This commit is contained in:
Nikolai V. Chr 2022-11-28 14:04:31 +01:00
parent d45de579f5
commit 4dc3084f0c
32 changed files with 180891 additions and 0 deletions

635
S-200/Hud/hud.xml Normal file
View File

@ -0,0 +1,635 @@
<?xml version="1.0"?>
<PropertyList>
<name>Vinson HUD</name>
<enable3d>false</enable3d>
<!-- <tape>
<name>Rel Brg</name>
<x>-100</x>
<y>190</y>
<width>200</width>
<height>28</height>
<input>
<property>/sim/current-view/heading-offset-rel-deg</property>
</input>
<display-span>25.0</display-span>
<option>top</option>
<major-divisions>5</major-divisions>
<minor-divisions>1</minor-divisions>
<tick-bottom>false</tick-bottom>
<tick-top>false</tick-top>
<tick-right>true</tick-right>
<tick-left>true</tick-left>
<cap-bottom>true</cap-bottom>
<cap-top>false</cap-top>
<cap-right>false</cap-right>
<cap-left>false</cap-left>
<marker-offset>0.0</marker-offset>
<enable-pointer>true</enable-pointer>
<pointer-type>fixed</pointer-type>
<tick-type>line</tick-type>
<tick-length>variable</tick-length>
</tape> -->
<ladder>
<name>Ladder</name>
<type>pitch</type>
<x>-60</x>
<y>-90</y>
<width>120</width>
<height>180</height>
<condition>
<equals>
<property>/sim/current-view/name</property>
<value>Approach View</value>
</equals>
</condition>
<roll-input>
<property>/orientation/roll-deg</property>
<factor>-1.0</factor>
</roll-input>
<pitch-input>
<property>/orientation/pitch-deg</property>
<factor>-1.0</factor>
</pitch-input>
<compression-factor>30</compression-factor>
<display-span>8</display-span>
<divisions>1.0</divisions>
<screen-hole>100</screen-hole>
<lbl-pos>0</lbl-pos>
<glide-slope>0.0</glide-slope>
<enable-fuselage-ref-line>false</enable-fuselage-ref-line>
<enable-target-spot>false</enable-target-spot>
<enable-target-markers>true</enable-target-markers>
<enable-velocity-vector>false</enable-velocity-vector>
<enable-drift-marker>false</enable-drift-marker>
<enable-alpha-bracket>false</enable-alpha-bracket>
<enable-energy-marker>false</enable-energy-marker>
<enable-climb-dive-marker>false</enable-climb-dive-marker>
<enable-glide-slope-marker>false</enable-glide-slope-marker>
<enable-energy-worm>false</enable-energy-worm>
<enable-waypoint-marker>false</enable-waypoint-marker>
<enable-zenith>false</enable-zenith>
<enable-nadir>false</enable-nadir>
<enable-hat>false</enable-hat>
</ladder>
<!--<label>
<name>Wind Angle Runway</name>
<x>-300</x>
<y>190</y>
<width>200</width>
<height>25</height>
<prefix> Wind Angle Runway: </prefix>
<postfix> deg</postfix>
<halign>left</halign>
<format>%03.0f</format>
<box>true</box>
<input>
<property>/orientation/relative-wind-deg</property>
</input>
</label>-->
<label>
<name>Height</name>
<x>-300</x>
<y>80</y>
<width>200</width>
<height>25</height>
<condition>
<or>
<equals>
<property>/sim/current-view/name</property>
<value>Landing Signal Officer View</value>
</equals>
<equals>
<property>/sim/current-view/name</property>
<value>Approach View</value>
</equals>
</or>
</condition>
<box>false</box>
<prefix>HEIGHT: </prefix>
<halign>left</halign>
<input>
<property>/sim/current-view/height</property>
</input>
<blinking>
<interval>0.25</interval>
<condition>
<and>
<equals>
<property>/sim/current-view/height</property>
<value>VERY LOW</value>
</equals>
<less-than>
<property>/sim/current-view/distance</property>
<value>1</value>
</less-than>
</and>
</condition>
</blinking>
</label>
<label>
<name>Gear</name>
<x>-300</x>
<y>60</y>
<width>200</width>
<height>25</height>
<condition>
<or>
<equals>
<property>/sim/current-view/name</property>
<value>Landing Signal Officer View</value>
</equals>
<equals>
<property>/sim/current-view/name</property>
<value>Approach View</value>
</equals>
</or>
</condition>
<box>false</box>
<prefix>GEAR: </prefix>
<halign>left</halign>
<input>
<property>/sim/current-view/gear</property>
</input>
<blinking>
<interval>0.25</interval>
<condition>
<and>
<less-than>
<property>/sim/current-view/gear</property>
<value>1</value>
</less-than>
<less-than>
<property>/sim/current-view/distance</property>
<value>1</value>
</less-than>
</and>
</condition>
</blinking>
</label>
<label>
<name>Flap</name>
<x>-300</x>
<y>40</y>
<width>200</width>
<height>25</height>
<condition>
<or>
<equals>
<property>/sim/current-view/name</property>
<value>Landing Signal Officer View</value>
</equals>
<equals>
<property>/sim/current-view/name</property>
<value>Approach View</value>
</equals>
</or>
</condition>
<box>false</box>
<prefix>FLAPS: </prefix>
<halign>left</halign>
<input>
<property>/sim/current-view/flap</property>
</input>
<blinking>
<interval>0.25</interval>
<condition>
<and>
<less-than>
<property>/sim/current-view/flap</property>
<value>1</value>
</less-than>
<less-than>
<property>/sim/current-view/distance</property>
<value>1</value>
</less-than>
</and>
</condition>
</blinking>
</label>
<label>
<name>Hook</name>
<x>-300</x>
<y>20</y>
<width>200</width>
<height>25</height>
<condition>
<or>
<equals>
<property>/sim/current-view/name</property>
<value>Landing Signal Officer View</value>
</equals>
<equals>
<property>/sim/current-view/name</property>
<value>Approach View</value>
</equals>
</or>
</condition>
<box>false</box>
<prefix>HOOK: </prefix>
<halign>left</halign>
<input>
<property>/sim/current-view/hook</property>
</input>
</label>
<!--<label>
<name>Magnetic Heading</name>
<x>-300</x>
<y>-225</y>
<width>200</width>
<height>25</height>
<prefix> Mag. Heading: </prefix>
<postfix> deg</postfix>
<halign>left</halign>
<format>%03.0f</format>
<box>true</box>
<input>
<property>/orientation/heading-magnetic-deg</property>
</input>
</label>
<label>
<name>Magnetic Heading Runway</name>
<x>-300</x>
<y>-200</y>
<width>200</width>
<height>25</height>
<prefix> Mag. Heading Runway: </prefix>
<postfix> deg</postfix>
<halign>left</halign>
<format>%03.0f</format>
<box>true</box>
<input>
<property>/orientation/heading-runway-magnetic-deg</property>
</input>
</label>
<label>
<name>Wind Speed Runway</name>
<x>100</x>
<y>190</y>
<width>200</width>
<height>25</height>
<prefix> Wind Speed Runway: </prefix>
<postfix> kts</postfix>
<halign>left</halign>
<format>%2.0f</format>
<box>true</box>
<input>
<property>/velocities/wind-speed-runway-kt</property>
</input>
</label>-->
<!--<label>
<name>Speed</name>
<x>100</x>
<y>-225</y>
<width>200</width>
<height>25</height>
<prefix> My speed: </prefix>
<postfix> kts</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>/velocities/groundspeed-kt</property>
</input>
</label>-->
<!--<label>
<name>Target Speed</name>
<x>100</x>
<y>-200</y>
<width>200</width>
<height>25</height>
<prefix> Target Speed: </prefix>
<postfix> kts</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>/carrier/fbw/target/groundspeed-kt</property>
</input>
</label>-->
<label>
<name>Time to impact</name>
<x>150</x>
<y>150</y>
<width>200</width>
<height>25</height>
<prefix>1st Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>sam/impact0</property>
</input>
</label>
<label>
<name>Time to impact</name>
<x>150</x>
<y>100</y>
<width>200</width>
<height>25</height>
<prefix>2nd Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>sam/impact1</property>
</input>
</label>
<label>
<name>Time to impact</name>
<x>150</x>
<y>50</y>
<width>200</width>
<height>25</height>
<prefix>3rd Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>sam/impact2</property>
</input>
</label>
<label>
<name>Time to impact</name>
<x>150</x>
<y>0</y>
<width>200</width>
<height>25</height>
<prefix>4th Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>sam/impact3</property>
</input>
</label>
<label>
<name>Time to impact</name>
<x>150</x>
<y>-50</y>
<width>200</width>
<height>25</height>
<prefix>5th Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>sam/impact4</property>
</input>
</label>
<label>
<name>Time to impact</name>
<x>150</x>
<y>-100</y>
<width>200</width>
<height>25</height>
<prefix>6th Time to impact: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%2.1f</format>
<box>true</box>
<input>
<property>sam/impact5</property>
</input>
</label>
<label>
<name>Hit chance</name>
<x>150</x>
<y>125</y>
<width>200</width>
<height>25</height>
<prefix>1st Hit chance: </prefix>
<postfix> %%</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/hit0</property>
</input>
</label>
<label>
<name>Hit chance</name>
<x>150</x>
<y>75</y>
<width>200</width>
<height>25</height>
<prefix>2nd Hit chance: </prefix>
<postfix> %%</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/hit1</property>
</input>
</label>
<label>
<name>Hit chance</name>
<x>150</x>
<y>25</y>
<width>200</width>
<height>25</height>
<prefix>3rd Hit chance: </prefix>
<postfix> %%</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/hit2</property>
</input>
</label>
<label>
<name>Hit chance</name>
<x>150</x>
<y>-25</y>
<width>200</width>
<height>25</height>
<prefix>4th Hit chance: </prefix>
<postfix> %%</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/hit3</property>
</input>
</label>
<label>
<name>Hit chance</name>
<x>150</x>
<y>-75</y>
<width>200</width>
<height>25</height>
<prefix>5th Hit chance: </prefix>
<postfix> %%</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/hit4</property>
</input>
</label>
<label>
<name>Hit chance</name>
<x>150</x>
<y>-125</y>
<width>200</width>
<height>25</height>
<prefix>6th Hit chance: </prefix>
<postfix> %%</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/hit5</property>
</input>
</label>
<label>
<name>ETA</name>
<x>150</x>
<y>-175</y>
<width>200</width>
<height>25</height>
<prefix>Time before operational: </prefix>
<postfix> sec</postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>sam/timeleft</property>
</input>
</label>
<label>
<name>stores</name>
<x>-300</x>
<y>-175</y>
<width>125</width>
<height>25</height>
<prefix> Missiles ready: </prefix>
<postfix></postfix>
<halign>left</halign>
<format>%d</format>
<box>true</box>
<input>
<property>/sam/missiles</property>
</input>
</label>
<label>
<name>damage</name>
<x>-150</x>
<y>-175</y>
<width>125</width>
<height>25</height>
<prefix> Integrity: </prefix>
<postfix> %%</postfix>
<halign>left</halign>
<format>%3.1f</format>
<box>true</box>
<input>
<property>/sam/damage</property>
</input>
</label>
<label>
<name>cs</name>
<x>0</x>
<y>-175</y>
<width>125</width>
<height>25</height>
<prefix> Callsign: </prefix>
<postfix></postfix>
<halign>left</halign>
<format>%s</format>
<box>true</box>
<input>
<property>/sim/multiplay/callsign</property>
</input>
</label>
<label>
<name>Target info</name>
<x>-300</x>
<y>-225</y>
<width>375</width>
<height>25</height>
<prefix> Next target: </prefix>
<postfix></postfix>
<halign>left</halign>
<format>%s</format>
<box>true</box>
<input>
<property>/sam/info</property>
</input>
</label>
<label>
<name>tower</name>
<x>100</x>
<y>-225</y>
<width>200</width>
<height>25</height>
<prefix> Placement near: </prefix>
<postfix></postfix>
<halign>left</halign>
<format>%s</format>
<box>true</box>
<input>
<property>/sim/tower/airport-id</property>
</input>
</label>
</PropertyList>

95930
S-200/Models/P-12.ac Normal file

File diff suppressed because it is too large Load Diff

BIN
S-200/Models/P-12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

25
S-200/Models/P-12.xml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0"?>
<PropertyList>
<path>P-12.ac</path>
<animation>
<type>spin</type>
<object-name>Array</object-name>
<property>/sim/multiplay/online</property>
<factor>-15.0</factor>
<center>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>10.3</z-m>
</center>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
</PropertyList>

BIN
S-200/Models/S-200.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
S-200/Models/embankment.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 KiB

BIN
S-200/Models/fire.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

87
S-200/Models/fire.xml Normal file
View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<particlesystem>
<texture>fire.png</texture>
<condition>
<equals>
<property>sim/multiplay/generic/int[0]</property>
<value>1</value>
</equals>
</condition>
<emissive>true</emissive>
<lighting>false</lighting>
<offsets>
<roll-deg>0</roll-deg>
</offsets>
<attach>world</attach>
<placer>
<type>point</type>
</placer>
<shooter>
<theta-min-deg>80</theta-min-deg>
<theta-max-deg>30</theta-max-deg>
<phi-min-deg>-180</phi-min-deg>
<phi-max-deg> 180</phi-max-deg>
<speed>
<value>20</value>
<spread>40</spread>
</speed>
</shooter>
<counter>
<particles-per-sec>
<value>40</value>
<spread>60</spread>
</particles-per-sec>
</counter>
<align>billboard</align>
<particle>
<start>
<color>
<red>
<value>0.6</value>
</red>
<green>
<value>0.6</value>
</green>
<blue>
<value>0.6</value>
</blue>
<alpha>
<value>0.4</value>
</alpha>
</color>
<size>
<value>1.2</value>
</size>
</start>
<end>
<color>
<red>
<value>0</value>
</red>
<green>
<value>0</value>
</green>
<blue>
<value>0</value>
</blue>
<alpha>
<value>0</value>
</alpha>
</color>
<size>
<value>4.0</value>
</size>
</end>
<life-sec>
<value>3</value>
</life-sec>
<mass-kg>1.3</mass-kg>
<radius-m>0.03</radius-m>
</particle>
</particlesystem>
</PropertyList>

80482
S-200/Models/s-200.ac Normal file

File diff suppressed because it is too large Load Diff

200
S-200/Models/s-200.xml Normal file
View File

@ -0,0 +1,200 @@
<?xml version="1.0"?>
<PropertyList>
<model>
<path>s200a.xml</path>
<name>one</name>
<offsets>
<x-m> 25</x-m>
<y-m> -50</y-m>
<z-m> 0</z-m>
</offsets>
</model>
<model>
<path>s200b.xml</path>
<name>two</name>
<offsets>
<x-m> -25</x-m>
<y-m> -50</y-m>
<z-m> 0</z-m>
</offsets>
</model>
<model>
<path>s200c.xml</path>
<name>three</name>
<offsets>
<x-m> -50</x-m>
<y-m> 0</y-m>
<z-m> 0</z-m>
</offsets>
</model>
<model>
<path>s200d.xml</path>
<name>four</name>
<offsets>
<x-m> -25</x-m>
<y-m> 50</y-m>
<z-m> 0</z-m>
</offsets>
</model>
<model>
<path>s200e.xml</path>
<name>five</name>
<offsets>
<x-m> 25</x-m>
<y-m> 50</y-m>
<z-m> 0</z-m>
</offsets>
</model>
<model>
<path>s200f.xml</path>
<name>six</name>
<offsets>
<x-m> 50</x-m>
<y-m> 0</y-m>
<z-m> 0</z-m>
</offsets>
</model>
<model>
<path>P-12.xml</path>
<name>radar</name>
<offsets>
<x-m> 0</x-m>
<y-m> 0</y-m>
<z-m> 0</z-m>
</offsets>
</model>
<animation>
<type>translate</type>
<object-name>one</object-name>
<property>sim/multiplay/generic/float[11]</property>
<offset-m>0.0</offset-m>
<factor>1.0</factor>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>two</object-name>
<property>sim/multiplay/generic/float[12]</property>
<offset-m>0.0</offset-m>
<factor>1.0</factor>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>three</object-name>
<property>sim/multiplay/generic/float[13]</property>
<offset-m>0.0</offset-m>
<factor>1.0</factor>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>four</object-name>
<property>sim/multiplay/generic/float[14]</property>
<offset-m>0.0</offset-m>
<factor>1.0</factor>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>five</object-name>
<property>sim/multiplay/generic/float[15]</property>
<offset-m>0.0</offset-m>
<factor>1.0</factor>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>six</object-name>
<property>sim/multiplay/generic/float[16]</property>
<offset-m>0.0</offset-m>
<factor>1.0</factor>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<model>
<path>Aircraft/S-200/Models/smoke.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m>-0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-200/Models/fire.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m>-0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-200/Models/smoke.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m> 0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<model>
<path>Aircraft/S-200/Models/fire.xml</path>
<offsets>
<x-m> 3.26307</x-m>
<y-m> 0.84611</y-m>
<z-m> 2.85616</z-m>
<pitch-deg>0</pitch-deg>
</offsets>
</model>
<nasal>
<load><![CDATA[
]]>
</load>
</nasal>
</PropertyList>

36
S-200/Models/s200a.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<PropertyList>
<path>s-200.ac</path>
<animation>
<type>select</type>
<object-name>dubna</object-name>
<condition>
<less-than>
<property>active</property>
<value>1</value>
</less-than>
</condition>
</animation>
<animation>
<type>rotate</type>
<object-name>Mount</object-name>
<object-name>Body</object-name>
<object-name>Boom</object-name>
<object-name>dubna</object-name>
<property>sim/multiplay/generic/float[6]</property>
<factor>1.0</factor>
<axis>
<x1-m> 0 </x1-m>
<y1-m> 0 </y1-m>
<z1-m> 0 </z1-m>
<x2-m> 0 </x2-m>
<y2-m> 0 </y2-m>
<z2-m> -1 </z2-m>
</axis>
</animation>
</PropertyList>

36
S-200/Models/s200b.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<PropertyList>
<path>s-200.ac</path>
<animation>
<type>select</type>
<object-name>dubna</object-name>
<condition>
<less-than>
<property>active</property>
<value>2</value>
</less-than>
</condition>
</animation>
<animation>
<type>rotate</type>
<object-name>Mount</object-name>
<object-name>Body</object-name>
<object-name>Boom</object-name>
<object-name>dubna</object-name>
<property>sim/multiplay/generic/float[6]</property>
<factor>1.0</factor>
<axis>
<x1-m> 0 </x1-m>
<y1-m> 0 </y1-m>
<z1-m> 0 </z1-m>
<x2-m> 0 </x2-m>
<y2-m> 0 </y2-m>
<z2-m> -1 </z2-m>
</axis>
</animation>
</PropertyList>

36
S-200/Models/s200c.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<PropertyList>
<path>s-200.ac</path>
<animation>
<type>select</type>
<object-name>dubna</object-name>
<condition>
<less-than>
<property>active</property>
<value>3</value>
</less-than>
</condition>
</animation>
<animation>
<type>rotate</type>
<object-name>Mount</object-name>
<object-name>Body</object-name>
<object-name>Boom</object-name>
<object-name>dubna</object-name>
<property>sim/multiplay/generic/float[6]</property>
<factor>1.0</factor>
<axis>
<x1-m> 0 </x1-m>
<y1-m> 0 </y1-m>
<z1-m> 0 </z1-m>
<x2-m> 0 </x2-m>
<y2-m> 0 </y2-m>
<z2-m> -1 </z2-m>
</axis>
</animation>
</PropertyList>

36
S-200/Models/s200d.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<PropertyList>
<path>s-200.ac</path>
<animation>
<type>select</type>
<object-name>dubna</object-name>
<condition>
<less-than>
<property>active</property>
<value>4</value>
</less-than>
</condition>
</animation>
<animation>
<type>rotate</type>
<object-name>Mount</object-name>
<object-name>Body</object-name>
<object-name>Boom</object-name>
<object-name>dubna</object-name>
<property>sim/multiplay/generic/float[6]</property>
<factor>1.0</factor>
<axis>
<x1-m> 0 </x1-m>
<y1-m> 0 </y1-m>
<z1-m> 0 </z1-m>
<x2-m> 0 </x2-m>
<y2-m> 0 </y2-m>
<z2-m> -1 </z2-m>
</axis>
</animation>
</PropertyList>

36
S-200/Models/s200e.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<PropertyList>
<path>s-200.ac</path>
<animation>
<type>select</type>
<object-name>dubna</object-name>
<condition>
<less-than>
<property>active</property>
<value>5</value>
</less-than>
</condition>
</animation>
<animation>
<type>rotate</type>
<object-name>Mount</object-name>
<object-name>Body</object-name>
<object-name>Boom</object-name>
<object-name>dubna</object-name>
<property>sim/multiplay/generic/float[6]</property>
<factor>1.0</factor>
<axis>
<x1-m> 0 </x1-m>
<y1-m> 0 </y1-m>
<z1-m> 0 </z1-m>
<x2-m> 0 </x2-m>
<y2-m> 0 </y2-m>
<z2-m> -1 </z2-m>
</axis>
</animation>
</PropertyList>

36
S-200/Models/s200f.xml Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<PropertyList>
<path>s-200.ac</path>
<animation>
<type>select</type>
<object-name>dubna</object-name>
<condition>
<less-than>
<property>active</property>
<value>6</value>
</less-than>
</condition>
</animation>
<animation>
<type>rotate</type>
<object-name>Mount</object-name>
<object-name>Body</object-name>
<object-name>Boom</object-name>
<object-name>dubna</object-name>
<property>sim/multiplay/generic/float[6]</property>
<factor>1.0</factor>
<axis>
<x1-m> 0 </x1-m>
<y1-m> 0 </y1-m>
<z1-m> 0 </z1-m>
<x2-m> 0 </x2-m>
<y2-m> 0 </y2-m>
<z2-m> -1 </z2-m>
</axis>
</animation>
</PropertyList>

BIN
S-200/Models/smoke.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

81
S-200/Models/smoke.xml Normal file
View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<PropertyList>
<particlesystem>
<texture>smoke.png</texture>
<condition>
<equals>
<property>sim/multiplay/generic/int[0]</property>
<value>1</value>
</equals>
</condition>
<emissive>false</emissive>
<lighting>false</lighting>
<align>billboard</align> <!-- billboard / fixed -->
<attach>world</attach> <!-- world / local-->
<placer>
<type>point</type>damage.fail_systems(10000);
</placer>
<shooter>
<theta-min-deg>65</theta-min-deg>
<theta-max-deg>35</theta-max-deg>
<phi-min-deg>-20</phi-min-deg>
<phi-max-deg> 20</phi-max-deg>
<speed-mps>
<value>500</value>
<spread>10</spread>
</speed-mps>
<rotation-speed>
<x-min-deg-sec>0</x-min-deg-sec>
<y-min-deg-sec>0</y-min-deg-sec>
<z-min-deg-sec>-180</z-min-deg-sec>
<x-max-deg-sec>0</x-max-deg-sec>
<y-max-deg-sec>0</y-max-deg-sec>
<z-max-deg-sec>360</z-max-deg-sec>
</rotation-speed>
</shooter>
<counter>
<particles-per-sec>
<value>50</value>
<spread>1</spread>
</particles-per-sec>
</counter>
<particle>
<start>
<color>
<red><value>0.0</value></red>
<green><value>0.0</value></green>
<blue><value>0.0</value></blue>
<alpha><value>0.08</value></alpha>
</color>
<size>
<value>5</value>
</size>
</start>
<end>
<color>
<red><value>0.0</value></red>
<green><value>0.0</value></green>
<blue><value>0.0</value></blue>
<alpha><value>0.0</value></alpha>
</color>
<size>
<value>15.0</value>
</size>
</end>
<life-sec>
<value>4</value>
</life-sec>
<mass-kg>0.0085</mass-kg>
<radius-m>0.50</radius-m>
</particle>
<program>
<fluid>air</fluid>
<gravity type="bool">true</gravity>
<wind type="bool">true</wind>
</program>
</particlesystem>
</PropertyList>

View File

@ -0,0 +1,260 @@
#
#
# Use to transmit events that happen at a specific place; can be used to make
# models that are simulated locally (e.g. tankers) appear on other player's MP sessions.
var ArmamentNotification_Id = 19;
var ArmamentNotification =
{
# new:
# _ident - the identifier for the notification. not bridged.
# _name - name of the notification, bridged.
# _kind - created, moved, deleted, impact (see notifications.nas)
# _secondary_kind - This is the entity on which the activity is being performed. See below for predefined types.
##
new: func(_ident="none", _kind=0, _secondary_kind=0)
{
var new_class = emesary.Notification.new("ArmamentNotification", _ident, ArmamentNotification_Id);
new_class.Kind = _kind;
new_class.SecondaryKind = _secondary_kind;
new_class.RelativeAltitude = 0;
new_class.IsDistinct = 0;
new_class.Distance = 0;
new_class.Bearing = 0;
new_class.RemoteCallsign = ""; # associated remote callsign.
new_class.bridgeProperties = func
{
return
[
{
getValue:func{return emesary.TransferByte.encode(new_class.Kind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.Kind=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.SecondaryKind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.SecondaryKind=dv.value;return dv},
},
{
getValue:func{return emesary.TransferFixedDouble.encode(new_class.RelativeAltitude,2,1/10);},
setValue:func(v,root,pos){var dv=emesary.TransferFixedDouble.decode(v,2,1/10,pos);new_class.RelativeAltitude=dv.value;return dv},
},
{
getValue:func{return emesary.TransferFixedDouble.encode(new_class.Distance,2,1/10);},
setValue:func(v,root,pos){var dv=emesary.TransferFixedDouble.decode(v,2,1/10,pos);new_class.Distance=dv.value;return dv},
},
{
getValue:func{return emesary.TransferFixedDouble.encode(geo.normdeg180(new_class.Bearing),1,1.54);},
setValue:func(v,root,pos){var dv=emesary.TransferFixedDouble.decode(v,1,1.54,pos);new_class.Bearing=geo.normdeg(dv.value);return dv},
},
{
getValue:func{return emesary.TransferString.encode(new_class.RemoteCallsign);},
setValue:func(v,root,pos){var dv=emesary.TransferString.decode(v,pos);new_class.RemoteCallsign=dv.value;return dv},
},
];
};
return new_class;
},
};
var ArmamentInFlightNotification_Id = 21;
var ArmamentInFlightNotification =
{
# new:
# _ident - the identifier for the notification. not bridged.
# _name - name of the notification, bridged.
# _kind - created, moved, deleted (see below). This is the activity that the notification represents, called kind to avoid confusion with notification type.
# _secondary_kind - This is the entity on which the activity is being performed. See below for predefined types.
#
# UniqueIdentity - an identity that is unique to the sending instance of FG. Can be combined with the callsign to create an MP unique ID.
##
new: func(_ident="none", _unique=0, _kind=0, _secondary_kind=0)
{
var new_class = emesary.Notification.new("ArmamentInFlightNotification", _ident, ArmamentInFlightNotification_Id);
new_class.Kind = _kind;
new_class.SecondaryKind = _secondary_kind;
new_class.Position = geo.aircraft_position();
new_class.UniqueIndex = 0;
new_class.Heading = 360;
new_class.Pitch = 90;
new_class.u_fps = 0;
new_class.IsDistinct = 0;
new_class.Callsign = nil; # populated automatically by the incoming bridge when routed
new_class.RemoteCallsign = ""; # associated remote callsign.
new_class.Flags = 0; # 8 bits for whatever.
new_class.UniqueIdentity = _unique;
new_class.GetBridgeMessageNotificationTypeKey = func {
return new_class.NotificationType~"."~new_class.Ident~"."~new_class.UniqueIndex;
};
new_class.bridgeProperties = func
{
return
[
{
getValue:func{return emesary.TransferCoord.encode(new_class.Position);},
setValue:func(v,root,pos){var dv=emesary.TransferCoord.decode(v, pos);new_class.Position=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.Kind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.Kind=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.SecondaryKind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.SecondaryKind=dv.value;return dv},
},
{
#0..6696 fps (3967kts), mach 6.1 (SL) - factor 0.03703
getValue:func{return emesary.TransferFixedDouble.encode(new_class.u_fps-3348,1,1/0.03703);},
setValue:func(v,root,pos){var dv=emesary.TransferFixedDouble.decode(v,1,1/0.03703,pos);new_class.u_fps=dv.value+3348;return dv},
},
{
getValue:func{return emesary.TransferFixedDouble.encode(geo.normdeg180(new_class.Heading),1,1.54);},#1.0/0.65
setValue:func(v,root,pos){var dv=emesary.TransferFixedDouble.decode(v,1,1.54,pos);new_class.Heading=geo.normdeg(dv.value);return dv},
},
{
getValue:func{return emesary.TransferFixedDouble.encode(new_class.Pitch, 1, 1/1.38);},
setValue:func(v,root,pos){var dv=emesary.TransferFixedDouble.decode(v,1, 1/1.38, pos);new_class.Pitch=dv.value;return dv},
},
{
getValue:func{return emesary.TransferString.encode(new_class.RemoteCallsign);},
setValue:func(v,root,pos){var dv=emesary.TransferString.decode(v,pos);new_class.RemoteCallsign=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.Flags);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.Flags=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.UniqueIdentity);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.UniqueIdentity=dv.value;return dv},
},
];
};
return new_class;
},
};
var StaticNotification_Id = 25;
var StaticNotification =
{
# new:
# _ident - the identifier for the notification. not bridged.
# _kind - created, moved, deleted (see below). This is the activity that the notification represents, called kind to avoid confusion with notification type.
# _secondary_kind - This is the entity on which the activity is being performed. See below for predefined types.
#
# UniqueIdentity - an identity that is unique to the sending instance of FG. Can be combined with the callsign to create an MP unique ID.
##
new: func(_ident="stat", _unique=0, _kind=0, _secondary_kind=0)
{
var new_class = emesary.Notification.new("StaticNotification", _ident, StaticNotification_Id);
# _ident -> "stat"
new_class.UniqueIdentity = _unique; # random from 0 to 15000000 that identifies each static object
new_class.Kind = _kind; # 1=create, 2=move, 3=delete, 4=request_all
new_class.SecondaryKind = _secondary_kind; # 0 = small crater, 1 = big crater, 2 = smoke
new_class.IsDistinct = 0; # keep it 0
new_class.Callsign = nil; # populated automatically by the incoming bridge when routed
new_class.Position = geo.aircraft_position(); # position
new_class.Heading = 360; # heading
new_class.Flags1 = 0; # 7 bits for whatever.
new_class.Flags2 = 0; # 7 bits for whatever.
new_class.GetBridgeMessageNotificationTypeKey = func {
return new_class.NotificationType~"."~new_class.Ident~"."~new_class.UniqueIdentity;
};
new_class.bridgeProperties = func
{
return
[
{
getValue:func{return emesary.TransferCoord.encode(new_class.Position);},
setValue:func(v,root,pos){var dv=emesary.TransferCoord.decode(v, pos);new_class.Position=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.Kind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.Kind=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.SecondaryKind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.SecondaryKind=dv.value;return dv},
},
{
getValue:func{return emesary.TransferFixedDouble.encode(geo.normdeg180(new_class.Heading),1,1.54);},#1.0/0.65
setValue:func(v,root,pos){var dv=emesary.TransferFixedDouble.decode(v,1,1.54,pos);new_class.Heading=geo.normdeg(dv.value);return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.Flags1);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.Flags1=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.Flags2);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.Flags2=dv.value;return dv},
},
{
getValue:func{return emesary.TransferInt.encode(new_class.UniqueIdentity,3);},
setValue:func(v,root,pos){var dv=emesary.TransferInt.decode(v,3,pos);new_class.UniqueIdentity=dv.value;return dv},
},
];
};
return new_class;
},
};
var ObjectInFlightNotification_Id = 22;
var ObjectInFlightNotification =
{
# new:
# _ident - the identifier for the notification. not bridged.
# _name - name of the notification, bridged.
# _kind - created, moved, deleted (see below). This is the activity that the notification represents, called kind to avoid confusion with notification type.
# _secondary_kind - This is the entity on which the activity is being performed. See below for predefined types.
#
# UniqueIdentity - an identity that is unique to the sending instance of FG. Can be combined with the callsign to create an MP unique ID.
##
new: func(_ident="none", _unique=0, _kind=0, _secondary_kind=0)
{
var new_class = emesary.Notification.new("ObjectInFlightNotification", _ident, ObjectInFlightNotification_Id);
new_class.Kind = _kind;
new_class.SecondaryKind = _secondary_kind;
new_class.Position = geo.aircraft_position();
new_class.UniqueIndex = 0;
new_class.IsDistinct = 1;
new_class.Callsign = nil; # populated automatically by the incoming bridge when routed
new_class.UniqueIdentity = _unique;
new_class.GetBridgeMessageNotificationTypeKey = func {
return new_class.NotificationType~"."~new_class.Ident~"."~new_class.UniqueIndex;
};
new_class.bridgeProperties = func
{
return
[
{
getValue:func{return emesary.TransferCoord.encode(new_class.Position);},
setValue:func(v,root,pos){var dv=emesary.TransferCoord.decode(v, pos);new_class.Position=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.Kind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.Kind=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.SecondaryKind);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.SecondaryKind=dv.value;return dv},
},
{
getValue:func{return emesary.TransferByte.encode(new_class.UniqueIdentity);},
setValue:func(v,root,pos){var dv=emesary.TransferByte.decode(v,pos);new_class.UniqueIdentity=dv.value;return dv},
},
];
};
return new_class;
},
};

View File

@ -0,0 +1,53 @@
# Emesary bridged transmitter for armament notifications.
#
# Richard Harrison 2017
#
# NOTES:
# 1.The incoming bridges that is defined here will apply to all models that
# are loaded over MP; it is better to create the bridges here rather than in the model.xml
# So given that we don't want a bridge on all MP models only those that are on OPRF
# aircraft that want to receive notifications we will create the incoming bridge here
# and thus only an OPRF model will receive notifications from another OPRF model.
#
# 2. The Emesary MP bridge requires two sides; the outgoing and incoming.
# - The outgoing aircraft will forwards all received notifications via MP;
# and these will be received by a similarly equipped craft.
# - The receiving aircraft will receive all notifications from other MP craft via
# the globalTransmitter - which is bridged via property #18 /sim/multiplay/emesary/bridge[18]
#------------------------------------------------------------------------------------------
# Setup the bridge
# armament notification 24 bytes
# geoEventNotification - 34 bytes + the length of the RemoteCallsign and Name fields.
#NOTE: due to bug in Emesary MP Bridge (fixed in 2019.2 after 24/3/2020) we can only
# reliably send one message type per bridge - so for the maximum compatibility
# we will use two bridges.
# If at some point in the future we target 2019.2 as a min ver we can use a single
# bridge and setup the notification list to contain all of the armament hit/flying notifications
#i.e. change to [notifications.ArmamentInFlightNotification.new(nil), notifications.ArmamentNotification.new(nil)];
var geoRoutedNotifications = [notifications.ArmamentInFlightNotification.new()];
var geoBridgedTransmitter = emesary.Transmitter.new("geoOutgoingBridge");
var geooutgoingBridge = emesary_mp_bridge.OutgoingMPBridge.new("sa5mp.geo",geoRoutedNotifications, 18, "", geoBridgedTransmitter);
# bridge should be tuned to be around 90% of the packet size full.
geooutgoingBridge.TransmitFrequencySeconds = 0.75;
geooutgoingBridge.MPStringMaxLen = 150;
emesary_mp_bridge.IncomingMPBridge.startMPBridge(geoRoutedNotifications, 18, emesary.GlobalTransmitter);
#----- bridge hit (armament) notifications
var hitRoutedNotifications = [notifications.ArmamentNotification.new(),notifications.StaticNotification.new()];
var hitBridgedTransmitter = emesary.Transmitter.new("armamentNotificationBridge");
var hitoutgoingBridge = emesary_mp_bridge.OutgoingMPBridge.new("sa5mp.hit",hitRoutedNotifications, 19, "", hitBridgedTransmitter);
hitoutgoingBridge.TransmitFrequencySeconds = 1.5;
hitoutgoingBridge.MPStringMaxLen = 120;
emesary_mp_bridge.IncomingMPBridge.startMPBridge(hitRoutedNotifications, 19, emesary.GlobalTransmitter);
#----- bridge object notifications
var objectRoutedNotifications = [notifications.ObjectInFlightNotification.new()];
var objectBridgedTransmitter = emesary.Transmitter.new("objectNotificationBridge");
var objectoutgoingBridge = emesary_mp_bridge.OutgoingMPBridge.new("sa5mp.object",objectRoutedNotifications, 17, "", objectBridgedTransmitter);
objectoutgoingBridge.TransmitFrequencySeconds = 0.2;
objectoutgoingBridge.MessageLifeTime = 1;
objectoutgoingBridge.MPStringMaxLen = 150;
emesary_mp_bridge.IncomingMPBridge.startMPBridge(objectRoutedNotifications, 17, emesary.GlobalTransmitter);

1418
S-200/Nasal/damage.nas Normal file

File diff suppressed because it is too large Load Diff

106
S-200/Nasal/fdm.nas Normal file
View File

@ -0,0 +1,106 @@
# Copyright (C) 2015 onox
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#io.include("Aircraft/ExpansionPack/Nasal/init.nas");
srand();# seed the random generator with systime
#with("updateloop");
# Number of iterations per second
var frequency = 10.0;
# Change in heading per second at full rudder deflection
var heading_ps = 0.5;
time_last = 0;
sim_speed = 1;
setprop("/carrier/pitch-deg",0);
setprop("/carrier/pitch-offset",0);
setprop("/carrier/roll-deg",0);
setprop("/carrier/roll-offset",0);
setprop("/carrier/sunk",0);
var PositionUpdater = func () {
settimer( PositionUpdater, 1/frequency );
var position = geo.aircraft_position();
var elev0 = geo.elevation(position.lat(),position.lon());
if (elev0 == nil) return;
var geodPos = aircraftToCart({x:-25, y:-50, z: 0});
var co = geo.Coord.new();
co.set_xyz(geodPos.x, geodPos.y, geodPos.z);
var elev = geo.elevation(co.lat(),co.lon());
if (elev != nil) {
setprop("sim/multiplay/generic/float[11]", elev-elev0);
setprop("controls/armament/station[1]/offsets/z-m", elev-elev0+3.4);
} else {
setprop("sim/multiplay/generic/float[11]", 0);
setprop("controls/armament/station[1]/offsets/z-m", 3.4);
}
geodPos = aircraftToCart({x:25, y:-50, z: 0});
co.set_xyz(geodPos.x, geodPos.y, geodPos.z);
elev = geo.elevation(co.lat(),co.lon());
if (elev != nil) {
setprop("sim/multiplay/generic/float[12]", elev-elev0);
setprop("controls/armament/station[2]/offsets/z-m", elev-elev0+3.4);
} else {
setprop("sim/multiplay/generic/float[12]", 0);
setprop("controls/armament/station[2]/offsets/z-m", 3.4);
}
geodPos = aircraftToCart({x:50, y:0, z: 0});
co.set_xyz(geodPos.x, geodPos.y, geodPos.z);
elev = geo.elevation(co.lat(),co.lon());
if (elev != nil) {
setprop("sim/multiplay/generic/float[13]", elev-elev0);
setprop("controls/armament/station[3]/offsets/z-m", elev-elev0+3.4);
} else {
setprop("sim/multiplay/generic/float[13]", 0);
setprop("controls/armament/station[3]/offsets/z-m", 3.4);
}
geodPos = aircraftToCart({x:25, y:50, z: 0});
co.set_xyz(geodPos.x, geodPos.y, geodPos.z);
elev = geo.elevation(co.lat(),co.lon());
if (elev != nil) {
setprop("sim/multiplay/generic/float[14]", elev-elev0);
setprop("controls/armament/station[4]/offsets/z-m", elev-elev0+3.4);
} else {
setprop("sim/multiplay/generic/float[14]", 0);
setprop("controls/armament/station[4]/offsets/z-m", 3.4);
}
geodPos = aircraftToCart({x:-25, y:50, z: 0});
co.set_xyz(geodPos.x, geodPos.y, geodPos.z);
elev = geo.elevation(co.lat(),co.lon());
if (elev != nil) {
setprop("sim/multiplay/generic/float[15]", elev-elev0);
setprop("controls/armament/station[5]/offsets/z-m", elev-elev0+3.4);
} else {
setprop("sim/multiplay/generic/float[15]", 0);
setprop("controls/armament/station[5]/offsets/z-m", 3.4);
}
geodPos = aircraftToCart({x:-50, y:0, z: 0});
co.set_xyz(geodPos.x, geodPos.y, geodPos.z);
elev = geo.elevation(co.lat(),co.lon());
if (elev != nil) {
setprop("sim/multiplay/generic/float[16]", elev-elev0);
setprop("controls/armament/station[6]/offsets/z-m", elev-elev0+3.4);
} else {
setprop("sim/multiplay/generic/float[16]", 0);
setprop("controls/armament/station[6]/offsets/z-m", 3.4);
}
};
PositionUpdater();

482
S-200/Nasal/vector.nas Normal file
View File

@ -0,0 +1,482 @@
var Math = {
#
# Authors: Nikolai V. Chr, Axel Paccalin.
#
# Version 2.01
#
# When doing euler coords. to cartesian: +x = forw, +y = left, +z = up.
# FG struct. coords: +x = back, +y = right, +z = up.
#
# If euler to cartesian (with inverted heading) then:
# cartesian vector will be x: north, y: west, z: skyward
#
# When doing euler angles (from pilots point of view): yaw = yaw left, pitch = rotate up, roll = roll right.
# FG rotations: heading = yaw right, pitch = rotate up, roll = roll right.
#
# Cartesian is right-handed coord system.
#
clamp: func(v, min, max) { v < min ? min : v > max ? max : v },
convertCoords: func (x,y,z) {
return [-x, -y, z];
},
convertAngles: func (heading,pitch,roll) {
return [-heading, pitch, roll];
},
# returns direction in geo coordinate system
vectorToGeoVector: func (a, coord) {
me.handp = me.cartesianToEuler(a);
me.end_dist_m = 100;# not too low for floating point precision. Not too high to get into earth curvature stuff.
me.tgt_coord = geo.Coord.new(coord);
if (me.handp[0] != nil) {
me.tgt_coord.apply_course_distance(me.handp[0],me.end_dist_m);
me.upamount = me.end_dist_m * math.tan(me.handp[1]*D2R);
} elsif (me.handp[1] == 90) {
me.upamount = me.end_dist_m;
} else {
me.upamount = -me.end_dist_m;
}
me.tgt_coord.set_alt(coord.alt()+me.upamount);
me.geoVeccy = me.product(me.magnitudeVector(a), me.normalize([me.tgt_coord.x()-coord.x(),me.tgt_coord.y()-coord.y(),me.tgt_coord.z()-coord.z()]));
return {"x":me.tgt_coord.x()-coord.x(), "y":me.tgt_coord.y()-coord.y(), "z":me.tgt_coord.z()-coord.z(), "vector": me.geoVeccy};
},
# When observing another MP aircraft the groundspeed velocity info is in body frame, this method will convert it to cartesian vector.
#
# Warning: If you input body velocities in fps the output will be in fps also. Likewise for mps.
getCartesianVelocity: func (yaw_deg, pitch_deg, roll_deg, uBody_fps, vBody_fps, wBody_fps) {
me.bodyVelocity = [uBody_fps, -vBody_fps, -wBody_fps];
return me.rollPitchYawVector(roll_deg, pitch_deg, yaw_deg, me.bodyVelocity);
},
# angle between 2 vectors. Returns 0-180 degrees.
angleBetweenVectors: func (a,b) {
a = me.normalize(a);
b = me.normalize(b);
me.value = me.clamp((me.dotProduct(a,b)/me.magnitudeVector(a))/me.magnitudeVector(b),-1,1);#just to be safe in case some floating point error makes it out of bounds
return R2D * math.acos(me.value);
},
# Rodrigues' rotation formula. Use unitVectorAxis as axis, and rotate around it.
rotateVectorAroundVector: func (a, unitVectorAxis, angle) {
return me.plus(
me.plus(
me.product(math.cos(angle*D2R),a),
me.product(math.sin(angle*D2R), me.crossProduct(unitVectorAxis,a))
),
me.product((1-math.cos(angle*D2R))*me.dotProduct(unitVectorAxis,a), unitVectorAxis)
);
},
#Rotate a certain amound of degrees towards 'towardsMe'.
rotateVectorTowardsVector: func (a, towardsMe, angle) {
return me.rotateVectorAroundVector(a, me.normalize(me.crossProduct(a, towardsMe)), angle);
},
# length of vector
magnitudeVector: func (a) {
me.mag = 1;
call(func {me.mag = math.sqrt(math.pow(a[0],2)+math.pow(a[1],2)+math.pow(a[2],2))},nil,nil,var err =[]);#strange bug in Nasal can sometimes mess up sqrt
return me.mag;
},
# dot product of 2 vectors
dotProduct: func (a,b) {
return a[0]*b[0]+a[1]*b[1]+a[2]*b[2];
},
# rotate a vector. Order: roll, pitch, yaw (same as aircraft)
#
# The coordinate system is fixed during all the rolls.
#
rollPitchYawVector: func (roll, pitch, yaw, vector) {
me.rollM = me.rollMatrix(roll);
me.pitchM = me.pitchMatrix(pitch);
me.yawM = me.yawMatrix(yaw);
me.rotation = me.multiplyMatrices(me.yawM, me.multiplyMatrices(me.pitchM, me.rollM));
return me.multiplyMatrixWithVector(me.rotation, vector);
},
# rotate a vector. Order: yaw, pitch, roll (reverse of aircraft)
yawPitchRollVector: func (yaw, pitch, roll, vector) {
me.rollM = me.rollMatrix(roll);
me.pitchM = me.pitchMatrix(pitch);
me.yawM = me.yawMatrix(yaw);
me.rotation = me.multiplyMatrices(me.rollM, me.multiplyMatrices(me.pitchM, me.yawM));
return me.multiplyMatrixWithVector(me.rotation, vector);
},
# rotate a vector. Order: yaw, pitch
yawPitchVector: func (yaw, pitch, vector) {
me.pitchM = me.pitchMatrix(pitch);
me.yawM = me.yawMatrix(yaw);
me.rotation = me.multiplyMatrices(me.pitchM, me.yawM);
return me.multiplyMatrixWithVector(me.rotation, vector);
},
# rotate a vector. Order: pitch, yaw
pitchYawVector: func (pitch, yaw, vector) {
me.pitchM = me.pitchMatrix(pitch);
me.yawM = me.yawMatrix(yaw);
me.rotation = me.multiplyMatrices(me.yawM, me.pitchM);
return me.multiplyMatrixWithVector(me.rotation, vector);
},
# rotate a vector. Order: yaw
yawVector: func (yaw, vector) {
me.yawM = me.yawMatrix(yaw);
return me.multiplyMatrixWithVector(me.yawM, vector);
},
# rotate a vector. Order: pitch
pitchVector: func (pitch, vector) {
me.pitchM = me.pitchMatrix(pitch);
return me.multiplyMatrixWithVector(me.pitchM, vector);
},
# multiply 3x3 matrix with vector
multiplyMatrixWithVector: func (matrix, vector) {
return [matrix[0]*vector[0]+matrix[1]*vector[1]+matrix[2]*vector[2],
matrix[3]*vector[0]+matrix[4]*vector[1]+matrix[5]*vector[2],
matrix[6]*vector[0]+matrix[7]*vector[1]+matrix[8]*vector[2]];
},
# multiply 2 3x3 matrices
multiplyMatrices: func (a,b) {
return [a[0]*b[0]+a[1]*b[3]+a[2]*b[6], a[0]*b[1]+a[1]*b[4]+a[2]*b[7], a[0]*b[2]+a[1]*b[5]+a[2]*b[8],
a[3]*b[0]+a[4]*b[3]+a[5]*b[6], a[3]*b[1]+a[4]*b[4]+a[5]*b[7], a[3]*b[2]+a[4]*b[5]+a[5]*b[8],
a[6]*b[0]+a[7]*b[3]+a[8]*b[6], a[6]*b[1]+a[7]*b[4]+a[8]*b[7], a[6]*b[2]+a[7]*b[5]+a[8]*b[8]];
},
# matrix for rolling
rollMatrix: func (roll) {
roll = roll * D2R;
return [1,0,0,
0,math.cos(roll),-math.sin(roll),
0,math.sin(roll), math.cos(roll)];
},
# matrix for pitching
pitchMatrix: func (pitch) {
pitch = -pitch * D2R;
return [math.cos(pitch),0,math.sin(pitch),
0,1,0,
-math.sin(pitch),0,math.cos(pitch)];
},
# matrix for yawing
yawMatrix: func (yaw) {
yaw = yaw * D2R;
return [math.cos(yaw),-math.sin(yaw),0,
math.sin(yaw),math.cos(yaw),0,
0,0,1];
},
# vector to heading/pitch
cartesianToEuler: func (vector) {
me.horz = math.sqrt(vector[0]*vector[0]+vector[1]*vector[1]);
if (me.horz != 0) {
me.pitch = math.atan2(vector[2],me.horz)*R2D;
me.div = math.clamp(-vector[1]/me.horz, -1, 1);
me.hdg = math.asin(me.div)*R2D;
if (vector[0] < 0) {
# south
if (me.hdg >= 0) {
me.hdg = 180-me.hdg;
} else {
me.hdg = -180-me.hdg;
}
}
me.hdg = geo.normdeg(me.hdg);
} else {
me.pitch = vector[2]>=0?90:-90;
me.hdg = nil;
}
return [me.hdg, me.pitch];
},
# vector to pitch
cartesianToEulerPitch: func (vector) {
me.horz = math.sqrt(vector[0]*vector[0]+vector[1]*vector[1]);
if (me.horz != 0) {
me.pitch = math.atan2(vector[2],me.horz)*R2D;
} else {
me.pitch = vector[2]>=0?90:-90;
}
return me.pitch;
},
# vector to heading
cartesianToEulerHeading: func (vector) {
me.horz = math.sqrt(vector[0]*vector[0]+vector[1]*vector[1]);
if (me.horz != 0) {
me.div = math.clamp(-vector[1]/me.horz, -1, 1);
me.hdg = math.asin(me.div)*R2D;
if (vector[0] < 0) {
# south
if (me.hdg >= 0) {
me.hdg = 180-me.hdg;
} else {
me.hdg = -180-me.hdg;
}
}
me.hdg = geo.normdeg(me.hdg);
} else {
me.hdg = 0;
}
return me.hdg;
},
# gives an vector that points up from fuselage
eulerToCartesian3Z: func (yaw_deg, pitch_deg, roll_deg) {
me.yaw = yaw_deg * D2R;
me.pitch = pitch_deg * D2R;
me.roll = roll_deg * D2R;
me.x = -math.cos(me.yaw)*math.sin(me.pitch)*math.cos(me.roll) + math.sin(me.yaw)*math.sin(me.roll);
me.y = -math.sin(me.yaw)*math.sin(me.pitch)*math.cos(me.roll) - math.cos(me.yaw)*math.sin(me.roll);
me.z = math.cos(me.pitch)*math.cos(me.roll);#roll changed from sin to cos, since the rotation matrix is wrong
return [me.x,me.y,me.z];
},
# gives an vector that points forward from fuselage
eulerToCartesian3X: func (yaw_deg, pitch_deg, roll_deg) {
me.yaw = yaw_deg * D2R;
me.pitch = pitch_deg * D2R;
me.roll = roll_deg * D2R;
me.x = math.cos(me.yaw)*math.cos(me.pitch);
me.y = math.sin(me.yaw)*math.cos(me.pitch);
me.z = math.sin(me.pitch);
return [me.x,me.y,me.z];
},
# gives an vector that points left from fuselage
eulerToCartesian3Y: func (yaw_deg, pitch_deg, roll_deg) {
me.yaw = yaw_deg * D2R;
me.pitch = pitch_deg * D2R;
me.roll = roll_deg * D2R;
me.x = -math.cos(me.yaw)*math.sin(me.pitch)*math.sin(me.roll) - math.sin(me.yaw)*math.cos(me.roll);
me.y = -math.sin(me.yaw)*math.sin(me.pitch)*math.sin(me.roll) + math.cos(me.yaw)*math.cos(me.roll);
me.z = math.cos(me.pitch)*math.sin(me.roll);
return [me.x,me.y,me.z];
},
# same as eulerToCartesian3X, except it needs no roll
eulerToCartesian2: func (yaw_deg, pitch_deg) {
me.yaw = yaw_deg * D2R;
me.pitch = pitch_deg * D2R;
me.x = math.cos(me.pitch) * math.cos(me.yaw);
me.y = math.cos(me.pitch) * math.sin(me.yaw);
me.z = math.sin(me.pitch);
return [me.x,me.y,me.z];
},
#pitch from coord1 to coord2 in degrees (takes curvature of earth into effect.)
getPitch: func (coord1, coord2) {
if (coord1.lat() == coord2.lat() and coord1.lon() == coord2.lon()) {
if (coord2.alt() > coord1.alt()) {
return 90;
} elsif (coord2.alt() < coord1.alt()) {
return -90;
} else {
return 0;
}
}
if (coord1.alt() != coord2.alt()) {
me.d12 = coord1.direct_distance_to(coord2);
me.coord3 = geo.Coord.new(coord1);
me.coord3.set_alt(coord1.alt()-me.d12*0.5);# this will increase the area of the triangle so that rounding errors dont get in the way.
me.d13 = coord1.alt()-me.coord3.alt();
if (me.d12 == 0) {
# on top of each other, maybe rounding error..
return 0;
}
me.d32 = me.coord3.direct_distance_to(coord2);
if (math.abs(me.d13)+me.d32 < me.d12) {
# rounding errors somewhere..one triangle side is longer than other 2 sides combined.
return 0;
}
# standard formula for a triangle where all 3 side lengths are known:
me.len = (math.pow(me.d12, 2)+math.pow(me.d13,2)-math.pow(me.d32, 2))/(2 * me.d12 * math.abs(me.d13));
if (me.len < -1 or me.len > 1) {
# something went wrong, maybe rounding error..
return 0;
}
me.angle = R2D * math.acos(me.len);
me.pitch = -1* (90 - me.angle);
#printf("d12 %.4f d32 %.4f d13 %.4f len %.4f pitch %.4f angle %.4f", me.d12, me.d32, me.d13, me.len, me.pitch, me.angle);
return me.pitch;
} else {
# same altitude
me.nc = geo.Coord.new();
me.nc.set_xyz(0,0,0); # center of earth
me.radiusEarth = coord1.direct_distance_to(me.nc);# current distance to earth center
me.d12 = coord1.direct_distance_to(coord2);
# standard formula for a triangle where all 3 side lengths are known:
me.len = (math.pow(me.d12, 2)+math.pow(me.radiusEarth,2)-math.pow(me.radiusEarth, 2))/(2 * me.d12 * me.radiusEarth);
if (me.len < -1 or me.len > 1) {
# something went wrong, maybe rounding error..
return 0;
}
me.angle = R2D * math.acos(me.len);
me.pitch = -1* (90 - me.angle);
return me.pitch;
}
},
# supply a normal to the plane, and a vector. The vector will be projected onto the plane, and that projection is returned as a vector.
projVectorOnPlane: func (planeNormal, vector) {
if (me.magnitudeVector(planeNormal) == 0) return [0,0,0];#safety
return me.minus(vector, me.product(me.dotProduct(vector,planeNormal)/math.pow(me.magnitudeVector(planeNormal),2), planeNormal));
},
# Project a onto ontoMe.
projVectorOnVector: func (a, ontoMe) {
if (me.magnitudeVector(ontoMe) == 0) return [0,0,0];#safety
return me.product(me.dotProduct(a,ontoMe)/me.dotProduct(ontoMe,ontoMe), ontoMe);
},
# Project a onto ontoMe and measure how long along ontoMe it goes, opposite will give negative number.
scalarProjVectorOnVector: func (a, ontoMe) {
me.ontoMeMag = me.magnitudeVector(ontoMe);
if (me.ontoMeMag == 0) return 0;
return me.dotProduct(a,ontoMe)/me.ontoMeMag;
},
# unary - vector
opposite: func (v){
# author: Paccalin
return [-v[0], -v[1], -v[2]];
},
# vector a - vector b
minus: func (a, b) {
return [a[0]-b[0], a[1]-b[1], a[2]-b[2]];
},
# vector a + vector b
plus: func (a, b) {
return [a[0]+b[0], a[1]+b[1], a[2]+b[2]];
},
# float * vector
product: func (scalar, vector) {
return [scalar*vector[0], scalar*vector[1], scalar*vector[2]]
},
# print vector to console
format: func (v) {
return sprintf("(%.2f, %.2f, %.2f)",v[0],v[1],v[2]);
},
# make vector length 1.0
normalize: func (v) {
me.mag = me.magnitudeVector(v);
return [v[0]/me.mag, v[1]/me.mag, v[2]/me.mag];
},
crossProduct: func (a,b) {
return [a[1]*b[2]-a[2]*b[1], a[2]*b[0]-a[0]*b[2], a[0]*b[1]-a[1]*b[0]];
},
distance_from_point_to_line: func (coordP, coordL1, coordL2) {
var P = [coordP.x(), coordP.y(), coordP.z()];
var L1 = [coordL1.x(), coordL1.y(), coordL1.z()];
var L2 = [coordL2.x(), coordL2.y(), coordL2.z()];
return me.magnitudeVector(me.crossProduct(me.minus(L2,L1), me.minus(L1,P)))/me.magnitudeVector(me.minus(L2,L1));
},
interpolateVector: func (start, end, fraction) {
me.xx = (start[0]*(1-fraction) +end[0]*fraction);
me.yy = (start[1]*(1-fraction) +end[1]*fraction);
me.zz = (start[2]*(1-fraction) +end[2]*fraction);
return [me.xx, me.yy, me.zz];
},
# move distance 'along' from start towards end. Total dist from start to end is dist.
alongVector: func (start, end, dist, along) {
me.fraction = along/dist;
return me.interpolateVector(start, end, me.fraction);
},
# Orthogonal projection of a vector `vec` onto another `ref` !!can throw an exception if the referential vector is null!!.
orthogonalProjection: func(vec, ref){
# author: Paccalin
me.op_refMag = me.magnitudeVector(ref);
if(me.op_refMag == 0)
die("Orthogonal projection on a null vector referential");
return me.dotProduct(vec, ref) / me.op_refMag;
},
# Time at which two particles will be at shortest distance !!can throw an exception if the relative speed is null!!
particleShortestDistTime: func (orig1, speed1, orig2, speed2) {
# author: Paccalin
# Compute the origin of the second particle in a referential positionally centered on the first particle.
me.psdt_tgtOrig = me.minus(orig2, orig1);
# Compute the speed of the second particle in a referential inertially based on the first particle.
me.psdt_tgtSpeed = me.minus(speed2, speed1);
# Project the origin of the particle1 referential onto the line supported by the particle2 trajectory in 1 unit of time.
# And divide the result by the magnitude of the speed to have it normalized relative to the time.
return me.orthogonalProjection(me.opposite(me.psdt_tgtOrig), me.psdt_tgtSpeed) / me.magnitudeVector(me.psdt_tgtSpeed);
},
# rotation matrices
#
#
#| 1 0 0 |
#| 0 cos(roll) -sin(roll) |
#| 0 sin(roll) cos(roll) |
#
#| cos(-pitch) 0 sin(-pitch) |
#| 0 1 0 |
#| -sin(-pitch) 0 cos(-pitch) |
#
#| cos(yaw) -sin(yaw) 0 |
#| sin(yaw) cos(yaw) 0 |
#| 0 0 1 |
#
# combined matrix from yaw, pitch, roll:
#
#| cos(yaw)cos(pitch) -cos(yaw)sin(pitch)sin(roll)-sin(yaw)cos(roll) -cos(yaw)sin(pitch)cos(roll)+sin(yaw)sin(roll)|
#| sin(yaw)cos(pitch) -sin(yaw)sin(pitch)sin(roll)+cos(yaw)cos(roll) -sin(yaw)sin(pitch)cos(roll)-cos(yaw)sin(roll)|
#| sin(pitch) cos(pitch)sin(roll) cos(pitch)cos(roll)|
#
#
};
var unitTest = {
start: func {
# 1: Simple test of rotation matrices and getting the input back in another way.
var localDir = Math.pitchYawVector(-40, -75, [1,0,0]);
me.eulerDir = Math.cartesianToEuler(localDir);
me.eulerDir[0] = me.eulerDir[0]==nil?0:geo.normdeg(me.eulerDir[0]);
printf("Looking out of aircraft window at heading 75 and 40 degs down: %.4f heading %.4f pitch.",me.eulerDir[0],me.eulerDir[1]);
# 2: Revert part of test #1
var forwardDir = Math.yawPitchVector(75, 0, localDir);
me.eulerDir = Math.cartesianToEuler(forwardDir);
me.eulerDir[0] = me.eulerDir[0]==nil?0:geo.normdeg(me.eulerDir[0]);
printf("Looking out of aircraft window at heading 0 and 40 degs down: %.4f heading %.4f pitch.",me.eulerDir[0],me.eulerDir[1]);
# 3: Tougher test, try it different places on earth since earth is not sphere. At KXTA runway it gives 0.03% error in pitch.
var someDir = Math.eulerToCartesian3X(-75, -40, 20);
var myCoord = geo.aircraft_position();
me.thousandVectorGeo = Math.vectorToGeoVector(someDir, myCoord).vector;# does not return magnitude with meaning, only its direction matters.
me.thousandVectorGeo = Math.normalize(me.thousandVectorGeo);
me.thousandVectorGeo = Math.product(100000, me.thousandVectorGeo);
me.lookAt = geo.Coord.new().set_xyz(myCoord.x()+me.thousandVectorGeo[0], myCoord.y()+me.thousandVectorGeo[1], myCoord.z()+me.thousandVectorGeo[2]);
printf("Looking out of aircraft window 100000m away heading 75 and 40 degs down: %.4f heading %.4f pitch %.4f meter.", myCoord.course_to(me.lookAt), Math.getPitch(myCoord, me.lookAt), myCoord.direct_distance_to(me.lookAt));
# 4:
var aircraft = Math.eulerToCartesian3X(-35, 72, 21);
var aircraft2 = Math.rollPitchYawVector(21, 72, -35, [1,0,0]);
printf("These two should be the same %s = %s",Math.format(aircraft),Math.format(aircraft2));
},
};
#unitTest.start();

304
S-200/S-200-set.xml Normal file
View File

@ -0,0 +1,304 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<sim>
<author>pinto, Leto, J Maverick 16</author>
<description>S-200D</description>
<long-description>S-200D Dubna (SA-5) is a Soviet-designed, long-distance surface to air missile system.</long-description>
<status>alpha</status>
<aircraft-version>0.1</aircraft-version>
<flight-model>null</flight-model>
<aero>KPN-D</aero>
<aircraft-operator>KPN</aircraft-operator>
<chase-distance-m type="double" archive="y">-250.0</chase-distance-m>
<model>
<path>Aircraft/S-200/Models/s-200.xml</path>
</model>
<sound>
<path>Sounds/sound.xml</path>
</sound>
<presets>
<onground>true</onground>
</presets>
<startup>
<splash-texture>Aircraft/S-200/splash1.png</splash-texture>
</startup>
<previews>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>gui/1.png</path>
</preview>
<preview>
<type>exterior</type>
<splash type="bool">true</splash>
<path>gui/2.png</path>
</preview>
</previews>
<current-view>
<deck-park type="bool">true</deck-park>
<z-offset-dec-step type="double">0.0</z-offset-dec-step>
<z-offset-inc-step type="double">0.0</z-offset-inc-step>
<can-change-z-offset type="bool">false</can-change-z-offset>
<z-offset-min-m type="float">100.0</z-offset-min-m>
<z-offset-max-m type="float">2000.0</z-offset-max-m>
</current-view>
<view n="200">
<name>Follow</name>
<type>lookat</type>
<internal>false</internal>
<config>
<!--<from-model type="bool">true</from-model>
<from-model-idx type="int">0</from-model-idx>-->
<eye-fixed type="bool">true</eye-fixed>
<target-lat-deg-path>rotors/main/blade[0]/flap-deg</target-lat-deg-path>
<target-lon-deg-path>rotors/main/blade[1]/flap-deg</target-lon-deg-path>
<target-alt-ft-path>rotors/main/blade[2]/position-deg</target-alt-ft-path>
<eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>
<eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>
<eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>
<!--<eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
<eye-pitch-deg-path>/orientation/pitch-deg</eye-pitch-deg-path>
<eye-roll-deg-path>/orientation/roll-deg</eye-roll-deg-path>-->
<eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
<eye-pitch-deg>0</eye-pitch-deg>
<eye-roll-deg>0</eye-roll-deg>
<x-offset-m>50</x-offset-m>
<y-offset-m>50</y-offset-m>
<z-offset-m>25</z-offset-m>
<default-field-of-view-deg>70</default-field-of-view-deg>
<limits>
<enabled type="bool">false</enabled>
</limits>
</config>
</view>
<hud>
<path n="1">Aircraft/S-200/Hud/hud.xml</path>
<visibility n="1">true</visibility>
<font>
<size type="float">11.0</size>
</font>
</hud>
<tower>
<auto-position type="bool">true</auto-position>
</tower>
<multiplay>
<visibility-range-nm type="int">500</visibility-range-nm>
<generic>
<int n="0" type="int">0</int>
<int n="2" type="int">0</int>
<string n="6" type="string"></string><!-- string 6 used by radar lock RWR warning -->
<string n="7" type="string"></string><!-- datalink -->
</generic>
</multiplay>
<menubar>
<default>
<menu n="100">
<label>S-200D</label>
<enabled type="bool">true</enabled>
<item>
<label>Event Log</label>
<binding>
<command>dialog-show</command>
<dialog-name>flightlog</dialog-name>
</binding>
</item>
</menu>
</default>
</menubar>
<aircraft-data>
<!-- Properties that get saved to persist locally between FG sessions -->
<path>enemies/e1</path>
<path>enemies/e2</path>
<path>enemies/e3</path>
<path>enemies/e4</path>
<path>enemies/e5</path>
<path>enemies/e6</path>
<path>enemies/e7</path>
<path>enemies/e8</path>
<path>enemies/e9</path>
<path>enemies/e10</path>
<path>enemies/e11</path>
<path>enemies/e12</path>
</aircraft-data>
</sim>
<controls>
<armament>
<station n="1">
<offsets>
<x-m type="double"> 25</x-m>
<y-m type="double"> -50</y-m>
<z-m type="double"> 5.5</z-m>
</offsets>
</station>
<station n="2">
<offsets>
<x-m type="double"> -25</x-m>
<y-m type="double"> -50</y-m>
<z-m type="double"> 5.5</z-m>
</offsets>
</station>
<station n="3">
<offsets>
<x-m type="double"> -50</x-m>
<y-m type="double"> 0</y-m>
<z-m type="double"> 5.5</z-m>
</offsets>
</station>
<station n="4">
<offsets>
<x-m type="double"> -25</x-m>
<y-m type="double"> 50</y-m>
<z-m type="double"> 5.5</z-m>
</offsets>
</station>
<station n="5">
<offsets>
<x-m type="double"> 25</x-m>
<y-m type="double"> 50</y-m>
<z-m type="double"> 5.5</z-m>
</offsets>
</station>
<station n="6">
<offsets>
<x-m type="double"> 50</x-m>
<y-m type="double"> 0</y-m>
<z-m type="double"> 5.5</z-m>
</offsets>
</station>
</armament>
</controls>
<payload>
<d-config>
<full_damage_dist_m type="double">2.25</full_damage_dist_m>
<use_hitpoints_instead_of_failure_modes_bool type="bool">true</use_hitpoints_instead_of_failure_modes_bool>
<hp_max type="double">80</hp_max>
<hitable_by_air_munitions type="bool">false</hitable_by_air_munitions>
<hitable_by_cannon type="bool">true</hitable_by_cannon>
<is_fleet type="bool">false</is_fleet>
<rwr_to_screen type="bool">false</rwr_to_screen>
<rwr_audio_extended type="bool">false</rwr_audio_extended>
<tacview_supported type="bool">false</tacview_supported>
<m28_auto type="bool">false</m28_auto>
<mlw_max type="double">2.25</mlw_max>
<auto_flare_caller type="bool">false</auto_flare_caller>
</d-config>
<armament>
<models type="string">Aircraft/S-200/Models/Armament/Weapons/</models>
<modelsUseCase type="bool">true</modelsUseCase>
<modelsUpperCase type="bool">true</modelsUpperCase>
<MP-lat type="string">rotors/main/blade[0]/flap-deg</MP-lat>
<MP-lon type="string">rotors/main/blade[1]/flap-deg</MP-lon>
<MP-alt type="string">rotors/main/blade[2]/flap-deg</MP-alt>
<MP-alt-ft type="string">rotors/main/blade[2]/position-deg</MP-alt-ft>
<hit-interpolation type="bool">true</hit-interpolation>
<gnd-launch type="bool">true</gnd-launch>
<pylon-offset type="int">1</pylon-offset>
<pylon-stations>controls/armament</pylon-stations>
<station-name type="string">station</station-name>
<msg type="bool">true</msg>
<damage type="bool">true</damage>
<enable-craters type="bool">true</enable-craters>
<MLW-bearing type="double">0</MLW-bearing>
<MLW-count type="int">0</MLW-count>
<MLW-launcher type="string"></MLW-launcher>
<MAW-bearing type="double">0</MAW-bearing>
<MAW-active type="bool">false</MAW-active>
<spike type="bool">false</spike>
</armament>
</payload>
<rotors>
<main>
<blade n="0">
<flap-deg type="double">0</flap-deg>
</blade>
<blade n="1">
<flap-deg type="double">0</flap-deg>
</blade>
<blade n="2">
<flap-deg type="double">0</flap-deg>
<position-deg type="double">0</position-deg>
</blade>
</main>
</rotors>
<sam>
<impact0 type="double">-1</impact0>
<impact1 type="double">-1</impact1>
<impact2 type="double">-1</impact2>
<impact3 type="double">-1</impact3>
<hit0 type="double">-1</hit0>
<hit1 type="double">-1</hit1>
<hit2 type="double">-1</hit2>
<hit3 type="double">-1</hit3>
<missiles type="double">1</missiles>
<timeleft type="double">600</timeleft>
<damage type="double">100</damage>
</sam>
<enemies>
<e1 userarchive="y" type="string">target1</e1>
<e2 userarchive="y" type="string">target2</e2>
<e3 userarchive="y" type="string">target3</e3>
<e4 userarchive="y" type="string">target4</e4>
<e5 userarchive="y" type="string">target5</e5>
<e6 userarchive="y" type="string">target6</e6>
<e7 userarchive="y" type="string">target7</e7>
<e8 userarchive="y" type="string">target8</e8>
<e9 userarchive="y" type="string">target9</e9>
<e10 userarchive="y" type="string">targetA</e10>
<e11 userarchive="y" type="string">targetB</e11>
<e12 userarchive="y" type="string">targetC</e12>
</enemies>
<priority type="int">1</priority>
<priority1 type="int">1</priority1>
<nasal>
<notifications>
<file>Aircraft/S-200/Nasal/ArmamentNotification.nas</file>
<file>Aircraft/S-200/Nasal/GeoBridgedTransmitter.nas</file>
</notifications>
<fdm>
<file>Aircraft/S-200/Nasal/fdm.nas</file>
</fdm>
<damage>
<file>Aircraft/S-200/Nasal/damage.nas</file>
</damage>
<radar_logic>
<file>Aircraft/S-200/Nasal/radar-logic.nas</file>
</radar_logic>
<vector>
<file>Aircraft/S-200/Nasal/vector.nas</file><!-- needed by the guided-missiles -->
</vector>
<armament>
<file>Aircraft/S-200/Nasal/guided-missiles.nas</file>
</armament>
<fire_control>
<file>Aircraft/S-200/Nasal/fire-control.nas</file>
</fire_control>
</nasal>
</PropertyList>

25
S-200/Sounds/sound.xml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<fx>
<launch>
<name>missile</name>
<path>Aircraft/S-200/Sounds/launch.wav</path>
<mode>once</mode>
<condition>
<property>payload/armament/dubna/sound-fire-on-off</property>
</condition>
<reference-dist>50</reference-dist>
<max-dist>15000</max-dist>
<position>
<x> 0.01 </x>
<y> 0.01 </y>
<z> 0.01 </z>
</position>
<volume>
<factor>1</factor>
<max>1</max>
</volume>
</launch>
</fx>
</PropertyList>

BIN
S-200/gui/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
S-200/gui/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

@ -0,0 +1,348 @@
<?xml version="1.0"?>
<PropertyList>
<name>enemies</name>
<modal>false</modal>
<layout>vbox</layout>
<draggable>true</draggable>
<resizable>true</resizable>
<width>250</width>
<height>550</height>
<group>
<layout>hbox</layout>
<empty><stretch>1</stretch></empty>
<text>
<label>Targets</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
</group>
<text>
<label>Callsigns:</label>
<height>25</height>
</text>
<input>
<width>250</width>
<height>25</height>
<label>1</label>
<property>enemies/e1</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>2</label>
<property>enemies/e2</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>3</label>
<property>enemies/e3</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>4</label>
<property>enemies/e4</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>5</label>
<property>enemies/e5</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>6</label>
<property>enemies/e6</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>7</label>
<property>enemies/e7</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>8</label>
<property>enemies/e8</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>9</label>
<property>enemies/e9</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>10</label>
<property>enemies/e10</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>11</label>
<property>enemies/e11</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<input>
<width>250</width>
<height>25</height>
<label>12</label>
<property>enemies/e12</property>
<live>true</live>
<halign>left</halign>
<binding>
<command>dialog-apply</command>
</binding>
<color>
<red>1</red>
<green>0.5</green>
<blue>0.5</blue>
</color>
<enable>
<not>
<property>enemies/opfor-switch</property>
</not>
<not>
<property>enemies/friend-switch</property>
</not>
</enable>
</input>
<checkbox>
<width>12</width>
<height>12</height>
<property>/enemies/opfor-switch</property>
<label>Target all non-OPFOR</label>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<width>12</width>
<height>12</height>
<property>/enemies/friend-switch</property>
<label>Target all OPFOR</label>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</PropertyList>

View File

@ -0,0 +1,91 @@
<?xml version="1.0"?>
<PropertyList>
<name>flightlog</name>
<modal>false</modal>
<layout>vbox</layout>
<draggable>true</draggable>
<resizable>true</resizable>
<group>
<layout>hbox</layout>
<empty><stretch>1</stretch></empty>
<text>
<label>Event log</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
</group>
<nasal>
<open>
<![CDATA[
setprop("sim/model/mig21/event-log", "Click refresh to see the event log..");
]]>
</open>
<close>
<![CDATA[
setprop("sim/model/mig21/event-log", "");
]]>
</close>
</nasal>
<button>
<!--<x>0</x>
<y>0</y>-->
<legend>Refresh</legend>
<binding>
<command>nasal</command>
<script><![CDATA[
var str = "";
if (1) {
var buffer = damage.damageLog.get_buffer();
foreach(entry; buffer) {
str = str~""~entry.time~" "~entry.message~"\n";
}
} else {
str = "The aircraft must be still to read the event log.";
}
setprop("sim/model/mig21/event-log", str);
]]></script>
</binding>
</button>
<text>
<label>Log:</label>
</text>
<textbox>
<!-- position -->
<!--<x>100</x>
<y>100</y>-->
<!-- dimensions -->
<pref-width>500</pref-width>
<pref-height>500</pref-height>
<property>/sim/model/mig21/event-log</property>
<live>true</live>
<slider>15</slider> <!--width for slider -->
<wrap>false</wrap> <!-- don't wrap text; default: true -->
<top-line>0</top-line> <!-- line to show at top, -ve numbers show last line -->
<editable>false</editable> <!-- if the puLargeInput is supposed to be editable -->
</textbox>
</PropertyList>

148
S-200/gui/dialogs/prio.xml Normal file
View File

@ -0,0 +1,148 @@
<?xml version="1.0"?>
<PropertyList>
<name>priority</name>
<modal>false</modal>
<layout>vbox</layout>
<draggable>true</draggable>
<resizable>false</resizable>
<width>125</width>
<height>200</height>
<group>
<empty><stretch>1</stretch></empty>
<layout>hbox</layout>
<text>
<label>Priority</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>dialog-close</command>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
</button>
</group>
<group>
<layout>table</layout>
<text>
<label>Random</label>
<halign>right</halign>
<row>0</row>
<col>0</col>
</text>
<radio>
<row>0</row>
<col>1</col>
<property>priority0</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",0);setprop("priority0",1);setprop("priority6",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Highest</label>
<halign>right</halign>
<row>1</row>
<col>0</col>
</text>
<radio>
<row>1</row>
<col>1</col>
<property>priority1</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",1);setprop("priority1",1);setprop("priority0",0);setprop("priority6",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Lowest</label>
<halign>right</halign>
<row>2</row>
<col>0</col>
</text>
<radio>
<row>2</row>
<col>1</col>
<property>priority2</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",2);setprop("priority2",1);setprop("priority0",0);setprop("priority1",0);setprop("priority6",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Fastest</label>
<halign>right</halign>
<row>3</row>
<col>0</col>
</text>
<radio>
<row>3</row>
<col>1</col>
<property>priority3</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",3);setprop("priority3",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority6",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Slowest</label>
<halign>right</halign>
<row>4</row>
<col>0</col>
</text>
<radio>
<row>4</row>
<col>1</col>
<property>priority4</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",4);setprop("priority4",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority6",0);setprop("priority5",0);</script>
</binding>
</radio>
<text>
<label>Closest</label>
<halign>right</halign>
<row>5</row>
<col>0</col>
</text>
<radio>
<row>5</row>
<col>1</col>
<property>priority5</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",5);setprop("priority5",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority6",0);</script>
</binding>
</radio>
<text>
<label>Farthest</label>
<halign>right</halign>
<row>6</row>
<col>0</col>
</text>
<radio>
<row>6</row>
<col>1</col>
<property>priority6</property>
<live>true</live>
<binding>
<command>nasal</command>
<script>setprop("priority",6);setprop("priority6",1);setprop("priority0",0);setprop("priority1",0);setprop("priority2",0);setprop("priority3",0);setprop("priority4",0);setprop("priority5",0);</script>
</binding>
</radio>
</group>
</PropertyList>

BIN
S-200/splash1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

BIN
S-200/thumbnail.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB