LUA Shuttle Atlantis launch.lua modifications

GlassTrain

New member
Joined
Jul 14, 2011
Messages
3
Reaction score
0
Points
0
I decided take Martin's challenge and see if I could modify the original launch.lua file to 'improve' it. Thank you Martin for the base file. Also, thanks to Dave for the Shuttle Fleet. Kept launching his Shuttles for reference, over and over taking notes.

Attached is the result. Please, leave feedback and point to improvements that can be made to it!

*It usually ends for me (all Realism and Perturbations checked) at a Perigee of 60km and an Apogee 'around' 175 - 220km. I did away with the altitude hold portion and set the heads up-MECO attitude manually because after modding it, the altitude program sometimes set the apogee behind the shuttle and sent it screaming towards a perigee of 60km or lower. Good news for the fuel tank, bad news for Atlantis.

Also, most testing was done with an azimuth of 138*RAD (aiming for the ISS, of course!). By default, the do_oms1/do_oms2 portions are set to false.
 

Attachments

  • launch.txt
    8.8 KB · Views: 30

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
Hi GlassTrain,

thanks a lot for this 'enhanced' atlantis/launch.lua !
I chose it for my first look at Lua for Orbiter.

I did some modifications (by far not perfect) to it to check what can be done.
Attached you'll find my modifed script.
This is what I did:

  • Added helper-function 'kill_all_thrust' (quite obvious what it does, right? ;) )
  • Added an 'improved' version of martins 'setdir' function ('_setdir'). It only has a 'p0' parameter that enables to set a pitch angle offset to the direction-vector. Here I set it to ca. 15 degrees to compensate for the OMS-offset.
  • The OMS1 and OMS2 are enabled per default.
  • The OMS1 burn is skipped if not needed

Note however, that I only tried some things here. So it is far away from a good ascent autopilot ;)

Nevertheless, thanks again for your input.

Regards,
Kuddel
 

Attachments

  • launch2.txt
    11.3 KB · Views: 27
Last edited:

GlassTrain

New member
Joined
Jul 14, 2011
Messages
3
Reaction score
0
Points
0
Thank you for the modifications Kuddel!

I see that you combined the 'THGROUP RESET' portion into one function.:thumbup:

Some reasoning for the modifications I made to the OMS portions:

*During time compression, the OMS 1 and 2 functions would leave the RCS thrusters still firing after the functions were complete. Unfortunately for me, even after adding the THGROUP RESET portions, this still happens on occasion. Maybe it has something to do with time compression skipping kill steps within in the function.

*The original OMS 1 function uses the 'azimuth=___*RAD' input for setting it's burn direction. Not helpful if the new ascent portion actually puts Atlantis within 1.5 degrees inclination of a target when it completes (in this case ISS). Prograde is best, of course. Eventually, once I tired of messing with the launch.lua and had a reasonably accurate ascent portion, I set the OMS 1/2 to 'false' and manually do any additional burns with Attitude MFD set to 'Velocity' (with +15 degrees in pitch). :lol:

On another note, depending on which way the roll to heads up initiates (flip a coin between clockwise/counterclockwise), it can really be a source of inconsistency to the Shuttle's ending inclination. A perfect roll would rotate around the thrust angle of +15 degrees. Dave's Shuttle Fleet actually compensates for this within the GPCMFD ascent program if I'm not mistaken. Anyway, not sure how to even force it to rotate a certain direction, much less around the thrust axis. As it stands, it seems that the bank and yaw programs never really stay at a perfect 0, instead swinging back and forth between plus and minus just enough to make rolling upright rather unpredictable.
 
Top