1
0
Fork 0

Merge branch 'master' of \New Git\fgdata

This commit is contained in:
Vivian Meazza 2010-11-21 20:21:28 +00:00
commit e01d142b30
6 changed files with 45 additions and 90 deletions

View file

@ -25,7 +25,7 @@
<property>/sim/rendering/landmass-shader</property>
<property>/sim/rendering/shader-effects</property>
<less-equal>
<value type="float">4.0</value>
<value type="float">4.5</value>
<float-property>/sim/rendering/quality-level</float-property>
</less-equal>
<or>

View file

@ -21,20 +21,41 @@
<to>/environment/clouds/layer[0]/elevation-ft</to>
</params>
<name>MetarController:clouds:altitude_interpolate</name>
<type>noise-spike</type>
<max-rate-of-change>8.333</max-rate-of-change>
<type>exponential</type>
<filter-time>
<condition>
<!-- dont't interpolate to -9999 or if more than 2000ft offset -->
<or>
<less-than>
<property alias="../../../../../params/from"/>
<value>-9000</value>
</less-than>
<less-than>
<property alias="../../../../../params/to"/>
<value>-9000</value>
</less-than>
<greater-than>
<expression>
<abs>
<difference>
<property alias="../../../../../../../../params/from"/>
<property alias="../../../../../../../../params/to"/>
</difference>
</abs>
</expression>
<value>2000</value>
</greater-than>
</or>
</condition>
<value>0</value>
</filter-time>
<filter-time>60</filter-time>
<enable>
<condition>
<property>/environment/metar/valid</property>
<property>/environment/params/metar-updates-environment</property>
<greater-than>
<property alias="../../../../params/from"/>
<value>-9000</value>
</greater-than>
<greater-than>
<property alias="../../../../params/to"/>
<value>-9000</value>
</greater-than>
</condition>
</enable>
<input alias="../params/from"/>

View file

@ -1,44 +0,0 @@
<?xml version="1.0" ?>
<!--
This file is part of FlightGear, the free flight simulator
http://www.flightgear.org/
Copyright (C) 2009 Torsten Dreyer, Torsten (at) t3r _dot_ de
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
-->
<PropertyList>
<params>
<from>environment/metar/clouds/layer[0]/elevation-ft</from>
<to>/environment/clouds/layer[0]/elevation-ft</to>
</params>
<name>MetarController:clouds:altitude_set</name>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<property>/environment/metar/valid</property>
<property>/environment/params/metar-updates-environment</property>
<or>
<less-than>
<property alias="../../../../../params/from"/>
<value>-9000</value>
</less-than>
<less-than>
<property alias="../../../../../params/to"/>
<value>-9000</value>
</less-than>
</or>
</condition>
</enable>
<input alias="../params/from"/>
<output alias="../params/to"/>
</PropertyList>

View file

@ -282,33 +282,6 @@
</filter>
<!-- Clouds -->
<!-- don't interpolate to/from altitude -9999 -->
<filter include="clouds-altitude-set.xml"/>
<filter include="clouds-altitude-set.xml">
<params>
<from>/environment/metar/clouds/layer[1]/elevation-ft</from>
<to>/environment/clouds/layer[1]/elevation-ft</to>
</params>
</filter>
<filter include="clouds-altitude-set.xml">
<params>
<from>/environment/metar/clouds/layer[2]/elevation-ft</from>
<to>/environment/clouds/layer[2]/elevation-ft</to>
</params>
</filter>
<filter include="clouds-altitude-set.xml">
<params>
<from>/environment/metar/clouds/layer[3]/elevation-ft</from>
<to>/environment/clouds/layer[3]/elevation-ft</to>
</params>
</filter>
<filter include="clouds-altitude-set.xml">
<params>
<from>/environment/metar/clouds/layer[4]/elevation-ft</from>
<to>/environment/clouds/layer[4]/elevation-ft</to>
</params>
</filter>
<filter include="clouds-altitude-interpolate.xml"/>
<filter include="clouds-altitude-interpolate.xml">
<params>

View file

@ -92,9 +92,8 @@ void main (void)
//float pam = (map.a * -2) + 1; //reverse map
reflFactor = map.a + transparency_offset;
} else {
// set the reflectivity proportional to shininess with user
// input
reflFactor = (gl_FrontMaterial.shininess / 128) + transparency_offset;
// set the reflectivity proportional to shininess with user input
reflFactor = (gl_FrontMaterial.shininess / 128) * ns.a + transparency_offset;
}
reflFactor = clamp(reflFactor, 0.0, 1.0);

View file

@ -1512,10 +1512,10 @@
<live>false</live>
<property>sim/gui/dialogs/weather-scenario/metar</property>
<enable>
<equals>
<property>/sim/gui/dialogs/weather-scenario/state</property>
<value type="int">1</value>
</equals>
<greater-than>
<property>/sim/gui/dialogs/weather-scenario/state</property>
<value type="int">1</value>
</greater-than>>
</enable>
</textbox>
@ -1574,7 +1574,7 @@
}
me.scenarioListenerId = setlistener( me.base ~ "/source-selection", func(n) { me.scenarioListener(n); } );
me.metarListenerId = setlistener( "environment/metar/valid", func(n) { me.metarListener(n); }, 1, 0 );
me.metarListenerId = setlistener( "environment/metar/valid", func(n) { me.metarListener(n); }, 1, 1 );
},
close : func {
@ -1596,6 +1596,11 @@
setprop( "/environment/realwx/enabled", 1 );
setprop( "/environment/config/enabled", 1 );
me.baseN.getNode("state",1).setIntValue( 0 );
} else if( scenarioName == "Manual input" ) {
setprop( "/environment/params/metar-updates-environment", 1 );
setprop( "/environment/realwx/enabled", 0 );
setprop( "/environment/config/enabled", 1 );
me.baseN.getNode("state",1).setIntValue( 2 );
} else {
setprop( "/environment/params/metar-updates-environment", 1 );
setprop( "/environment/realwx/enabled", 0 );
@ -1647,6 +1652,7 @@
var metar = getprop("environment/metar/data");
if( metar == nil or metar == "" ) metar = "NIL";
metar = normalize_string(metar);
printlog( "info", "new METAR: " ~ metar );
setprop( me.base ~ "/metar", metar );
gui.dialog_update( "weather", "metar" );
},