1
0
Fork 0

Add /environment/atmosphere/is-isa property for ISA METAR

This commit is contained in:
Roman Ludwicki 2023-07-22 00:52:07 +02:00 committed by James Turner
parent 11820f6493
commit 4f7a93d0ba
2 changed files with 12 additions and 0 deletions

View file

@ -42,19 +42,25 @@ setlistener("/environment/weather-scenario", func(n) {
setprop( "/environment/params/metar-updates-environment", 0 );
setprop( "/environment/realwx/enabled", 0 );
setprop( "/environment/config/enabled", 0 );
setprop( "/environment/climate/is-isa", 0 );
} else if( scenarioName == "Live data" ) {
setprop( "/environment/params/metar-updates-environment", 1 );
setprop( "/environment/realwx/enabled", 1 );
setprop( "/environment/config/enabled", 1 );
setprop( "/environment/climate/is-isa", 0 );
} else if( scenarioName == "Manual input" ) {
setprop( "/environment/params/metar-updates-environment", 1 );
setprop( "/environment/realwx/enabled", 0 );
setprop( "/environment/config/enabled", 1 );
setprop( "/environment/climate/is-isa", 0 );
} else {
setprop( "/environment/params/metar-updates-environment", 1 );
setprop( "/environment/realwx/enabled", 0 );
setprop( "/environment/config/enabled", 1 );
var metar = scenario.getNode("metar",1).getValue();
setprop( "environment/metar/data", metar );
var isISA = scenarioName == "International Standard Atmosphere";
setprop( "/environment/climate/is-isa", isISA );
}
});

View file

@ -55,10 +55,16 @@
setprop( "/environment/params/metar-updates-environment", 0 );
setprop( "/environment/realwx/enabled", 0 );
setprop( "/environment/config/enabled", 1 );
setprop( "/environment/climate/is-isa", 0 );
} else if( scenarioName == "Live data" ) {
# If we've selected Live Data we need to force
# a refresh of the Live Data setting.
setprop( "/environment/realwx/enabled", 1 );
setprop( "/environment/climate/is-isa", 0 );
} else if( scenarioName == "International Standard Atmosphere" ) {
# If we've selected International Standard Atmosphere we need to
# enable the ISA setting.
setprop( "/environment/climate/is-isa", 1 );
}
},