首页 > 解决方案 > FlightGear“致命异常无效字符串位置”运行 NASA 的 MATLAB 内置 HL-20 模型

问题描述

我一直在尝试运行 MATLAB 的 Aerospace 模块组的预配置 HL-20 模型。它应该在 FlightGear 中运行,但我遇到了“致命异常:无效字符串位置”错误,我什至无法打开模拟。当我尝试按原样使用它时,以及当我尝试为我打算与 NASA 的模型一起使用的新飞机模型更改文档和代码的“hl-20”作为基础开始时,都会发生这种情况。此名称更改是 YouTube 上一个教程的后续,该教程似乎在那里工作得很好。我一直在使用 R2018a 版本的 MATLAB 和 2017.3.1 版本的 FlightGear。我应该编辑的代码是:


<!-- ************************************************************************Flight Gear 0.9.3/0.9.8a config file for HL-20 network simulationCopyright 1990-2005 The MathWorks Inc.R. Aberg2004-MAY-17 ************************************************************************ -->

-<PropertyList>

<path>HL20.ac</path>


-<animation>

<type>rotate</type>

<object-name>NoseGear</object-name>

<property>/gear/gear[0]/position-norm</property>

<factor>-110</factor>

<offset-deg>110</offset-deg>


-<center>

<x-m>-2.57</x-m>

<y-m>0</y-m>

<z-m>-0.25</z-m>

</center>


-<axis>

<x>0</x>

<y>1</y>

<z>0</z>

</axis>

</animation>


-<animation>

<type>translate</type>

<object-name>NoseGear</object-name>

<property>/gear/gear[0]/compression-norm</property>

<factor>1</factor>


-<axis>

<x>0</x>

<y>0</y>

<z>1</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>RightMainGear</object-name>

<property>/gear/gear[1]/position-norm</property>

<factor>140</factor>

<offset-deg>-140</offset-deg>


-<center>

<x-m>1.17</x-m>

<y-m>1.34</y-m>

<z-m>-0.41</z-m>

</center>


-<axis>

<x>1</x>

<y>0</y>

<z>0</z>

</axis>

</animation>


-<animation>

<type>translate</type>

<object-name>RightMainGear</object-name>

<property>/gear/gear[1]/compression-norm</property>

<factor>1</factor>


-<axis>

<x>0</x>

<y>0</y>

<z>1</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>LeftMainGear</object-name>

<property>/gear/gear[2]/position-norm</property>

<factor>-140</factor>

<offset-deg>140</offset-deg>


-<center>

<x-m>1.17</x-m>

<y-m>-1.34</y-m>

<z-m>-0.41</z-m>

</center>


-<axis>

<x>1</x>

<y>0</y>

<z>0</z>

</axis>

</animation>


-<animation>

<type>translate</type>

<object-name>LeftMainGear</object-name>

<property>/gear/gear[2]/compression-norm</property>

<factor>1</factor>


-<axis>

<x>0</x>

<y>0</y>

<z>1</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>LeftUpperFlap</object-name>

<property>/surface-positions/elevator-pos-norm</property>

<factor>-60</factor>

<offset-deg>0</offset-deg>


-<center>

<x-m>2.61</x-m>

<y-m>-1.08</y-m>

<z-m>0.41</z-m>

</center>


-<axis>

<x>0</x>

<y>1</y>

<z>0</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>LeftLowerFlap</object-name>

<property>/surface-positions/flap-pos-norm</property>

<factor>60</factor>

<offset-deg>0</offset-deg>


-<center>

<x-m>2.61</x-m>

<y-m>-1.08</y-m>

<z-m>-0.51</z-m>

</center>


-<axis>

<x>0</x>

<y>1</y>

<z>0</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>RightUpperFlap</object-name>

<property>/surface-positions/spoilers-pos-norm</property>

<factor>-60</factor>

<offset-deg>0</offset-deg>


-<center>

<x-m>2.61</x-m>

<y-m>1.01</y-m>

<z-m>0.41</z-m>

</center>


-<axis>

<x>0</x>

<y>1</y>

<z>0</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>RightLowerFlap</object-name>

<property>/surface-positions/speedbrake-pos-norm</property>

<factor>60</factor>

<offset-deg>0</offset-deg>


-<center>

<x-m>2.61</x-m>

<y-m>1.01</y-m>

<z-m>-0.51</z-m>

</center>


-<axis>

<x>0</x>

<y>1</y>

<z>0</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>Rudder</object-name>

<property>/surface-positions/rudder-pos-norm</property>

<factor>15</factor>

<offset-deg>0</offset-deg>


-<center>

<x-m>2.09</x-m>

<y-m>0</y-m>

<z-m>0.7</z-m>

</center>


-<axis>

<x>0</x>

<y>0</y>

<z>1</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>RightAileron</object-name>

<property>/surface-positions/right-aileron-pos-norm</property>

<factor>30</factor>

<offset-deg>0</offset-deg>


-<center>

<x-m>3.13</x-m>

<y-m>2.34</y-m>

<z-m>0.93</z-m>

</center>


-<axis>

<x>0.56</x>

<y>0.86</y>

<z>0.93</z>

</axis>

</animation>


-<animation>

<type>rotate</type>

<object-name>LeftAileron</object-name>

<property>/surface-positions/left-aileron-pos-norm</property>

<factor>30</factor>

<offset-deg>0</offset-deg>


-<center>

<x-m>3.13</x-m>

<y-m>-2.34</y-m>

<z-m>0.93</z-m>

</center>


-<axis>

<x>0.56</x>

<y>-0.86</y>

<z>0.93</z>

</axis>

</animation>

</PropertyList>


<!-- ************************************************************************Flight Gear 0.9.3/0.9.8a config file for HL-20 network simulationBackground information: http://oea.larc.nasa.gov/PAIS/HL-20.htmlCopyright 1990-2015 The MathWorks Inc.R. Aberg2003-NOV-26 ************************************************************************ -->

-<PropertyList>


-<sim>

<description>NASA HL-20 Personnel Launch System</description>

<flight-model>network</flight-model>


-<model>

<path>Aircraft/HL20/Models/HL20.xml</path>

</model>


-<systems>


-<electrical>

<path>Aircraft/Generic/generic-electrical.xml</path>

</electrical>

</systems>

<!-- The following piece of code sets the default view as the chase view -->



-<current-view>

<view-number type="int">2</view-number>

</current-view>

</sim>

</PropertyList>

先感谢您!

标签: cssxmlmatlab

解决方案


推荐阅读