altos/kalman: Kalman terms can be > 1, use 32-bit fixed point
authorKeith Packard <keithp@keithp.com>
Tue, 22 Mar 2011 07:51:04 +0000 (16:51 +0900)
committerKeith Packard <keithp@keithp.com>
Tue, 22 Mar 2011 07:51:04 +0000 (16:51 +0900)
commit6864e06d88a5b908cffa7c4cd2be8969ff46ce4d
treebb6a3b86ccf040f319011afdfacadde534652043
parentc14d6c5ace1d67bd948273ceb7eb6807b29c3806
altos/kalman: Kalman terms can be > 1, use 32-bit fixed point

Because speed and acceleration are scaled by 16, it's fairly common
for the kalman terms to end up larger than 1. Instead of trying to
fuss with 16-bit values and shifts, just use 32-bit values.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kalman/kalman.5c