JSBSim 双流五边自动驾驶脚本 B737ZUUU.xml

初始化脚本: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="
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值