From 3b4445fb8b057ba761263af6a23ede97d1448fb9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 17 Jul 2025 13:34:36 +0200 Subject: [PATCH] doc: Update telemetry.txt Add a bunch of new packet formats. Document ADC data mapping Signed-off-by: Keith Packard --- doc/telemetry.txt | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/doc/telemetry.txt b/doc/telemetry.txt index 7ee0ab3c..324c051d 100644 --- a/doc/telemetry.txt +++ b/doc/telemetry.txt @@ -102,8 +102,12 @@ Keith Packard ; Bdale Garbee [options="border",cols="1,3"] |==== |Type |Description - |0x08 |TeleMega IMU Sensor Data - |0x09 |TeleMega Kalman and Voltage Data + |0x08 |TeleMega IMU Sensor Data with Invensense IMU + |0x12 |TeleMega IMU Sensor Data with BMX160 IMU + |0x13 |TeleMega IMU Sensor Data with MPU6000 and MMC5983 + |0x14 |TeleMega IMU Sensor Data with BMI088 and MMC5983 + |0x09 |TeleMega Kalman and Voltage Data for 15V boards + |0x15 |TeleMega Kalman and Voltage data for 30V boards |==== TeleMega has a lot of sensors, and so it splits the sensor @@ -135,6 +139,20 @@ Keith Packard ; Bdale Garbee from the 3 axis gyroscope to compute the total orientation change of the airframe since liftoff. + Voltage values are reported as raw ADC values, so you + need to know the voltage divider in front of the ADC + as well as the ADC range. Boards with a 15 volt range + use 100k/27k divider, boards with a 30 volt range use + 100k/12k. All Mega boards have a 12 bit ADC so the + values range from 0 to 4095, and they all use a 3.3V + reference, so an ADC value of 0 represents 0V and an + ADC value of 4095 represents 3.3V. In sum, to convert + a raw ADC value to a voltage, take the value, divide + by 4095, multiply by 3.3 then multiply by (adc_hi + + adc_lo)/adc_lo, where adc_hi is 100k for both ranges + and adc_lo is 27k for 15V boards and 12k for 30V + boards. + .TeleMega IMU Sensor Packet Contents [options="border",cols="2,3,3,9"] |==== @@ -146,9 +164,9 @@ Keith Packard ; Bdale Garbee |14 |int16_t |accel_x |X axis acceleration (across) |16 |int16_t |accel_y |Y axis acceleration (along) |18 |int16_t |accel_z |Z axis acceleration (through) - |20 |int16_t |gyro_x |X axis rotation (across) - |22 |int16_t |gyro_y |Y axis rotation (along) - |24 |int16_t |gyro_z |Z axis rotation (through) + |20 |int16_t |gyro_x |X axis rotation (roll) + |22 |int16_t |gyro_y |Y axis rotation (pitch) + |24 |int16_t |gyro_z |Z axis rotation (yaw) |26 |int16_t |mag_x |X field strength (across) |28 |int16_t |mag_y |Y field strength (along) |30 |int16_t |mag_z |Z field strength (through) -- 2.47.2