PEGAS icon indicating copy to clipboard operation
PEGAS copied to clipboard

Support for hotstaging

Open VoreckLukas opened this issue 2 years ago • 1 comments

So for ullage, you can choose none, srb and rcs. But a hotstaging option where it presses spacebar a bit before the staging event to ignite the engine and then again at the staging event to jettison the previous stage would be nice

VoreckLukas avatar Jun 09 '22 08:06 VoreckLukas

Thanks for the suggestion.

Just to clearly understand what you'd like to achieve. While stage N is still burning, you'd want to hit spacebar a few seconds before it burns out, and then activate stage N+1 using a jettison-only sequence, since its engine is still running - correct?
If so, this might be a little tricky to implement, because staging events are tied to burn-out times of each stage. I'm currently reworking the event handler routine however, so I'll give this some consideration (another reason to decouple event handling from the staging sequence).

Noiredd avatar Aug 17 '22 16:08 Noiredd

I've got an experimental solution working: check out d085c66.

This adds a new ullage mode, "hot", which simply causes jettison and ignition to swap places. I've tested it with one vehicle and it seems to be working, but would be cool if someone confirmed it in their use case - @Voreck do you think you could?

I can see one place where this could go wrong: if the preceding stage burns out faster than it should, and there's no thrust anymore when the staging sequence starts. It would be relatively straightforward to correct on the vehicle side: simply reduce massFuel by a bit to convince PEGAS that the stage should burn out a little earlier. To fix this "properly" on PEGAS side, I'd have to implement some sort of negative delay on a hot-ignited stage, and a look-ahead to deal with such stages. Arguably more hassle than making just a little tweak in vehicle.

EDIT: I'll close this for now. If there are any problems with this, please reopen/comment and we'll have a look.

Noiredd avatar Sep 09 '22 20:09 Noiredd

Thanks for the suggestion.

Just to clearly understand what you'd like to achieve. While stage N is still burning, you'd want to hit spacebar a few seconds before it burns out, and then activate stage N+1 using a jettison-only sequence, since its engine is still running - correct? If so, this might be a little tricky to implement, because staging events are tied to burn-out times of each stage. I'm currently reworking the event handler routine however, so I'll give this some consideration (another reason to decouple event handling from the staging sequence).

Sorry, havent looked in here for a while

I've got an experimental solution working: check out d085c66.

This adds a new ullage mode, "hot", which simply causes jettison and ignition to swap places. I've tested it with one vehicle and it seems to be working, but would be cool if someone confirmed it in their use case - @Voreck do you think you could?

I can see one place where this could go wrong: if the preceding stage burns out faster than it should, and there's no thrust anymore when the staging sequence starts. It would be relatively straightforward to correct on the vehicle side: simply reduce massFuel by a bit to convince PEGAS that the stage should burn out a little earlier. To fix this "properly" on PEGAS side, I'd have to implement some sort of negative delay on a hot-ignited stage, and a look-ahead to deal with such stages. Arguably more hassle than making just a little tweak in vehicle.

EDIT: I'll close this for now. If there are any problems with this, please reopen/comment and we'll have a look.

Thank you for doing this, I actually didn't expect this project to be alive. I'll try it out once I can

VoreckLukas avatar Sep 12 '22 20:09 VoreckLukas

Yeah, sorry about the long delay but that's how it is with this project... half a year passes as I have zero free time to even touch it, and then suddenly find myself on a week long coding spree sorting out issues backlogged years ago. This time I want to get them all done, put a "v1.3" tag on it, release and call it finished.

Noiredd avatar Sep 13 '22 00:09 Noiredd