Environment: handle metar-updates-environment
And some minor fixes
This commit is contained in:
parent
277575a51e
commit
9bdc9ec4e1
9 changed files with 88 additions and 2 deletions
|
@ -26,6 +26,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
<greater-than>
|
<greater-than>
|
||||||
<property alias="../../../../params/from"/>
|
<property alias="../../../../params/from"/>
|
||||||
<value>-9000</value>
|
<value>-9000</value>
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
<or>
|
<or>
|
||||||
<less-than>
|
<less-than>
|
||||||
<property alias="../../../../../params/from"/>
|
<property alias="../../../../../params/from"/>
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
<not-equals>
|
<not-equals>
|
||||||
<property alias="../../../../params/from"/>
|
<property alias="../../../../params/from"/>
|
||||||
<property alias="../../../../params/to"/>
|
<property alias="../../../../params/to"/>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>/environment/metar/clouds/layer[0]/thickness-ft</input>
|
<input>/environment/metar/clouds/layer[0]/thickness-ft</input>
|
||||||
|
|
|
@ -217,6 +217,7 @@
|
||||||
<params>
|
<params>
|
||||||
<metar-max-age-min type="long">240</metar-max-age-min> <!-- deprecated -->
|
<metar-max-age-min type="long">240</metar-max-age-min> <!-- deprecated -->
|
||||||
<metar-updates-environment type="bool">true</metar-updates-environment>
|
<metar-updates-environment type="bool">true</metar-updates-environment>
|
||||||
|
<metar-updates-winds-aloft type="bool">true</metar-updates-winds-aloft>
|
||||||
<control-fdm-atmosphere type="bool">true</control-fdm-atmosphere>
|
<control-fdm-atmosphere type="bool">true</control-fdm-atmosphere>
|
||||||
<contrail-altitude>30000</contrail-altitude>
|
<contrail-altitude>30000</contrail-altitude>
|
||||||
</params>
|
</params>
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>/environment/metar/pressure-sea-level-inhg</input>
|
<input>/environment/metar/pressure-sea-level-inhg</input>
|
||||||
|
@ -51,6 +52,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>/environment/metar/temperature-sea-level-degc</input>
|
<input>/environment/metar/temperature-sea-level-degc</input>
|
||||||
|
@ -74,6 +76,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>/environment/metar/dewpoint-sea-level-degc</input>
|
<input>/environment/metar/dewpoint-sea-level-degc</input>
|
||||||
|
@ -88,7 +91,7 @@
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<!--
|
<!--
|
||||||
transfer the sea-level temperature to each layer of
|
transfer the visibility to each layer of
|
||||||
interpolation controller. We are not very creative here and
|
interpolation controller. We are not very creative here and
|
||||||
use the same visibility for all layers but top three which
|
use the same visibility for all layers but top three which
|
||||||
are left untouched.
|
are left untouched.
|
||||||
|
@ -99,6 +102,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>/environment/metar/min-visibility-m</input>
|
<input>/environment/metar/min-visibility-m</input>
|
||||||
|
@ -106,6 +110,9 @@
|
||||||
<output>/environment/config/boundary/entry[1]/visibility-m</output>
|
<output>/environment/config/boundary/entry[1]/visibility-m</output>
|
||||||
<output>/environment/config/aloft/entry[0]/visibility-m</output>
|
<output>/environment/config/aloft/entry[0]/visibility-m</output>
|
||||||
<output>/environment/config/aloft/entry[1]/visibility-m</output>
|
<output>/environment/config/aloft/entry[1]/visibility-m</output>
|
||||||
|
<output>/environment/config/aloft/entry[2]/visibility-m</output>
|
||||||
|
<output>/environment/config/aloft/entry[3]/visibility-m</output>
|
||||||
|
<output>/environment/config/aloft/entry[4]/visibility-m</output>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<!-- split the wind vector into it's components -->
|
<!-- split the wind vector into it's components -->
|
||||||
|
@ -117,6 +124,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>/environment/metar/base-wind-from-north-fps</input>
|
<input>/environment/metar/base-wind-from-north-fps</input>
|
||||||
|
@ -130,6 +138,7 @@
|
||||||
<enable>
|
<enable>
|
||||||
<condition>
|
<condition>
|
||||||
<property>/environment/metar/valid</property>
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
</condition>
|
</condition>
|
||||||
</enable>
|
</enable>
|
||||||
<input>/environment/metar/base-wind-from-east-fps</input>
|
<input>/environment/metar/base-wind-from-east-fps</input>
|
||||||
|
@ -140,30 +149,65 @@
|
||||||
<!-- TODO: handle variable winds -->
|
<!-- TODO: handle variable winds -->
|
||||||
<filter include="layer-heading-offset.xml"/>
|
<filter include="layer-heading-offset.xml"/>
|
||||||
<filter include="layer-heading-offset.xml">
|
<filter include="layer-heading-offset.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[0]/wind-heading-change-deg</offset>
|
<offset>/environment/config/aloft/entry[0]/wind-heading-change-deg</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[0]/wind-from-heading-deg</output>
|
<output>/environment/config/aloft/entry[0]/wind-from-heading-deg</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-heading-offset.xml">
|
<filter include="layer-heading-offset.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[1]/wind-heading-change-deg</offset>
|
<offset>/environment/config/aloft/entry[1]/wind-heading-change-deg</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[1]/wind-from-heading-deg</output>
|
<output>/environment/config/aloft/entry[1]/wind-from-heading-deg</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-heading-offset.xml">
|
<filter include="layer-heading-offset.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[2]/wind-heading-change-deg</offset>
|
<offset>/environment/config/aloft/entry[2]/wind-heading-change-deg</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[2]/wind-from-heading-deg</output>
|
<output>/environment/config/aloft/entry[2]/wind-from-heading-deg</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-heading-offset.xml">
|
<filter include="layer-heading-offset.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[3]/wind-heading-change-deg</offset>
|
<offset>/environment/config/aloft/entry[3]/wind-heading-change-deg</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[3]/wind-from-heading-deg</output>
|
<output>/environment/config/aloft/entry[3]/wind-from-heading-deg</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-heading-offset.xml">
|
<filter include="layer-heading-offset.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[4]/wind-heading-change-deg</offset>
|
<offset>/environment/config/aloft/entry[4]/wind-heading-change-deg</offset>
|
||||||
</input>
|
</input>
|
||||||
|
@ -172,30 +216,65 @@
|
||||||
|
|
||||||
<filter include="layer-speed-change.xml"/>
|
<filter include="layer-speed-change.xml"/>
|
||||||
<filter include="layer-speed-change.xml">
|
<filter include="layer-speed-change.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[0]/wind-speed-change-rel</offset>
|
<offset>/environment/config/aloft/entry[0]/wind-speed-change-rel</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[0]/wind-speed-kt</output>
|
<output>/environment/config/aloft/entry[0]/wind-speed-kt</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-speed-change.xml">
|
<filter include="layer-speed-change.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[1]/wind-speed-change-rel</offset>
|
<offset>/environment/config/aloft/entry[1]/wind-speed-change-rel</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[1]/wind-speed-kt</output>
|
<output>/environment/config/aloft/entry[1]/wind-speed-kt</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-speed-change.xml">
|
<filter include="layer-speed-change.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[2]/wind-speed-change-rel</offset>
|
<offset>/environment/config/aloft/entry[2]/wind-speed-change-rel</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[2]/wind-speed-kt</output>
|
<output>/environment/config/aloft/entry[2]/wind-speed-kt</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-speed-change.xml">
|
<filter include="layer-speed-change.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[3]/wind-speed-change-rel</offset>
|
<offset>/environment/config/aloft/entry[3]/wind-speed-change-rel</offset>
|
||||||
</input>
|
</input>
|
||||||
<output>/environment/config/aloft/entry[3]/wind-speed-kt</output>
|
<output>/environment/config/aloft/entry[3]/wind-speed-kt</output>
|
||||||
</filter>
|
</filter>
|
||||||
<filter include="layer-speed-change.xml">
|
<filter include="layer-speed-change.xml">
|
||||||
|
<enable>
|
||||||
|
<condition>
|
||||||
|
<property>/environment/metar/valid</property>
|
||||||
|
<property>/environment/params/metar-updates-environment</property>
|
||||||
|
<property>/environment/params/metar-updates-winds-aloft</property>
|
||||||
|
</condition>
|
||||||
|
</enable>
|
||||||
<input>
|
<input>
|
||||||
<offset>/environment/config/aloft/entry[4]/wind-speed-change-rel</offset>
|
<offset>/environment/config/aloft/entry[4]/wind-speed-change-rel</offset>
|
||||||
</input>
|
</input>
|
||||||
|
|
|
@ -999,7 +999,7 @@
|
||||||
if( metar == nil ) metar = "";
|
if( metar == nil ) metar = "";
|
||||||
metar = normalize_string(metar);
|
metar = normalize_string(metar);
|
||||||
setprop("sim/gui/dialogs/weather-scenario/metar", metar );
|
setprop("sim/gui/dialogs/weather-scenario/metar", metar );
|
||||||
gui.dialog_update( "weather_scenario", "metar" );
|
gui.dialog_update( "weather", "metar" );
|
||||||
}, 1, 0);
|
}, 1, 0);
|
||||||
|
|
||||||
#initialize the METAR source selection
|
#initialize the METAR source selection
|
||||||
|
|
Loading…
Reference in a new issue