1
0
Fork 0

AW: Fix bad vertical visibility profile determination for high clouds in METAR

This commit is contained in:
Thorsten Renk 2018-09-05 09:27:44 +03:00
parent d8c0387744
commit ab9805ca9b

View file

@ -2378,6 +2378,7 @@ var alt_low = layers[0].getNode("elevation-ft").getValue();
if ((alt_low < 0.0) or (cover_low ==0)) # we have to guess a value for the convective altitude for the visibility model
{alt_low = 8000.0;}
# first check a few obvious criteria
if (cover_low == 8) {cumulus_flag = 0;} # overcast sky is unlikely to be Cumulus, and we can't render it anyway
@ -2747,6 +2748,14 @@ var set_METAR_weather_station = func {
{ovcst_alt = layer_alt4; ovcst = ovcst + rand() * 0.1;}
# visibility model requires to separate the two
if (alt_shade >= ovcst_alt - 2000.0)
{ovcst_alt = alt_shade + 2000.0;}
#print ("Alt_shade: ", alt_shade, " alt ovcst: ", ovcst_alt);
# and specify the atmosphere - currently default only
local_weather.set_atmosphere_ipoint(station_lat, station_lon, vis + 10000.0, metar_alt_offset + alt_shade, vis + 20000.0, ovcst, ovcst_alt+metar_alt_offset - 5000.0, ovcst_alt+metar_alt_offset, shade, layer_alt1+metar_alt_offset, alt_shade+metar_alt_offset + 2500.0);