自前の飛行機づくりに挑戦・3
【実際】
〔Step1:The Engine configurationの入力と生成したエンジンファイル(/juef128/Engines/HeS_011.xml)について〕
・Step1:The Engine configurationの入力
↑aeromaticによるフライトモデル(JSBSim)の作成:Step1
・生成したエンジンファイル(/juef128/Engines/HeS_011.xmlとして保存)
<?xml version="1.0"?>
<!--
File: HeS_011.xml
Author: Aero-Matic v 0.82
Inputs:
name: HeS_011
type: turbine
thrust: 2700 lb
augmented? no
injected? no
-->
<turbine_engine name="HeS_011">
<milthrust> 2700.0 </milthrust>
<bypassratio> 1.0 </bypassratio>
<tsfc> 0.8 </tsfc>
<bleed> 0.03</bleed>
<idlen1> 30.0 </idlen1>
<idlen2> 60.0 </idlen2>
<maxn1> 100.0 </maxn1>
<maxn2> 100.0 </maxn2>
<augmented> 0 </augmented>
<injected> 0 </injected>
<function name="IdleThrust">
<table>
<independentVar lookup="row">velocities/mach</independentVar>
<independentVar lookup="column">atmosphere/density-altitude</independentVar>
<tableData>
-10000 0 10000 20000 30000 40000 50000 60000
0.0 0.0430 0.0488 0.0528 0.0694 0.0899 0.1183 0.1467 0
0.2 0.0500 0.0501 0.0335 0.0544 0.0797 0.1049 0.1342 0
0.4 0.0040 0.0047 0.0020 0.0272 0.0595 0.0891 0.1203 0
0.6 0.0 0.0 0.0 0.0 0.0276 0.0718 0.1073 0
0.8 0.0 0.0 0.0 0.0 0.0474 0.0868 0.0900 0
1.0 0.0 0.0 0.0 0.0 0.0 0.0552 0.0800 0
</tableData>
</table>
</function>
<function name="MilThrust">
<table>
<independentVar lookup="row">velocities/mach</independentVar>
<independentVar lookup="column">atmosphere/density-altitude</independentVar>
<tableData>
-10000 0 10000 20000 30000 40000 50000 60000
0.0 1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 0
0.2 1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 0
0.4 1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 0
0.6 1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 0
0.8 1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 0
1.0 1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 0
1.2 1.4850 1.2300 0.9750 0.7440 0.5450 0.3640 0.2250 0
1.4 1.5941 1.3400 1.0860 0.8450 0.6280 0.4240 0.2630 0
</tableData>
</table>
</function>
</turbine_engine>
〔step3:The Aero configurationの入力と生成したフライトモデルファイル(/juef128/juef128.xml)について〕
・step3:The Aero configurationの入力
↑aeromaticによるフライトモデル(JSBSim)の作成:Step3
・生成したフライトモデルファイル(/juef128/juef128.xmlとして保存)の抜粋
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://jsbsim.sourceforge.net/JSBSim.xsl"?>
<fdm_config name="juef128" version="2.0" release="ALPHA"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
<fileheader>
<author> Aeromatic v 0.91 </author>
<filecreationdate> 2011-07-10 </filecreationdate>
<version>$Revision: 1.10 $</version>
<description> Models a juef128. </description>
</fileheader>
<!--
File: juef128.xml
Inputs:
name: juef128
type: single-engine transonic/supersonic fighter
max weight: 8989.785 lb
wing span: 29.2009 ft
length: 23.13105 ft
wing area: 189.464 sq-ft
gear type: tricycle
retractable?: yes
# engines: 1
engine type: turbine
engine layout: aft fuselage
yaw damper? yes
Outputs:
wing loading: 47.45 lb/sq-ft
CL-alpha: 3.5 per radian
CL-0: 0.08
CL-max: 1
CD-0: 0.021
K: 0.12
-->
<metrics>
<wingarea unit="FT2"> 189.46 </wingarea>
<wingspan unit="FT" > 29.20 </wingspan>
<wing_incidence> 2.00 </wing_incidence>
<chord unit="FT" > 6.49 </chord>
<htailarea unit="FT2"> 37.89 </htailarea>
<htailarm unit="FT" > 9.25 </htailarm>
<vtailarea unit="FT2"> 22.74 </vtailarea>
<vtailarm unit="FT" > 9.25 </vtailarm>
<location name="AERORP" unit="IN">
<x> 166.54 </x>
<y> 0.00 </y>
<z> 0.00 </z>
</location>
<location name="EYEPOINT" unit="IN">
<x> 55.51 </x>
<y> 0.00 </y>
<z> 36.00 </z>
</location>
<location name="VRP" unit="IN">
<x>0</x>
<y>0</y>
<z>0</z>
</location>
</metrics>
<mass_balance>
<ixx unit="SLUG*FT2"> 2603 </ixx>
<iyy unit="SLUG*FT2"> 2745 </iyy>
<izz unit="SLUG*FT2"> 4588 </izz>
<emptywt unit="LBS" > 5394 </emptywt>
<location name="CG" unit="IN">
<x> 166.54 </x>
<y> 0.00 </y>
<z> -6.94 </z>
</location>
</mass_balance>
<ground_reactions>
<contact type="BOGEY" name="NOSE">
<location unit="IN">
<x> 36.08 </x>
<y> 0.00 </y>
<z> -33.31 </z>
</location>
<static_friction> 0.80 </static_friction>
<dynamic_friction> 0.50 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 2696.94 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 898.98 </damping_coeff>
<max_steer unit="DEG"> 5.00 </max_steer>
<brake_group>NONE</brake_group>
<retractable>1</retractable>
</contact>
(略)
</ground_reactions>
<propulsion>
<engine file="HeS_011 ←元の <engine file="juef128_engine">から書き換え
<location unit="IN">
<x> 217.57 </x>
<y> 0.00 </y>
<z> 0.00 </z>
</location>
<orient unit="DEG">
<pitch> 0.00 </pitch>
<roll> 0.00 </roll>
<yaw> 0.00 </yaw>
</orient>
<feed>0</feed>
<thruster file="direct">
<location unit="IN">
<x> 217.57 </x>
<y> 0.00 </y>
<z> 0.00 </z>
</location>
<orient unit="DEG">
<pitch> 0.00 </pitch>
<roll> 0.00 </roll>
<yaw> 0.00 </yaw>
</orient>
</thruster>
</engine>
(略)
<function name="aero/coefficient/Cnda">
<description>Adverse_yaw</description>
<product>
<property>aero/qbar-psf</property>
<property>metrics/Sw-sqft</property>
<property>metrics/bw-ft</property>
<property>fcs/left-aileron-pos-rad</property>
<value>0</value>
</product>
</function>
</axis>
</aerodynamics>
</fdm_config>
〔エンジン用のもう一つのファイル(/juef128/Engines/direct.xml)〕
・direct.xml名で作成し、/juef128/Engines/ディレクトリ下に置きます。
<?xml version="1.0"?>
<!--
Thrust is computed directly by the engine
-->
<direct name="Direct">
</direct>
〔機体設定ファイル(/juef128/juef128-set.xml)〕
・FlightGearの日本語サイトにあるTatさんの「T-4製作記」から拝借したものに必要な変更を施し(変更箇所は←で記します)、juef128-set.xml名にして/juef128/ディレクトリ下に置きます。
<?xml version="1.0"?>
<PropertyList>
<sim>
<!-- 機体名称 -->
<description>Junkers Ju EF128 (JSBSim)</description> ←機体名変更
<!-- 作者、開発状況 -->
<author>virtfly</author> ←作者名変更
<status>just started</status>
<!-- フライトモデル情報 -->
<flight-model>jsb</flight-model> <!-- FDMエンジン (jsb/yasim)-->
<aero>juef128</aero> <!-- フライトモデルファイル名(.xml) --> ←ファイル名変更
<!-- サウンドファイル -->
<sound>
<path>Aircraft/juef128/Sounds/me262-sound.xml</path> ←音源ファイル差し替え
</sound>
<!-- 3D モデルの設定 -->
<model>
<path>Aircraft/juef128/Models/juef128.xml</path> ←3Dモデルのファイルをフルパス指定
</model>
<startup> ←起動時に独自のsplash画像を表示させるために以下3行追加(別途splash画像が必要)
<splash-texture>Aircraft/juef128/juef128_splash.png</splash-texture>
</startup>
<!-- 視点の設定 -->
<!-- chase view の時の視点から機体への距離 (m) -->
<chase-distance-m type="double" archive="y">-20.0</chase-distance-m> ←-35.0を-20.0に改め距離を縮めます
<!-- デフォルトの視点オフセット、距離の設定 -->
<view>
<config>
<pitch-offset-deg>-8.8</pitch-offset-deg>
<default-field-of-view-deg>80</default-field-of-view-deg>
</config>
</view>
<!-- コクピット視点の設定 -->
<view n="0">
<name>Cockpit View</name>
<type>lookfrom</type> <!-- 指定した座標から見ることを意味 -->
<internal archive="y">true</internal> <!-- 機体内部の視点という意味 -->
<config>
<!-- 視点位置 --> ←以下の視点位置座標の変更は、フライトモデルのギア位置の座標修正に伴うもの
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">0.80</y-offset-m> ←0.66を0.80に上下位置変更
<z-offset-m archive="y">-1.80</z-offset-m> ←-2.80を-1.08へ前後位置変更
<!-- 見る方向 (上下方向) -->
<pitch-offset-deg>-10</pitch-offset-deg>
<!-- ズーム率 -->
<default-field-of-view-deg>67.0</default-field-of-view-deg>
</config>
</view>
<!-- ユーザ定義視点 - 後部座席のコクピット視点 -->
<!--<view n="100"> ←後部座席はないので、以下15行はコメントアウトないし削除
<name>Trainer View</name>
<type>lookfrom</type>
<internal archive="y">true</internal>
<config>
<from-model type="bool">true</from-model>
<from-model-idx type="int">0</from-model-idx>
<ground-level-nearplane-m type="double">0.03</ground-level-nearplane-m>
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">1.03</y-offset-m>
<z-offset-m archive="y">-1.33</z-offset-m>
<pitch-offset-deg>-10</pitch-offset-deg>
<default-field-of-view-deg>67.0</default-field-of-view-deg>
</config>
</view>-->
<!-- 機体毎のキー設定のヘルプメッセージ -->
<!-- <help> ←当面は付け足す機体毎のキー設定はないので、以下6行はコメントアウトないし削除
<key>
<name>Ctrl-B</name>
<desc>toggle speed brake</desc>
</key>
</help>-->
</sim>
<!-- キー設定: まだ何もありません -->
<input>
<keyboard>
</keyboard>
</input>
<!-- エンジンの初期状態設定: 2基共に起動 --> ←Ju EF128のエンジンは1基
<engines>
<engine n="0">
<running>true</running>
</engine>
<!-- <engine n="1"> ←エンジンは1基しか装備しないので、以下3行はコメントアウトないし削除
<running>true</running>
</engine> -->
</engines>
<!-- 燃料設定: 1565ガロン搭載 --> ←とりあえず130ガロンずつ搭載から変更
<consumables>
<fuel>
<tank n="0">
<level-gal_us archive="y">540</level-gal_us> ←とりあえず変更
</tank>
<tank n="1">
<level-gal_us archive="y">1025</level-gal_us> ←とりあえず変更
</tank>
</fuel>
</consumables>
</PropertyList>
〔3Dモデル設定ファイル(/juef128/Models/juef128.xml)〕
・aeromaticによるJSBSim用フライトモデルファイルの自動生成を用いて、簡単に自作機を飛行させるための作業の最後は、先に作成した機体の3Dモデルのacファイル名をフルパス指定するxmlファイル、juef128.xmlを/juef128/Models/ディレクトリ下に作成することです。この3Dモデル設定ファイルは、とりあえず作成した機体を飛ばすだけならこれだけの記述でよいですが、実際には車輪の出し入れやエルロン、ラダーなどの動きの再現のために、ここに必要な設定を記述するのが本来です。
<?xml version="1.0"?>
<PropertyList>
<path>juef128.ac</path>
</PropertyList>
[2011/08/03][2012/12/01更新][2018/04/23刷新]
「仮想飛行」(virtual flight) by virt_fly
●aeromatic用いたJSBSimのフライトモデル作成
【コメント】
aeromaticは便利ですね。JSBSimのフライトもデルを適当に作ってくれるんですから。前項の「作業の概略」にもとづき、aeromaticの入力の実際や生成するxmlファイルあるいは作成が必要なファイルについて具体的に記します。