1
0
Fork 0

Unification of Weather UI.

This commit is contained in:
Stuart Buchanan 2012-08-07 21:27:29 +01:00
parent 9be134b34d
commit ed068bef82
4 changed files with 1042 additions and 2576 deletions

View file

@ -17,25 +17,24 @@
--> -->
<PropertyList> <PropertyList>
<weather-scenarios> <weather-scenarios>
<scenario>
<name type="string">Disabled</name>
<description type="string">METAR weather generation is disabled. Use the above controls to setup your weather.</description>
</scenario>
<scenario> <scenario>
<name type="string">Live data</name> <name type="string">Live data</name>
<description type="string"> <description type="string">
Fetch live weather data for your nearest airport from noaa.gov. You need a working internet connection. Fetch live weather data for your nearest airport from noaa.gov. You need a working internet connection.
All the controls in this dialog are computed automatically, once a valid METAR is received. All the controls in this dialog are computed automatically, once a valid METAR is received.
</description> </description>
<tile>live</tile>
</scenario> </scenario>
<scenario> <scenario>
<name type="string">Manual input</name> <name type="string">Manual input</name>
<description type="string">Enter your favorite METAR weather in the textbox below. A valid METAR syntax is required.</description> <description type="string">Enter your favorite METAR weather in the textbox above. A valid METAR syntax is required.</description>
<tile>manual</tile>
</scenario> </scenario>
<scenario> <scenario>
<name type="string">Fair weather</name> <name type="string">Fair weather</name>
<metar type="string">XXXX 012345Z 15003KT 12SM SCT041 FEW200 20/08 Q1015 NOSIG</metar> <metar type="string">XXXX 012345Z 15003KT 12SM SCT041 FEW200 20/08 Q1015 NOSIG</metar>
<description type="string">A lovely day for trip to your favorite 100$ hamburger airfield</description> <description type="string">A lovely day for trip to your favorite 100$ hamburger airfield</description>
<tile>High-pressure-core</tile>
</scenario> </scenario>
<scenario> <scenario>
<name type="string">Thunderstorm</name> <name type="string">Thunderstorm</name>
@ -45,6 +44,7 @@
Be prepared for reduction of visibility in showers and strong gusts Be prepared for reduction of visibility in showers and strong gusts
near thunderstorms near thunderstorms
</description> </description>
<tile>Thunderstorms</tile>
</scenario> </scenario>
<scenario> <scenario>
<name type="string">Stormy Monday</name> <name type="string">Stormy Monday</name>

View file

@ -1,222 +1,66 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<PropertyList> <PropertyList>
<name>local-weather</name>
<!-- Weather tiles -->
<name>local_weather_tiles</name>
<width>470</width>
<height>410</height>
<modal>false</modal> <modal>false</modal>
<resizable>false</resizable>
<layout>vbox</layout>
<default-padding>3</default-padding>
<!-- Title bar with close button -->
<group>
<layout>hbox</layout>
<default-padding>1</default-padding>
<empty>
<stretch>true</stretch>
</empty>
<text> <text>
<x>5</x> <label>Advanced Weather Configuration</label>
<y>380</y>
<label>Select initial weather scenario tile</label>
</text> </text>
<empty>
<stretch>true</stretch>
</empty>
<combo> <button>
<x>10</x> <legend/>
<y>355</y> <key>Esc</key>
<width>280</width> <pref-width>16</pref-width>
<height>25</height> <pref-height>16</pref-height>
<live>true</live> <border>2</border>
<property>/local-weather/tmp/tile-type</property>
<value>High-pressure-core</value>
<value>High-pressure</value>
<value>High-pressure-border</value>
<value>Low-pressure-border</value>
<value>Low-pressure</value>
<value>Low-pressure-core</value>
<value>Cold-sector</value>
<value>Warm-sector</value>
<value>Coldfront</value>
<value>Warmfront</value>
<value>Tropical</value>
<value>Thunderstorms</value>
<value>Test tile</value>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-close</command>
</binding> </binding>
<!--<enable> </button>
<not> </group>
<equals>
<property>/local-weather/tmp/tile-management</property>
<value type="string">METAR</value>
</equals>
</not>
</enable>-->
</combo>
<hrule/>
<group>
<layout>vbox</layout>
<text> <text>
<x>300</x> <halign>left</halign>
<y>355</y> <label>General Settings</label>
<label>alt. offset (ft)</label>
</text> </text>
<group>
<layout>table</layout>
<input>
<x>390</x>
<y>355</y>
<width>50</width>
<height>25</height>
<property>/local-weather/tmp/tile-alt-offset-ft</property>
</input>
<text> <text>
<x>5</x> <row>0</row>
<y>320</y> <col>0</col>
<label>wind deg</label> <halign>right</halign>
</text> <label>Tile selection mode</label>
<input>
<x>67</x>
<y>320</y>
<width>40</width>
<height>25</height>
<property>/local-weather/tmp/tile-orientation-deg</property>
</input>
<text>
<x>105</x>
<y>320</y>
<label>kt</label>
</text>
<input>
<x>125</x>
<y>320</y>
<width>30</width>
<height>25</height>
<property>/local-weather/tmp/windspeed-kt</property>
</input>
<text>
<x>157</x>
<y>320</y>
<label>gust freq.</label>
</text>
<slider>
<x>225</x>
<y>320</y>
<width>50</width>
<height>20</height>
<min>0.0</min>
<max>2.0</max>
<property>/local-weather/tmp/gust-frequency-hz</property>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<text>
<x>275</x>
<y>320</y>
<label>strength</label>
</text>
<slider>
<x>333</x>
<y>320</y>
<width>50</width>
<height>20</height>
<min>0.0</min>
<max>1.5</max>
<property>/local-weather/tmp/gust-relative-strength</property>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<text>
<x>380</x>
<y>320</y>
<label>dir.</label>
</text>
<slider>
<x>410</x>
<y>320</y>
<width>50</width>
<height>20</height>
<min>0.0</min>
<max>45.0</max>
<property>/local-weather/tmp/gust-angular-variation-deg</property>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<text>
<x>5</x>
<y>290</y>
<label>wind model</label>
</text>
<combo>
<x>150</x>
<y>290</y>
<width>140</width>
<height>25</height>
<live>true</live>
<property>/local-weather/config/wind-model</property>
<value>constant</value>
<value>constant in tile</value>
<value>aloft interpolated</value>
<value>aloft waypoints</value>
<!-- <value>airmass interpolated</value> -->
<binding>
<command>dialog-apply</command>
</binding>
</combo>
<text>
<x>300</x>
<y>290</y>
<label>T offset (C)</label>
</text>
<input>
<x>390</x>
<y>290</y>
<width>50</width>
<height>25</height>
<property>/local-weather/config/temperature-offset-degc</property>
</input>
<text>
<x>5</x>
<y>260</y>
<label>tile selection mode</label>
</text> </text>
<combo> <combo>
<x>150</x> <row>0</row>
<y>260</y> <col>1</col>
<width>140</width> <halign>left</halign>
<height>25</height> <pref-width>150</pref-width>
<live>true</live> <live>true</live>
<property>/local-weather/tmp/tile-management</property> <property>/local-weather/tmp/tile-management</property>
<value>single tile</value> <value>single tile</value>
@ -229,11 +73,39 @@
</combo> </combo>
<text>
<row>1</row>
<col>0</col>
<halign>right</halign>
<label>Altitude offset (ft)</label>
</text>
<input>
<row>1</row>
<col>1</col>
<halign>left</halign>
<property>/local-weather/tmp/tile-alt-offset-ft</property>
</input>
<text>
<row>2</row>
<col>0</col>
<halign>right</halign>
<label>Temperature offset (C)</label>
</text>
<input>
<row>2</row>
<col>1</col>
<halign>left</halign>
<property>/local-weather/config/temperature-offset-degc</property>
</input>
<checkbox> <checkbox>
<x>10</x> <row>3</row>
<y>230</y> <col>0</col>
<width>15</width> <halign>left</halign>
<height>15</height>
<label>debug output</label> <label>debug output</label>
<property>/local-weather/config/debug-output-flag</property> <property>/local-weather/config/debug-output-flag</property>
<binding> <binding>
@ -241,47 +113,10 @@
</binding> </binding>
</checkbox> </checkbox>
<!--<checkbox>
<x>150</x>
<y>150</y>
<width>15</width>
<height>15</height>
<label>detailed clouds</label>
<property>/local-weather/config/detailed-clouds-flag</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>-->
<!--<checkbox>
<x>10</x>
<y>125</y>
<width>15</width>
<height>15</height>
<label>dynamical weather</label>
<property>/local-weather/config/dynamics-flag</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>-->
<!--<checkbox>
<x>150</x>
<y>125</y>
<width>15</width>
<height>15</height>
<label>dynamical convection</label>
<property>/local-weather/config/dynamical-convection-flag</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>-->
<checkbox> <checkbox>
<x>150</x> <row>3</row>
<y>230</y> <col>1</col>
<width>15</width> <halign>left</halign>
<height>15</height>
<label>terrain effects</label> <label>terrain effects</label>
<property>/local-weather/config/detailed-terrain-interaction-flag</property> <property>/local-weather/config/detailed-terrain-interaction-flag</property>
<binding> <binding>
@ -290,10 +125,9 @@
</checkbox> </checkbox>
<checkbox> <checkbox>
<x>290</x> <row>3</row>
<y>230</y> <col>2</col>
<width>15</width> <halign>left</halign>
<height>15</height>
<label>realistic visibility</label> <label>realistic visibility</label>
<property>/local-weather/config/realistic-visibility-flag</property> <property>/local-weather/config/realistic-visibility-flag</property>
<binding> <binding>
@ -302,79 +136,249 @@
</checkbox> </checkbox>
<checkbox> <checkbox>
<x>10</x> <row>4</row>
<y>205</y> <col>1</col>
<width>15</width> <halign>left</halign>
<height>15</height>
<label>generate thermals</label>
<property>/local-weather/config/generate-thermal-lift-flag</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<x>150</x>
<y>205</y>
<width>15</width>
<height>15</height>
<label>terrain presampling</label> <label>terrain presampling</label>
<property>/local-weather/config/presampling-flag</property> <property>/local-weather/config/presampling-flag</property>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
</checkbox> </checkbox>
</group>
<hrule/>
<text> <text>
<x>5</x> <halign>left</halign>
<y>175</y> <label>Wind Settings</label>
<label>Thermal properties:</label>
</text> </text>
<group>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<empty>
<stretch>true</stretch>
</empty>
<text> <text>
<x>160</x> <label>Wind:</label>
<y>175</y> </text>
<label>rough day</label>
<input>
<pref-width>50</pref-width>
<property>/local-weather/tmp/tile-orientation-deg</property>
</input>
<text>
<label>degrees at</label>
</text>
<input>
<pref-width>30</pref-width>
<property>/local-weather/tmp/windspeed-kt</property>
</input>
<text>
<label>kts</label>
</text>
<empty>
<stretch>true</stretch>
</empty>
</group>
<group>
<layout>table</layout>
<text>
<row>0</row>
<col>0</col>
<halign>right</halign>
<label>Gust frequency (Hz)</label>
</text> </text>
<slider> <slider>
<x>230</x> <row>0</row>
<y>175</y> <col>1</col>
<width>90</width> <halign>fill</halign>
<height>20</height> <min>0.0</min>
<min>0.3</min> <max>2.0</max>
<max>1.5</max> <property>/local-weather/tmp/gust-frequency-hz</property>
<property>/local-weather/config/thermal-properties</property>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
</slider> </slider>
<text> <text>
<x>330</x> <row>0</row>
<y>175</y> <col>2</col>
<label>1234</label>
<halign>left</halign>
<format>%.1f</format>
<property>/local-weather/tmp/gust-frequency-hz</property>
<live>true</live>
</text>
<text>
<row>1</row>
<col>0</col>
<halign>right</halign>
<label>Gust factor</label>
</text>
<slider>
<row>1</row>
<col>1</col>
<halign>fill</halign>
<min>0.0</min>
<max>1.5</max>
<property>/local-weather/tmp/gust-relative-strength</property>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<text>
<row>1</row>
<col>2</col>
<halign>left</halign>
<label>1234</label>
<format>%.1f</format>
<property>/local-weather/tmp/gust-relative-strength</property>
<live>true</live>
</text>
<text>
<row>2</row>
<col>0</col>
<halign>right</halign>
<label>Gust direction variation</label>
</text>
<slider>
<row>2</row>
<col>1</col>
<halign>fill</halign>
<min>0.0</min>
<max>45.0</max>
<property>/local-weather/tmp/gust-angular-variation-deg</property>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<text>
<row>2</row>
<col>2</col>
<halign>left</halign>
<label>1234</label>
<format>%.1f</format>
<property>/local-weather/tmp/gust-angular-variation-deg</property>
<live>true</live>
</text>
<text>
<row>3</row>
<col>0</col>
<halign>right</halign>
<label>Wind model</label>
</text>
<combo>
<row>3</row>
<col>1</col>
<halign>fill</halign>
<live>true</live>
<property>/local-weather/config/wind-model</property>
<value>constant</value>
<value>constant in tile</value>
<value>aloft interpolated</value>
<value>aloft waypoints</value>
<!-- <value>airmass interpolated</value> -->
<binding>
<command>dialog-apply</command>
</binding>
</combo>
</group>
</group>
<hrule/>
<text>
<halign>left</halign>
<label>Thermic and Visibility Settings</label>
</text>
<group>
<layout>table</layout>
<checkbox>
<row>0</row>
<col>0</col>
<halign>left</halign>
<label>Generate thermals</label>
<property>/local-weather/config/generate-thermal-lift-flag</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<text>
<row>0</row>
<col>1</col>
<halign>right</halign>
<enable>
<property>/local-weather/config/generate-thermal-lift-flag</property>
</enable>
<label>rough day</label>
</text>
<slider>
<row>0</row>
<col>2</col>
<min>0.3</min>
<max>1.5</max>
<property>/local-weather/config/thermal-properties</property>
<enable>
<property>/local-weather/config/generate-thermal-lift-flag</property>
</enable>
<binding>
<command>dialog-apply</command>
</binding>
</slider>
<text>
<row>0</row>
<col>3</col>
<halign>left</halign>
<enable>
<property>/local-weather/config/generate-thermal-lift-flag</property>
</enable>
<label>low convection</label> <label>low convection</label>
</text> </text>
<text> <text>
<x>5</x> <row>1</row>
<y>150</y> <col>0</col>
<label>Ground haze:</label> <halign>right</halign>
<label>Ground haze</label>
</text> </text>
<text> <text>
<x>160</x> <row>1</row>
<y>150</y> <col>1</col>
<label>thick</label> <label>thick</label>
</text> </text>
<slider> <slider>
<x>230</x> <row>1</row>
<y>150</y> <col>2</col>
<width>90</width>
<height>20</height>
<min>0.1</min> <min>0.1</min>
<max>1.0</max> <max>1.0</max>
<property>/local-weather/config/ground-haze-factor</property> <property>/local-weather/config/ground-haze-factor</property>
@ -384,28 +388,29 @@
</slider> </slider>
<text> <text>
<x>330</x> <row>1</row>
<y>150</y> <col>3</col>
<halign>left</halign>
<label>thin</label> <label>thin</label>
</text> </text>
<text> <text>
<x>5</x> <row>2</row>
<y>125</y> <col>0</col>
<label>Air pollution:</label> <halign>right</halign>
<label>Air pollution</label>
</text> </text>
<text> <text>
<x>160</x> <row>2</row>
<y>125</y> <col>1</col>
<halign>right</halign>
<label>clean</label> <label>clean</label>
</text> </text>
<slider> <slider>
<x>230</x> <row>2</row>
<y>125</y> <col>2</col>
<width>90</width>
<height>20</height>
<min>0.0</min> <min>0.0</min>
<max>1.0</max> <max>1.0</max>
<property>/environment/air-pollution-norm</property> <property>/environment/air-pollution-norm</property>
@ -415,29 +420,29 @@
</slider> </slider>
<text> <text>
<x>330</x> <row>2</row>
<y>125</y> <col>3</col>
<halign>left</halign>
<label>smog</label> <label>smog</label>
</text> </text>
<text> <text>
<x>5</x> <row>3</row>
<y>100</y> <col>0</col>
<label>Max. visibility:</label> <halign>right</halign>
<label>Max. visibility</label>
</text> </text>
<text> <text>
<x>160</x> <row>3</row>
<y>100</y> <col>1</col>
<halign>right</halign>
<label>20 km</label> <label>20 km</label>
</text> </text>
<slider> <slider>
<x>230</x> <row>3</row>
<y>100</y> <col>2</col>
<width>90</width>
<height>20</height>
<min>9.90348</min> <min>9.90348</min>
<max>12.429216196</max> <max>12.429216196</max>
<property>/local-weather/config/aux-max-vis-range-m</property> <property>/local-weather/config/aux-max-vis-range-m</property>
@ -447,46 +452,63 @@
</slider> </slider>
<text> <text>
<x>330</x> <row>3</row>
<y>100</y> <col>3</col>
<halign>left</halign>
<label>250 km</label> <label>250 km</label>
</text> </text>
<text> <text>
<x>380</x> <row>3</row>
<y>100</y> <col>4</col>
<halign>left</halign>
<label>12345678</label> <label>12345678</label>
<format>%.fm</format> <format>%.fm</format>
<live>true</live> <live>true</live>
<property>/local-weather/config/max-vis-range-m</property> <property>/local-weather/config/max-vis-range-m</property>
</text> </text>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text> <text>
<x>5</x> <halign>left</halign>
<y>75</y> <label>Weather Pattern Scales</label>
<label>Weather pattern scales</label>
</text> </text>
<group>
<layout>table</layout>
<halign>center</halign>
<text> <text>
<x>15</x> <row>0</row>
<y>45</y> <col>1</col>
<halign>left</halign>
<label>small</label> <label>small</label>
</text> </text>
<text> <text>
<x>78</x> <row>0</row>
<y>60</y> <col>2</col>
<label>airmass</label> <halign>right</halign>
<label>large</label>
</text>
<text>
<row>1</row>
<col>0</col>
<halign>right</halign>
<label>Airmass</label>
</text> </text>
<slider> <slider>
<x>60</x> <row>1</row>
<y>45</y> <col>1</col>
<width>100</width> <colspan>2</colspan>
<height>20</height> <halign>fill</halign>
<min>0.5</min> <min>0.5</min>
<max>2.0</max> <max>2.0</max>
<property>/local-weather/config/large-scale-persistence</property> <property>/local-weather/config/large-scale-persistence</property>
@ -496,29 +518,17 @@
</slider> </slider>
<text> <text>
<x>165</x> <row>2</row>
<y>45</y> <col>0</col>
<label>large</label> <halign>right</halign>
</text> <label>Cloud patterns</label>
<text>
<x>205</x>
<y>45</y>
<label>small</label>
</text>
<text>
<x>257</x>
<y>60</y>
<label>cloud patterns</label>
</text> </text>
<slider> <slider>
<x>250</x> <row>2</row>
<y>45</y> <col>1</col>
<width>100</width> <colspan>2</colspan>
<height>20</height> <halign>fill</halign>
<min>0.0</min> <min>0.0</min>
<max>1.0</max> <max>1.0</max>
<property>/local-weather/config/small-scale-persistence</property> <property>/local-weather/config/small-scale-persistence</property>
@ -526,54 +536,32 @@
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
</slider> </slider>
</group>
</group>
</group>
<text> <hrule/>
<x>355</x>
<y>45</y>
<label>large</label>
</text>
<group> <group>
<x>10</x> <layout>hbox</layout>
<y>10</y>
<empty>
<stretch>true</stretch>
</empty>
<button> <button>
<x>0</x>
<y>0</y>
<legend>OK</legend> <legend>OK</legend>
<!--<default>true</default>-->
<equal>true</equal>
<binding> <binding>
<command>dialog-apply</command> <command>dialog-apply</command>
</binding> </binding>
<binding>
<command>nasal</command>
<script>local_weather.set_tile()</script>
</binding>
<binding> <binding>
<command>dialog-close</command> <command>dialog-close</command>
</binding> </binding>
</button> </button>
<button> <button>
<x>40</x>
<y>0</y>
<legend>Clear / End</legend>
<!--<default>true</default>-->
<!--<equal>true</equal>-->
<binding>
<command>nasal</command>
<script>local_weather.clear_all()</script>
</binding>
</button>
<button>
<x>125</x>
<y>0</y>
<legend>Close</legend> <legend>Close</legend>
<!--<equal>true</equal>--> <default>true</default>
<key>Esc</key> <key>Esc</key>
<binding> <binding>
<command>dialog-close</command> <command>dialog-close</command>
@ -581,10 +569,7 @@
</button> </button>
<button> <button>
<x>180</x> <legend>Wind Configuration...</legend>
<y>0</y>
<legend>Winds</legend>
<!--<equal>true</equal>-->
<binding> <binding>
<command>dialog-show</command> <command>dialog-show</command>
<dialog-name>local_weather_winds</dialog-name> <dialog-name>local_weather_winds</dialog-name>
@ -595,10 +580,7 @@
</button> </button>
<button> <button>
<x>235</x> <legend>Advanced...</legend>
<y>0</y>
<legend>Advanced</legend>
<!--<equal>true</equal>-->
<binding> <binding>
<command>dialog-show</command> <command>dialog-show</command>
<dialog-name>local_weather_environment</dialog-name> <dialog-name>local_weather_environment</dialog-name>
@ -608,29 +590,9 @@
</binding> </binding>
</button> </button>
<button> <empty>
<x>330</x> <stretch>true</stretch>
<y>0</y> </empty>
<legend>Basic Weather --></legend>
<default>false</default>
<binding>
<command>nasal</command>
<script>if (getprop("/nasal/local_weather/loaded",0)) local_weather.clear_all()</script>
</binding>
<binding>
<command>property-assign</command>
<property>/nasal/local_weather/enabled</property>
<value type="bool">false</value>
</binding>
<binding>
<command>dialog-show</command>
<dialog-name>weather</dialog-name>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group> </group>
</PropertyList> </PropertyList>

File diff suppressed because it is too large Load diff

View file

@ -276,19 +276,9 @@
<item> <item>
<name>global-weather</name> <name>global-weather</name>
<binding> <binding>
<condition>
<not><property>/nasal/local_weather/enabled</property></not>
</condition>
<command>dialog-show</command> <command>dialog-show</command>
<dialog-name>weather</dialog-name> <dialog-name>weather</dialog-name>
</binding> </binding>
<binding>
<condition>
<property>/nasal/local_weather/enabled</property>
</condition>
<command>dialog-show</command>
<dialog-name>local_weather_tiles</dialog-name>
</binding>
</item> </item>
<item> <item>