Some nice steps.
The gamma thing works quite well coupled to Hdot PID
I fixed TMECO by setting correct 100 % thrust and some other minor stuffs .
Initial MECO altitude is 345000 feet now.
Here targeting for a 0.23 ° path at MECO and a 125 Nm apogee ( MECO Vi is the variable then)
Close enough
I did a wide range of tests, different payloads, and loft. Apart the need to adjust sometimes the second stage angle in mission.xml, it is on the spot, especially with the h dot guidance that Thorsten made, putting us back on the good traj with some slight altitude deviations.
I also adjusted the TAL MECO altitude at 360000 feet and a very shallow fligh path angle ( 50 ft/s) like in books. Working very well.
It works well with lofting and MPS/SRB angle bias
Here loft of 60000 feet for a MECO at 400000 feet ( like first STS missions)
I almost finish the first stage opened loop.
Path is less lofted at SRB sep ( 30 ° vs 45 ° before, hence the need to modify a bit stage 2 initial Pitch target)
Really close to real datas, and adjustable with SRB loft angle.
Also , I added a more lofted traj ( 35 °) in case of an early engine failure to not be too far for RTLS selection at 2mn30 ( based on real datas also)
Here at max Q after an 180 ° roll ( so even more margin with no roll and heading 270 for lift off)