Space Shuttle

The Space Shuttle package simulates many systems and comes with automation for ascent, entry and final approach. The whole story is in the article Space Shuttle von Kennedy nach Leipzig (German). This page has the parts you need for your own script. The values come from my flights.

Space Shuttle lifting off from Kennedy Space Center

Launch

"$FG_BASIS/werkzeuge/starten.sh" --aircraft=SpaceShuttle-launch \
  --lat=28.6206 --lon=-80.6133 --heading=270 --disable-real-weather-fetch

Before ignition you need the APU sequence from the Pre-launch checklist, otherwise the launch aborts (“Lockup of engine”). The ignition itself runs through Nasal:

fg.nasal("SpaceShuttle.ignition();")

Load the outside view beforehand if your script needs it. FlightGear can stall on the first switch, once for about 50 seconds in my case. If that happens with the engines running, the orbit ends up too low. So switch before ignition and wait until /sim/frame-rate has been stable again for a few seconds.

OMS: don’t forget the heating

The OMS ignites only from 60 % thrust, and the throttle depends on the condition of the fuel line. Without heating, that condition degrades below 275 K, for me down to 1.7 %. So right after tank separation:

fg.nasal("SpaceShuttle.thermal_control_on();")

And check the thrust after every burn instead of just waiting.

Turn before entry

After the deorbit burn the Shuttle flies backwards. In thin air the entry control has only 10 % of its yaw authority; if you turn there, it oscillates and empties the aft RCS. So, as with the real Shuttle, turn beforehand, still in orbital control:

fg.nasal('SpaceShuttle.orbital_dap_manager.control_select("INRTL");')
tempo = min(2.5, grad * 0.15)   # degrees per second, slower close to the target

Note: the sign for yaw is reversed between orbital and entry control. My target from 175 km was 40° angle of attack; the attitude was set by 135 km.

Entry point

With my target, about 4300 nm before the landing site worked. At only 3340 nm the Shuttle had too much energy, the guidance rolled up to 120° and the heat shield failed. Above 90° of bank it generally gets dangerous.

Add a landing site

The package only knows a list of sites. A new site goes at the end of Nasal/landing_sites.nas. Back up the file first, since a package update overwrites it. The example shows Leipzig/Halle; you must adapt the index and values:

var coord94 = geo.Coord.new();
coord94.set_latlon(51.4128, 12.2304, 0.0);
var ls_entry94 = landing_site_entry.new(coord94, "Leipzig Halle", "LEJ", "08R", "26L", "emergency", 94);
ls_entry94.tacan = "111";
ls_entry94.TAEM_pri_lat = 51.411608;
ls_entry94.TAEM_pri_lon = 12.204648;
ls_entry94.TAEM_pri_heading = 85.7;
ls_entry94.TAEM_pri_elevation = 465.0;
ls_entry94.TAEM_pri_MLS_flag = 0;
ls_entry94.TAEM_pri_MLS_channel = -1;
ls_entry94.TAEM_sec_lat = 51.414026;
ls_entry94.TAEM_sec_lon = 12.256247;
ls_entry94.TAEM_sec_heading = 265.7;
ls_entry94.TAEM_sec_elevation = 465.0;
ls_entry94.TAEM_sec_MLS_flag = 0;
ls_entry94.TAEM_sec_MLS_channel = -1;
ls_entry94.TAEM_rwy_length = 3589.0;
append(landing_site_data.array, ls_entry94);

For the automation to know the site on approach as well, Nasal/automatic_approach_setup.nas needs a matching branch for the airport. Use the existing entries there as a template.

Master Alarm

It goes off several times in flight. Harmless in my case: hydraulics before APU start, freon that was too cold and “SSME REPOS FAIL”. It gets serious with “Thermal protection failure” or when the bank stays above 90° for long.