1
0
Fork 0

Local Weather 1.35 by Thorsten Renk

This commit is contained in:
Frederic Bouvier 2011-09-23 23:22:19 +02:00
parent eed827ae21
commit 928789a0d5
8 changed files with 2234 additions and 744 deletions

View file

@ -16,6 +16,8 @@
<debug-output-flag type="bool" userarchive="y">0</debug-output-flag>
<generate-thermal-lift-flag type="bool" userarchive="y">0</generate-thermal-lift-flag>
<dynamical-convection-flag type="bool" userarchive="y">0</dynamical-convection-flag>
<detailed-terrain-interaction-flag type="bool" userarchive="y">0</detailed-terrain-interaction-flag>
<realistic-visibility-flag type="bool" userarchive="y">0</realistic-visibility-flag>
<thread-flag type="bool" userarchive="n">1</thread-flag>
<presampling-flag type="bool" userarchive="y">1</presampling-flag>
<fps-control-flag type="bool" userarchive="y">0</fps-control-flag>

File diff suppressed because it is too large Load diff

View file

@ -83,6 +83,8 @@ weather_tiles = local_weather;
var result = "yes";
if (1==0) # no compatibility tests for 2.4 binary, it has the required features
{
print("Compatibility layer: testing for hard coded support");
if (props.globals.getNode("/rendering/scene/saturation", 0) == nil)
@ -119,6 +121,21 @@ print("* can disable global weather: "~result);
print("Compatibility layer: tests done.");
}
# features of a 2.4 binary
features.can_set_light = 1;
features.can_set_scattering = 1;
features.terrain_presampling = 1;
features.terrain_presampling_active = 1;
features.can_disable_environment = 1;
# features of a current GIT binary
features.fast_geodinfo = 1;
# do actual startup()
local_weather.updateMenu();
@ -128,6 +145,8 @@ local_weather.startup();
var setDefaultCloudsOff = func {
if (features.can_disable_environment == 1)
@ -149,6 +168,16 @@ else
}
}
if (local_weather.hardcoded_clouds_flag == 1)
{
# we store that information ourselves, so this should be zero
setprop("/environment/clouds/layer[0]/elevation-ft",0.0);
# layer wrapping off
setprop("/sim/rendering/clouds3d-wrap",0);
}
}
@ -226,7 +255,9 @@ settimer( func {visibility_loop(); },0);
####################################
var setLift = func (lift) {
setprop("/environment/local-weather-lift-fps",lift);
setprop("/environment/local-weather-lift-fps",lift);
}
####################################
@ -655,8 +686,7 @@ model.getNode("tile-index",1).setValue(tile_counter);
model.getNode("load", 1).remove();
# sort the model node into a vector for easy deletion
# append(weather_tile_management.modelArrays[tile_counter-1],model);
# sort the cloud into the cloud hash array
@ -699,6 +729,64 @@ if (local_weather.dynamics_flag == 1)
}
###########################################################
# place a single cloud using hard-coded system
###########################################################
var create_cloud_new = func(c) {
var tile_counter = getprop(lw~"tiles/tile-counter");
cloud_index = cloud_index + 1;
c.index = tile_counter;
c.cloud_index = cloud_index;
# write the actual cloud into the scenery
var p = props.Node.new({ "layer" : 0,
"index": cloud_index,
"lat-deg": c.lat,
"lon-deg": c.lon,
"min-sprite-width-m": c.min_width,
"max-sprite-width-m": c.max_width,
"min-sprite-height-m": c.min_height,
"max-sprite-height-m": c.max_height,
"num-sprites": c.n_sprites,
"bottom-shade": c.bottom_shade,
"texture": c.texture_sheet,
"num-textures-x": c.num_tex_x,
"num-textures-y": c.num_tex_y,
"min-cloud-width-m": c.min_cloud_width,
"max-cloud-width-m": c.min_cloud_width,
"min-cloud-height-m": c.min_cloud_height,
"max-cloud-height-m": c.min_cloud_height,
"z-scale": c.z_scale,
"height-map-texture": 0,
"alt-ft" : c.alt});
fgcommand("add-cloud", p);
# print("alt: ", c.alt);
# add other management properties to the hash if dynamics is on
if (local_weather.dynamics_flag == 1)
{
c.timestamp = weather_dynamics.time_lw;
}
# add cloud to array
append(weather_tile_management.cloudArray,c);
}
###########################################################
# place a cloud layer from arrays, split across frames
###########################################################
@ -736,6 +824,7 @@ for (var k = 0; k < k_max; k = k+1)
cloud_evolution_timestamp = local_weather.clouds_evolution_timestamp[s-k-1];
}
create_cloud(clouds_path[s-k-1], clouds_lat[s-k-1], clouds_lon[s-k-1], clouds_alt[s-k-1], clouds_orientation[s-k-1]);
#create_cloud_new(clouds_path[s-k-1], clouds_lat[s-k-1], clouds_lon[s-k-1], clouds_alt[s-k-1], clouds_orientation[s-k-1]);
}
setsize(clouds_path,s-k_max);
@ -838,3 +927,7 @@ var buffered_tile_index = 0;
var cloud_mean_altitude = 0.0;
var cloud_flt = 0.0;
var cloud_evolution_timestamp = 0.0;
# globals to handle new cloud indexing
var cloud_index = 0;

File diff suppressed because it is too large Load diff

View file

@ -54,6 +54,32 @@ return windfield;
}
var get_wind_direction = func (tile_index) {
if ((local_weather.wind_model_flag == 1) or (local_weather.wind_model_flag == 3))
{
return tile_wind_direction[0];
}
else if ((local_weather.wind_model_flag ==2) or (local_weather.wind_model_flag == 4) or (local_weather.wind_model_flag == 5))
{
return tile_wind_direction[tile_index-1];
}
}
var get_wind_speed = func (tile_index) {
if ((local_weather.wind_model_flag == 1) or (local_weather.wind_model_flag == 3))
{
return tile_wind_speed[0];
}
else if ((local_weather.wind_model_flag ==2) or (local_weather.wind_model_flag == 4) or (local_weather.wind_model_flag == 5))
{
return tile_wind_speed[tile_index-1];
}
}
########################################################
# timing loop
# this gets the accurate time since the start of weather dynamics

View file

@ -1228,7 +1228,7 @@ if (getprop(lw~"buffer-loop-flag") ==1) {settimer( func {buffer_loop(i)}, 0);}
# housekeeping loop
###############################
var housekeeping_loop = func (index) {
var housekeeping_loop = func (index, index1) {
if (local_weather.local_weather_running_flag == 0) {return;}
@ -1237,12 +1237,14 @@ var n_max = size(cloudSceneryArray);
n_cloudSceneryArray = n_max;
var s = size(active_tile_list);
setprop(lw~"clouds/cloud-scenery-count",n_max);
var m_max = size(cloudArray);
setprop(lw~"clouds/cloud-scenery-count",n_max+m_max);
# don't do anything as long as the array is empty
if (n_max == 0) # nothing to do, loop over
{if (getprop(lw~"housekeeping-loop-flag") ==1) {settimer( func {housekeeping_loop(index)}, 0);} return;}
if ((n_max == 0) and (m_max == 0)) # nothing to do, loop over
{if (getprop(lw~"housekeeping-loop-flag") ==1) {settimer( func {housekeeping_loop(index, index1)}, 0);} return;}
# parse the flags
@ -1255,7 +1257,7 @@ if (asymmetric_buffering_flag ==1)
var current_heading = getprop("orientation/heading-deg");
}
# now process the array
# now process the Scenery array
if (index > n_max-1) {index = 0;}
@ -1310,7 +1312,34 @@ for (var i = index; i < i_max; i = i+1)
}
if (getprop(lw~"housekeeping-loop-flag") ==1) {settimer( func {housekeeping_loop(i)}, 0);}
# now process the hard coded cloud array and see a tile has been removed
if (index1 > m_max-1) {index1 = 0;}
var j_max = index1 + n;
if (j_max > m_max) {j_max = m_max;}
for (var j = index1; j < j_max; j = j+1)
{
var c = cloudArray[j];
var flag = 0;
for (var k = 0; k < s; k = k+1)
{
if (active_tile_list[k] == c.index) {flag = 1; break;}
}
if (flag == 0)
{
c.remove();
cloudArray = delete_from_vector(cloudArray,j);
j = j -1; j_max = j_max - 1; m_max = m_max - 1;
continue;
}
}
if (getprop(lw~"housekeeping-loop-flag") ==1) {settimer( func {housekeeping_loop(i,j)}, 0);}
}
@ -1555,11 +1584,20 @@ var cloudScenery = {
return me.calt.getValue();
},
correct_altitude: func {
var lat = me.clat.getValue();
var lon = me.clon.getValue();
var lat = me.lat;
var lon = me.lon;
var convective_alt = weather_dynamics.tile_convective_altitude[me.index-1] + local_weather.alt_20_array[me.index-1];
var elevation = compat_layer.get_elevation(lat, lon);
var alt_new = local_weather.get_convective_altitude(convective_alt, elevation, me.index);
if (local_weather.detailed_terrain_interaction_flag == 1)
{
var phi = local_weather.get_wind_direction(me.index) * math.pi/180.0;
var grad = local_weather.get_terrain_gradient(lat, lon, elevation, phi, 1000.0);
}
else
{var grad = 0.0;}
var alt_new = local_weather.get_convective_altitude(convective_alt, elevation, me.index, grad);
me.target_alt = alt_new + me.rel_alt;
},
correct_altitude_and_age: func {
@ -1582,13 +1620,25 @@ var cloudScenery = {
}
}
if (local_weather.detailed_terrain_interaction_flag == 1)
{
var phi = local_weather.get_wind_direction(me.index) * math.pi/180.0;
var grad = local_weather.get_terrain_gradient(lat, lon, elevation, phi, 1000.0);
var lee_bias = local_weather.get_lee_bias(grad);
}
else
{
var grad = 0.0;
var lee_bias = 1.0;
}
# correct the altitude
var alt_new = local_weather.get_convective_altitude(convective_alt, elevation, me.index);
var alt_new = local_weather.get_convective_altitude(convective_alt, elevation, me.index, grad);
me.target_alt = alt_new + me.rel_alt;
# correct fractional lifetime based on terrain below
var current_lifetime = math.sqrt(p_cover)/math.sqrt(0.35) * weather_dynamics.cloud_convective_lifetime_s;
var current_lifetime = math.sqrt(p_cover * lee_bias)/math.sqrt(0.35) * weather_dynamics.cloud_convective_lifetime_s;
var fractional_increase = (weather_dynamics.time_lw - me.evolution_timestamp)/current_lifetime;
me.flt = me.flt + fractional_increase;
me.evolution_timestamp = weather_dynamics.time_lw;
@ -1641,6 +1691,59 @@ var cloudScenery = {
},
};
var cloudArray = [];
var cloud = {
new: func(type, subtype) {
var c = { parents: [cloud] };
c.type = type;
c.subtype = subtype;
return c;
},
remove: func {
var p = props.Node.new({ "layer" : 0,
"index": me.cloud_index });
fgcommand("del-cloud", p);
},
move: func {
# this doesn't move a cloud in the scenery, but updates its position in internal space
var windfield = local_weather.windfield;
var dt = local_weather.time_lw - me.timestamp;
me.lat = me.lat + windfield[1] * dt * local_weather.m_to_lat;
me.lon = me.lon + windfield[0] * dt * local_weather.m_to_lon;
me.timestamp = weather_dynamics.time_lw;
},
correct_altitude: func {
var convective_alt = weather_dynamics.tile_convective_altitude[me.index-1] + local_weather.alt_20_array[me.index-1];
var elevation = compat_layer.get_elevation(me.lat, me.lon);
if (local_weather.detailed_terrain_interaction_flag == 1)
{
var phi = local_weather.get_wind_direction(me.index) * math.pi/180.0;
var grad = local_weather.get_terrain_gradient(me.lat, me.lon, elevation, phi, 1000.0);
}
else
{var grad = 0.0;}
var alt_new = local_weather.get_convective_altitude(convective_alt, elevation, me.index, grad);
var target_alt = alt_new + me.rel_alt;
var p = props.Node.new({ "layer" : 0,
"index": me.cloud_index,
"lat-deg": me.lat,
"lon-deg": me.lon,
"alt-ft": target_alt
});
fgcommand("move-cloud",p);
me.alt = target_alt;
},
};
###################
# helper functions
###################

View file

@ -98,27 +98,30 @@ calc_geo(blat);
local_weather.set_weather_station(blat, blon, alt_offset, 20000.0, 14.0, 12.0, 29.78);
# create_8_8_nimbus_var3(blat, blon, 2000.0 + alt_offset+local_weather.cloud_vertical_size_map["Nimbus"] * 0.5 * m_to_ft, 0.0);
#strength = 0.5;
#local_weather.create_cumosys(blat,blon, 3000.0, get_n(strength), 20000.0);
#create_2_8_sstratus_streak(blat, blon,5000.0,0.0);
#create_2_8_altocumulus_streaks(blat, blon, 12000+alt_offset, alpha) ;
#create_2_8_altocumulus_streaks(blat, blon, 12000+alt_offset, alpha) ;
#create_6_8_stratus(blat, blon, 3000+alt_offset, alpha) ;
#create_4_8_tstratus_patches(blat, blon, 5000+alt_offset, alpha) ;
#create_4_8_sstratus_patches(blat, blon, 12000+alt_offset, alpha) ;
#create_4_8_cirrostratus_patches(blat, blon, 20000+alt_offset, alpha) ;
#create_4_8_cirrocumulus_bank(blat, blon, 6000.0, 0.0);
#create_4_8_cirrocumulus_streaks(blat, blon, 10000.0 + alt_offset, alpha);
create_4_8_alttstratus_streaks(blat, blon, 5000+alt_offset, alpha) ;
#create_2_8_cirrocumulus_patches(blat, blon, 13000+alt_offset, alpha) ;
#create_8_8_nimbus_rain(blat, blon, 5000+alt_offset, alpha, 0.3) ;
#create_4_8_cirrocumulus_streaks(blat, blon, 6000.0, 0.0);
#create_4_8_altocumulus_perlucidus(blat, blon, 5000+alt_offset, alpha) ;
# create_2_8_cirrocumulus(blat, blon, 6000.0, 0.0);
#create_detailed_stratocumulus_bank(blat, blon, 4000+alt_offset,alpha);
# create_detailed_small_stratocumulus_bank(blat, blon,3000.0+alt_offset,0.0);
#store convective altitude and strength
create_4_8_altocumulus_perlucidus(blat, blon, 10000.0, 0.0);
#local_weather.create_effect_volume(3, blat, blon, 20000.0, 7000.0, alpha, 0.0, 80000.0, -1, -1, -1, -1, 15.0, -3,-1);
create_1_8_contrails(blat, blon, 30000.0, 0.0);
# store convective altitude and strength
local_weather.set_atmosphere_ipoint(blat, blon, 45000.0, 10000.0, 45000.0, 0.2, 25000.0, 30000.0, 0.7, 10000.0, 11000.0);
local_weather.set_atmosphere_ipoint(blat, blon, 45000.0, 10000.0, 45000.0, 0.0, 25000.0, 30000.0, 0.9, 10000.0, 11000.0);
append(weather_dynamics.tile_convective_altitude,3000.0);
@ -159,7 +162,7 @@ calc_geo(blat);
var vis = 30000.0 + rand() * 15000.0;
var T = 20.0 + rand() * 10.0;
var spread = 5.0 + 3.0 * rand();
var spread = 14.0 + 8.0 * rand();
var D = T - spread;
var p = 1025.0 + rand() * 6.0; p = adjust_p(p);
@ -168,7 +171,7 @@ local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_i
var alt = spread * 1000;
var alt = spread * 400;
var strength = 0.0;
@ -297,7 +300,7 @@ calc_geo(blat);
var vis = 25000.0 + rand() * 15000.0;
var T = 15.0 + rand() * 10.0;
var spread = 4.0 + 2.0 * rand();
var spread = 10.0 + 4.0 * rand();
var D = T - spread;
var p = 1019.0 + rand() * 6.0; p = adjust_p(p);
@ -305,10 +308,11 @@ var p = 1019.0 + rand() * 6.0; p = adjust_p(p);
local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_inhg);
var alt = spread * 1000;
var alt = spread * 400;
var strength = 0.0;
# print("alt: ",alt, "spread: ", spread, "offset: ", alt_offset);
var rn = rand();
@ -443,7 +447,7 @@ calc_geo(blat);
var vis = 20000.0 + rand() * 12000.0;
var T = 12.0 + rand() * 10.0;
var spread = 3.0 + 2.0 * rand();
var spread = 7.0 + 4.0 * rand();
var D = T - spread;
var p = 1013.0 + rand() * 6.0; p = adjust_p(p);
@ -453,7 +457,7 @@ local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_i
# now a random selection of different possible cloud configuration scenarios
var alt = spread * 1000;
var alt = spread * 400;
var strength = 0.0;
var rn = rand();
@ -651,7 +655,7 @@ calc_geo(blat);
var vis = 12000.0 + rand() * 9000.0;
var T = 10.0 + rand() * 10.0;
var spread = 2.0 + 2.0 * rand();
var spread = 6.0 + 2.0 * rand();
var D = T - spread;
var p = 1007.0 + rand() * 6.0; p = adjust_p(p);
@ -659,7 +663,7 @@ var p = 1007.0 + rand() * 6.0; p = adjust_p(p);
local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
var strength = 0.0;
# bias Cumulus clouds towards larger sizes due to lots of water vapour
@ -813,7 +817,7 @@ calc_geo(blat);
var vis = 9000.0 + rand() * 10000.0;
var T = 5.0 + rand() * 10.0;
var spread = 2.0 + 2.5 * rand();
var spread = 5.0 + 2.0 * rand();
var D = T - spread;
var p = 1001.0 + rand() * 6.0; p = adjust_p(p);
@ -823,7 +827,7 @@ var p = 1001.0 + rand() * 6.0; p = adjust_p(p);
local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
var strength = 0.0;
var rn = rand();
@ -963,7 +967,7 @@ calc_geo(blat);
var vis = 5000.0 + rand() * 5000.0;
var T = 3.0 + rand() * 7.0;
var spread = 1.5 + 1.5 * rand();
var spread = 4.5 + 1.0 * rand();
var D = T - spread;
var p = 995.0 + rand() * 6.0; p = adjust_p(p);
@ -973,7 +977,7 @@ local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_i
# set a closed Nimbostratus layer
var alt = spread * 1000.0 + local_weather.cloud_vertical_size_map["Nimbus"] * 0.5 * m_to_ft;
var alt = spread * 400.0 + local_weather.cloud_vertical_size_map["Nimbus"] * 0.5 * m_to_ft;
var strength = 0.0;
@ -1032,9 +1036,9 @@ calc_geo(blat);
# get probabilistic values for the weather parameters
var vis = 35000.0 + rand() * 20000.0;
var vis = 45000.0 + rand() * 20000.0;
var T = 8.0 + rand() * 8.0;
var spread = 3.0 + 2.0 * rand();
var spread = 7.0 + 3.0 * rand();
var D = T - spread;
var p = 1005.0 + rand() * 10.0; p = adjust_p(p);
@ -1042,7 +1046,7 @@ var p = 1005.0 + rand() * 10.0; p = adjust_p(p);
local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
var strength = 0.0;
var rn = rand();
@ -1129,7 +1133,7 @@ calc_geo(blat);
var vis = 12000.0 + rand() * 10000.0;
var T = 16.0 + rand() * 10.0;
var spread = 2.0 + 2.0 * rand();
var spread = 6.0 + 3.0 * rand();
var D = T - spread;
var p = 1005.0 + rand() * 10.0; p = adjust_p(p);
@ -1137,7 +1141,7 @@ var p = 1005.0 + rand() * 10.0; p = adjust_p(p);
local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
var strength = 0.0;
# bias Cumulus clouds towards larger sizes due to lots of water vapour
@ -1265,7 +1269,7 @@ calc_geo(blat);
var vis = 9000.0 + rand() * 10000.0;
var T = 20.0 + rand() * 15.0;
var spread = 3.0 + 2.0 * rand();
var spread = 8.0 + 2.0 * rand();
var D = T - spread;
var p = 970 + rand() * 10.0; p = adjust_p(p);
@ -1274,7 +1278,7 @@ var p = 970 + rand() * 10.0; p = adjust_p(p);
local_weather.set_weather_station(blat, blon, alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
var strength = 0.0;
# bias Cumulus clouds towards larger sizes due to lots of water vapour
@ -1402,7 +1406,7 @@ calc_geo(blat);
var vis = 20000.0 + rand() * 10000.0;
var T = 20.0 + rand() * 8.0;
var spread = 3.0 + 2.0 * rand();
var spread = 8.0 + 2.0 * rand();
var D = T - spread;
var p = 1005 + rand() * 10.0; p = adjust_p(p);
@ -1425,7 +1429,7 @@ x = -15000.0; y = -15000.0;
local_weather.set_weather_station(blat +get_lat(x,y,phi), blon + get_lon(x,y,phi), alt_offset, vis*0.7, T+3.0, D+3.0, (p-2.0) * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
var strength = 0.0;
# thunderstorms first
@ -1536,7 +1540,7 @@ calc_geo(blat);
var vis = 20000.0 + rand() * 5000.0;
var T = 10.0 + rand() * 8.0;
var spread = 3.0 + 3.0 * rand();
var spread = 9.0 + 4.0 * rand();
var D = T - spread;
var p = 1005 + rand() * 10.0; p = adjust_p(p);
@ -1559,7 +1563,7 @@ x = -15000.0; y = -15000.0;
local_weather.set_weather_station(blat +get_lat(x,y,phi), blon + get_lon(x,y,phi), alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
# some weak Cumulus development
@ -1636,7 +1640,7 @@ calc_geo(blat);
var vis = 15000.0 + rand() * 5000.0;
var T = 13.0 + rand() * 8.0;
var spread = 2.5 + 2.5 * rand();
var spread = 8.0 + 2.0 * rand();
var D = T - spread;
var p = 1005 + rand() * 10.0; p = adjust_p(p);
@ -1659,7 +1663,7 @@ x = -15000.0; y = -15000.0;
local_weather.set_weather_station(blat +get_lat(x,y,phi), blon + get_lon(x,y,phi), alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0;
var alt = spread * 400.0;
var strength = 0.0;
# followed by random patches of Cirrostratus
@ -1753,7 +1757,7 @@ calc_geo(blat);
var vis = 12000.0 + rand() * 3000.0;
var T = 15.0 + rand() * 7.0;
var spread = 2.5 + 1.5 * rand();
var spread = 7.0 + 2.0 * rand();
var D = T - spread;
var p = 1005 + rand() * 10.0; p = adjust_p(p);
@ -1776,7 +1780,7 @@ x = -15000.0; y = -15000.0;
local_weather.set_weather_station(blat +get_lat(x,y,phi), blon + get_lon(x,y,phi), alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0 + local_weather.cloud_vertical_size_map["Nimbus"] * 0.5 * m_to_ft;
var alt = spread * 400.0 + local_weather.cloud_vertical_size_map["Nimbus"] * 0.5 * m_to_ft;
var strength = 0.0;
# closed Stratus layer
@ -1860,7 +1864,7 @@ calc_geo(blat);
var vis = 12000.0 + rand() * 3000.0;
var T = 17.0 + rand() * 6.0;
var spread = 2.0 + 1.0 * rand();
var spread = 5.0 + 2.0 * rand();
var D = T - spread;
var p = 1005 + rand() * 10.0; p = adjust_p(p);
@ -1883,7 +1887,7 @@ x = -15000.0; y = -15000.0;
local_weather.set_weather_station(blat +get_lat(x,y,phi), blon + get_lon(x,y,phi), alt_offset, vis, T, D, p * hp_to_inhg);
# altitude for the lowest layer
var alt = spread * 1000.0 + local_weather.cloud_vertical_size_map["Nimbus"] * 0.5 * m_to_ft;
var alt = spread * 400.0 + local_weather.cloud_vertical_size_map["Nimbus"] * 0.5 * m_to_ft;
var strength = 0.0;
# low Nimbostratus layer
@ -1927,120 +1931,6 @@ tile_finished();
####################################
# Glider's sky
####################################
var set_gliders_sky_tile = func {
setprop(lw~"tiles/code","gliders_sky");
tile_start();
var x = 0.0;
var y = 0.0;
var lat = 0.0;
var lon = 0.0;
var alpha = getprop(lw~"tmp/tile-orientation-deg");
var phi = alpha * math.pi/180.0;
var alt_offset = getprop(lw~"tmp/tile-alt-offset-ft");
# get tile center coordinates
var blat = getprop(lw~"tiles/tmp/latitude-deg");
var blon = getprop(lw~"tiles/tmp/longitude-deg");
calc_geo(blat);
# first weather info for tile center (lat, lon, visibility, temperature, dew point, pressure)
local_weather.set_weather_station(blat, blon, alt_offset, 35000.0, 20.0, 16.0, 1018 * hp_to_inhg);
var alt = 3000.0;
# add convective clouds
var strength = 0.5;
var n = int(4000 * strength); # calculate the number of placement tries from tile size 20x20km and strength
local_weather.create_cumosys(blat,blon, alt+alt_offset,n, 20000.0);
# store convective altitude and strength
append(weather_dynamics.tile_convective_altitude,alt);
append(weather_dynamics.tile_convective_strength,strength);
tile_finished();
}
####################################
# Blue thermals
####################################
var set_blue_thermals_tile = func {
setprop(lw~"tiles/code","blue_thermals");
tile_start();
var x = 0.0;
var y = 0.0;
var lat = 0.0;
var lon = 0.0;
var alpha = getprop(lw~"tmp/tile-orientation-deg");
var phi = alpha * math.pi/180.0;
var alt_offset = getprop(lw~"tmp/tile-alt-offset-ft");
# get tile center coordinates
var blat = getprop(lw~"tiles/tmp/latitude-deg");
var blon = getprop(lw~"tiles/tmp/longitude-deg");
calc_geo(blat);
# first weather info for tile center (lat, lon, visibility, temperature, dew point, pressure)
local_weather.set_weather_station(blat, blon, alt_offset, 45000.0, 20.0, 15.0, 1018 * hp_to_inhg);
local_weather.generate_thermal_lift_flag = 3;
var alt = 5000.0;
# add convective clouds
# set flag to blue thermal generation
if (local_weather.generate_thermal_lift_flag !=0)
{local_weather.generate_thermal_lift_flag = 3;}
var strength = 0.9;
var n = int(4000 * strength); # calculate the number of placement tries from tile size 20x20km and strength
local_weather.create_cumosys(blat,blon, 5000.0+alt_offset,n, 20000.0);
# set flag back to normal thermal generation
if (local_weather.generate_thermal_lift_flag !=0)
{local_weather.generate_thermal_lift_flag = 0;}
# store convective altitude and strength
append(weather_dynamics.tile_convective_altitude,alt);
append(weather_dynamics.tile_convective_strength,strength);
tile_finished();
}
####################################
# METAR
####################################
@ -2497,23 +2387,31 @@ var set_METAR_weather_station = func {
var create_8_8_stratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
local_weather.create_streak("Stratus",lat, lon, alt,500.0,32,1250.0,0.0,400.0,32,1250.0,0.0,400.0,alpha,1.0);
}
var create_8_8_tstratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 650.0;}
local_weather.create_streak("Stratus (thin)",lat, lon, alt,500.0,32,1250.0,0.0,400.0,32,1250.0,0.0,400.0,alpha,1.0);
}
var create_8_8_cirrostratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1800.0;}
local_weather.create_streak("Cirrostratus",lat,lon,alt,500.0,30,1250.0,0.0,400.0,30,1250.0,0.0,400.0,alpha,1.0);
}
var create_8_8_nimbus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
local_weather.create_streak("Nimbus",lat, lon, alt,500.0,32,1250.0,0.0,200.0,32,1250.0,0.0,200.0,alpha,1.0);
@ -2556,6 +2454,7 @@ var create_8_8_nimbus_var3 = func (lat, lon, alt, alpha) {
var phi = alpha * math.pi/180.0;
local_weather.create_streak("Nimbus",lat, lon, alt,500.0,35,1111.0,0.0,200.0,35,1111.0,0.0,200.0,alpha,1.0);
for (var i=0; i<6; i=i+1)
@ -2575,6 +2474,8 @@ for (var i=0; i<6; i=i+1)
var create_8_8_nimbus_rain = func (lat, lon, alt, alpha, rain) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 3000.0;}
if (local_weather.detailed_clouds_flag == 0)
{local_weather.create_streak("Nimbus",lat, lon, alt,500.0,32,1250.0,0.0,200.0,32,1250.0,0.0,200.0,alpha,1.0);}
else
@ -2601,6 +2502,8 @@ else
var create_8_8_stratus_rain = func (lat, lon, alt, alpha, rain) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
local_weather.create_streak("Stratus",lat, lon, alt,500.0,32,1250.0,0.0,400.0,32,1250.0,0.0,400.0,alpha,1.0);
if (rain > 0.1)
@ -2617,6 +2520,8 @@ else
var create_6_8_stratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
local_weather.create_streak("Stratus",lat, lon, alt,500.0,20,0.0,0.2,20000.0,20,0.0,0.2,20000.0,alpha,1.0);
}
@ -2627,6 +2532,7 @@ var create_6_8_nimbus_rain = func (lat, lon, alt, alpha, rain) {
var phi = alpha * math.pi/180.0;
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 3000.0;}
for (var i = 0; i < 3; i = i + 1)
{
@ -2656,6 +2562,7 @@ var create_6_8_stratus_rain = func (lat, lon, alt, alpha, rain) {
var phi = alpha * math.pi/180.0;
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
for (var i = 0; i < 3; i = i + 1)
{
@ -2682,16 +2589,22 @@ for (var i = 0; i < 3; i = i + 1)
var create_6_8_stratus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
local_weather.create_undulatus("Stratus",lat, lon, alt,300.0,10,4000.0,0.1,400.0,50,800.0,0.1,100.0, 1000.0, alpha,1.0);
}
var create_6_8_tstratus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 650.0;}
local_weather.create_undulatus("Stratus (thin)",lat, lon, alt,300.0,10,4000.0,0.1,400.0,50,800.0,0.1,100.0, 1000.0, alpha,1.0);
}
var create_6_8_cirrostratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1800.0;}
local_weather.create_streak("Cirrostratus",lat,lon,alt,500.0,24,1500.0,0.0,900.0,24,1500.0,0.0,900.0,alpha,1.0);
}
@ -2720,6 +2633,8 @@ else
var create_4_8_stratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
var phi = alpha * math.pi/180.0;
var x = 2.0 * (rand()-0.5) * 15000;
var y = 2.0 * (rand()-0.5) * 15000;
@ -2747,6 +2662,8 @@ var create_4_8_stratus_patches = func (lat, lon, alt, alpha) {
var phi = alpha * math.pi/180.0;
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
for (var i=0; i<16; i=i+1)
{
var x = 2.0 * (rand()-0.5) * 18000;
@ -2762,6 +2679,8 @@ var create_4_8_tstratus_patches = func (lat, lon, alt, alpha) {
var phi = alpha * math.pi/180.0;
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 650.0;}
for (var i=0; i<22; i=i+1)
{
var x = 2.0 * (rand()-0.5) * 18000;
@ -2782,6 +2701,8 @@ var create_4_8_sstratus_patches = func (lat, lon, alt, alpha) {
var phi = alpha * math.pi/180.0;
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 800.0;}
for (var i=0; i<22; i=i+1)
{
var x = 2.0 * (rand()-0.5) * 18000;
@ -2798,6 +2719,8 @@ for (var i=0; i<22; i=i+1)
var create_4_8_cirrostratus_patches = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1800.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<6; i=i+1)
@ -2813,12 +2736,16 @@ for (var i=0; i<6; i=i+1)
var create_4_8_cirrostratus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1800.0;}
local_weather.create_undulatus("Cirrostratus",lat, lon, alt,300.0,5,8000.0,0.1,400.0,40,1000.0,0.1,100.0, 1500.0, alpha,1.0);
}
var create_4_8_stratus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
var phi = alpha * math.pi/180.0;
var x = 2.0 * (rand()-0.5) * 5000;
var y = 2.0 * (rand()-0.5) * 5000;
@ -2833,6 +2760,8 @@ local_weather.create_streak("Stratus",lat+get_lat(x,y-4000,phi), lon+get_lon(x,y
var create_4_8_tstratus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 650.0;}
var phi = alpha * math.pi/180.0;
var x = 2.0 * (rand()-0.5) * 5000;
var y = 2.0 * (rand()-0.5) * 5000;
@ -2847,6 +2776,8 @@ local_weather.create_streak("Stratus (thin)",lat+get_lat(x,y-4000,phi), lon+get_
var create_4_8_sstratus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 800.0;}
var phi = alpha * math.pi/180.0;
var x = 2.0 * (rand()-0.5) * 5000;
var y = 2.0 * (rand()-0.5) * 5000;
@ -2860,6 +2791,8 @@ local_weather.create_streak("Stratus (structured)",lat+get_lat(x,y,phi), lon+get
var create_4_8_cirrocumulus_bank = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
var x = 2.0 * (rand()-0.5) * 5000;
var y = 2.0 * (rand()-0.5) * 5000;
@ -2873,6 +2806,8 @@ local_weather.create_streak("Cirrocumulus (cloudlet)",lat+get_lat(x,y,phi), lon+
var create_4_8_cirrocumulus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
var x = 2.0 * (rand()-0.5) * 5000;
var y = 2.0 * (rand()-0.5) * 5000;
@ -2886,6 +2821,8 @@ local_weather.create_streak("Cirrocumulus (cloudlet)",lat+get_lat(x,y,phi), lon+
var create_4_8_cirrocumulus_streaks = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
var beta = 90.0 + (rand() -0.5) * 30.0;
@ -2904,6 +2841,8 @@ for (var i=0; i<2; i=i+1)
var create_4_8_altocumulus_perlucidus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<20; i=i+1)
@ -2919,6 +2858,8 @@ for (var i=0; i<20; i=i+1)
var create_4_8_alttstratus_streaks = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<10; i=i+1)
@ -2937,6 +2878,8 @@ for (var i=0; i<10; i=i+1)
var create_4_8_alttstratus_patches = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<14; i=i+1)
@ -2966,6 +2909,8 @@ else
var create_2_8_stratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1500.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<8; i=i+1)
@ -2981,6 +2926,8 @@ for (var i=0; i<8; i=i+1)
var create_2_8_tstratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 650.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<8; i=i+1)
@ -2997,6 +2944,8 @@ for (var i=0; i<8; i=i+1)
var create_2_8_sstratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 800.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<8; i=i+1)
@ -3018,6 +2967,8 @@ for (var i=0; i<8; i=i+1)
var create_2_8_sstratus_streak = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 800.0;}
var phi = alpha * math.pi/180.0;
var x = 2.0 * (rand()-0.5) * 6000;
@ -3030,6 +2981,8 @@ local_weather.create_streak("Stratus (structured)",lat+get_lat(x,y,phi), lon+get
var create_2_8_cirrostratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1800.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<3; i=i+1)
@ -3045,6 +2998,8 @@ for (var i=0; i<3; i=i+1)
var create_2_8_cirrocumulus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<25; i=i+1)
@ -3072,6 +3027,8 @@ local_weather.create_streak("Cirrus",lat+get_lat(x,y,phi), lon+get_lon(x,y,phi),
var create_2_8_alttstratus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
for (var i=0; i<4; i=i+1)
@ -3100,6 +3057,9 @@ for (var i=0; i<2; i=i+1)
}
var create_1_8_altocumulus_scattered = func (lat, lon, alt, alpha) {
var phi = alpha * math.pi/180.0;
@ -3153,12 +3113,15 @@ local_weather.create_streak("Cirrus",lat+get_lat(x,y,phi), lon+get_lon(x,y,phi),
var create_1_8_cirrostratus_undulatus = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 1800.0;}
local_weather.create_undulatus("Cirrostratus",lat, lon, alt,300.0,1,8000.0,0.0,400.0,40,1000.0,0.1,100.0, 1500.0, alpha,1.0);
}
var create_1_8_contrails = func (lat, lon, alt, alpha) {
if (local_weather.hardcoded_clouds_flag == 1) {alt = alt - 300.0;}
var phi = alpha * math.pi/180.0;
@ -3239,14 +3202,29 @@ var n = int(9 + rand() * 7);
var alt_offset = 0.5 * local_weather.cloud_vertical_size_map["Cumulus"] * ft_to_m;
local_weather.create_streak("Stratocumulus",lat+get_lat(x,y+7500,phi), lon+get_lon(x,y+7500,phi), alt + alt_offset,500.0,m,1100.0,0.1,400.0,n,1100.0,0.1,400.0,alpha+90.0+beta,tri);
if (local_weather.hardcoded_clouds_flag == 0)
{
local_weather.create_streak("Stratocumulus",lat+get_lat(x,y+7500,phi), lon+get_lon(x,y+7500,phi), alt + alt_offset,500.0,m,1100.0,0.1,400.0,n,1100.0,0.1,400.0,alpha+90.0+beta,tri);
local_weather.create_streak("Stratocumulus",lat+get_lat(x,y-7500,phi), lon+get_lon(x,y-7500,phi), alt + alt_offset,500.0,m,1100.0,0.1,400.0,n,1100.0,0.1,400.0,alpha+270.0+beta,tri);
local_weather.create_streak("Stratocumulus",lat+get_lat(x,y-7500,phi), lon+get_lon(x,y-7500,phi), alt + alt_offset,500.0,m,1100.0,0.1,400.0,n,1100.0,0.1,400.0,alpha+270.0+beta,tri);
local_weather.create_streak("Stratocumulus bottom",lat+get_lat(x,y+5250,phi), lon+get_lon(x,y+5250,phi), alt,0.0,m+1,700.0,0.2,400.0,n+1,700.0,0.0,400.0,alpha+90.0+beta,tri);
local_weather.create_streak("Stratocumulus bottom",lat+get_lat(x,y+5250,phi), lon+get_lon(x,y+5250,phi), alt,0.0,m+1,700.0,0.2,400.0,n+1,700.0,0.0,400.0,alpha+90.0+beta,tri);
local_weather.create_streak("Stratocumulus bottom",lat+get_lat(x,y-5250,phi), lon+get_lon(x,y-5250,phi), alt,0.0,m+1,700.0,0.2,400.0,n+1,700.0,0.0,400.0,alpha+270.0+beta,tri);
local_weather.create_streak("Stratocumulus bottom",lat+get_lat(x,y-5250,phi), lon+get_lon(x,y-5250,phi), alt,0.0,m+1,700.0,0.2,400.0,n+1,700.0,0.0,400.0,alpha+270.0+beta,tri);
}
else
{
local_weather.create_streak("Stratocumulus",lat+get_lat(x,y+7500,phi), lon+get_lon(x,y+7500,phi), alt-1000.0 ,500.0,m,1100.0,0.1,400.0,n,1100.0,0.1,400.0,alpha+90.0+beta,tri);
local_weather.create_streak("Stratocumulus",lat+get_lat(x,y-7500,phi), lon+get_lon(x,y-7500,phi), alt-1000.0 ,500.0,m,1100.0,0.1,400.0,n,1100.0,0.1,400.0,alpha+270.0+beta,tri);
local_weather.create_streak("Stratocumulus bottom",lat+get_lat(x,y+5250,phi), lon+get_lon(x,y+5250,phi), alt-1000.0,0.0,m+1,700.0,0.2,400.0,n+1,700.0,0.0,400.0,alpha+90.0+beta,tri);
local_weather.create_streak("Stratocumulus bottom",lat+get_lat(x,y-5250,phi), lon+get_lon(x,y-5250,phi), alt-1000.0,0.0,m+1,700.0,0.2,400.0,n+1,700.0,0.0,400.0,alpha+270.0+beta,tri);
}
}
@ -3354,6 +3332,28 @@ local_weather.create_effect_volume(1, lat, lon, 7500.0 * 0.7 * scale, 7500.0 * 0
}
# spectacular, but not useful in practice
var create_2_8_cirrocumulus_patches = func (lat, lon, alt, alpha) {
var phi = alpha * math.pi/180.0;
for (var i=0; i<2; i=i+1)
{
var x = 2.0 * (rand()-0.5) * 10000;
var y = 2.0 * (rand()-0.5) * 10000;
var tri = 1.5 + rand();
var beta = rand() * math.pi;
#local_weather.create_streak("Cirrocumulus (new)",lat+get_lat(x,y,phi), lon+get_lon(x,y,phi), alt,0.0,50,150.0,0.2,50.0,50,150.0,0.2,50.0,alpha ,tri);
local_weather.create_layer("Cirrocumulus (new)", lat+get_lat(x,y,phi), lon+get_lat(x,y,phi), alt, 0.0, 8500.0, 5000.0, beta, 15.0, 0.25, 0, 0.0);
}
}
###################
# helper functions
###################

View file

@ -6,20 +6,20 @@
<name>local_weather_tiles</name>
<width>310</width>
<height>360</height>
<height>385</height>
<modal>false</modal>
<text>
<x>5</x>
<y>330</y>
<y>355</y>
<label>Select initial weather scenario tile</label>
</text>
<combo>
<x>10</x>
<y>305</y>
<y>330</y>
<width>280</width>
<height>25</height>
<live>true</live>
@ -35,7 +35,7 @@
<value>Coldfront</value>
<value>Warmfront</value>
<value>Tropical</value>
<!--<value>Test tile</value>-->
<value>Test tile</value>
<binding>
<command>dialog-apply</command>
</binding>
@ -51,13 +51,13 @@
<text>
<x>5</x>
<y>270</y>
<y>295</y>
<label>wind deg</label>
</text>
<input>
<x>67</x>
<y>270</y>
<y>295</y>
<width>40</width>
<height>25</height>
<property>/local-weather/tmp/tile-orientation-deg</property>
@ -65,13 +65,13 @@
<text>
<x>105</x>
<y>270</y>
<y>295</y>
<label>kt</label>
</text>
<input>
<x>125</x>
<y>270</y>
<y>295</y>
<width>30</width>
<height>25</height>
<property>/local-weather/tmp/windspeed-kt</property>
@ -79,7 +79,7 @@
<text>
<x>155</x>
<y>270</y>
<y>295</y>
<label>alt. offset (ft)</label>
</text>
@ -87,7 +87,7 @@
<input>
<x>240</x>
<y>270</y>
<y>295</y>
<width>50</width>
<height>25</height>
<property>/local-weather/tmp/tile-alt-offset-ft</property>
@ -96,7 +96,7 @@
<text>
<x>5</x>
<y>240</y>
<y>265</y>
<label>gust freq.</label>
</text>
@ -104,7 +104,7 @@
<slider>
<x>65</x>
<y>240</y>
<y>265</y>
<width>50</width>
<height>20</height>
<min>0.0</min>
@ -119,14 +119,14 @@
<text>
<x>112</x>
<y>240</y>
<y>265</y>
<label>strength</label>
</text>
<slider>
<x>167</x>
<y>240</y>
<y>265</y>
<width>50</width>
<height>20</height>
<min>0.0</min>
@ -139,14 +139,14 @@
<text>
<x>215</x>
<y>240</y>
<y>265</y>
<label>dir.</label>
</text>
<slider>
<x>240</x>
<y>240</y>
<y>265</y>
<width>50</width>
<height>20</height>
<min>0.0</min>
@ -162,14 +162,14 @@
<text>
<x>5</x>
<y>210</y>
<y>235</y>
<label>wind model</label>
</text>
<combo>
<x>150</x>
<y>210</y>
<y>235</y>
<width>140</width>
<height>25</height>
<live>true</live>
@ -187,13 +187,13 @@
<text>
<x>5</x>
<y>180</y>
<y>205</y>
<label>tile selection mode</label>
</text>
<combo>
<x>150</x>
<y>180</y>
<y>205</y>
<width>140</width>
<height>25</height>
<live>true</live>
@ -209,7 +209,7 @@
<checkbox>
<x>10</x>
<y>150</y>
<y>175</y>
<width>15</width>
<height>15</height>
<label>terrain presampling</label>
@ -221,7 +221,7 @@
<checkbox>
<x>150</x>
<y>150</y>
<y>175</y>
<width>15</width>
<height>15</height>
<label>generate thermals</label>
@ -233,7 +233,7 @@
<checkbox>
<x>10</x>
<y>125</y>
<y>150</y>
<width>15</width>
<height>15</height>
<label>debug output</label>
@ -245,7 +245,7 @@
<checkbox>
<x>150</x>
<y>125</y>
<y>150</y>
<width>15</width>
<height>15</height>
<label>detailed clouds</label>
@ -257,7 +257,7 @@
<checkbox>
<x>10</x>
<y>100</y>
<y>125</y>
<width>15</width>
<height>15</height>
<label>dynamical weather</label>
@ -269,7 +269,7 @@
<checkbox>
<x>150</x>
<y>100</y>
<y>125</y>
<width>15</width>
<height>15</height>
<label>dynamical convection</label>
@ -279,6 +279,30 @@
</binding>
</checkbox>
<checkbox>
<x>10</x>
<y>100</y>
<width>15</width>
<height>15</height>
<label>terrain effects</label>
<property>/local-weather/config/detailed-terrain-interaction-flag</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<checkbox>
<x>150</x>
<y>100</y>
<width>15</width>
<height>15</height>
<label>realistic visibility</label>
<property>/local-weather/config/realistic-visibility-flag</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<text>
<x>10</x>
<y>75</y>