On 1/31/07, Joacim Persson wrote:
I have an idea of how to at least partially fix the problem with the "wall
of weather" when flying with METAR updates, which when flying on autopilot
in a light aircraft often, not to say usually, results in advanced
airobatic manouvers, loss of control, altitude, and adjustment of the
horizontal gyro. It has been suggested that we should triangulate the
weather from several neighbouring metar data rather than one and that is
by
all means an excellent idea but it may not solve everything (there could
still be transients due to varying/poor resolution of metar stations) and
is
perhaps trickier to implement than what I have in mind. I think the two
methods should be combined for best result.
The /environment/metar/ properties are set in
FGClouds::update_metar_properties( const FGMetar *m )
[src/Environment/fgclouds.cxx: line 270]
where m is the new metar data. The properties are set with calls to the
fgSet...-functions from [src/Main/fg_props.hxx]
What I would like to do, is replace these instant Set-ing of the
properties
to something similar to the interpolate-function in nasal, to smooth out
the change of weather over a certain time; a few seconds up to perhaps a
minute, whatever works best. At least I want to try it out.
Any ideas on how to implement this? I'm considering doing calls to the
nasal
system for the interpolating. Any pitfalls with that? Better ways of doing
it?
Useful functions I may have missed?
Right now the "environment" subsystem maintains up to 3 "base" layers and 5
"aloft" layers of conditions (temps, wind, visibility, etc.). The base
layers are relative to local ground height, the aloft layers are defined as
absolute altitude.
Using the "base" layers, you can define conditions at/near the surface that
will be somewhat consistent no matter what the ground elevation is.
The environment subsystem then smoothly interpolates between all these
layers as you fly through different elevations.
The way the code is structured is you have a class instance for each layer
and then the environment subsystem interpolates between the layers to
produce instance of this class for the current aircraft position which is
what is used down stream in the rest of the code. It's somewhat of a
complex C++ inheritance maze to wade through, but it's all there if you can
get your head around it.
I'm not a big fan of interpolating between nearby stations because as those
nearby station conditions are updated, you will still see discontinuous
jumps in the local conditions ... plus it's complicated, time consuming,
memory consuming, etc.
What I would like to see is a mechanism that slowly (over the course of a
couple minutes) migrates the "current" conditions towards the most recent
data that is fetched via the metar subsystem.
We could do this a number of ways ... we could extend the interpolations
scheme out to another enclosing layer to interpolate smoothly between "past"
and "current" conditions. We could simply move the data values in the
"current" interpolation tables slowly towards the new values as they are
updated. This might be the simplest. We could establish some sort of
reasonable rate of change for each value type and just at that delta every
iteration.
This doesn't address clouds which are slightly more complex ... you could
slowly move a layer to a new altitude and that should work ok, but how do
you add a new layer or remove a layer smoothly and cleanly ... that get's
tougher with our current scheme.
That is a quick summary of my thinking on the matter ...
Curt.
--
Curtis Olson - University of Minnesota - FlightGear Project
http://baron.flightgear.org/~curt/ http://www.humanfirst.umn.edu/
http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel