flightgear-bugs

 [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-08-27 17:10:33 ```Status: New Owner: ---- New issue 1186 by bmbr...@...: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 *What steps will reproduce the problem?* 1. Use a moving average filter The attached test takes an average of the last N(=10) values of a constant (=3). *What is the expected output? What do you see instead?* In this case the output should be 3, but it is actually 6.3 (in general (2*N+1)/N times the correct value). *Any output in the console (black window)?* No. *What FlightGear version are you using (when using GIT version, please mention date)?* GIT version from Aug 26, 2013. *What operating system and graphics card?* Not relevant. *Please provide any additional information below or as attachment (Avoid expiring external links, such as to imageshack/pastebin/...).* The incorrect result is due to 2 bugs: The first is increasing the queue size to N+1 before subtracting the value of the back element, so that when the back element is actually subtracted it is always 0 (in the original code). This is where the factor of 1/N comes from. There is no need for the extra element, so the attached patch removes it. The second bug is that when the filter length is increased, the addition queue entries are initialized to 0. For the next (difference from old to new sizes) values X_i processed by the filter, this will increase the filter value by X_i/N (because the old value being removed is zero). For the initial case we begin with a zero length queue, and so will increase the filter value by the average of the first N values. The initial value of the filter seems to be the first value processed, so this is where the additional factor of 2 comes from. The attached patch extends the input queue with the existing filter average. The patch also attempts to deal with a filter that gets shorter, but that code path hasn't been tested. The patch doesn't address any uses of the incorrect result. Attachments: testcase.xml 204 bytes 0253-Fix-moving-average-filter.patch 1.3 KB -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-08-27 20:16:49 ```Updates: Status: Dev Owner: cumuluni...@... Comment #1 on issue 1186 by cumuluni...@...: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-09-05 08:18:45 ```Updates: Status: Testing Comment #2 on issue 1186 by cumuluni...@...: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 Your patch has just been commited as 7e117d25585bb5c705d9a0cd0aab0dbe02a9b568 Please test and report if it's working correctly. Thanks for reporting and fixing this long standing issue. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-09-06 04:18:28 ```Comment #3 on issue 1186 by bmbr...@...: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 Tested and working. Thanks. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-09-08 17:22:54 ```Updates: Status: Verified Comment #4 on issue 1186 by cumuluni...@...: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 Great! -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-09-09 14:16:13 ```Updates: Labels: Milestone-2.12.0 Comment #5 on issue 1186 by gijsrooy: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 (No comment was entered for this change.) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-09-09 14:17:43 ```Comment #6 on issue 1186 by gijsrooy: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 Torsten, will you also pull this to the release branch? -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-09-09 21:12:26 ```Comment #7 on issue 1186 by cumuluni...@...: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 Probably not a good idea, as there is at least the A-10, the B-52F, the AN-225 and the Mig-15 using the moving-average filter. Those aircraft using the old implementation might get unstable with the new version and I'd like to give the maintainers some time to adopt the new behaviour. -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```
 Re: [Flightgear-bugs] Issue 1186 in flightgear-bugs: Incorrect computation in moving average filter (with test and patch) From: - 2013-09-10 16:39:48 ```Updates: Labels: -Milestone-2.12.0 Milestone-3.0 Comment #8 on issue 1186 by gijsrooy: Incorrect computation in moving average filter (with test and patch) http://code.google.com/p/flightgear-bugs/issues/detail?id=1186 Right, you're correct ;-) -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings ```