Curt wrote:
> I just did a cross country flight with the latest CVS cloud/weather/metar
> changes and I noticed that the weather interpolation that smoothed out
> abrubt changes to wind and clouds when a new METAR report comes
> in seems to have now been lost. We are back to abrubt wind and cloud
> changes. I haven't had a chance to dig in myself, but thought I'd mention
> this to the folks that currently have their heads immersed in that section of
> the code.
Thanks for the bug report.
The culprit as you guessed is some of the 3D cloud changes. The attached patch
reverts one of my changes which ensured that the 3D clouds were updated with
METAR. Unfortunately this had the side-effect of over-writing the environment
properties, and therefore nuking the interpolation work.
The patch below backs out that change. Unfortunately this means the change
to the cloud coverage due to changing METAR will not be reflected in the 3D
clouds
(2D clouds are unaffected). Unfortunately I don't think it will be possible to
fix
this before the release.
Could someone please commit this? Thanks.
-Stuart
Index: environment_ctrl.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/Environment/environment_ctrl.cxx,v
retrieving revision 1.58
diff -u -p -r1.58 environment_ctrl.cxx
--- environment_ctrl.cxx 19 Dec 2008 07:42:13 -0000 1.58
+++ environment_ctrl.cxx 19 Dec 2008 22:36:48 -0000
@@ -502,7 +502,6 @@ FGMetarEnvironmentCtrl::update_env_confi
double aircraft_alt = fgGetDouble("/position/altitude-ft");
char s[128];
int i;
- bool rebuild_clouds = false;
for (i = 0, layer = layers.begin(); layer != layers_end; ++layer, i++)
{
double currentval;
@@ -520,7 +519,6 @@ FGMetarEnvironmentCtrl::update_env_confi
const char* coverage = (*layer)->getStringValue("coverage",
"clear");
if (strncmp(fgGetString(s), coverage, 128) != 0) {
fgSetString(s, coverage);
- rebuild_clouds = true;
}
snprintf(s, 128, cl, i);
@@ -570,10 +568,6 @@ FGMetarEnvironmentCtrl::update_env_confi
}
}
- if (rebuild_clouds) {
- // Force an update of the 3D clouds
- fgSetDouble("/environment/rebuild-layers", 1.0);
- }
} else {
// We haven't already loaded a METAR, so apply it immediately.
dir_from = fgGetDouble("/environment/metar/base-wind-range-from");
------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel