jsbsim.js
Version:
JSBSim flight dynamics model ported to JavaScript
35 lines (34 loc) • 1.72 kB
text/xml
<runscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sf.net/JSBSimScript.xsd"
ame="StellarJ">
<use aircraft="StellarJ" initialize="reset00"/>
<run start="0.0" end="400" dt="0.00833333">
<event name="Prepare engine">
<condition>simulation/sim-time-sec ge 0.25</condition>
<set name="propulsion/active_engine" value="-1"/>
<set name="fcs/throttle-cmd-norm[0]" action="FG_RAMP" value="0.3" tc="2.0"/>
<set name="fcs/throttle-cmd-norm[1]" action="FG_RAMP" value="0.3" tc="2.0"/>
<set name="fcs/throttle-cmd-norm[2]" action="FG_RAMP" value="0.3" tc="2.0"/>
<set name="fcs/throttle-cmd-norm[3]" action="FG_RAMP" value="0.3" tc="2.0"/>
<set name="propulsion/starter_cmd" value="1"/>
<notify/>
</event>
<event name="Start engine">
<condition>propulsion/n2[1] ge 15</condition>
<set name="propulsion/cutoff_cmd" value="0"/>
<set name="fcs/throttle-cmd-norm[0]" action="FG_RAMP" value="1.0" tc="0.05"/>
<set name="fcs/throttle-cmd-norm[1]" action="FG_RAMP" value="1.0" tc="0.05"/>
<set name="fcs/throttle-cmd-norm[2]" action="FG_RAMP" value="1.0" tc="0.05"/>
<set name="fcs/throttle-cmd-norm[3]" action="FG_RAMP" value="1.0" tc="0.05"/>
<notify/>
</event>
<event name="Set altitude target">
<condition>aero/qbar-psf ge 25.0</condition>
<set name="ap/altitude_setpoint" action="FG_EXP" value="50000.0" tc="3.0"/>
<set name="ap/altitude_hold" value="1"/>
<notify/>
</event>
</run>
</runscript>