diff options
| author | Bdale Garbee <bdale@gag.com> | 2014-09-09 23:28:39 -0600 |
|---|---|---|
| committer | Bdale Garbee <bdale@gag.com> | 2014-09-09 23:28:39 -0600 |
| commit | 16405fd3eb6f82ef3a709e3ed30fc48faef7b547 (patch) | |
| tree | c111819b3ba0c9357af41c81b798326b9df7adad /src/kernel/ao_microkalman.c | |
| parent | 5a2f6ed6210844f7284fbf9f7ecba68c8a14fa52 (diff) | |
| parent | 28bd5057252e61bc5b1a35a00bc1f9fdfde097f7 (diff) | |
Merge branch 'branch-1.5' into debian
Conflicts:
ChangeLog
Releasing
altosui/Instdrv/NSIS/Includes/java.nsh
altosui/altos-windows.nsi.in
configure.ac
doc/Makefile
doc/altusmetrum.xsl
micropeak/micropeak-windows.nsi.in
telegps/telegps-windows.nsi.in
Diffstat (limited to 'src/kernel/ao_microkalman.c')
| -rw-r--r-- | src/kernel/ao_microkalman.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/ao_microkalman.c b/src/kernel/ao_microkalman.c index 0684ea2b..75a29cc4 100644 --- a/src/kernel/ao_microkalman.c +++ b/src/kernel/ao_microkalman.c @@ -22,19 +22,19 @@ #define FIX_BITS 16 -#define to_fix16(x) ((int16_t) ((x) * 65536.0 + 0.5)) -#define to_fix32(x) ((int32_t) ((x) * 65536.0 + 0.5)) +#define to_fix_v(x) ((int16_t) ((x) * 65536.0 + 0.5)) +#define to_fix_k(x) ((int32_t) ((x) * 65536.0 + 0.5)) #define from_fix8(x) ((x) >> 8) #define from_fix(x) ((x) >> 16) -#define fix8_to_fix16(x) ((x) << 8) +#define fix8_to_fix_v(x) ((x) << 8) #define fix16_to_fix8(x) ((x) >> 8) #include <ao_kalman.h> /* Basic time step (96ms) */ -#define AO_MK_STEP to_fix16(0.096) +#define AO_MK_STEP to_fix_v(0.096) /* step ** 2 / 2 */ -#define AO_MK_STEP_2_2 to_fix16(0.004608) +#define AO_MK_STEP_2_2 to_fix_v(0.004608) uint32_t ao_k_pa; /* 24.8 fixed point */ int32_t ao_k_pa_speed; /* 16.16 fixed point */ @@ -49,7 +49,7 @@ ao_microkalman_init(void) { ao_pa = pa; ao_k_pa = pa << 8; -} +} void ao_microkalman_predict(void) |
