Block metar winds if simbrief winds are active
This commit is contained in:
parent
91401a95b0
commit
55b17f4c5e
1 changed files with 10 additions and 1 deletions
|
@ -3444,6 +3444,11 @@ append(windIpointArray, w);
|
||||||
|
|
||||||
var set_wind_ipoint_metar = func (lat, lon, d0, v0) {
|
var set_wind_ipoint_metar = func (lat, lon, d0, v0) {
|
||||||
|
|
||||||
|
if (getprop("/sim/gui/dialogs/weather/simbrief-loaded")) {
|
||||||
|
# METAR winds should not interfere with simbrief winds
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
# insert a plausible pattern of aloft winds based on ground info
|
# insert a plausible pattern of aloft winds based on ground info
|
||||||
|
|
||||||
|
|
||||||
|
@ -3689,6 +3694,11 @@ create_cloudbox(type, lat, lon, alt, x,y,z,n, f_core, r_core, h_core, n_core, f_
|
||||||
}
|
}
|
||||||
|
|
||||||
var load_simbrief_weather_from_xml = func {
|
var load_simbrief_weather_from_xml = func {
|
||||||
|
setprop("/sim/gui/dialogs/weather/simbrief-loaded", "true");
|
||||||
|
|
||||||
|
# Clear existing wind data (e.g. from metar mode)
|
||||||
|
windIpointArray = [];
|
||||||
|
|
||||||
var file = getprop("/sim/fg-home") ~ "/Export/weater_simbrief.xml";
|
var file = getprop("/sim/fg-home") ~ "/Export/weater_simbrief.xml";
|
||||||
|
|
||||||
var node = io.readxml(file);
|
var node = io.readxml(file);
|
||||||
|
@ -3757,7 +3767,6 @@ var load_simbrief_weather_from_xml = func {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setprop("/sim/gui/dialogs/weather/simbrief-loaded", "true");
|
|
||||||
setprop("/sim/gui/dialogs/weather/simbrief-last-flight", departure ~ " - " ~ arrival);
|
setprop("/sim/gui/dialogs/weather/simbrief-last-flight", departure ~ " - " ~ arrival);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue