diff options
author | Keith Packard <keithp@keithp.com> | 2013-11-12 14:01:55 +0900 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-11-12 14:01:55 +0900 |
commit | bdd6244d8b4a55c9aa4fb79b0cb1a0727afbc2ac (patch) | |
tree | 5470d8f1949be99efa94a99324974e4e65fb8ca1 /src/core/ao_data.h | |
parent | 29b48b63305881471d9b97ef3fb236af03cb79f5 (diff) |
altos: Add orientation tracking to ao_flight_test
Shows calculated offset from vertical in ao_flight_test output
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_data.h')
-rw-r--r-- | src/core/ao_data.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/ao_data.h b/src/core/ao_data.h index 5a232885..e1d8a139 100644 --- a/src/core/ao_data.h +++ b/src/core/ao_data.h @@ -319,4 +319,16 @@ typedef int16_t angle_t; /* in degrees */ #endif +#if !HAS_MAG && HAS_HMC5883 + +#define HAS_MAG 1 + +typedef int16_t ao_mag_t; /* in raw sample units */ + +#define ao_data_mag_along(packet) ((packet)->hmc5883.x) +#define ao_data_mag_across(packet) ((packet)->hmc5883.y) +#define ao_data_mag_through(packet) ((packet)->hmc5883.z) + +#endif + #endif /* _AO_DATA_H_ */ |