初始化脚本:resetZUUU_runway.xml 放置到 $USER_PATH$\aircraft\737\resetZUUU_runway.xml
<?xml version="1.0"?>
<initialize name="resetZUUU">
<!--
This file sets up the aircraft to start off
from the runway in preparation for takeoff.
-->
<ubody unit="M/SEC"> 0.0 </ubody>
<vbody unit="FT/SEC"> 0.0 </vbody>
<wbody unit="FT/SEC"> 0.0 </wbody>
<latitude unit="DEG" type="geodetic"> 30.563518 </latitude>
<longitude unit="DEG"> 103.940091 </longitude>
<phi unit="DEG"> 0.0 </phi>
<theta unit="DEG"> 0.0 </theta>
<psi unit="DEG"> 21.87 </psi>
<altitudeAGL unit="M"> 1.13 </altitudeAGL>
<elevation unit="M"> 494 </elevation>
<trim> 1 </trim>
</initialize>
运行脚本:放置到 $USER_PATH$\AircraftSimulation\scripts\B737TakeoffZUUU.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sf.net/JSBSimScript.xsl"?>
<runscript name="B737 take off from ZUUU autopilot testing, edited by Sherlock at CDATC. autopilot B737TakeoffZUUU.xml">
<description>For testing CDATC autopilot capability</description>
<use aircraft="737" initialize="resetZUUU_runway"/>
<run start="0.0" end="25000" dt="0.02">
<property value="0">simulation/notify-time-trigger</property>
<event name="Start engine">
<description>
Start engine and set initial heading and waypoints, turn on heading-hold mode.
</description>
<condition>simulation/sim-time-sec ge 0.25</condition>
<set name="fcs/left-brake-cmd-norm" value="0"/>
<set name="fcs/right-brake-cmd-norm" value="0"/>
<set name="fcs/center-brake-cmd-norm" value="0"/>
<set name="propulsion/starter_cmd" value="1"/>
<set name="fcs/throttle-cmd-norm[0]" value="0.4"/>
<set name="fcs/throttle-cmd-norm[1]" value="0.4"/>
<set name="ap/altitude_setpoint" action="FG_EXP" value="10000" tc="1.0"/><!--feet-->
<set name="ap/attitude_hold" value="0"/>
<set name="guidance/target_wp_latitude_rad" value="0.544148644851473"/>
<set name="guidance/target_wp_longitude_rad" value="1.819126078368226"/>
<set name="ap/heading_setpoint" value="21.87"/>
<set name="ap/heading-setpoint-select" value="0"/>
<set name="ap/heading_hold" value="0"/>
<set name="ap/active-waypoint" value="0"/>
<notify>
<property caption="Latitude ">position/lat-geod-deg</property>
<property caption="Longitude ">position/long-gc-deg</property>
<property caption="Airspeed (keas) ">velocities/ve-kts</property>
</notify>
</event>
<event name="Steering and Elevator Command Test">
<condition>simulation/sim-time-sec ge 1.0</condition>
<set name="fcs/steer-cmd-norm" action="FG_RAMP" value="0.0" tc="1"/>
<!-- set name="fcs/elevator-cmd-norm" action="FG_RAMP" value="-0.5" tc="1"/ -->
<set name="fcs/flap-cmd-norm" action="FG_RAMP" value="0.5" tc="10"/>
<set name="fcs/flap-pos-deg" action="FG_RAMP" value="12.0" tc="10"/>
<notify>
<property>fcs/elevator-pos-deg</property>
<property>fcs/flap-pos-deg</property>
</notify>
</event>
<event name="Advance Throttle">
<condition>simulation/sim-time-sec ge 10.0</condition>
<set name="propulsion/cutoff_cmd" value="