1
0
Fork 0

Display , hotspot update

This commit is contained in:
sydadams 2009-02-15 09:32:11 +00:00
parent dfc22cf009
commit 58d629ed13
15 changed files with 322 additions and 278 deletions

View file

@ -7,6 +7,26 @@ Syd Adams
<path>RDR160.ac</path> <path>RDR160.ac</path>
<panel>
<name>Radar</name>
<path>Aircraft/Instruments-3d/RDR-160/radar.xml</path>
<bottom-left>
<x-m>0.003</x-m>
<y-m>-0.050</y-m>
<z-m>-0.033</z-m>
</bottom-left>
<bottom-right>
<x-m>0.003</x-m>
<y-m>0.050</y-m>
<z-m>-0.033</z-m>
</bottom-right>
<top-left>
<x-m>0.003</x-m>
<y-m>-0.050</y-m>
<z-m>0.049</z-m>
</top-left>
</panel>
<animation> <animation>
<type>material</type> <type>material</type>
<object-name>RDR160.labels</object-name> <object-name>RDR160.labels</object-name>
@ -72,7 +92,7 @@ Syd Adams
<animation> <animation>
<type>rotate</type> <type>rotate</type>
<object-name>RDR160.power</object-name> <object-name>RDR160.power</object-name>
<property>/instrumentation/radar/switch-pos</property> <property>instrumentation/radar/switch-pos</property>
<interpolation> <interpolation>
<entry><ind>0</ind><dep>0</dep></entry> <entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>1</ind><dep>40</dep></entry> <entry><ind>1</ind><dep>40</dep></entry>
@ -91,11 +111,11 @@ Syd Adams
</axis> </axis>
</animation> </animation>
<!-- OSG Pick Animations --> <!-- Hotspots -->
<!--
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>brt.up</object-name> <object-name>RDR160.brt</object-name>
<action> <action>
<button>0</button> <button>0</button>
<repeatable>true</repeatable> <repeatable>true</repeatable>
@ -112,9 +132,9 @@ Syd Adams
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>brt.dwn</object-name> <object-name>RDR160.brt</object-name>
<action> <action>
<button>0</button> <button>1</button>
<repeatable>true</repeatable> <repeatable>true</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>property-adjust</command>
@ -129,7 +149,7 @@ Syd Adams
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>tilt.up</object-name> <object-name>RDR160.tilt</object-name>
<action> <action>
<button>0</button> <button>0</button>
<repeatable>false</repeatable> <repeatable>false</repeatable>
@ -146,9 +166,9 @@ Syd Adams
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>tilt.dwn</object-name> <object-name>RDR160.tilt</object-name>
<action> <action>
<button>0</button> <button>1</button>
<repeatable>false</repeatable> <repeatable>false</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>property-adjust</command>
@ -163,34 +183,24 @@ Syd Adams
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>pwr.off</object-name> <object-name>RDR160.power</object-name>
<action> <action>
<button>0</button> <button>1</button>
<repeatable>false</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>nasal</command>
<property>instrumentation/radar/switch-pos</property> <script>radar.set_switch(-1);</script>
<step>-1</step>
<min>0</min>
<max>3</max>
<wrap>false</wrap>
</binding> </binding>
</action> </action>
</animation> </animation>
<animation> <animation>
<type>pick</type> <type>pick</type>
<object-name>pwr.on</object-name> <object-name>RDR160.power</object-name>
<action> <action>
<button>0</button> <button>0</button>
<repeatable>false</repeatable>
<binding> <binding>
<command>property-adjust</command> <command>nasal</command>
<property>instrumentation/radar/switch-pos</property> <script>radar.set_switch(1);</script>
<step>1</step>
<min>0</min>
<max>3</max>
<wrap>false</wrap>
</binding> </binding>
</action> </action>
</animation> </animation>
@ -202,9 +212,8 @@ Syd Adams
<button>0</button> <button>0</button>
<repeatable>false</repeatable> <repeatable>false</repeatable>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>instrumentation/radar/set-range</property> <script>radar.set_range(1);</script>
<value>1</value>
</binding> </binding>
</action> </action>
</animation> </animation>
@ -216,9 +225,8 @@ Syd Adams
<button>0</button> <button>0</button>
<repeatable>false</repeatable> <repeatable>false</repeatable>
<binding> <binding>
<command>property-assign</command> <command>nasal</command>
<property>instrumentation/radar/set-range</property> <script>radar.set_range(-1);</script>
<value>-1</value>
</binding> </binding>
</action> </action>
</animation> </animation>
@ -248,5 +256,5 @@ Syd Adams
</binding> </binding>
</action> </action>
</animation> </animation>
-->
</PropertyList> </PropertyList>

View file

@ -44,7 +44,7 @@ OBJECT poly
name "RDR160" name "RDR160"
data 8 data 8
Mesh.223 Mesh.223
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 86 numvert 86
@ -484,7 +484,7 @@ OBJECT poly
name "RDR160.bkgr" name "RDR160.bkgr"
data 9 data 9
Plane.004 Plane.004
texture "bkgrd.rgb" texture "bkgrd.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 4 numvert 4
@ -505,7 +505,7 @@ OBJECT poly
name "RDR160.brt" name "RDR160.brt"
data 12 data 12
Cylinder.011 Cylinder.011
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 38 numvert 38
@ -815,7 +815,7 @@ OBJECT poly
name "RDR160.btn1" name "RDR160.btn1"
data 8 data 8
Cube.005 Cube.005
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -868,7 +868,7 @@ OBJECT poly
name "RDR160.btn2" name "RDR160.btn2"
data 8 data 8
Cube.008 Cube.008
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -921,7 +921,7 @@ OBJECT poly
name "RDR160.gain" name "RDR160.gain"
data 12 data 12
Cylinder.015 Cylinder.015
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 38 numvert 38
@ -1231,7 +1231,7 @@ OBJECT poly
name "RDR160.hold" name "RDR160.hold"
data 8 data 8
Cube.009 Cube.009
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -1284,7 +1284,7 @@ OBJECT poly
name "RDR160.labels" name "RDR160.labels"
data 9 data 9
Plane.052 Plane.052
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 52 numvert 52
@ -1437,7 +1437,7 @@ OBJECT poly
name "RDR160.modedwn" name "RDR160.modedwn"
data 8 data 8
Cube.006 Cube.006
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -1490,7 +1490,7 @@ OBJECT poly
name "RDR160.modeup" name "RDR160.modeup"
data 8 data 8
Cube.012 Cube.012
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -1543,7 +1543,7 @@ OBJECT poly
name "RDR160.nav" name "RDR160.nav"
data 8 data 8
Cube.007 Cube.007
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -1596,7 +1596,7 @@ OBJECT poly
name "RDR160.power" name "RDR160.power"
data 12 data 12
Cylinder.014 Cylinder.014
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 38 numvert 38
@ -1906,7 +1906,7 @@ OBJECT poly
name "RDR160.rngdwn" name "RDR160.rngdwn"
data 8 data 8
Cube.014 Cube.014
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -1959,7 +1959,7 @@ OBJECT poly
name "RDR160.rngup" name "RDR160.rngup"
data 8 data 8
Cube.013 Cube.013
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -2012,7 +2012,7 @@ OBJECT poly
name "RDR160.tilt" name "RDR160.tilt"
data 12 data 12
Cylinder.012 Cylinder.012
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 38 numvert 38
@ -2322,7 +2322,7 @@ OBJECT poly
name "RDR160.trkdwn" name "RDR160.trkdwn"
data 8 data 8
Cube.010 Cube.010
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -2375,7 +2375,7 @@ OBJECT poly
name "RDR160.trkup" name "RDR160.trkup"
data 8 data 8
Cube.011 Cube.011
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 8 numvert 8
@ -2542,7 +2542,7 @@ OBJECT poly
name "tilt.dwn" name "tilt.dwn"
data 9 data 9
Plane.060 Plane.060
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 4 numvert 4
@ -2563,7 +2563,7 @@ OBJECT poly
name "tilt.up" name "tilt.up"
data 9 data 9
Plane.070 Plane.070
texture "RDR160.rgb" texture "RDR160.png"
texrep 1 1 texrep 1 1
crease 30.000000 crease 30.000000
numvert 4 numvert 4

View file

@ -1,58 +1,36 @@
#### King RDR-160 Weather Radar #### # This file should be loaded in the aircraft set file like so:
#### Syd Adams #### # <nasal>
#### # <radar>
#### Include this file in the Set file to run the RDR-160 radar # <file>Aircraft/Instruments-3d/RDR-160/RDR160.nas</file>
#### # </radar>
#### Switch Modes 0 = off ; 1 = stby ; 2 = tst ; 3 = on; #</nasal>
#### Radar Modes WX ; WXA ; MAP #
#### Ranges : 10 , 20, 40, 80 , 160 #
RADAR = props.globals.getNode("/instrumentation/radar",1);
FDM_ON = 0;
P_Str =["off","stby", "tst","on"];
RADAR.getNode("serviceable",1).setBoolValue(1);
RADAR.getNode("range",1).setIntValue(20);
RADAR.getNode("heading-marker",1).setBoolValue(0);
RADAR.getNode("lightning",1).setBoolValue(0);
RADAR.getNode("set-range",1).setIntValue(0);
RADAR.getNode("minimized",1).setBoolValue(0);
RADAR.getNode("switch",1).setValue("off");
RADAR.getNode("switch-pos",1).setIntValue(0);
RADAR.getNode("mode",1).setValue("WX");
RADAR.getNode("mode-control",1).setIntValue(3);
RADAR.getNode("display-mode",1).setValue("arc");
RADAR.getNode("dim",1).setDoubleValue(0.5);
RADAR.getNode("display-controls/WX",1).setBoolValue(1);
RADAR.getNode("display-controls/data",1).setBoolValue(0);
RADAR.getNode("display-controls/pos",1).setBoolValue(0);
setlistener("/sim/signals/fdm-initialized", func { var switch_mode=["off","stby","tst","on"];
FDM_ON = 1; var s_pos =props.globals.initNode("instrumentation/radar/switch-pos",0,"INT");
print("KING RDR-160 ... OK"); var r_rng =props.globals.initNode("instrumentation/radar/range",10,"DOUBLE");
}); var r_sw =props.globals.initNode("instrumentation/radar/switch","off");
setlistener("/instrumentation/radar/switch-pos", func(n) { var set_range=func(rng){
if(FDM_ON != 0){ var Rng = r_rng.getValue();
var swtch = n.getValue(); if(rng==1){
RADAR.getNode("switch",1).setValue(P_Str[swtch]); Rng=Rng*2;
if(Rng >160)Rng=160;
}elsif(rng==-1){
Rng=Rng*0.5;
if(Rng <10)Rng=10;
} }
}); r_rng.setValue(Rng);
};
setlistener("/instrumentation/radar/set-range", func(n) { var set_switch=func(sw){
if(FDM_ON != 0){ var switchpos=s_pos.getValue() or 0;
var rng = RADAR.getNode("range").getValue(); switchpos+=sw;
var num = n.getValue(); if(switchpos>3)switchpos=3;
n.setValue(0); if(switchpos<0)switchpos=0;
if(num > 0){ s_pos.setValue(switchpos);
rng *= 2; r_sw.setValue(switch_mode[switchpos]);
if(rng > 160){rng = 160.0;} };
}else{
if(num < 0){
rng *=0.5;
if(rng < 10){rng = 10.0;}
}
}
RADAR.getNode("range").setValue(rng);
}
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

View file

@ -0,0 +1,208 @@
<?xml version="1.0"?>
<!--RDR 160 WxRadar hotspots-->
<PropertyList>
<name>radar display</name>
<w-base>256</w-base>
<h-base>256</h-base>
<w>256</w>
<h>256</h>
<layers>
<layer>
<condition>
<not-equals>
<property>instrumentation/radar/switch</property>
<value>off</value>
</not-equals>
</condition>
<name>background</name>
<texture>
<path>Aircraft/Instruments-3d/RDR-160/bkgrd.png</path>
<x1>0.07</x1>
<y1>0.05</y1>
<x2>0.930</x2>
<y2>0.910</y2>
</texture>
<emissive>true</emissive>
</layer>
<layer>
<condition>
<equals>
<property>instrumentation/radar/switch</property>
<value>on</value>
</equals>
</condition>
<name>radar data</name>
<texture>
<path>Aircraft/Instruments-3d/RDR-160/od_wxradar.png</path>
<x1>0.0</x1>
<y1>0.0</y1>
<x2>1.0</x2>
<y2>1.0</y2>
</texture>
<emissive>true</emissive>
</layer>
<layer>
<condition>
<not-equals>
<property>instrumentation/radar/switch</property>
<value>off</value>
</not-equals>
</condition>
<name>RNG1</name>
<type>text</type>
<font>arial_black</font>
<point-size>10</point-size>
<color>
<red>0.39</red>
<green>0.55</green>
<blue>0.69</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>instrumentation/radar/range</property>
<format>%3.0f</format>
</chunk>
</chunks>
<transformations>
<transformation>
<type>x-shift</type>
<offset>99</offset>
</transformation>
<transformation>
<type>y-shift</type>
<offset>70</offset>
</transformation>
</transformations>
</layer>
<layer>
<condition>
<not-equals>
<property>instrumentation/radar/switch</property>
<value>off</value>
</not-equals>
</condition>
<name>RNG2</name>
<type>text</type>
<font>arial_black</font>
<point-size>10</point-size>
<color>
<red>0.39</red>
<green>0.55</green>
<blue>0.69</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>instrumentation/radar/range</property>
<scale>0.75</scale>
<format>%3.1f</format>
</chunk>
</chunks>
<transformations>
<transformation>
<type>x-shift</type>
<offset>99</offset>
</transformation>
<transformation>
<type>y-shift</type>
<offset>0</offset>
</transformation>
</transformations>
</layer>
<layer>
<condition>
<not-equals>
<property>instrumentation/radar/switch</property>
<value>off</value>
</not-equals>
</condition>
<name>RNG3</name>
<type>text</type>
<font>arial_black</font>
<point-size>10</point-size>
<color>
<red>0.39</red>
<green>0.55</green>
<blue>0.69</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>instrumentation/radar/range</property>
<scale>0.5</scale>
<format>%3.1f</format>
</chunk>
</chunks>
<transformations>
<transformation>
<type>x-shift</type>
<offset>67</offset>
</transformation>
<transformation>
<type>y-shift</type>
<offset>-31</offset>
</transformation>
</transformations>
</layer>
<layer>
<condition>
<not-equals>
<property>instrumentation/radar/switch</property>
<value>off</value>
</not-equals>
</condition>
<name>RNG4</name>
<type>text</type>
<font>arial_black</font>
<point-size>10</point-size>
<color>
<red>0.39</red>
<green>0.55</green>
<blue>0.69</blue>
</color>
<chunks>
<chunk>
<type>number-value</type>
<property>instrumentation/radar/range</property>
<scale>0.25</scale>
<format>%3.1f</format>
</chunk>
</chunks>
<transformations>
<transformation>
<type>x-shift</type>
<offset>38</offset>
</transformation>
<transformation>
<type>y-shift</type>
<offset>-60</offset>
</transformation>
</transformations>
</layer>
</layers>
<actions>
<!--
<action>
<name>outline</name>
<button>0</button>
<x>-128</x>
<y>-128</y>
<w>256</w>
<h>256</h>
</action>
-->
</actions>
</PropertyList>

View file

@ -0,0 +1,21 @@
<?xml version="1.0"?>
<PropertyList>
<name>Radar Panel</name>
<background>Aircraft/Instruments-3d/RDR-160/transparent-bg.png</background>
<w>330</w>
<h>256</h>
<instruments>
<instrument include="radar-display.xml">
<name>radar screen</name>
<x>165</x>
<y>128</y>
<w>256</w>
<h>256</h>
</instrument>
</instruments>
</PropertyList>

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -4,8 +4,7 @@
<PropertyList> <PropertyList>
<name>wxradar hotspots</name> <name>wxradar hotspots</name>
<w-base>160</w-base> <background>Aircraft/Instruments-3d/RDR-160/pnl.png</background>
<h-base>120</h-base>
<w>160</w> <w>160</w>
<h>120</h> <h>120</h>
@ -22,7 +21,7 @@
</not-equals> </not-equals>
</condition> </condition>
<texture> <texture>
<path>Aircraft/Instruments-3d/RDR-160/bkgrd.rgb</path> <path>Aircraft/Instruments-3d/RDR-160/bkgrd.png</path>
<x1>0.030</x1> <x1>0.030</x1>
<y1>0.112</y1> <y1>0.112</y1>
<x2>0.979</x2> <x2>0.979</x2>
@ -49,7 +48,7 @@
</equals> </equals>
</condition> </condition>
<texture> <texture>
<path>Aircraft/Instruments-3d/RDR-160/od_wxradar.rgb</path> <path>Aircraft/Instruments-3d/RDR-160/od_wxradar.png</path>
<x1>0.0</x1> <x1>0.0</x1>
<y1>0.0</y1> <y1>0.0</y1>
<x2>1.0</x2> <x2>1.0</x2>
@ -234,176 +233,6 @@
</transformation> </transformation>
</transformations> </transformations>
</layer> </layer>
</layers> </layers>
<actions>
<!--
<action>
<name>outline</name>
<button>0</button>
<x>-80</x>
<y>-60</y>
<w>160</w>
<h>120</h>
</action>
-->
<action>
<name>data toggle</name>
<button>0</button>
<x>-74</x>
<y>-2</y>
<w>12</w>
<h>8</h>
<binding>
<command>property-toggle</command>
<property>instrumentation/radar/display-controls/data</property>
</binding>
</action>
<action>
<name>pos toggle</name>
<button>0</button>
<x>-74</x>
<y>-20</y>
<w>12</w>
<h>8</h>
<binding>
<command>property-toggle</command>
<property>instrumentation/radar/display-controls/pos</property>
</binding>
</action>
<action>
<name>range increase</name>
<button>0</button>
<x>64</x>
<y>-2</y>
<w>12</w>
<h>8</h>
<binding>
<command>property-assign</command>
<property>instrumentation/radar/set-range</property>
<value>1</value>
</binding>
</action>
<action>
<name>range decrease</name>
<button>0</button>
<x>64</x>
<y>-20</y>
<w>12</w>
<h>8</h>
<binding>
<command>property-assign</command>
<property>instrumentation/radar/set-range</property>
<value>-1</value>
</binding>
</action>
<action>
<name>pwroff</name>
<button>0</button>
<x>-80</x>
<y>-51</y>
<w>12</w>
<h>20</h>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/switch-pos</property>
<step>-1</step>
<min>0</min>
<max>3</max>
<wrap>false</wrap>
</binding>
</action>
<action>
<name>pwron</name>
<button>0</button>
<x>-68</x>
<y>-51</y>
<w>12</w>
<h>20</h>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/switch-pos</property>
<step>1</step>
<min>0</min>
<max>3</max>
<wrap>false</wrap>
</binding>
</action>
<action>
<name>tiltup</name>
<button>0</button>
<x>67</x>
<y>-55</y>
<w>12</w>
<h>20</h>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/tilt</property>
<step>5.0</step>
<min>-15.0</min>
<max>15.0</max>
<wrap>false</wrap>
</binding>
</action>
<action>
<name>tiltdown</name>
<button>0</button>
<x>55</x>
<y>-55</y>
<w>12</w>
<h>20</h>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/tilt</property>
<step>-5.0</step>
<min>-15.0</min>
<max>15.0</max>
<wrap>false</wrap>
</binding>
</action>
<action>
<name>brtup</name>
<button>0</button>
<x>-68</x>
<y>39</y>
<w>12</w>
<h>20</h>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/dim</property>
<step>0.05</step>
<min>0.0</min>
<max>1.0</max>
<wrap>false</wrap>
</binding>
</action>
<action>
<name>brtdwn</name>
<button>0</button>
<x>-80</x>
<y>39</y>
<w>12</w>
<h>20</h>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/dim</property>
<step>-0.05</step>
<min>0.0</min>
<max>1.0</max>
<wrap>false</wrap>
</binding>
</action>
</actions>
</PropertyList> </PropertyList>