通用化数字飞机模块, 主要用于解决通用化无人机综合仿真中的数字飞机问题。
主要思路是通过标准化的独立接口实现和综合仿真系统的交互,主要功能有:
- 加入系统
- 退出系统
- 心跳信息
- 加载预先任务规划信息
- 加载动态规划信息
- 接收控制指令
- 接收操纵杆/油门杆消息
- 发送飞行参数消息
目前通用化数字飞机模块拟采用JSBSim来实现
通过修改相应飞机模型的XML文件(如c172x.xml)中的output段, 类似如下
<output name="localhost" type="SOCKET" port="1138" protocol="UDP" rate="20">
<simulation> OFF </simulation>
<atmosphere> OFF </atmosphere>
<massprops> OFF</massprops>
<rates> OFF </rates>
<velocities> OFF </velocities>
<forces> OFF </forces>
<moments> OFF </moments>
<position> OFF </position>
<propulsion> OFF </propulsion>
<aerosurfaces> OFF </aerosurfaces>
<fcs> OFF </fcs>
<ground_reactions> OFF </ground_reactions>
<coefficients> OFF </coefficients>
<property> position/h-agl-ft </property>
<property> velocities/vc-kts </property>
<property> attitude/phi-rad </property>
<property> fcs/attitude/sensor/phi-rad </property>
</output>
启动JSBSim的批处理文件类似如下
::Set the scriptname
set scriptname=c1723
::Del old outputlogfile
del -Q %scriptname%.csv
Release\JSBSim --script=scripts\%scriptname%.xml --realtime > JSBSim.out
pause
然后就可以用UDP监听工具在1138端口得到JSBSim的实时输出数据了