1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd">
7 <title>AltOS Telemetry</title>
8 <subtitle>Packet Definitions</subtitle>
10 <firstname>Keith</firstname>
11 <surname>Packard</surname>
15 <holder>Keith Packard</holder>
19 This document is released under the terms of the
20 <ulink url="http://creativecommons.org/licenses/by-sa/3.0/">
21 Creative Commons ShareAlike 3.0
28 <revnumber>0.1</revnumber>
29 <date>01 July 2011</date>
30 <revremark>Initial content</revremark>
35 <title>Packet Format Design</title>
37 AltOS telemetry data is split into multiple different packets,
38 all the same size, but each includs an identifier so that the
39 ground station can distinguish among different types. A single
40 flight board will transmit multiple packet types, each type on a
41 different schedule. The ground software need look for only a
42 single packet size, and then decode the information within the
43 packet and merge data from multiple packets to construct the
44 full flight computer state.
47 Each AltOS packet is 32 bytes long. This size was chosen based
48 on the known telemetry data requirements. The power of two size
49 allows them to be stored easily in flash memory without having
50 them split across blocks or leaving gaps at the end.
53 All packet types start with a five byte header which encodes the
54 device serial number, device clock value and the packet
55 type. The remaining 27 bytes encode type-specific data.
59 <title>Packet Formats</title>
61 This section first defines the packet header common to all packets
62 and then the per-packet data layout.
65 <title>Packet Header</title>
67 <title>Telemetry Packet Header</title>
68 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
69 <colspec align='center' colwidth='*' colname='Offset'/>
70 <colspec align='center' colwidth='3*' colname='Data Type'/>
71 <colspec align='left' colwidth='3*' colname='Name'/>
72 <colspec align='left' colwidth='9*' colname='Description'/>
75 <entry align='center'>Offset</entry>
76 <entry align='center'>Data Type</entry>
77 <entry align='center'>Name</entry>
78 <entry align='center'>Description</entry>
84 <entry>uint16_t</entry>
86 <entry>Device serial Number</entry>
90 <entry>uint16_t</entry>
92 <entry>Device time in 100ths of a second</entry>
96 <entry>uint8_t</entry>
98 <entry>Packet type</entry>
107 Each packet starts with these five bytes which serve to identify
108 which device has transmitted the packet, when it was transmitted
109 and what the rest of the packet contains.
113 <title>TeleMetrum v1.x, TeleMini and TeleNano Sensor Data</title>
114 <informaltable frame='none' label='' tocentry='0'>
115 <tgroup cols='2' align='center' colsep='1' rowsep='1'>
116 <colspec align='center' colwidth='*' colname='Offset'/>
117 <colspec align='left' colwidth='3*' colname='Description'/>
121 <entry>Description</entry>
127 <entry>TeleMetrum v1.x Sensor Data</entry>
131 <entry>TeleMini Sensor Data</entry>
135 <entry>TeleNano Sensor Data</entry>
141 TeleMetrum v1.x, TeleMini and TeleNano share this same packet
142 format for sensor data. Each uses a distinct packet type so
143 that the receiver knows which data values are valid and which
147 Sensor Data packets are transmitted once per second on the
148 ground, 10 times per second during ascent and once per second
149 during descent and landing
152 <title>Sensor Packet Contents</title>
153 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
154 <colspec align='center' colwidth='*' colname='Offset'/>
155 <colspec align='center' colwidth='3*' colname='Data Type'/>
156 <colspec align='left' colwidth='3*' colname='Name'/>
157 <colspec align='left' colwidth='9*' colname='Description'/>
160 <entry align='center'>Offset</entry>
161 <entry align='center'>Data Type</entry>
162 <entry align='center'>Name</entry>
163 <entry align='center'>Description</entry>
168 <entry>5</entry><entry>uint8_t</entry><entry>state</entry><entry>Flight state</entry>
171 <entry>6</entry><entry>int16_t</entry><entry>accel</entry><entry>accelerometer (TM only)</entry>
174 <entry>8</entry><entry>int16_t</entry><entry>pres</entry><entry>pressure sensor</entry>
177 <entry>10</entry><entry>int16_t</entry><entry>temp</entry><entry>temperature sensor</entry>
180 <entry>12</entry><entry>int16_t</entry><entry>v_batt</entry><entry>battery voltage</entry>
183 <entry>14</entry><entry>int16_t</entry><entry>sense_d</entry><entry>drogue continuity sense (TM/Tm)</entry>
186 <entry>16</entry><entry>int16_t</entry><entry>sense_m</entry><entry>main continuity sense (TM/Tm)</entry>
189 <entry>18</entry><entry>int16_t</entry><entry>acceleration</entry><entry>m/s² * 16</entry>
192 <entry>20</entry><entry>int16_t</entry><entry>speed</entry><entry>m/s * 16</entry>
195 <entry>22</entry><entry>int16_t</entry><entry>height</entry><entry>m</entry>
198 <entry>24</entry><entry>int16_t</entry><entry>ground_pres</entry><entry>Average barometer reading on ground</entry>
201 <entry>26</entry><entry>int16_t</entry><entry>ground_accel</entry><entry>TM</entry>
204 <entry>28</entry><entry>int16_t</entry><entry>accel_plus_g</entry><entry>TM</entry>
207 <entry>30</entry><entry>int16_t</entry><entry>accel_minus_g</entry><entry>TM</entry>
217 <title>TeleMega Sensor Data</title>
218 <informaltable frame='none' label='' tocentry='0'>
219 <tgroup cols='2' align='center' colsep='1' rowsep='1'>
220 <colspec align='center' colwidth='*' colname='Offset'/>
221 <colspec align='left' colwidth='3*' colname='Description'/>
225 <entry>Description</entry>
231 <entry>TeleMega IMU Sensor Data</entry>
235 <entry>TeleMega Kalman and Voltage Data</entry>
241 TeleMega has a lot of sensors, and so it splits the sensor
242 data into two packets. The raw IMU data are sent more often;
243 the voltage values don't change very fast, and the Kalman
244 values can be reconstructed from the IMU data.
247 IMU Sensor Data packets are transmitted once per second on the
248 ground, 10 times per second during ascent and once per second
249 during descent and landing
252 Kalman and Voltage Data packets are transmitted once per second on the
253 ground, 5 times per second during ascent and once per second
254 during descent and landing
257 The high-g accelerometer is reported separately from the data
258 for the 9-axis IMU (accel/gyro/mag). The 9-axis IMU is mounted
259 so that the X axis is "across" the board (along the short
260 axis0, the Y axis is "along" the board (along the long axis,
261 with the high-g accelerometer) and the Z axis is "through" the
262 board (perpendicular to the board). Rotation measurements are
263 around the respective axis, so Y rotation measures the spin
264 rate of the rocket while X and Z rotation measure the tilt
268 The overall tilt angle of the rocket is computed by first
269 measuring the orientation of the rocket on the pad using the 3
270 axis accelerometer, and then integrating the overall tilt rate
271 from the 3 axis gyroscope to compute the total orientation
272 change of the airframe since liftoff.
275 <title>TeleMega IMU Sensor Packet Contents</title>
276 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
277 <colspec align='center' colwidth='*' colname='Offset'/>
278 <colspec align='center' colwidth='3*' colname='Data Type'/>
279 <colspec align='left' colwidth='3*' colname='Name'/>
280 <colspec align='left' colwidth='9*' colname='Description'/>
283 <entry align='center'>Offset</entry>
284 <entry align='center'>Data Type</entry>
285 <entry align='center'>Name</entry>
286 <entry align='center'>Description</entry>
291 <entry>5</entry><entry>uint8_t</entry><entry>orient</entry><entry>Angle from vertical in degrees</entry>
294 <entry>6</entry><entry>int16_t</entry><entry>accel</entry><entry>High G accelerometer</entry>
297 <entry>8</entry><entry>int32_t</entry><entry>pres</entry><entry>pressure (Pa * 10)</entry>
300 <entry>12</entry><entry>int16_t</entry><entry>temp</entry><entry>temperature (°C * 100)</entry>
303 <entry>14</entry><entry>int16_t</entry><entry>accel_x</entry><entry>X axis acceleration (across)</entry>
306 <entry>16</entry><entry>int16_t</entry><entry>accel_y</entry><entry>Y axis acceleration (along)</entry>
309 <entry>18</entry><entry>int16_t</entry><entry>accel_z</entry><entry>Z axis acceleration (through)</entry>
312 <entry>20</entry><entry>int16_t</entry><entry>gyro_x</entry><entry>X axis rotation (across)</entry>
315 <entry>22</entry><entry>int16_t</entry><entry>gyro_y</entry><entry>Y axis rotation (along)</entry>
318 <entry>24</entry><entry>int16_t</entry><entry>gyro_z</entry><entry>Z axis rotation (through)</entry>
321 <entry>26</entry><entry>int16_t</entry><entry>mag_x</entry><entry>X field strength (across)</entry>
324 <entry>28</entry><entry>int16_t</entry><entry>mag_y</entry><entry>Y field strength (along)</entry>
327 <entry>30</entry><entry>int16_t</entry><entry>mag_z</entry><entry>Z field strength (through)</entry>
336 <title>TeleMega Kalman and Voltage Data Packet Contents</title>
337 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
338 <colspec align='center' colwidth='*' colname='Offset'/>
339 <colspec align='center' colwidth='3*' colname='Data Type'/>
340 <colspec align='left' colwidth='3*' colname='Name'/>
341 <colspec align='left' colwidth='9*' colname='Description'/>
344 <entry align='center'>Offset</entry>
345 <entry align='center'>Data Type</entry>
346 <entry align='center'>Name</entry>
347 <entry align='center'>Description</entry>
352 <entry>5</entry><entry>uint8_t</entry><entry>state</entry><entry>Flight state</entry>
355 <entry>6</entry><entry>int16_t</entry><entry>v_batt</entry><entry>battery voltage</entry>
358 <entry>8</entry><entry>int16_t</entry><entry>v_pyro</entry><entry>pyro battery voltage</entry>
361 <entry>10</entry><entry>int8_t[6]</entry><entry>sense</entry><entry>pyro continuity sense</entry>
364 <entry>16</entry><entry>int32_t</entry><entry>ground_pres</entry><entry>Average barometer reading on ground</entry>
367 <entry>20</entry><entry>int16_t</entry><entry>ground_accel</entry><entry>Average accelerometer reading on ground</entry>
370 <entry>22</entry><entry>int16_t</entry><entry>accel_plus_g</entry><entry>Accel calibration at +1g</entry>
373 <entry>24</entry><entry>int16_t</entry><entry>accel_minus_g</entry><entry>Accel calibration at -1g</entry>
376 <entry>26</entry><entry>int16_t</entry><entry>acceleration</entry><entry>m/s² * 16</entry>
379 <entry>28</entry><entry>int16_t</entry><entry>speed</entry><entry>m/s * 16</entry>
382 <entry>30</entry><entry>int16_t</entry><entry>height</entry><entry>m</entry>
392 <title>TeleMetrum v2 Sensor Data</title>
393 <informaltable frame='none' label='' tocentry='0'>
394 <tgroup cols='2' align='center' colsep='1' rowsep='1'>
395 <colspec align='center' colwidth='*' colname='Offset'/>
396 <colspec align='left' colwidth='3*' colname='Description'/>
400 <entry>Description</entry>
406 <entry>TeleMetrum v2 Sensor Data</entry>
410 <entry>TeleMetrum v2 Calibration Data</entry>
416 TeleMetrum v2 has higher resolution barometric data than
417 TeleMetrum v1, and so the constant calibration data is
418 split out into a separate packet.
421 TeleMetrum v2 Sensor Data packets are transmitted once per second on the
422 ground, 10 times per second during ascent and once per second
423 during descent and landing
426 TeleMetrum v2 Calibration Data packets are always transmitted once per second.
429 <title>TeleMetrum v2 Sensor Packet Contents</title>
430 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
431 <colspec align='center' colwidth='*' colname='Offset'/>
432 <colspec align='center' colwidth='3*' colname='Data Type'/>
433 <colspec align='left' colwidth='3*' colname='Name'/>
434 <colspec align='left' colwidth='9*' colname='Description'/>
437 <entry align='center'>Offset</entry>
438 <entry align='center'>Data Type</entry>
439 <entry align='center'>Name</entry>
440 <entry align='center'>Description</entry>
445 <entry>5</entry><entry>uint8_t</entry><entry>state</entry><entry>Flight state</entry>
448 <entry>6</entry><entry>int16_t</entry><entry>accel</entry><entry>accelerometer</entry>
451 <entry>8</entry><entry>int32_t</entry><entry>pres</entry><entry>pressure sensor (Pa * 10)</entry>
454 <entry>12</entry><entry>int16_t</entry><entry>temp</entry><entry>temperature sensor (°C * 100)</entry>
458 <entry>14</entry><entry>int16_t</entry><entry>acceleration</entry><entry>m/s² * 16</entry>
461 <entry>16</entry><entry>int16_t</entry><entry>speed</entry><entry>m/s * 16</entry>
464 <entry>18</entry><entry>int16_t</entry><entry>height</entry><entry>m</entry>
468 <entry>20</entry><entry>int16_t</entry><entry>v_batt</entry><entry>battery voltage</entry>
471 <entry>22</entry><entry>int16_t</entry><entry>sense_d</entry><entry>drogue continuity sense</entry>
474 <entry>24</entry><entry>int16_t</entry><entry>sense_m</entry><entry>main continuity sense</entry>
477 <entry>26</entry><entry>pad[6]</entry><entry>pad bytes</entry><entry></entry>
486 <title>TeleMetrum v2 Calibration Data Packet Contents</title>
487 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
488 <colspec align='center' colwidth='*' colname='Offset'/>
489 <colspec align='center' colwidth='3*' colname='Data Type'/>
490 <colspec align='left' colwidth='3*' colname='Name'/>
491 <colspec align='left' colwidth='9*' colname='Description'/>
494 <entry align='center'>Offset</entry>
495 <entry align='center'>Data Type</entry>
496 <entry align='center'>Name</entry>
497 <entry align='center'>Description</entry>
502 <entry>5</entry><entry>pad[3]</entry><entry>pad bytes</entry><entry></entry>
505 <entry>8</entry><entry>int32_t</entry><entry>ground_pres</entry><entry>Average barometer reading on ground</entry>
508 <entry>12</entry><entry>int16_t</entry><entry>ground_accel</entry><entry>Average accelerometer reading on ground</entry>
511 <entry>14</entry><entry>int16_t</entry><entry>accel_plus_g</entry><entry>Accel calibration at +1g</entry>
514 <entry>16</entry><entry>int16_t</entry><entry>accel_minus_g</entry><entry>Accel calibration at -1g</entry>
517 <entry>18</entry><entry>pad[14]</entry><entry>pad bytes</entry><entry></entry>
527 <title>Configuration Data</title>
528 <informaltable frame='none' label='' tocentry='0'>
529 <tgroup cols='2' align='center' colsep='1' rowsep='1'>
530 <colspec align='center' colwidth='*' colname='Offset'/>
531 <colspec align='left' colwidth='3*' colname='Description'/>
535 <entry>Description</entry>
541 <entry>Configuration Data</entry>
547 This provides a description of the software installed on the
548 flight computer as well as any user-specified configuration data.
551 Configuration data packets are transmitted once per second
552 during all phases of the flight
555 <title>Sensor Packet Contents</title>
556 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
557 <colspec align='center' colwidth='*' colname='Offset'/>
558 <colspec align='center' colwidth='3*' colname='Data Type'/>
559 <colspec align='left' colwidth='3*' colname='Name'/>
560 <colspec align='left' colwidth='9*' colname='Description'/>
563 <entry align='center'>Offset</entry>
564 <entry align='center'>Data Type</entry>
565 <entry align='center'>Name</entry>
566 <entry align='center'>Description</entry>
571 <entry>5</entry><entry>uint8_t</entry><entry>type</entry><entry>Device type</entry>
574 <entry>6</entry><entry>uint16_t</entry><entry>flight</entry><entry>Flight number</entry>
577 <entry>8</entry><entry>uint8_t</entry><entry>config_major</entry><entry>Config major version</entry>
580 <entry>9</entry><entry>uint8_t</entry><entry>config_minor</entry><entry>Config minor version</entry>
583 <entry>10</entry><entry>uint16_t</entry><entry>apogee_delay</entry>
584 <entry>Apogee deploy delay in seconds</entry>
587 <entry>12</entry><entry>uint16_t</entry><entry>main_deploy</entry><entry>Main deploy alt in meters</entry>
590 <entry>14</entry><entry>uint16_t</entry><entry>flight_log_max</entry>
591 <entry>Maximum flight log size (kB)</entry>
594 <entry>16</entry><entry>char</entry><entry>callsign[8]</entry><entry>Radio operator identifier</entry>
597 <entry>24</entry><entry>char</entry><entry>version[8]</entry><entry>Software version identifier</entry>
607 <title>GPS Location</title>
608 <informaltable frame='none' label='' tocentry='0'>
609 <tgroup cols='2' align='center' colsep='1' rowsep='1'>
610 <colspec align='center' colwidth='*' colname='Offset'/>
611 <colspec align='left' colwidth='3*' colname='Description'/>
615 <entry>Description</entry>
621 <entry>GPS Location</entry>
627 This packet provides all of the information available from the
628 GPS receiver—position, time, speed and precision
632 GPS Location packets are transmitted once per second during
633 all phases of the flight
636 <title>GPS Location Packet Contents</title>
637 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
638 <colspec align='center' colwidth='*' colname='Offset'/>
639 <colspec align='center' colwidth='3*' colname='Data Type'/>
640 <colspec align='left' colwidth='3*' colname='Name'/>
641 <colspec align='left' colwidth='9*' colname='Description'/>
644 <entry align='center'>Offset</entry>
645 <entry align='center'>Data Type</entry>
646 <entry align='center'>Name</entry>
647 <entry align='center'>Description</entry>
652 <entry>5</entry><entry>uint8_t</entry><entry>flags</entry>
653 <entry>See GPS Flags table below</entry>
656 <entry>6</entry><entry>int16_t</entry><entry>altitude</entry><entry>m</entry>
659 <entry>8</entry><entry>int32_t</entry><entry>latitude</entry><entry>degrees * 10<superscript>7</superscript></entry>
662 <entry>12</entry><entry>int32_t</entry><entry>longitude</entry><entry>degrees * 10<superscript>7</superscript></entry>
665 <entry>16</entry><entry>uint8_t</entry><entry>year</entry>
668 <entry>17</entry><entry>uint8_t</entry><entry>month</entry>
671 <entry>18</entry><entry>uint8_t</entry><entry>day</entry>
674 <entry>19</entry><entry>uint8_t</entry><entry>hour</entry>
677 <entry>20</entry><entry>uint8_t</entry><entry>minute</entry>
680 <entry>21</entry><entry>uint8_t</entry><entry>second</entry>
683 <entry>22</entry><entry>uint8_t</entry><entry>pdop</entry><entry>* 5</entry>
686 <entry>23</entry><entry>uint8_t</entry><entry>hdop</entry><entry>* 5</entry>
689 <entry>24</entry><entry>uint8_t</entry><entry>vdop</entry><entry>* 5</entry>
692 <entry>25</entry><entry>uint8_t</entry><entry>mode</entry>
693 <entry>See GPS Mode table below</entry>
696 <entry>26</entry><entry>uint16_t</entry><entry>ground_speed</entry><entry>cm/s</entry>
699 <entry>28</entry><entry>int16_t</entry><entry>climb_rate</entry><entry>cm/s</entry>
702 <entry>30</entry><entry>uint8_t</entry><entry>course</entry><entry>/ 2</entry>
705 <entry>31</entry><entry>uint8_t</entry><entry>unused[1]</entry>
714 Packed into a one byte field are status flags and the count of
715 satellites used to compute the position fix. Note that this
716 number may be lower than the number of satellites being
717 tracked; the receiver will not use information from satellites
718 with weak signals or which are close enough to the horizon to
719 have significantly degraded position accuracy.
722 <title>GPS Flags</title>
723 <tgroup cols='3' colsep='1' rowsep='1'>
724 <colspec align='center' colwidth='*' colname='bits'/>
725 <colspec align='left' colwidth='2*' colname='name'/>
726 <colspec align='left' colwidth='7*' colname='description'/>
729 <entry align='center'>Bits</entry>
730 <entry align='center'>Name</entry>
731 <entry align='center'>Description</entry>
738 <entry>Number of satellites in solution</entry>
743 <entry>GPS solution is valid</entry>
747 <entry>running</entry>
748 <entry>GPS receiver is operational</entry>
752 <entry>date_valid</entry>
753 <entry>Reported date is valid</entry>
757 <entry>course_valid</entry>
758 <entry>ground speed, course and climb rates are valid</entry>
764 Here are all of the valid GPS operational modes. Altus Metrum
765 products will only ever report 'N' (not valid), 'A'
766 (Autonomous) modes or 'E' (Estimated). The remaining modes
767 are either testing modes or require additional data.
770 <title>GPS Mode</title>
771 <tgroup cols='3' colsep='1' rowsep='1'>
772 <colspec align='center' colwidth='*' colname='value'/>
773 <colspec align='center' colwidth='3*' colname='name'/>
774 <colspec align='left' colwidth='7*' colname='description'/>
777 <entry align='center'>Mode</entry>
778 <entry align='center'>Name</entry>
779 <entry align='center'>Decsription</entry>
785 <entry>Not Valid</entry>
786 <entry>All data are invalid</entry>
790 <entry>Autonomous mode</entry>
791 <entry>Data are derived from satellite data</entry>
795 <entry>Differential Mode</entry>
797 Data are augmented with differential data from a
798 known ground station. The SkyTraq unit in TeleMetrum
799 does not support this mode
804 <entry>Estimated</entry>
806 Data are estimated using dead reckoning from the
812 <entry>Manual</entry>
813 <entry>Data were entered manually</entry>
817 <entry>Simulated</entry>
818 <entry>GPS receiver testing mode</entry>
825 <title>GPS Satellite Data</title>
826 <informaltable frame='none' label='' tocentry='0'>
827 <tgroup cols='2' align='center' colsep='1' rowsep='1'>
828 <colspec align='center' colwidth='*' colname='Offset'/>
829 <colspec align='left' colwidth='3*' colname='Description'/>
833 <entry>Description</entry>
839 <entry>GPS Satellite Data</entry>
845 This packet provides space vehicle identifiers and signal
846 quality information in the form of a C/N1 number for up to 12
847 satellites. The order of the svids is not specified.
850 GPS Satellite data are transmitted once per second during all
851 phases of the flight.
854 <title>GPS Satellite Data Contents</title>
855 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
856 <colspec align='right' colwidth='*' colname='Offset'/>
857 <colspec align='center' colwidth='3*' colname='Data Type'/>
858 <colspec align='left' colwidth='3*' colname='Name'/>
859 <colspec align='left' colwidth='9*' colname='Description'/>
862 <entry align='center'>Offset</entry>
863 <entry align='center'>Data Type</entry>
864 <entry align='center'>Name</entry>
865 <entry align='center'>Description</entry>
870 <entry>5</entry><entry>uint8_t</entry><entry>channels</entry>
871 <entry>Number of reported satellite information</entry>
874 <entry>6</entry><entry>sat_info_t</entry><entry>sats[12]</entry>
875 <entry>See Per-Satellite data table below</entry>
878 <entry>30</entry><entry>uint8_t</entry><entry>unused[2]</entry>
887 <title>GPS Per-Satellite data (sat_info_t)</title>
888 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
889 <colspec align='right' colwidth='*' colname='Offset'/>
890 <colspec align='center' colwidth='3*' colname='Data Type'/>
891 <colspec align='left' colwidth='3*' colname='Name'/>
892 <colspec align='left' colwidth='9*' colname='Description'/>
895 <entry align='center'>Offset</entry>
896 <entry align='center'>Data Type</entry>
897 <entry align='center'>Name</entry>
898 <entry align='center'>Description</entry>
903 <entry>0</entry><entry>uint8_t</entry><entry>svid</entry>
904 <entry>Space Vehicle Identifier</entry>
907 <entry>1</entry><entry>uint8_t</entry><entry>c_n_1</entry>
908 <entry>C/N1 signal quality indicator</entry>
918 <title>Companion Data Data</title>
919 <informaltable frame='none' label='' tocentry='0'>
920 <tgroup cols='2' align='center' colsep='1' rowsep='1'>
921 <colspec align='center' colwidth='*' colname='Offset'/>
922 <colspec align='left' colwidth='3*' colname='Description'/>
926 <entry>Description</entry>
932 <entry>Companion Data Data</entry>
938 When a companion board is attached to TeleMega or TeleMetrum,
939 it can provide telemetry data to be included in the
940 downlink. The companion board can provide up to 12 16-bit data
944 The companion board itself specifies the transmission rate. On
945 the ground and during descent, that rate is limited to one
946 packet per second. During ascent, that rate is limited to 10
950 <title>Companion Data Contents</title>
951 <tgroup cols='4' align='center' colsep='1' rowsep='1'>
952 <colspec align='right' colwidth='*' colname='Offset'/>
953 <colspec align='center' colwidth='3*' colname='Data Type'/>
954 <colspec align='left' colwidth='3*' colname='Name'/>
955 <colspec align='left' colwidth='9*' colname='Description'/>
958 <entry align='center'>Offset</entry>
959 <entry align='center'>Data Type</entry>
960 <entry align='center'>Name</entry>
961 <entry align='center'>Description</entry>
966 <entry>5</entry><entry>uint8_t</entry><entry>board_id</entry>
967 <entry>Type of companion board attached</entry>
970 <entry>6</entry><entry>uint8_t</entry><entry>update_period</entry>
971 <entry>How often telemetry is sent, in 1/100ths of a second</entry>
974 <entry>7</entry><entry>uint8_t</entry><entry>channels</entry>
975 <entry>Number of data channels supplied</entry>
978 <entry>8</entry><entry>uint16_t[12]</entry><entry>companion_data</entry>
979 <entry>Up to 12 channels of 16-bit companion data</entry>
990 <title>Data Transmission</title>
992 Altus Metrum devices use Texas Instruments sub-GHz digital radio
993 products. Ground stations use parts with HW FEC while some
994 flight computers perform FEC in software. TeleGPS is
998 <title>Altus Metrum Radio Parts</title>
1000 <colspec align="center" colwidth="*" colname="Part Number"/>
1001 <colspec align="center" colwidth="*" colname="Description"/>
1002 <colspec align="left" colwidth="*" colname="Used in"/>
1005 <entry align="center">Part Number</entry>
1006 <entry align="center">Description</entry>
1007 <entry align="center">Used in</entry>
1012 <entry>CC1111</entry><entry>10mW transceiver with integrated SoC</entry>
1013 <entry>TeleDongle v0.2, TeleBT v1.0, TeleMetrum v1.x, TeleMini</entry>
1016 <entry>CC1120</entry><entry>35mW transceiver with SW FEC</entry>
1017 <entry>TeleMetrum v2, TeleMega</entry>
1020 <entry>CC1200</entry><entry>35mW transceiver with HW FEC</entry>
1021 <entry>TeleDongle v3.0, TeleBT v3.0</entry>
1024 <entry>CC115L</entry><entry>14mW transmitter with SW FEC</entry>
1025 <entry>TeleGPS</entry>
1031 <title>Modulation Scheme</title>
1033 Texas Instruments provides a tool for computing modulation
1034 parameters given a desired modulation format and basic bit
1037 While we might like to use something with better low-signal
1038 performance like BPSK, the radios we use don't support that,
1039 but do support Gaussian frequency shift keying (GFSK). Regular
1040 frequency shift keying (FSK) encodes the signal by switching
1041 the carrier between two frequencies. The Gaussian version is
1042 essentially the same, but the shift between frequencies gently
1043 follows a gaussian curve, rather than switching
1044 immediately. This tames the bandwidth of the signal without
1045 affecting the ability to transmit data.
1047 For AltOS, there are three available bit rates, 38.4kBaud,
1048 9.6kBaud and 2.4kBaud resulting in the following signal
1053 <title>Modulation Scheme</title>
1055 <colspec align="center" colwidth="*" colname="rate"/>
1056 <colspec align="center" colwidth="*" colname="deviation"/>
1057 <colspec align="center" colwidth="*" colname="bandwidth"/>
1060 <entry align='center'>Rate</entry>
1061 <entry align='center'>Deviation</entry>
1062 <entry align='center'>Receiver Bandwidth</entry>
1067 <entry>38.4kBaud</entry>
1068 <entry>20.5kHz</entry>
1069 <entry>100kHz</entry>
1072 <entry>9.6kBaud</entry>
1073 <entry>5.125kHz</entry>
1074 <entry>25kHz</entry>
1077 <entry>2.4kBaud</entry>
1078 <entry>1.5kHz</entry>
1086 <title>Error Correction</title>
1088 The cc1111 and cc1200 provide forward error correction in
1089 hardware; on the cc1120 and cc115l that's done in
1090 software. AltOS uses this to improve reception of weak
1091 signals. As it's a rate 1/2 encoding, each bit of data takes
1092 two bits when transmitted, so the effective data rate is half
1093 of the raw transmitted bit rate.
1096 <title>Error Correction</title>
1098 <colspec align="center" colwidth="*" colname="parameter"/>
1099 <colspec align="center" colwidth="*" colname="value"/>
1100 <colspec align="center" colwidth="*" colname="description"/>
1103 <entry align='center'>Parameter</entry>
1104 <entry align='center'>Value</entry>
1105 <entry align='center'>Description</entry>
1110 <entry>Error Correction</entry>
1111 <entry>Convolutional coding</entry>
1112 <entry>1/2 rate, constraint length m=4</entry>
1115 <entry>Interleaving</entry>
1116 <entry>4 x 4</entry>
1117 <entry>Reduce effect of noise burst</entry>
1120 <entry>Data Whitening</entry>
1121 <entry>XOR with 9-bit PNR</entry>
1122 <entry>Rotate right with bit 8 = bit 0 xor bit 5, initial
1123 value 111111111</entry>
1131 <title>TeleDongle packet format</title>
1133 TeleDongle does not do any interpretation of the packet data,
1134 instead it is configured to receive packets of a specified
1135 length (32 bytes in this case). For each received packet,
1136 TeleDongle produces a single line of text. This line starts with
1137 the string "TELEM " and is followed by a list of hexadecimal
1140 <programlisting>TELEM 224f01080b05765e00701f1a1bbeb8d7b60b070605140c000600000000000000003fa988</programlisting>
1142 The hexadecimal encoded string of bytes contains a length byte,
1143 the packet data, two bytes added by the cc1111 radio receiver
1144 hardware and finally a checksum so that the host software can
1145 validate that the line was transmitted without any errors.
1148 <title>Packet Format</title>
1150 <colspec align="center" colwidth="2*" colname="offset"/>
1151 <colspec align="center" colwidth="*" colname="name"/>
1152 <colspec align="center" colwidth="*" colname="value"/>
1153 <colspec align="center" colwidth="5*" colname="description"/>
1156 <entry align='center'>Offset</entry>
1157 <entry align='center'>Name</entry>
1158 <entry align='center'>Example</entry>
1159 <entry align='center'>Description</entry>
1165 <entry>length</entry>
1167 <entry>Total length of data bytes in the line. Note that
1168 this includes the added RSSI and status bytes</entry>
1171 <entry>1 ·· length-3</entry>
1172 <entry>packet</entry>
1173 <entry>4f ·· 00</entry>
1174 <entry>Bytes of actual packet data</entry>
1177 <entry>length-2</entry>
1180 <entry>Received signal strength. dBm = rssi / 2 - 74</entry>
1183 <entry>length-1</entry>
1186 <entry>Link Quality Indicator and CRC status. Bit 7
1187 is set when the CRC is correct</entry>
1190 <entry>length</entry>
1191 <entry>checksum</entry>
1193 <entry>(0x5a + sum(bytes 1 ·· length-1)) % 256</entry>
1200 <title>History and Motivation</title>
1202 The original AltoOS telemetry mechanism encoded everything
1203 available piece of information on the TeleMetrum hardware into a
1204 single unified packet. Initially, the packets contained very
1205 little data—some raw sensor readings along with the current GPS
1206 coordinates when a GPS receiver was connected. Over time, the
1207 amount of data grew to include sensor calibration data, GPS
1208 satellite information and a host of internal state information
1209 designed to help diagnose flight failures in case of a loss of
1210 the on-board flight data.
1213 Because every packet contained all of the data, packets were
1214 huge—95 bytes long. Much of the information was also specific to
1215 the TeleMetrum hardware. With the introduction of the TeleMini
1216 flight computer, most of the data contained in the telemetry
1217 packets was unavailable. Initially, a shorter, but still
1218 comprehensive packet was implemented. This required that the
1219 ground station be pre-configured as to which kind of packet to
1223 The development of several companion boards also made the
1224 shortcomings evident—each companion board would want to include
1225 telemetry data in the radio link; with the original design, the
1226 packet would have to hold the new data as well, requiring
1227 additional TeleMetrum and ground station changes.