diff options
| author | Keith Packard <keithp@keithp.com> | 2013-08-20 11:40:17 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-08-27 21:56:42 -0600 | 
| commit | 7b0f9b25a56fa8b4aa1c2e9d79c43e6a97cab0c0 (patch) | |
| tree | d6b0c692976bf8086c5fce18193a4624623d0835 /src/core/ao_telemetry.h | |
| parent | 3ded57394f6dfd7beb9526c031a5c6c6c9926917 (diff) | |
altos: Initial TeleMetrum v2.0 bits
Adds new telemetry and logging formats along with code for TeleMetrum
v2.0 design.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao_telemetry.h')
| -rw-r--r-- | src/core/ao_telemetry.h | 44 | 
1 files changed, 44 insertions, 0 deletions
| diff --git a/src/core/ao_telemetry.h b/src/core/ao_telemetry.h index f2d201de..17dc3e93 100644 --- a/src/core/ao_telemetry.h +++ b/src/core/ao_telemetry.h @@ -207,6 +207,48 @@ struct ao_telemetry_mega_data {  }; +#define AO_TELEMETRY_METRUM_SENSOR	0x0A + +struct ao_telemetry_metrum_sensor { +	uint16_t	serial;		/*  0 */ +	uint16_t	tick;		/*  2 */ +	uint8_t		type;		/*  4 */ + +	uint8_t         state;          /*  5 flight state */ +	int16_t		accel;		/*  6 Z axis */ + +	int32_t		pres;		/*  8 Pa * 10 */ +	int16_t		temp;		/* 12 °C * 100 */ + +	int16_t         acceleration;   /* 14 m/s² * 16 */ +	int16_t         speed;          /* 16 m/s * 16 */ +	int16_t         height;         /* 18 m */ + +	int16_t		v_batt;		/* 20 battery voltage */ +	int16_t		sense_a;	/* 22 apogee continuity sense */ +	int16_t		sense_m;	/* 24 main continuity sense */ + +	uint8_t		pad[6];		/* 26 */ +	/* 32 */ +}; +	 +#define AO_TELEMETRY_METRUM_DATA	0x0B + +struct ao_telemetry_metrum_data { +	uint16_t	serial;		/*  0 */ +	uint16_t	tick;		/*  2 */ +	uint8_t		type;		/*  4 */ + +	int32_t		ground_pres;	/* 8 average pres on pad */ +	int16_t		ground_accel;	/* 12 average accel on pad */ +	int16_t		accel_plus_g;	/* 14 accel calibration at +1g */ +	int16_t		accel_minus_g;	/* 16 accel calibration at -1g */ + +	uint8_t		pad[14];	/* 18 */ +	/* 32 */ +}; + +  /* #define AO_SEND_ALL_BARO */  #define AO_TELEMETRY_BARO		0x80 @@ -240,6 +282,8 @@ union ao_telemetry_all {  	struct ao_telemetry_companion		companion;  	struct ao_telemetry_mega_sensor		mega_sensor;  	struct ao_telemetry_mega_data		mega_data; +	struct ao_telemetry_metrum_sensor	metrum_sensor; +	struct ao_telemetry_metrum_data		metrum_data;  	struct ao_telemetry_baro		baro;  }; | 
