On Wednesday 31 January 2007 18:09, 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?
>

I had been thinking along similar lines re using nasal to interpolate the 
values.  In the end I figured that for an all nasal solution all it really 
needs is for the weather updates to be written to new nodes somewhere else 
and then set listeners on those nodes to interpolate the values into the 
currently used nodes, where they would then be acted upon.

If a little more coding is acceptable you could do away with the listeners and 
call the nasal interpolate functions from the same code that retrieves the 
new data when it stores it in the tree.

You might want to set the interpolation time to be relative to the aircraft 
speed, to simulate the effect changing over distance instead of time.

LeeE


-------------------------------------------------------------------------
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

Reply via email to