Does this happen for anyone else or is it a well-known issue?
cd $HOME/flightgear/src/
find . -type f -exec grep -qin "precip" {} \; -print
if ( fgGetBool("/environment/use-custom-precipitation", false) ) {
altitudeCloudLayer =fgGetDouble("/environment/precipitation-max-altitude-m", 0);
SG_LOG(SG_GENERAL, SG_ALERT, "Using custom precipitation altitude:" << altitudeCloudLayer);
}
else
altitudeCloudLayer = this->getPrecipitationAtAltitudeMax() * SG_METER_TO_FEET;
on flat landscapes I find most annoying, how the terrain tiles don't get loaded in distance. When cruising at 30000ft it's veery ugly...
chris_blues wrote in Tue Aug 14, 2012 11:49 am:You're right. We have. But I thought I'll bring it up every now and then, and maybe someday there's a solution...
ot-666 wrote in Tue Aug 14, 2012 12:14 am:Is it possible to set the cloud distance to more then 250km?
Hooray wrote in Tue Aug 14, 2012 2:14 pm:... file a report using the issue tracker...
Hooray wrote in Tue Aug 14, 2012 10:48 am:you are getting >= 60 fps with these visibility settings? Is this possibly even with frame rate throttling enabled?
What hardware configuration do you have? What is your frame spacing (worst frame spacing) like?
This info may help people who also want to enjoy the latest weather features in FlightGear, i.e. so that they see what hardware they need to get.
ot-666 wrote in Tue Aug 14, 2012 7:21 pm:Having the tile dimensions configurable for the local weather sound nice.
Flightgear used 13.5GB memory during that flight
Thorsten wrote in Tue Aug 14, 2012 10:13 pm:You can't make tile dimensions configurable. The 'artwork' part of the code depends on this being a fixed number.
diff --git a/Nasal/local_weather/local_weather.nas b/Nasal/local_weather/local_weather.nas
index 1bcc4fe..4a252c7 100644
--- a/Nasal/local_weather/local_weather.nas
+++ b/Nasal/local_weather/local_weather.nas
@@ -4034,9 +4034,14 @@ setlistener(lw~"config/temperature-offset-degc", func {temperature_offset = getp
setlistener("/environment/air-pollution-norm", func {air_pollution_norm = getprop("/environment/air-pollution-norm");});
setlistener("/sim/rendering/shaders/skydome", func {scattering_shader_flag = getprop("/sim/rendering/shaders/skydome"); if (scattering_shader_flag ==1) {setprop("/sim/rendering/minimum-sky-visibility",0.0);} else {setprop("/sim/rendering/minimum-sky-visibility",1000.0);} });
-}
+setlistener(lw~"config/tile-size-m", func {
+ print("Local Weather:Changing the tile-size at runtime is currently not yet supported!\ntile_size is:", tile_size_m );
+} );
+
+}
+
#####################################################
# Standard test call (for development and debug only)
#####################################################
diff --git a/Nasal/local_weather/weather_tile_management.nas b/Nasal/local_weather/weather_tile_management.nas
index 61e0df1..2a1c535 100644
--- a/Nasal/local_weather/weather_tile_management.nas
+++ b/Nasal/local_weather/weather_tile_management.nas
@@ -981,17 +981,22 @@ t.getNode("code").setValue(f.getNode("code").getValue());
var create_neighbour = func (blat, blon, index, alpha) {
+if (local_weather.debug_output_flag == 1) {
+ print("Setting up adjacent tiles with dimensions:", tile_size_m, 'x', tile_size_m, ' m');
+}
+
+
var x = 0.0;
var y = 0.0;
var phi = alpha * math.pi/180.0;
calc_geo(blat);
-if ((index == 0) or (index == 3) or (index == 6)) {x =-40000.0;}
-if ((index == 2) or (index == 5) or (index == 8)) {x = 40000.0;}
+if ((index == 0) or (index == 3) or (index == 6)) {x =-get_tile_size();}
+if ((index == 2) or (index == 5) or (index == 8)) {x = get_tile_size();}
-if ((index == 0) or (index == 1) or (index == 2)) {y = 40000.0;}
-if ((index == 6) or (index == 7) or (index == 8)) {y = -40000.0;}
+if ((index == 0) or (index == 1) or (index == 2)) {y = get_tile_size();}
+if ((index == 6) or (index == 7) or (index == 8)) {y = -get_tile_size();}
var t = props.globals.getNode(lw~"tiles").getChild("tile",index,1);
@@ -1022,7 +1027,7 @@ var phi = alpha * math.pi/180.0;
calc_geo(blat);
-x = -40000.0; y = 40000.0;
+x = -get_tile_size(); y = get_tile_size();
setprop(lw~"tiles/tile[0]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[0]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[0]/generated-flag",0);
@@ -1031,7 +1036,7 @@ setprop(lw~"tiles/tile[0]/code","");
setprop(lw~"tiles/tile[0]/timestamp-sec",weather_dynamics.time_lw);
setprop(lw~"tiles/tile[0]/orientation-deg",alpha);
-x = 0.0; y = 40000.0;
+x = 0.0; y = get_tile_size();
setprop(lw~"tiles/tile[1]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[1]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[1]/generated-flag",0);
@@ -1040,7 +1045,7 @@ setprop(lw~"tiles/tile[1]/code","");
setprop(lw~"tiles/tile[1]/timestamp-sec",weather_dynamics.time_lw);
setprop(lw~"tiles/tile[1]/orientation-deg",alpha);
-x = 40000.0; y = 40000.0;
+x = get_tile_size(); y = get_tile_size();
setprop(lw~"tiles/tile[2]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[2]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[2]/generated-flag",0);
@@ -1049,7 +1054,7 @@ setprop(lw~"tiles/tile[2]/code","");
setprop(lw~"tiles/tile[2]/timestamp-sec",weather_dynamics.time_lw);
setprop(lw~"tiles/tile[2]/orientation-deg",alpha);
-x = -40000.0; y = 0.0;
+x = -get_tile_size(); y = 0.0;
setprop(lw~"tiles/tile[3]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[3]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[3]/generated-flag",0);
@@ -1069,7 +1074,7 @@ setprop(lw~"tiles/tile[4]/timestamp-sec",weather_dynamics.time_lw);
setprop(lw~"tiles/tile[4]/orientation-deg",getprop(lw~"tmp/tile-orientation-deg"));
-x = 40000.0; y = 0.0;
+x = get_tile_size(); y = 0.0;
setprop(lw~"tiles/tile[5]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[5]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[5]/generated-flag",0);
@@ -1078,7 +1083,7 @@ setprop(lw~"tiles/tile[5]/code","");
setprop(lw~"tiles/tile[5]/timestamp-sec",weather_dynamics.time_lw);
setprop(lw~"tiles/tile[5]/orientation-deg",alpha);
-x = -40000.0; y = -40000.0;
+x = -get_tile_size(); y = -get_tile_size();
setprop(lw~"tiles/tile[6]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[6]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[6]/generated-flag",0);
@@ -1087,7 +1092,7 @@ setprop(lw~"tiles/tile[6]/code","");
setprop(lw~"tiles/tile[6]/timestamp-sec",weather_dynamics.time_lw);
setprop(lw~"tiles/tile[6]/orientation-deg",alpha);
-x = 0.0; y = -40000.0;
+x = 0.0; y = -get_tile_size();
setprop(lw~"tiles/tile[7]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[7]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[7]/generated-flag",0);
@@ -1096,7 +1101,7 @@ setprop(lw~"tiles/tile[7]/code","");
setprop(lw~"tiles/tile[7]/timestamp-sec",weather_dynamics.time_lw);
setprop(lw~"tiles/tile[7]/orientation-deg",alpha);
-x = 40000.0; y = -40000.0;
+x = get_tile_size(); y = -get_tile_size();
setprop(lw~"tiles/tile[8]/latitude-deg",blat + get_lat(x,y,phi));
setprop(lw~"tiles/tile[8]/longitude-deg",blon + get_lon(x,y,phi));
setprop(lw~"tiles/tile[8]/generated-flag",0);
@@ -1325,6 +1330,8 @@ var cloud_view_distance = getprop(lw~"config/clouds-visible-range-m");
var modelArrays = [];
var active_tile_list = [];
+var tile_size_m = getprop( lw~"config/tile-size-m" ) or 40000.0 and print("Local Weather: Using default tile dimensions");
+var get_tile_size = func return tile_size_m or die("LW:tile_size_m is nil!");
#####################################################
# hashes to manage clouds in scenery or in the buffer
diff --git a/Nasal/local_weather/weather_tiles.nas b/Nasal/local_weather/weather_tiles.nas
index 30259ff..7f92c4d 100644
--- a/Nasal/local_weather/weather_tiles.nas
+++ b/Nasal/local_weather/weather_tiles.nas
@@ -1199,7 +1199,7 @@ calc_geo(blat);
# get probabilistic values for the weather parameters
-var vis = 40000.0 + rand() * 15000.0;
+var vis = get_tile_size() + rand() * 15000.0;
var T = 8.0 + rand() * 8.0;
var spread = 7.0 + 3.0 * rand();
var D = T - spread;
Users browsing this forum: No registered users and 0 guests