Merge branch 'master' of gitorious.org:fg/fgdata
This commit is contained in:
commit
a06f5be440
5 changed files with 73 additions and 8 deletions
|
@ -12,6 +12,24 @@ Started October 23 2001 by John Check, fgpanels@rockfish.net
|
||||||
<sim>
|
<sim>
|
||||||
|
|
||||||
<description>Cessna 172P Skyhawk (1981 model)</description>
|
<description>Cessna 172P Skyhawk (1981 model)</description>
|
||||||
|
<long-description>The Cessna 172 Skyhawk is a four-seat, single-engine, high-wing fixed-wing aircraft.
|
||||||
|
First flown in 1955 and still in production, more Cessna 172s have been built than any other aircraft.
|
||||||
|
</long-description>
|
||||||
|
|
||||||
|
<fr>
|
||||||
|
<long-description>Le Cessna 172 Skyhawk est un avion quadriplace, monomoteur à aile haute.
|
||||||
|
Il effectua son premier vol en 1955 et est toujours en production, plus de Cessna 172 ont été construits que tout autres avions.
|
||||||
|
</long-description>
|
||||||
|
</fr>
|
||||||
|
|
||||||
|
<tags>
|
||||||
|
<tag>ga</tag>
|
||||||
|
<tag>cessna</tag>
|
||||||
|
<tag>piston</tag>
|
||||||
|
<tag>single-engine</tag>
|
||||||
|
<tag>fixed-gear</tag>
|
||||||
|
</tags>
|
||||||
|
|
||||||
<author>David Megginson</author>
|
<author>David Megginson</author>
|
||||||
<status>early production</status>
|
<status>early production</status>
|
||||||
<rating>
|
<rating>
|
||||||
|
|
BIN
Aircraft/c172p/thumbnail2.png
Normal file
BIN
Aircraft/c172p/thumbnail2.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 383 KiB |
BIN
Aircraft/c172p/thumbnail3.png
Normal file
BIN
Aircraft/c172p/thumbnail3.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 329 KiB |
|
@ -5,6 +5,18 @@
|
||||||
<description>UFO from the 'White Project' of the UNESCO</description>
|
<description>UFO from the 'White Project' of the UNESCO</description>
|
||||||
<author>ET</author>
|
<author>ET</author>
|
||||||
|
|
||||||
|
<long-description>With the UFO you can place 3D objects in the FlightGear scenery,
|
||||||
|
and inspect the scenery without worrying about crashing.</long-description>
|
||||||
|
<fr>
|
||||||
|
<long-description>Avec l'UFO (OVNI) vous pouvez placer des objets 3D dans les scènes de FlightGear scenery</long-description>
|
||||||
|
</fr>
|
||||||
|
|
||||||
|
|
||||||
|
<tags>
|
||||||
|
<tag>fictional</tag>
|
||||||
|
<tag>spaceship</tag>
|
||||||
|
</tags>
|
||||||
|
|
||||||
<flight-model>ufo</flight-model>
|
<flight-model>ufo</flight-model>
|
||||||
|
|
||||||
<sound>
|
<sound>
|
||||||
|
|
|
@ -18,14 +18,46 @@ var decreaseVisibility = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var adjustVisibility = func( factor ) {
|
var adjustVisibility = func( factor ) {
|
||||||
var val = visibilityProp.getValue() * factor;
|
var val = 0;
|
||||||
if( val < 1.0 ) val = getprop("/environment/visibility-m");
|
var aux_val = 0;
|
||||||
if( val > 30 ) {
|
var local = getprop("sim/gui/dialogs/metar/mode/local-weather");
|
||||||
visibilityProp.setDoubleValue(val);
|
var global = getprop("sim/gui/dialogs/metar/mode/global-weather");
|
||||||
visibilityOverrideProp.setBoolValue(1);
|
var max_aux_vis = 12.429216196;
|
||||||
gui.popupTip(sprintf("Visibility: %.0f m", val));
|
var min_aux_vis = 9.90348;
|
||||||
}
|
|
||||||
}
|
if(global)
|
||||||
|
{
|
||||||
|
val = visibilityProp.getValue() * factor;
|
||||||
|
|
||||||
|
if( val < 1.0 ) val = getprop("/environment/visibility-m");
|
||||||
|
|
||||||
|
if( val > 30 ) {
|
||||||
|
visibilityProp.setDoubleValue(val);
|
||||||
|
visibilityOverrideProp.setBoolValue(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
gui.popupTip(sprintf("Visibility: %.0f m", val));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (factor == 1.1)
|
||||||
|
factor = 1.001;
|
||||||
|
else
|
||||||
|
factor = 0.999;
|
||||||
|
|
||||||
|
aux_val = auxvisibilityProp.getValue() * factor;
|
||||||
|
|
||||||
|
if( aux_val <= min_aux_vis)
|
||||||
|
auxvisibilityProp.setDoubleValue(min_aux_vis);
|
||||||
|
elsif(aux_val >= max_aux_vis)
|
||||||
|
auxvisibilityProp.setDoubleValue(max_aux_vis);
|
||||||
|
else
|
||||||
|
auxvisibilityProp.setDoubleValue(aux_val);
|
||||||
|
|
||||||
|
gui.popupTip(sprintf("Max Visibility: %.0f m", getprop("/local-weather/config/max-vis-range-m")));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
# Handler. Reset visibility to default.
|
# Handler. Reset visibility to default.
|
||||||
|
@ -38,8 +70,11 @@ var resetVisibility = func {
|
||||||
|
|
||||||
var visibilityProp = nil;
|
var visibilityProp = nil;
|
||||||
var visibilityOverrideProp = nil;
|
var visibilityOverrideProp = nil;
|
||||||
|
var auxvisibilityProp = nil;
|
||||||
|
|
||||||
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
_setlistener("/sim/signals/nasal-dir-initialized", func {
|
||||||
|
print ("environment init");
|
||||||
visibilityProp = props.globals.initNode("/environment/config/presets/visibility-m", 0, "DOUBLE" );
|
visibilityProp = props.globals.initNode("/environment/config/presets/visibility-m", 0, "DOUBLE" );
|
||||||
visibilityOverrideProp = props.globals.initNode("/environment/config/presets/visibility-m-override", 0, "BOOL" );
|
visibilityOverrideProp = props.globals.initNode("/environment/config/presets/visibility-m-override", 0, "BOOL" );
|
||||||
|
auxvisibilityProp = props.globals.initNode("/local-weather/config/aux-max-vis-range-m", 0, "DOUBLE" );
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue