1
0
Fork 0

Merge branch 'master' of git://gitorious.org/fg/fgdata

This commit is contained in:
Detlef Faber 2011-12-07 17:24:38 +01:00
commit 7097a27b51
10 changed files with 152 additions and 137 deletions

View file

@ -41,7 +41,7 @@ parameters :
<use>/environment/rain-norm</use>
</rain-norm>
<snow-level>
<use>/sim/rendering/snow-level-m</use>
<use>/environment/snow-level-m</use>
</snow-level>
<cloud-cover0>

View file

@ -4,12 +4,12 @@
<inherits-from>Effects/terrain-default</inherits-from>
<parameters>
<snow-level>
<use>/sim/rendering/snow-level-m</use>
<use>/environment/snow-level-m</use>
</snow-level>
<depth-factor type="float">0.008</depth-factor>
<night-color type="vec3d">0.75 0.59 0.05</night-color>
<quality-level>
<use>/sim/rendering/shaders/quality-level</use>
<use>/sim/rendering/shaders/urban</use>
</quality-level>
<!--fog include-->
@ -46,7 +46,7 @@
<property>/sim/rendering/shaders/quality-level</property>
<less-equal>
<value type="float">4.0</value>
<float-property>/sim/rendering/shaders/quality-level</float-property>
<float-property>/sim/rendering/shaders/urban</float-property>
</less-equal>
<or>
<less-equal>

View file

@ -318,6 +318,8 @@
<report-score type="bool" userarchive="y">false</report-score>
<data type="string"/>
</wildfire>
<snow-level-m type="double">3200.0</snow-level-m>
<!-- create on instance of the terrains-sampler but start disabled -->
<terrain>

View file

@ -1232,14 +1232,14 @@ var common_aircraft_keys = {
key: [
{ name: "Enter", desc: "move rudder right" },
{ name: "0/Insert", desc: "move rudder left" },
{ name: "1/End", desc: "decrease elevator trim" },
{ name: "2/Up", desc: "increase elevator or AP altitude" },
{ name: "1/End", desc: "elevator trim up" },
{ name: "2/Down", desc: "elevator up or increase AP altitude" },
{ name: "3/PgDn", desc: "decr. throttle or AP autothrottle" },
{ name: "4/Left", desc: "move aileron left or adj. AP hdg." },
{ name: "5/KP5", desc: "center aileron, elev., and rudder" },
{ name: "6/Right", desc: "move aileron right or adj. AP hdg." },
{ name: "7/Home", desc: "increase elevator trim" },
{ name: "8/Down", desc: "decrease elevator or AP altitude" },
{ name: "7/Home", desc: "elevator trim down" },
{ name: "8/Up", desc: "elevator down or decrease AP altitude" },
{ name: "9/PgUp", desc: "incr. throttle or AP autothrottle" },
{ name: "Space", desc: "PTT - Push To Talk (via VoIP)" },
{ name: "!/@/#/$", desc: "select engine 1/2/3/4" },

View file

@ -70,7 +70,6 @@ var initialize = func {
var ground_term_Node = props.globals.getNode("/environment/terminator-relative-position-m" , 1);
ground_term_Node.setDoubleValue(60000);
# ################## listeners ####################
#
setlistener("/environment/sea/surface/wind-speed-kt", func (n) {
@ -111,7 +110,7 @@ var initialize = func {
},
1,
0);# end listener
print("weather util initialized ...");
loop();
@ -157,3 +156,26 @@ setlistener("sim/signals/fdm-initialized", initialize);
# end
###
# Adjust snow line to match METAR
#
var snowLineDefault = 3200;
_setlistener("/environment/metar/valid", func {
var snowCover = getprop("/environment/metar/snow-cover");
var snowLine = getprop("/environment/snow-level-m");
# Put the snow line slightly below the station's elevation,
# so the station is completely covered with snow
var stationElev = getprop("/environment/metar/station-elevation-ft") * globals.FT2M - 50;
if (snowCover == 1){
if (stationElev > snowLineDefault) { snowLine = snowLineDefault; }
if ((stationElev <= snowLineDefault) and (snowLine > stationElev)) { snowLine = stationElev; }
}
setprop("/environment/snow-level-m",snowLine);
});
#
###

View file

@ -418,81 +418,6 @@
</group>
</group>
<group>
<layout>hbox</layout>
<text>
<label>Other</label>
<halign>left</halign>
<enable>
<property>/sim/rendering/shaders/quality-level</property>
</enable>
</text>
<hrule>
<stretch>true</stretch>
</hrule>
</group>
<group>
<layout>hbox</layout>
<halign>right</halign>
<text>
<label>Snow line</label>
<enable>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<or>
<property>/sim/rendering/shaders/crop</property>
<property>/sim/rendering/shaders/landmass</property>
<property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shaders/urban</property>
</or>
</and>
</enable>
</text>
<slider>
<name>snow-level</name>
<enable>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<or>
<property>/sim/rendering/shaders/crop</property>
<property>/sim/rendering/shaders/landmass</property>
<property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shaders/urban</property>
</or>
</and>
</enable>
<min>0.0</min>
<max>5000.0</max>
<property>/sim/rendering/snow-level-m</property>
<binding>
<command>dialog-apply</command>
<object-name>snow-level</object-name>
</binding>
</slider>
<text>
<halign>left</halign>
<enable>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<or>
<property>/sim/rendering/shaders/crop</property>
<property>/sim/rendering/shaders/landmass</property>
<property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shaders/urban</property>
</or>
</and>
</enable>
<label>12345678</label>
<format>%.fm</format>
<live>true</live>
<property>/sim/rendering/snow-level-m</property>
</text>
</group>
<group>
<layout>hbox</layout>
<text>

View file

@ -416,7 +416,7 @@
</group>
<group>
<layout>hbox</layout>
<layout>vbox</layout>
<halign>fill</halign>
<group>
<layout>table</layout>
@ -424,23 +424,18 @@
<row>0</row>
<col>0</col>
<label>Rain</label>
<enable>
<property>/sim/gui/dialogs/weather-scenario/state</property>
</enable>
</text>
<text>
<row>0</row>
<col>1</col>
<label>Snow</label>
<enable>
<property>/sim/gui/dialogs/weather-scenario/state</property>
<halign>left</halign>
<enable>
<equals>
<property>/sim/gui/dialogs/weather-scenario/state</property>
<value type="int">1</value>
</equals>
</enable>
</text>
<slider>
<row>1</row>
<col>0</col>
<row>0</row>
<col>1</col>
<live>true</live>
<halign>fill</halign>
<property>/environment/rain-norm</property>
@ -455,6 +450,19 @@
</equals>
</enable>
</slider>
<text>
<row>1</row>
<col>0</col>
<label>Snow</label>
<halign>left</halign>
<enable>
<equals>
<property>/sim/gui/dialogs/weather-scenario/state</property>
<value type="int">1</value>
</equals>
</enable>
</text>
<slider>
<row>1</row>
@ -478,7 +486,7 @@
<row>0</row>
<col>3</col>
<label>QNH (inHg)</label>
<enable>
<enable>
<property>/sim/gui/dialogs/weather-scenario/state</property>
</enable>
</text>
@ -501,19 +509,93 @@
<object-name>pressure-sea-level-inhg</object-name>
</binding>
</input>
<empty>
<text>
<label>Snow line</label>
<row>2</row>
<col>0</col>
<colspan>3</colspan>
<pref-height>30</pref-height>
</empty>
<enable>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<or>
<property>/sim/rendering/shaders/crop</property>
<property>/sim/rendering/shaders/landmass</property>
<property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shaders/urban</property>
</or>
</and>
</enable>
</text>
<slider>
<name>snow-level</name>
<row>2</row>
<col>1</col>
<enable>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<or>
<property>/sim/rendering/shaders/crop</property>
<property>/sim/rendering/shaders/landmass</property>
<property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shaders/urban</property>
</or>
</and>
</enable>
<min>-425.0</min>
<max>5000.0</max>
<live>true</live>
<property>/environment/snow-level-m</property>
<binding>
<command>dialog-apply</command>
<object-name>snow-level</object-name>
</binding>
</slider>
<text>
<row>2</row>
<col>2</col>
<enable>
<and>
<property>/sim/rendering/shaders/quality-level</property>
<or>
<property>/sim/rendering/shaders/crop</property>
<property>/sim/rendering/shaders/landmass</property>
<property>/sim/rendering/shaders/transition</property>
<property>/sim/rendering/shaders/urban</property>
</or>
</and>
</enable>
<label>12345678</label>
<format>%.fm</format>
<live>true</live>
<property>/environment/snow-level-m</property>
</text>
</group>
<empty>
<stretch>true</stretch>
</empty>
<text>
<visible>
<not>
<equals>
<property>/sim/gui/dialogs/weather-scenario/state</property>
<value type="int">1</value>
</equals>
</not>
</visible>
<label>Disable METAR to manually edit weather settings.</label>
<halign>left</halign>
<color>
<red>1.0</red>
<green>0.6</green>
<blue>0.6</blue>
</color>
</text>
</group>
</group>
<!-- Precipitation End -->

View file

@ -462,7 +462,7 @@ top down before the key bindings are parsed.
<key n="50">
<name>2</name>
<desc>Increase elevator or autopilot altitude</desc>
<desc>Elevator up or increase autopilot altitude</desc>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
@ -570,7 +570,7 @@ top down before the key bindings are parsed.
<key n="56">
<name>8</name>
<desc>Decrease elevator or autopilot altitude</desc>
<desc>Elevator down or decrease autopilot altitude</desc>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
@ -1277,7 +1277,7 @@ top down before the key bindings are parsed.
<key n="357">
<name>Up</name>
<desc>Increase elevator or autopilot altitude</desc>
<desc>Elevator down or decrease autopilot altitude</desc>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>
@ -1324,7 +1324,7 @@ top down before the key bindings are parsed.
<key n="359">
<name>Down</name>
<desc>Decrease elevator or autopilot altitude</desc>
<desc>Elevator up or increase autopilot altitude</desc>
<repeatable type="bool">true</repeatable>
<binding>
<command>nasal</command>

View file

@ -1280,6 +1280,7 @@ Shared parameters for various materials.
<name>ShrubCover</name>
<name>ShrubGrassCover</name>
<name>ScrubCover</name>
<name>Scrub</name>
<name>Sclerophyllous</name>
<name>Heath</name>
<texture>Terrain/shrub.dds</texture>
@ -2553,6 +2554,7 @@ Shared parameters for various materials.
<name>ShrubCover</name>
<name>ShrubGrassCover</name>
<name>ScrubCover</name>
<name>Scrub</name>
<name>Sclerophyllous</name>
<name>Heath</name>
<texture>Terrain.winter/shrub.png</texture>

View file

@ -68,22 +68,15 @@ Started September 2000 by David Megginson, david@megginson.com
<realism type="int">5</realism>
<filtering type="int">8</filtering>
<shaders>
<model type="float"
userarchive="y">1.0</model>
<crop type="float"
userarchive="y">1.0</crop>
<landmass type="float"
userarchive="y">1.0</landmass>
<contrails type="float"
userarchive="y">1.0</contrails>
<transition type="float"
userarchive="y">1.0</transition>
<urban type="float"
userarchive="y">1.0</urban>
<water type="float"
userarchive="y">1.0</water>
<quality-level type="float"
userarchive="y">3.0</quality-level>
<model type="float" userarchive="y">1.0</model>
<crop type="float" userarchive="y">1.0</crop>
<landmass type="float" userarchive="y">1.0</landmass>
<contrails type="float" userarchive="y">1.0</contrails>
<skydome type="bool" userarchive="y">false</skydome>
<transition type="float" userarchive="y">1.0</transition>
<urban type="float" userarchive="y">1.0</urban>
<water type="float" userarchive="y">1.0</water>
<quality-level type="float" userarchive="y">3.0</quality-level>
</shaders>
<mie type="float"
userarchive="y">0.003</mie>
@ -91,8 +84,6 @@ Started September 2000 by David Megginson, david@megginson.com
userarchive="y">0.0003</rayleigh>
<dome-density type="float"
userarchive="y">0.5</dome-density>
<scattering-shader type="bool"
userarchive="y">0</scattering-shader>
<!-- multithreading-mode>AutomaticSelection</multithreading-mode -->
<!--
Uncomment the above element to select OSG multi-threading mode.
@ -213,15 +204,6 @@ Started September 2000 by David Megginson, david@megginson.com
userarchive="y">false</enabled>
<rate-m-g type="double">0.005</rate-m-g>
</headshake>
<crop-shader type="bool" userarchive="y">false</crop-shader>
<landmass-shader type="bool" userarchive="y">false</landmass-shader>
<transition-shader type="bool" userarchive="y">false</transition-shader>
<water-shader type="bool" userarchive="y">false</water-shader>
<urban-shader type="bool" userarchive="y">false</urban-shader>
<contrail-shader type="bool" userarchive="y">false</contrail-shader>
<snow-level-m type="double">2000.0</snow-level-m>
<quality-level type="double"
userarchive="y">0.0</quality-level>
<osg-displaysettings>
<eye-separation type="double"
userarchive="y">0.05</eye-separation>