altos: Correct incremental rotation computation
authorKeith Packard <keithp@keithp.com>
Mon, 28 Oct 2013 06:37:55 +0000 (23:37 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 28 Oct 2013 06:37:55 +0000 (23:37 -0700)
commit4bebade9e9004bad81df1a423687f3e3f356f1c2
tree794d47bec593f260f5ee69508672d2eb85a78a8c
parent06b0c1b768a7d3eae57e66bc9aea25db49f9ea8a
altos: Correct incremental rotation computation

Trying to compute the combined rotation by taking the x/y/z rotations
as a vector is a good approximation, but not accurate enough for our
application given the large angles we sometimes see.

Instead, use a correct-but-expensive function with a pile of
transcendental function calls. The STM32L seems to be fast enough at least...

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