On Mon, Apr 14, 2008 at 12:55 PM, Melchior FRANZ wrote:

> * Curtis Olson -- Monday 14 April 2008:
> > Let's say I want to do a simple moving average ... so the new value is
> > (let's say) 9 parts the previous filtered value + 1 part of the latest
> > sensor reading.  Doing that as a simple average though will glitch if
> your
> > values are coming in around 0/360.
>
> FlightGear has an aircraft.angular_lowpass() in
> $FG_ROOT/Nasal/aircraft.nas.
> It filters sin() and cos() separately, and builds the angle from that
> again.
> Worked well in my tests.


Interesting ... I hadn't thought of that approach.

Curt.
-- 
Curtis Olson: http://baron.flightgear.org/~curt/
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to