Jump to content

[1.3] Smartstage, intelligent VAB reset button 2.9.7


xytovl

Recommended Posts

  • 2 months later...

I am currently working on a full simulation version. I have published on github preliminary work: the plugin will now do a numerical integration of rocket launch and compute stages interactively.

The aim is to be able to plot rocket performance: TWR, altitude over time. And also catch some corner cases where we need to limit thrust and it would mess with stage times.

My plan is to have the following controls:

*departure planet selection

*limit to terminal velocity checkbox

*limit acceleration field

Are there other features that you would like to see in an upcoming version ?

Link to comment
Share on other sites

I am currently working on a full simulation version. I have published on github preliminary work: the plugin will now do a numerical integration of rocket launch and compute stages interactively.

The aim is to be able to plot rocket performance: TWR, altitude over time. And also catch some corner cases where we need to limit thrust and it would mess with stage times.

My plan is to have the following controls:

*departure planet selection

*limit to terminal velocity checkbox

*limit acceleration field

Are there other features that you would like to see in an upcoming version ?

The new features sound very promising, I frankly can't think of anything I would like to see added. I really like the simplicity of Smartstage and I wouldn't want to see it bloated with unnecessary features.

Smartstage, as it exists right now, is extremely helpful and solves a major gameplay problem that still exists in stock KSP (ie: the staging process). Staging is probably my least favorite part of the vessel design process (and KSP as a whole) because I can usually figure out my staging in a matter of seconds but Stock KSP's lack of efficient editing tools and it's generally bad UI design/visual cues (ie: bad part highlighting which makes tracking down the part associated with a specific staging icon a truly maddening process(The "Part Highlighter" mod makes this problem much more bearable)) makes the staging process an extremely boring and repetitive task that takes an absurd amount of time to complete and test. Smartstage has made the whole process much less frustrating and allows me to spend more time doing the things I actually enjoy in KSP.

Smartstage has been an essential mod for me for a while. I consider it as important as mods like Editor Extensions, Part Highlighter, NavHud, FAR, Kerbal Joint Reinforcement, etc. So I hope to see its continued development and support. I remain mystified by the lack of responses on this thread considering the quality of the mod. But maybe it just works so well that almost no one needs to post on this thread to ask questions or seek assistance :)

Link to comment
Share on other sites

I need to check whether this is a good alternative to AutoAsparagus, which is much more constrained in scope.

xytovl , would you mind adding an entry at kerbalstuff for your addon too? CKAN can pick up releases at github, but full kerbalstuff is better integrated :)

Link to comment
Share on other sites

I have reached a state where I can publish a first beta of version 2.0

You can grab it here or compile latest version from my github repository

The major change is that there is now an advanced mode where you tell the planet, terminal velocity limitation and maximum acceleration, the mod will simulate the launch in order to know the pressure over time and required throttle. If you have mixed solid boosters and liquid fuel it could change the relative staging, problem is now solved. It can also make a difference for engines with very different ISP at sea level.

In this first beta, user interface is horrible I know, plot looks disgusting and there will be bugs.

@hakan:

Autoasparagus has a different philosophy, it will modify your rocket to make it asparagus staged.

I believe that putting the parts together is a fun part of KSP, so SmartStage will just help you arranging the stages, and only the staging.

I will have a look at kerbalstuff when 2.0 final is ready.

@Deems19

I am happy to see I am not the only one using the mod :)

Link to comment
Share on other sites

I have implemented classes to compute fuel flow, throttle control and numerical integration (still the limit to terminal velocity is not accurate enough). It would be possible to reuse them just to compute and plot data.

For the moment I do not plan to implement the "plot only" feature, maybe when I have some time to waste.

When you say it scrambles some stages, do you have .craft files where the computed staging is incorrect? I may find a way to improve decision making in the algorithm.

Link to comment
Share on other sites

The issue with your craft is that fuel flow does not happen correctly. Interstage fairings either do not alow crossfeed at all, and tanks placed over it are unused or they allow crossfeed and fuel from the upper stage is drained.

If you are using an additional mod to change fuel rules, this is not supported by SmartStage, and plots would be completeley wrong too :(

The second issue is the launch escape system, SmartStage should just ignore it and it should keep the same stage number it had. I'll see if I can do anything about that.

Link to comment
Share on other sites

Question, I use FASA Launchclamps for many of my rockets (FASA is the core parts mod I use.) How does your plugin deal with launch clamps that mount under the engines or mount high on the rocket?

THANKS this mod looks amazing and I am curious how it will help with my big Nova rocket builds.

Link to comment
Share on other sites

The plugin checks the part modules and if there is a "LaunchClamp", the part is activated at the beginning and not used during simulation.

The part definitions in FASA launchclamps (.cfg files) contain the MODULE { name = LaunchClamp} section so it should be ok.

Link to comment
Share on other sites

@miceliux:

the window appears just by hovering the icon, clicking it will compute staging. I could not find any better way to allow staging with one click but have more advanced options.

@Sirrobert:

Yes it works with any odd combination you could imagine. It works by simulating fuel consumption over time and firing individual decouplers as soon as the parts attached to it contain no fuel. If you have any craft that does an unexpected staging, you can provide the file and I'll try to fix the algorithm.

Link to comment
Share on other sites

@miceliux:

the window appears just by hovering the icon, clicking it will compute staging. I could not find any better way to allow staging with one click but have more advanced options.

But when you hover out, the window persists. In other mods, when you hover out, the window closes.

You can pin the window actually clicking in the icon. Just seems like an inconsistent behaviour to me.

Anyway, thanks for your work.

Link to comment
Share on other sites

@hakan:

Autoasparagus has a different philosophy, it will modify your rocket to make it asparagus staged.

I believe that putting the parts together is a fun part of KSP, so SmartStage will just help you arranging the stages, and only the staging.

AutoAsparagus originally only did staging. I hated staging sepratrons!! Creating fuel lines was a secondary feature added later. :)

AutoAsparagus won't modify existing fuel lines, so if you already have fuel lines on the rocket, AutoAsparagus winds up only doing the staging. I actually originally had separate buttons for "add fuel lines" and "staging" so you could do just one or the other, but people complained that it was too complicated. Really! So I went for the one-button-does-it-all approach, which internally just goes through the steps listed in the original window. Compare:

wbWSwAL.pngIVfW2jl.png

I took a peek at your code to see if you've discovered any awesome staging tricks (or ship refreshing tricks), but I just see part.inverseStage, Staging.SetStageCount(), and Staging.SortIcons(), which is what I eventually found (KSP's mod documentation is.. uh.. not exactly complete).

Your code does look significantly more well-designed and comprehensive.. my code was 99% seat-of-the-pants "let's try this method!" and "I can't believe it works!" :D

My block of code that figures out the start and end points of the fuel lines especially reminded me of Edison's quote "I have not failed. I've just found 10,000 ways that won't work." :D


//f.direction=(f.transform.position - destTank.transform.position).normalized;
//f.direction = f.transform.localRotation * f.transform.localPosition; // only works if destTank is parent
//f.direction = (f.transform.InverseTransformPoint(destTank.transform.position) - f.transform.localPosition).normalized; // works but crooked
//f.direction = (f.transform.InverseTransformPoint(destPosition) - f.transform.localPosition).normalized; // doesn't connect
//f.direction = (f.transform.InverseTransformPoint(destPosition) - f.transform.localPosition); // doesn't connect
f.direction = f.transform.InverseTransformPoint (destTank.transform.position).normalized; // correct!

I will say your isSepratron() is interesting - what does it do with a lander launched upside-down (engines pointing to the sky) on top of a booster rocket? I suppose looking at the angle is more flexible than just checking the part name for "sepMotor". I just discovered that there are modded fuel lines yesterday, so.. maybe there are modded sepratrons too?

Link to comment
Share on other sites

I imagine the best way to use this mod with complex complete missions with landers like you describe would be to first design your payload, however you need to to accomplish the mission, and look at it's rough size and gross weight. Then in a new craft file design the lift vehicle, using dead weight place holders....there are part mods for this, so that this algorithm is only concerned with one rocket at a time.

EDIT: http://forum.kerbalspaceprogram.com/threads/76231-0-24-x-Kerbal-NRAP-Procedural-test-weights%21-v1-5-0-1-03-08-14

Edited by Errol
Link to comment
Share on other sites

I imagine the best way to use this mod with complex complete missions with landers like you describe would be to first design your payload, however you need to to accomplish the mission, and look at it's rough size and gross weight. Then in a new craft file design the lift vehicle, using dead weight place holders....there are part mods for this, so that this algorithm is only concerned with one rocket at a time.

EDIT: http://forum.kerbalspaceprogram.com/threads/76231-0-24-x-Kerbal-NRAP-Procedural-test-weights%21-v1-5-0-1-03-08-14

Looks like just what I need.

Link to comment
Share on other sites

AutoAsparagus originally only did staging. I hated staging sepratrons!! Creating fuel lines was a secondary feature added later. :)

I will say your isSepratron() is interesting - what does it do with a lander launched upside-down (engines pointing to the sky) on top of a booster rocket? I suppose looking at the angle is more flexible than just checking the part name for "sepMotor". I just discovered that there are modded fuel lines yesterday, so.. maybe there are modded sepratrons too?

The main reason I did that is because I hate comparing strings, the compiler won't notice if Squad decides to change a name and it will be hard to find the problem...

If you have a lander upside down, the engines will get activated when they get separated from the root part. As it is likely not to happen, staging will not be changed for that part and you will probably find it in the first stage.

I can not imagine a generic way of staging an upside down part of the rocket.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...