Re: [Flightgear-devel] Bug in moving-average filter?

2005-09-25 Thread Lee Elliott
On Sunday 25 Sep 2005 09:12, Roy Vegard Ovesen wrote: On Wednesday 21 September 2005 15:23, Lee Elliott wrote: The agl data can be pretty spiky due to terrain/scenery artifacts and 3d buildings/structures and using a moving average filter here reduces the influence of the spikes they

Re: [Flightgear-devel] Bug in moving-average filter?

2005-09-21 Thread Lee Elliott
On Saturday 17 Sep 2005 15:43, Paul Kahler wrote: On Fri, 2005-09-16 at 04:41 +0100, Lee Elliott wrote: Hello List, I think there's a small bug in the moving-average filter in ... xmlauto.cxx else if (filterType == movingAverage) {

Re: [Flightgear-devel] Bug in moving-average filter?

2005-09-17 Thread Paul Kahler
On Fri, 2005-09-16 at 04:41 +0100, Lee Elliott wrote: Hello List, I think there's a small bug in the moving-average filter in ... xmlauto.cxx else if (filterType == movingAverage) { output.push_front(output[0] + (input[0] -

Re: [Flightgear-devel] Bug in moving-average filter?

2005-09-17 Thread Roy Vegard Ovesen
On Saturday 17 September 2005 16:43, Paul Kahler wrote: I'm not trying to flame, but why would you be using a moving average filter? That's the most complicated filter I've ever seen - it calls other functions! It calls some of the methods of the deque datatype. I'm sorry! That's the

Re:[Flightgear-devel] Bug in moving-average filter?

2005-09-16 Thread Roy Vegard Ovesen
Lee Elliot: Hello List, I think there's a small bug in the moving-average filter in xmlauto.cxx I noticed that the output from it was always out a bit and checking with a calculator showed that it seemed to be dividing by the number of samples + 1 instead of just the number of

Re: [Flightgear-devel] Bug in moving-average filter?

2005-09-16 Thread Curtis L. Olson
Done ... Roy Vegard Ovesen wrote: Lee Elliot: Hello List, I think there's a small bug in the moving-average filter in xmlauto.cxx I noticed that the output from it was always out a bit and checking with a calculator showed that it seemed to be dividing by the number of samples + 1

Re: [Flightgear-devel] Bug in moving-average filter?

2005-09-16 Thread Lee Elliott
On Friday 16 Sep 2005 21:11, Roy Vegard Ovesen wrote: Lee Elliot: Hello List, I think there's a small bug in the moving-average filter in xmlauto.cxx I noticed that the output from it was always out a bit and checking with a calculator showed that it seemed to be dividing by the

[Flightgear-devel] Bug in moving-average filter?

2005-09-15 Thread Lee Elliott
Hello List, I think there's a small bug in the moving-average filter in xmlauto.cxx I noticed that the output from it was always out a bit and checking with a calculator showed that it seemed to be dividing by the number of samples + 1 instead of just the number of samples. subtracting 1