I have posted on OrbitHangar a Java program which performs the multi-stage PEG algorithm, and contains other improvements which should make it more accurate and efficient, even for a single stage. It is a more-complete, but still not complete, implementation of the original PEG document.
This one, if you tell it how long a lower stage will burn, and what the initial acceleration and Isp of the upper stage are, will use both stages in an optimum-ish manner to achieve the target.
It is also capable of targeting the moon, for Ranger or Surveyor direct ascent missions. It is capable of flying one or two stages.
The original document contains a program for yaw steering, and an extension to an unlimited number of stages. I have not implemented these, but they should be pretty easy.
I have been working on this now for four years and have become sick of it. I can't even bring myself to update PEGAutopilot to use it. So, I'm putting it out there in the hopes that the Launch MFD guys will run with it. Anyone else can too, subject to the Library GPL.
This one, if you tell it how long a lower stage will burn, and what the initial acceleration and Isp of the upper stage are, will use both stages in an optimum-ish manner to achieve the target.
It is also capable of targeting the moon, for Ranger or Surveyor direct ascent missions. It is capable of flying one or two stages.
The original document contains a program for yaw steering, and an extension to an unlimited number of stages. I have not implemented these, but they should be pretty easy.
I have been working on this now for four years and have become sick of it. I can't even bring myself to update PEGAutopilot to use it. So, I'm putting it out there in the hopes that the Launch MFD guys will run with it. Anyone else can too, subject to the Library GPL.
