Noiredd / PEGAS

Powered Explicit Guidance Ascent System - a KSP & RO autopilot using the Space Shuttle guidance algorithm, UPFG
http://forum.kerbalspaceprogram.com/index.php?/topic/142213-pegas-powered-explicit-guidance-ascent-system-devlog
MIT License
113 stars 31 forks source link

Events system overhaul #43

Closed Noiredd closed 2 years ago

Noiredd commented 2 years ago

I decided to go with #39 and this is what I came up with.

Things done here:

What this gives us is that now the entire sequence - this time meaning both the user defined events in sequence and PEGAS-scheduled staging events from vehicle, so the complete "launch sequence" if you will - is pretty much exactly deterministic and explicit. The system becomes much cleaner (one does no longer have to track userEventFlag, which is not triggered in any mainline code but by a mysterious and untraceable WHEN) and less prone to errors (what about two events scheduled to happen in rapid succession? this is potentially problematic in the comms subsystem). But the main reason is that now we have one place to look for all things that will happen in the future. And this means #37 is now possible.

I'll be updating this with future developments and if all goes well, merge it later this week.

PS: @Patrykz94 if you're still around here somewhere, would you mind taking this for a spin and checking if your booster recovery missions still work? I've never used comms myself, and while I believe I've done everything right, it'd put my mind at ease if you confirmed that it indeed still works as intended.

Closes #39

Noiredd commented 2 years ago

Okay it's done now and ready to be merged. No problems so far, tested with 2 vastly different vehicles so I'm fairly confident.