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>
<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>
<type>material</type>
<object-name>RDR160.labels</object-name>
@ -72,7 +92,7 @@ Syd Adams
<animation>
<type>rotate</type>
<object-name>RDR160.power</object-name>
<property>/instrumentation/radar/switch-pos</property>
<property>instrumentation/radar/switch-pos</property>
<interpolation>
<entry><ind>0</ind><dep>0</dep></entry>
<entry><ind>1</ind><dep>40</dep></entry>
@ -91,11 +111,11 @@ Syd Adams
</axis>
</animation>
<!-- OSG Pick Animations -->
<!--
<!-- Hotspots -->
<animation>
<type>pick</type>
<object-name>brt.up</object-name>
<object-name>RDR160.brt</object-name>
<action>
<button>0</button>
<repeatable>true</repeatable>
@ -112,9 +132,9 @@ Syd Adams
<animation>
<type>pick</type>
<object-name>brt.dwn</object-name>
<object-name>RDR160.brt</object-name>
<action>
<button>0</button>
<button>1</button>
<repeatable>true</repeatable>
<binding>
<command>property-adjust</command>
@ -129,7 +149,7 @@ Syd Adams
<animation>
<type>pick</type>
<object-name>tilt.up</object-name>
<object-name>RDR160.tilt</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
@ -146,9 +166,9 @@ Syd Adams
<animation>
<type>pick</type>
<object-name>tilt.dwn</object-name>
<object-name>RDR160.tilt</object-name>
<action>
<button>0</button>
<button>1</button>
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
@ -163,34 +183,24 @@ Syd Adams
<animation>
<type>pick</type>
<object-name>pwr.off</object-name>
<object-name>RDR160.power</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<button>1</button>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/switch-pos</property>
<step>-1</step>
<min>0</min>
<max>3</max>
<wrap>false</wrap>
<command>nasal</command>
<script>radar.set_switch(-1);</script>
</binding>
</action>
</animation>
<animation>
<type>pick</type>
<object-name>pwr.on</object-name>
<object-name>RDR160.power</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-adjust</command>
<property>instrumentation/radar/switch-pos</property>
<step>1</step>
<min>0</min>
<max>3</max>
<wrap>false</wrap>
<command>nasal</command>
<script>radar.set_switch(1);</script>
</binding>
</action>
</animation>
@ -202,9 +212,8 @@ Syd Adams
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>instrumentation/radar/set-range</property>
<value>1</value>
<command>nasal</command>
<script>radar.set_range(1);</script>
</binding>
</action>
</animation>
@ -216,9 +225,8 @@ Syd Adams
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-assign</command>
<property>instrumentation/radar/set-range</property>
<value>-1</value>
<command>nasal</command>
<script>radar.set_range(-1);</script>
</binding>
</action>
</animation>
@ -248,5 +256,5 @@ Syd Adams
</binding>
</action>
</animation>
-->
</PropertyList>

View file

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

View file

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

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>
<name>wxradar hotspots</name>
<w-base>160</w-base>
<h-base>120</h-base>
<background>Aircraft/Instruments-3d/RDR-160/pnl.png</background>
<w>160</w>
<h>120</h>
@ -22,7 +21,7 @@
</not-equals>
</condition>
<texture>
<path>Aircraft/Instruments-3d/RDR-160/bkgrd.rgb</path>
<path>Aircraft/Instruments-3d/RDR-160/bkgrd.png</path>
<x1>0.030</x1>
<y1>0.112</y1>
<x2>0.979</x2>
@ -49,7 +48,7 @@
</equals>
</condition>
<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>
<y1>0.0</y1>
<x2>1.0</x2>
@ -234,176 +233,6 @@
</transformation>
</transformations>
</layer>
</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>