On Wed, 8 Aug 2007, Stuart Buchanan wrote:

> I'd be very grateful if you could help me diagnose the problem, as I did
> quite a lot of testing, but didn't encounter this myself.
>
> One possibility is that my interpolation is "fighting" with something else
> trying to write to the weather properties.

Hi!

With Stuart's help I've looked closer at this and I think I've tracked 
down the cause of the problem:
At least on my computer the sort() call on line 234 in 
Environment/environment_ctrl.cxx sorts the vector entries by memory 
address instead of altitude, i.e. the custom comparison predicate is not 
used. This causes the tables of environment conditions to be reordered
into a wrong order at some weather updates, depending, basically, 
on where the memory allocator places the objects. (Btw. why are they are 
freshly allocated for each update?)

The badly ordered tables cause the interpolation of the local weather to
start from the wrong conditions and, hence, the result is quite different 
from the weather before the weather update - a wall of weather.

How to fix this? The obvious way would be to ensure that the proper 
ordering predicate is used by sort(). OTOH I'm not sure the sort is 
needed at all - the entries are read from the property three, where I 
think they are already sorted. I'm testing with out the sort now, and so 
far I have seen no problems.

Cheers,

Anders
-- 
---------------------------------------------------------------------------
Anders Gidenstam
mail: anders(at)gidenstam.org
WWW: http://www.gidenstam.org/FlightGear/JSBSim-LTA/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to