Closed GoogleCodeExporter closed 9 years ago
We do not bother to preload the filter, which would be an acceptable way to
address this "problem". Not sure why it is a problem because the filter will
stabilize before you get in the air, won't it? I can add code to address it if
you can explain why it is a problem.
The code you propose is functionally the same as the current code. Why would
changing the constants from long integer to integer be of value? It is a long
integer calculation and result.
Original comment by dewei...@gmail.com
on 18 Sep 2010 at 12:43
The current code sets the new value of abs_press_gnd to 91% of its old value
and 1% of the new value, so abs_press_gnd shrinks by 8% every iteration with
constant APM_BMP085.Press. With my change, it gets set to 90% its old value
and 10% its new value, so it stays the same size with constant
APM_BMP085.Press. Another valid line would be
abs_press_gnd = (abs_press_gnd * 9l + APM_BMP085.Press) / 92;
Another would be
abs_press_gnd = (abs_press_gnd * 9l + APM_BMP085.Press * 10) / 10l;
The filter is preloaded before the 400 iterations though, so that's good.
Original comment by bjpcalt...@gmail.com
on 18 Sep 2010 at 12:54
Oh, totally my bad. I read the lowercase L as a one. Never mind.
Original comment by bjpcalt...@gmail.com
on 18 Sep 2010 at 12:58
Original comment by dewei...@gmail.com
on 18 Sep 2010 at 2:54
Original issue reported on code.google.com by
bjpcalt...@gmail.com
on 18 Sep 2010 at 12:26