diff options
| author | Keith Packard <keithp@keithp.com> | 2013-10-25 04:34:16 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-10-25 04:34:16 -0700 | 
| commit | 351d53836e201834a2d89773a08ab7c2dab2b2f4 (patch) | |
| tree | 599b180bc18e690496091dd335d8fa7731400b86 /src/core/ao.h | |
| parent | 08143a922fe27bc50a19924f46538f9476ab5fd1 (diff) | |
altos: Calibrate IMU accelerometers too
Average the IMU accelerometer values pointing up and down so that we
have a zero-g offset for all three axes. This can then be used to
compute which direction the rocket is pointing while sitting on the pad.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao.h')
| -rw-r--r-- | src/core/ao.h | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/src/core/ao.h b/src/core/ao.h index ea37885e..d12f13a0 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -739,7 +739,7 @@ extern __xdata uint8_t ao_force_freq;  #endif  #define AO_CONFIG_MAJOR	1 -#define AO_CONFIG_MINOR	14 +#define AO_CONFIG_MINOR	15  #define AO_AES_LEN 16 @@ -773,6 +773,11 @@ struct ao_config {  #if HAS_RADIO_AMP  	uint8_t		radio_amp;		/* minor version 14 */  #endif +#if HAS_GYRO +	uint16_t	accel_zero_along;	/* minor version 15 */ +	uint16_t	accel_zero_across;	/* minor version 15 */ +	uint16_t	accel_zero_through;	/* minor version 15 */ +#endif  };  #define AO_IGNITE_MODE_DUAL		0 | 
