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
114 stars 31 forks source link

Setting postlaunch task #28

Closed Patrykz94 closed 2 years ago

Patrykz94 commented 6 years ago

One feature that I feel would be useful is being able to set what happens after PEGAS has completed the ascent.

This could be done by adding some kind of optional parameter to the mission file to specify what to do once PEGAS has done it's job (successfully?), i.e. PEGAS CPU could run a program, send a message or simply stage.

This would make it possible to automate the whole mission by having PEGAS do the launch and after that run a program responsible for on-orbit operations, or send a message to the payload confirming that it's safe to decouple.

Noiredd commented 5 years ago

My apologies for a very late reply. I am currently very busy with other projects and, sadly, I admit I have neglected PEGAS. I will try to be more attentive of it in the future.

I like this idea -- it reminds me of #15, and indeed if I was ever to implement such a system, I would first want to create a richer system for general user events and then derive a post-launch event from that. It could use the same event dispatch interface as any other event (is it a roll command, a throttle, and action group, a function, script name?), the only difference would be timing.

Being completely honest though, I don't have the time to actively work on any of this. Maybe later this year I will have the time to get back to PEGAS and hack away on a feature like this, but I don't want to make a promise I can't keep. If you want to implement something like this, I'm :+1: on it - my only request would be to keep in touch and figure out a good way to do this.

Noiredd commented 3 years ago

Following all of the recent discussions: should this be a part of PEGAS as a framework, or should we consider implementing it as an addon?

Noiredd commented 2 years ago

I thought about this for a while and arrived at the conclusion that addon system provides enough flexibility to accomplish this. One doesn't even have to implement a whole separate addon for this: simply call registerHook(myPostLaunchTask@, "final"). to have your delegate called after everything else is done. Do this in the same place you define your mission and voila. No need for extra code in PEGAS itself.