On Monday 14 April 2008 18:55, 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.
>
> m.

Ah - that sounds good.

Using an exponential filter on heading produced a glitch but as it 
was resolved so quickly (0.45 sec) it only resulted in a 
small 'twitch' in flight, in most cases, but I'm sure there would 
be bigger problems if I was trying to follow an exact 0 deg course.

LeeE

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