1
0
Fork 0

Environment: smoothing light and moderate turbulence a bit

This commit is contained in:
Torsten Dreyer 2011-01-24 19:59:09 +01:00
parent c03ed7ee02
commit bcfc08fe56
2 changed files with 248 additions and 200 deletions

View file

@ -1,4 +1,4 @@
<?xml version="1.0" ?>
<?xml version="1.0" ?>
<!--
This file is part of FlightGear, the free flight simulator
http://www.flightgear.org/
@ -15,199 +15,212 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-->
<PropertyList>
<PropertyList>
<weather-scenarios>
<scenario>
<name>Disabled</name>
<description>METAR weather generation is disabled. Use the above controls to setup your weather.</description>
<name type="string">Disabled</name>
<description type="string">METAR weather generation is disabled. Use the above controls to setup your weather.</description>
</scenario>
<scenario>
<name>Live data</name>
<description>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.
<name type="string">Live data</name>
<description type="string">
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.
</description>
</scenario>
<scenario>
<name>Manual input</name>
<description>Enter your favorite METAR weather in the textbox below. A valid METAR syntax is required.</description>
<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>
</scenario>
<scenario>
<name>Fair weather</name>
<metar>XXXX 012345Z 15003KT 12SM SCT041 FEW200 20/08 Q1015 NOSIG</metar>
<description>A lovely day for trip to your favorite 100$ hamburger airfield</description>
<name type="string">Fair weather</name>
<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>
</scenario>
<scenario>
<name>Thunderstorm</name>
<metar>XXXX 012345Z 15012G25KT 4000 TSRA FEW030CB SCT035TCU 27/24 Q0995</metar>
<description>A hot and damp summer day with thunderstorms developing in the afternoon.
Be prepared for reduction of visibility in showers and strong gusts
near thunderstorms</description>
<name type="string">Thunderstorm</name>
<metar type="string">XXXX 012345Z 15012G25KT 4000 TSRA FEW030CB SCT035TCU 27/24 Q0995</metar>
<description type="string">
A hot and damp summer day with thunderstorms developing in the afternoon.
Be prepared for reduction of visibility in showers and strong gusts
near thunderstorms
</description>
</scenario>
<scenario>
<name>Stormy Monday</name>
<metar>XXXX 012345Z 28035G50KT 250V300 9999 TSRA SCT022CB BKN030 13/09 Q1005</metar>
<description>You're out for an adventure? Gusty winds blowing from the west
and isolated thunderstorms should be avoided. Fasten your seatbelt!</description>
<name type="string">Stormy Monday</name>
<metar type="string">XXXX 012345Z 28035G50KT 250V300 9999 TSRA SCT022CB BKN030 13/09 Q1005</metar>
<description type="string">
You're out for an adventure? Gusty winds blowing from the west
and isolated thunderstorms should be avoided. Fasten your seatbelt!
</description>
</scenario>
<scenario>
<name>Marginal VFR</name>
<metar>XXXX 012345Z 23010KT 5000 SHRA SCT012 BKN018 OVC060 15/11 Q1010</metar>
<description>After the storm - limited visibility and some showers.
Go or No-Go?</description>
<name type="string">Marginal VFR</name>
<metar type="string">XXXX 012345Z 23010KT 5000 SHRA SCT012 BKN018 OVC060 15/11 Q1010</metar>
<description type="string">
After the storm - limited visibility and some showers.
Go or No-Go?
</description>
</scenario>
<scenario>
<name>CAT I minimum</name>
<metar>XXXX 012345Z 15015KT 0800 -RA BKN002 OVC004 08/06 Q0990</metar>
<description>If you just got your IFR rating, this is what you are allowed to do. But can you?</description>
<name type="string">CAT I minimum</name>
<metar type="string">XXXX 012345Z 15015KT 0800 -RA BKN002 OVC004 08/06 Q0990</metar>
<description type="string">If you just got your IFR rating, this is what you are allowed to do. But can you?</description>
</scenario>
<scenario>
<name>CAT II minimum</name>
<metar>XXXX 012345Z 15010KT 0400 -RA BKN001 OVC002 08/06 Q0990</metar>
<description>With just a 1/4 mile visibility and clouds at 100ft, you don't see much of the runway until
seconds before touchdown. Trust your instruments to stay alive.</description>
<name type="string">CAT II minimum</name>
<metar type="string">XXXX 012345Z 15010KT 0400 -RA BKN001 OVC002 08/06 Q0990</metar>
<description type="string">
With just a 1/4 mile visibility and clouds at 100ft, you don't see much of the runway until
seconds before touchdown. Trust your instruments to stay alive.
</description>
</scenario>
<scenario>
<name>CAT IIIb minimum</name>
<metar>XXXX 012345Z VRB01KT 0100 -RA FG OVC001 OVC002 02/02 Q0990</metar>
<description>This is expert level. You will barely see the taxiway from the cockpit, even if you are
on ground. Fog and light drizzle, freezing level at 1000ft.</description>
<name type="string">CAT IIIb minimum</name>
<metar type="string">XXXX 012345Z VRB01KT 0100 -RA FG OVC001 OVC002 02/02 Q0990</metar>
<description type="string">
This is expert level. You will barely see the taxiway from the cockpit, even if you are
on ground. Fog and light drizzle, freezing level at 1000ft.
</description>
</scenario>
<scenario>
<name>Early morning fog</name>
<metar>XXXX 012345Z 00000KT 0800 FG NCD 08/08 A3030</metar>
<description>Fog developed this autumn's morning. Expect good visibility above the layer.
However - getting through it can be a challenge. Stay alive for a 500' climb
and you'll see the sun!</description>
<name type="string">Early morning fog</name>
<metar type="string">XXXX 012345Z 00000KT 0800 FG NCD 08/08 A3030</metar>
<description type="string">
Fog developed this autumn's morning. Expect good visibility above the layer.
However - getting through it can be a challenge. Stay alive for a 500' climb
and you'll see the sun!
</description>
</scenario>
</weather-scenarios>
<weather-scenario>Fair weather</weather-scenario>
<weather-scenario type="string">Fair weather</weather-scenario>
<config>
<boundary-transition-ft>500</boundary-transition-ft>
<boundary-transition-ft type="double">500</boundary-transition-ft>
<boundary>
<boundary>
<entry>
<elevation-ft>0</elevation-ft>
<wind-from-heading-deg>270</wind-from-heading-deg>
<wind-speed-kt>3</wind-speed-kt>
<visibility-m>16093.44</visibility-m>
<pressure-sea-level-inhg>29.92</pressure-sea-level-inhg>
<temperature-degc>15.0</temperature-degc>
<dewpoint-degc>5.0</dewpoint-degc>
<turbulence>
<factor>0.2</factor>
<magnitude-norm>0.0</magnitude-norm>
<rate-hz>1.0</rate-hz>
</turbulence>
<wind-heading-change-deg>0</wind-heading-change-deg>
<wind-speed-change-rel>0</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft type="double">0</elevation-ft>
<wind-from-heading-deg type="double">270</wind-from-heading-deg>
<wind-speed-kt type="double">3</wind-speed-kt>
<visibility-m type="double">16093.44</visibility-m>
<pressure-sea-level-inhg type="double">29.92</pressure-sea-level-inhg>
<temperature-degc type="double">15.0</temperature-degc>
<dewpoint-degc type="double">5.0</dewpoint-degc>
<turbulence>
<factor type="double">0.2</factor>
<magnitude-norm type="double">0.0</magnitude-norm>
<rate-hz type="double">1.0</rate-hz>
</turbulence>
<wind-heading-change-deg type="double">0</wind-heading-change-deg>
<wind-speed-change-rel type="double">0</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft>500</elevation-ft>
<wind-from-heading-deg>280</wind-from-heading-deg>
<wind-speed-kt>6</wind-speed-kt>
<turbulence>
<factor>1.0</factor>
<magnitude-norm>0.1</magnitude-norm>
<rate-hz>1.0</rate-hz>
</turbulence>
<wind-heading-change-deg>5</wind-heading-change-deg>
<wind-speed-change-rel>0.3</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft type="double">500</elevation-ft>
<wind-from-heading-deg type="double">280</wind-from-heading-deg>
<wind-speed-kt type="double">6</wind-speed-kt>
<turbulence>
<factor type="double">1.0</factor>
<magnitude-norm type="double">0.1</magnitude-norm>
<rate-hz type="double">1.0</rate-hz>
</turbulence>
<wind-heading-change-deg type="double">5</wind-heading-change-deg>
<wind-speed-change-rel type="double">0.3</wind-speed-change-rel>
</entry>
</boundary>
</boundary>
<aloft>
<aloft>
<entry>
<elevation-ft>5000</elevation-ft>
<wind-from-heading-deg>300</wind-from-heading-deg>
<wind-speed-kt>10</wind-speed-kt>
<visibility-m>16093.44</visibility-m>
<pressure-sea-level-inhg>29.92</pressure-sea-level-inhg>
<turbulence>
<factor>0.5</factor>
<magnitude-norm>0.05</magnitude-norm>
<rate-hz>1.0</rate-hz>
</turbulence>
<wind-heading-change-deg>25</wind-heading-change-deg>
<wind-speed-change-rel>1</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft type="double">5000</elevation-ft>
<wind-from-heading-deg type="double">300</wind-from-heading-deg>
<wind-speed-kt type="double">10</wind-speed-kt>
<visibility-m type="double">16093.44</visibility-m>
<pressure-sea-level-inhg type="double">29.92</pressure-sea-level-inhg>
<turbulence>
<factor type="double">0.5</factor>
<magnitude-norm type="double">0.05</magnitude-norm>
<rate-hz type="double">1.0</rate-hz>
</turbulence>
<wind-heading-change-deg type="double">25</wind-heading-change-deg>
<wind-speed-change-rel type="double">1</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft>10000</elevation-ft>
<wind-from-heading-deg>310</wind-from-heading-deg>
<wind-speed-kt>20</wind-speed-kt>
<turbulence>
<factor>0.0</factor>
<magnitude-norm>0.0</magnitude-norm>
<rate-hz>1.0</rate-hz>
</turbulence>
<wind-heading-change-deg>30</wind-heading-change-deg>
<wind-speed-change-rel>1.2</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft type="double">10000</elevation-ft>
<wind-from-heading-deg type="double">310</wind-from-heading-deg>
<wind-speed-kt type="double">20</wind-speed-kt>
<turbulence>
<factor type="double">0.0</factor>
<magnitude-norm type="double">0.0</magnitude-norm>
<rate-hz type="double">1.0</rate-hz>
</turbulence>
<wind-heading-change-deg type="double">30</wind-heading-change-deg>
<wind-speed-change-rel type="double">1.2</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft>18000</elevation-ft>
<wind-from-heading-deg>320</wind-from-heading-deg>
<wind-speed-kt>30</wind-speed-kt>
<wind-heading-change-deg>35</wind-heading-change-deg>
<wind-speed-change-rel>1.3</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft type="double">18000</elevation-ft>
<wind-from-heading-deg type="double">320</wind-from-heading-deg>
<wind-speed-kt type="double">30</wind-speed-kt>
<wind-heading-change-deg type="double">35</wind-heading-change-deg>
<wind-speed-change-rel type="double">1.3</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft>24000</elevation-ft>
<wind-from-heading-deg>330</wind-from-heading-deg>
<wind-speed-kt>50</wind-speed-kt>
<wind-heading-change-deg>35</wind-heading-change-deg>
<wind-speed-change-rel>1.3</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft type="double">24000</elevation-ft>
<wind-from-heading-deg type="double">330</wind-from-heading-deg>
<wind-speed-kt type="double">50</wind-speed-kt>
<wind-heading-change-deg type="double">35</wind-heading-change-deg>
<wind-speed-change-rel type="double">1.3</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft>30000</elevation-ft>
<wind-from-heading-deg>340</wind-from-heading-deg>
<wind-speed-kt>70</wind-speed-kt>
<wind-heading-change-deg>35</wind-heading-change-deg>
<wind-speed-change-rel>1.3</wind-speed-change-rel>
</entry>
<entry>
<elevation-ft type="double">30000</elevation-ft>
<wind-from-heading-deg type="double">340</wind-from-heading-deg>
<wind-speed-kt type="double">70</wind-speed-kt>
<wind-heading-change-deg type="double">35</wind-heading-change-deg>
<wind-speed-change-rel type="double">1.3</wind-speed-change-rel>
</entry>
</aloft>
</aloft>
</config>
<clouds>
<layer n="0">
<coverage>clear</coverage>
<elevation-ft>-9999</elevation-ft>
<thickness-ft>600</thickness-ft>
<transition-ft>150</transition-ft>
<span-m>40000</span-m>
</layer>
<layer n="1">
<coverage>clear</coverage>
<elevation-ft>-9999</elevation-ft>
<thickness-ft>65</thickness-ft>
<transition-ft>25</transition-ft>
<span-m>40000</span-m>
</layer>
<layer n="2">
<coverage>clear</coverage>
<elevation-ft>-9999</elevation-ft>
<span-m>40000</span-m>
</layer>
<layer n="3">
<coverage>clear</coverage>
<elevation-ft>-9999</elevation-ft>
<span-m>40000</span-m>
</layer>
<layer n="4">
<coverage>clear</coverage>
<elevation-ft>-9999</elevation-ft>
<span-m>40000</span-m>
</layer>
<layer n="0">
<coverage type="string">clear</coverage>
<elevation-ft type="double">-9999</elevation-ft>
<thickness-ft type="double">600</thickness-ft>
<transition-ft type="double">150</transition-ft>
<span-m>40000</span-m>
</layer>
<layer n="1">
<coverage type="string">clear</coverage>
<elevation-ft type="double">-9999</elevation-ft>
<thickness-ft type="double">65</thickness-ft>
<transition-ft type="double">25</transition-ft>
<span-m type="double">40000</span-m>
</layer>
<layer n="2">
<coverage type="string">clear</coverage>
<elevation-ft type="double">-9999</elevation-ft>
<span-m type="double">40000</span-m>
</layer>
<layer n="3">
<coverage type="double">clear</coverage>
<elevation-ft type="double">-9999</elevation-ft>
<span-m type="double">40000</span-m>
</layer>
<layer n="4">
<coverage type="string">clear</coverage>
<elevation-ft type="double">-9999</elevation-ft>
<span-m type="double">40000</span-m>
</layer>
</clouds>
<cloudlayers include="cloudlayers.xml"/>
@ -225,67 +238,80 @@
Wait for
/environment/metar[10]/valid to become true.
-->
<metar n="0">/environment/metar[0]</metar> <!-- nearest airport -->
<metar n="1">/environment/metar[1]</metar> <!-- NAV1 -->
<metar n="2">/environment/metar[2]</metar> <!-- NAV2 -->
<metar n="3">/environment/metar[3]</metar> <!-- VHF-COMM1 -->
<metar n="4">/environment/metar[4]</metar> <!-- VHF-COMM2 -->
<metar n="5">/environment/metar[5]</metar> <!-- UHF-COMM1 -->
<metar n="6">/environment/metar[6]</metar> <!-- UHF-COMM2 -->
<metar n="0" type="string">/environment/metar[0]</metar>
<!-- nearest airport -->
<metar n="1" type="string">/environment/metar[1]</metar>
<!-- NAV1 -->
<metar n="2" type="string">/environment/metar[2]</metar>
<!-- NAV2 -->
<metar n="3" type="string">/environment/metar[3]</metar>
<!-- VHF-COMM1 -->
<metar n="4" type="string">/environment/metar[4]</metar>
<!-- VHF-COMM2 -->
<metar n="5" type="string">/environment/metar[5]</metar>
<!-- UHF-COMM1 -->
<metar n="6" type="string">/environment/metar[6]</metar>
<!-- UHF-COMM2 -->
<!-- User defined queries -->
<metar n="10">/environment/metar[10]</metar>
<metar n="11">/environment/metar[11]</metar>
<metar n="10" type="string">/environment/metar[10]</metar>
<metar n="11" type="string">/environment/metar[11]</metar>
<!-- use NOAA for METAR (no aloft data) -->
<data-source>noaa</data-source>
<data-source type="string">noaa</data-source>
<!-- use http://www.navlost.eu/ for METAR and aloft data -->
<!-- data-source>nwx<data-source -->
<enabled>true</enabled>
<enabled type="bool">true</enabled>
</realwx>
<metar>
<!-- create a low-level cloud layer for fog/mist/haze from metar -->
<set-ground-cloud-layer type="bool">true</set-ground-cloud-layer>
<!-- create a low-level cloud layer for fog/mist/haze from metar -->
<set-ground-cloud-layer type="bool">true</set-ground-cloud-layer>
</metar>
<turbulence>
<!-- the turbulence/magnitude-norm interpolator applies this value
as an exponent to the magnitude -->
<sensitivity type="double">2</sensitivity>
</turbulence>
<params>
<metar-max-age-min type="long">240</metar-max-age-min>
<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>
<contrail-altitude>30000</contrail-altitude>
<!-- definitions for the metar generated fog/mist/haze layer -->
<fog-mist-haze-layer>
<offset-from-station-elevation-ft>-200</offset-from-station-elevation-ft>
<visibility-above-layer-m>20000</visibility-above-layer-m>
<metar-max-age-min type="long">240</metar-max-age-min>
<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>
<contrail-altitude type="double">30000</contrail-altitude>
<!-- definitions for the metar generated fog/mist/haze layer -->
<fog-mist-haze-layer>
<offset-from-station-elevation-ft type="double">-200</offset-from-station-elevation-ft>
<visibility-above-layer-m type="double">20000</visibility-above-layer-m>
<fog-thickness-ft>500</fog-thickness-ft>
<fog-2dlayer-alpha>1.0</fog-2dlayer-alpha>
<fog-2dlayer-coverage>overcast</fog-2dlayer-coverage>
<fog-bc-2dlayer-coverage>broken</fog-bc-2dlayer-coverage>
<fog-shallow-thickness-ft>30</fog-shallow-thickness-ft>
<fog-thickness-ft type="double">500</fog-thickness-ft>
<fog-2dlayer-alpha type="double">1.0</fog-2dlayer-alpha>
<fog-2dlayer-coverage type="string">overcast</fog-2dlayer-coverage>
<fog-bc-2dlayer-coverage type="string">broken</fog-bc-2dlayer-coverage>
<fog-shallow-thickness-ft type="double">30</fog-shallow-thickness-ft>
<mist-thickness-ft>2000</mist-thickness-ft>
<mist-2dlayer-alpha>0.8</mist-2dlayer-alpha>
<mist-2dlayer-coverage>overcast</mist-2dlayer-coverage>
<mist-thickness-ft type="double">2000</mist-thickness-ft>
<mist-2dlayer-alpha type="double">0.8</mist-2dlayer-alpha>
<mist-2dlayer-coverage type="string">overcast</mist-2dlayer-coverage>
<haze-thickness-ft>2000</haze-thickness-ft>
<haze-2dlayer-alpha>0.6</haze-2dlayer-alpha>
<haze-2dlayer-coverage>overcast</haze-2dlayer-coverage>
</fog-mist-haze-layer>
<haze-thickness-ft type="double">2000</haze-thickness-ft>
<haze-2dlayer-alpha type="double">0.6</haze-2dlayer-alpha>
<haze-2dlayer-coverage type="string">overcast</haze-2dlayer-coverage>
</fog-mist-haze-layer>
</params>
<wildfire>
<enabled type="bool" userarchive="y">false</enabled>
<share-events type="bool" userarchive="y">false</share-events>
<save-on-exit type="bool" userarchive="y">false</save-on-exit>
<restore-on-startup type="bool" userarchive="y">false</restore-on-startup>
<fire-on-crash type="bool" userarchive="y">false</fire-on-crash>
<report-score type="bool" userarchive="y">false</report-score>
<data type="string"/>
<enabled type="bool" userarchive="y">false</enabled>
<share-events type="bool" userarchive="y">false</share-events>
<save-on-exit type="bool" userarchive="y">false</save-on-exit>
<restore-on-startup type="bool" userarchive="y">false</restore-on-startup>
<fire-on-crash type="bool" userarchive="y">false</fire-on-crash>
<report-score type="bool" userarchive="y">false</report-score>
<data type="string"/>
</wildfire>
</PropertyList>

View file

@ -22,7 +22,7 @@
All filters are enabled on /environment/config/enabled=true
-->
<PropertyList>
<filter>
<name>EnvironmentInterpolator:temperature-sea-level-degc</name>
<enable>
@ -35,7 +35,7 @@
<type>noise-spike</type>
<max-rate-of-change>0.1667</max-rate-of-change>
</filter>
<filter>
<name>EnvironmentInterpolator:dewpoint-sea-level-degc</name>
<enable>
@ -48,7 +48,7 @@
<type>noise-spike</type>
<max-rate-of-change>0.1667</max-rate-of-change>
</filter>
<filter>
<!--
transfer the interpolated QNH to the global environment
@ -127,7 +127,7 @@
</filter>
<filter>
<name>EnvironmentInterpolator:turbulence-magnitude</name>
<name>EnvironmentInterpolator:turbulence-raw-magnitude</name>
<enable>
<condition>
<property>/environment/config/enabled</property>
@ -139,12 +139,34 @@
</condition>
<property>/environment/config/presets/turbulence-magnitude-norm-override</property>
</input>
<input>/environment/config/interpolated/turbulence/magnitude-norm</input>
<output>/environment/turbulence/magnitude-norm</output>
<input>
<property>/environment/config/interpolated/turbulence/magnitude-norm</property>
</input>
<output>/environment/turbulence/raw-magnitude-norm</output>
<type>exponential</type>
<filter-time>1</filter-time>
</filter>
<filter>
<name>EnvironmentInterpolator:turbulence-magnitude</name>
<enable>
<condition>
<property>/environment/config/enabled</property>
</condition>
</enable>
<input>
<expression>
<pow>
<property>/environment/turbulence/raw-magnitude-norm</property>
<property>/environment/turbulence/sensitivity</property>
</pow>
</expression>
</input>
<output>/environment/turbulence/magnitude-norm</output>
<type>gain</type>
<gain>1</gain>
</filter>
<filter>
<name>EnvironmentInterpolator:turbulence-rate</name>
<enable>