Feature Request: SRB's TWR
Kowgan opened this issue ยท 4 comments
I've been using Crzyrndm's mod, SRB Variable Thrust Limiter, which allows SRBs' thrust to decrease as they burn fuel.
With that, I'm trying to achieve the effect of decoupling the SRBs when the TWR they provide is equal or lower than the TWR provided by the main engine (not counting the SRB's mass). The calc is supposedly simple to make, but I just don't know how to put that into code. More info here.
I don't know what would be the best way to do this, but this is the idea I have in mind:
- The module would detect the SRB with most fuel (in case you're using different sized SRBs at the same time; just to avoid catastrophic explosions) that will be decoupled in the next stage;
- The module would acquire the TWR of that SRB only (stored here as TWR1);
- It would acquire the rest of the vessel's mass, despising the to-be-detached SRBs' mass (This might be tricky. I don't know what would be the best procedure to achieve this);
- Calculate the main engine(s)'s current TWR, based on the mass above (that means, discarding the SRBs' masses) (stored here as TWR2);
- Calculate TWR1 - TWR2 and display that number as a result.
So, once this number reaches zero, that means both the SRBs and the main vessel are currently producing the same TWR, and decoupling the SRBs wouldn't make them fly straight up. Instead, they would gently move away and down from the vessel.
Quick note: The gravity can be discarded in all of the TWR calculations in this module, since they all cancel each other when comparing values.
I can currently calc that by hand, but there's no automated way to do it, requiring me to pause the game in order to calc the current TWR difference, or having a pre-planned, specific trajectory during launch. Which is why I'm asking for this feature. Thank you for reading!
The video you link to is super slick, and reversed my skepticism that this is a feature worth pursuing. I assume you just make the thrust start at maximum and taper off to zero just before the end, so you don't need a fancy calculator to tell you how much propellant to load. You just want to decouple them at the moment of lowest stress, to prevent your rocket from pogoing. I love it!
Another way to describe the condition you want is the moment when, if the SRB and the main stack were not connected to each other, they would hover next to each other. Their accelerations would be the same even decoupled. That means that at this moment you can decouple them without changing the vertical force on the rocket. This is how real rockets are designed.
Of course, this is impossible with stock engines and SRBs, unless you have the main engine throttled WAY down until right before your SRB flames out. The standalone acceleration of stock SRBs gets huge near the end of their propellant, so if they are on the first stage of a large rocket with a reasonable main engine, they are never a burden before they run out of fuel. Then you are guaranteed a step-change in the vertical acceleration, either when they flame out or when you decouple them prematurely. But with a realistic thrust profile in the SRBs, it is easy to accomplish a smooth transition.
Of course, in real rockets they DO pre-plan every trajectory, so they know exactly how many seconds both rockets must burn before decoupling. One option is to write yourself a calculator outside of KSP to find this number for a given combination of central stack and SRB mass, fuel and thrust.
This idea is cool enough that I might actually try writing it myself and submitting it as a pull request. It would be buried in an option pane to enable when staging SRBs. But first I have to learn how to set up the build environment... ugh.
Realism overhaul already implements thrust curves in some of it's SRB's and the interaction with MJ is indeed a little wonky. It would be great if we could get this.
@sarbian any input on this by any chance? Thanks.