altosui: Make Windows java test "smarter"
[fw/altos] / doc / telemetry.xsl
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">
4
5 <article>
6   <articleinfo>
7     <title>AltOS Telemetry</title>
8     <subtitle>Packet Definitions</subtitle>
9     <author>
10       <firstname>Keith</firstname>
11       <surname>Packard</surname>
12     </author>
13     <copyright>
14       <year>2011</year>
15       <holder>Keith Packard</holder>
16     </copyright>
17     <legalnotice>
18       <para>
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
22         </ulink>
23         license.
24       </para>
25     </legalnotice>
26     <revhistory>
27       <revision>
28         <revnumber>0.1</revnumber>
29         <date>01 July 2011</date>
30         <revremark>Initial content</revremark>
31       </revision>
32     </revhistory>
33   </articleinfo>
34   <section>
35     <title>Packet Format Design</title>
36     <para>
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.
45     </para>
46     <para>
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.
51     </para>
52     <para>
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.
56     </para>
57   </section>
58   <section>
59     <title>Packet Formats</title>
60     <para>
61       This section first defines the packet header common to all packets
62       and then the per-packet data layout.
63     </para>
64     <section>
65       <title>Packet Header</title>
66       <table frame='all'>
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'/>
73           <thead>
74             <row>
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>
79             </row>
80           </thead>
81           <tbody>
82             <row>
83               <entry>0</entry>
84               <entry>uint16_t</entry>
85               <entry>serial</entry>
86               <entry>Device serial Number</entry>
87             </row>
88             <row>
89               <entry>2</entry>
90               <entry>uint16_t</entry>
91               <entry>tick</entry>
92               <entry>Device time in 100ths of a second</entry>
93             </row>
94             <row>
95               <entry>4</entry>
96               <entry>uint8_t</entry>
97               <entry>type</entry>
98               <entry>Packet type</entry>
99             </row>
100             <row>
101               <entry>5</entry>
102             </row>
103           </tbody>
104         </tgroup>
105       </table>
106       <para>
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.
110       </para>
111     </section>
112     <section>
113       <title>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'/>
118           <thead>
119             <row>
120               <entry>Type</entry>
121               <entry>Description</entry>
122             </row>
123           </thead>
124           <tbody>
125             <row>
126               <entry>0x01</entry>
127               <entry>TeleMetrum Sensor Data</entry>
128             </row>
129             <row>
130               <entry>0x02</entry>
131               <entry>TeleMini Sensor Data</entry>
132             </row>
133             <row>
134               <entry>0x03</entry>
135               <entry>TeleNano Sensor Data</entry>
136             </row>
137           </tbody>
138         </tgroup>
139       </informaltable>
140       <para>
141         TeleMetrum, 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
144         are undefined.
145       </para>
146       <para>
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
150       </para>
151       <table frame='all'>
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'/>
158           <thead>
159             <row>
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>
164             </row>
165           </thead>
166           <tbody>
167             <row>
168               <entry>5</entry><entry>uint8_t</entry><entry>state</entry><entry>Flight state</entry>
169             </row>
170             <row>
171               <entry>6</entry><entry>int16_t</entry><entry>accel</entry><entry>accelerometer (TM only)</entry>
172             </row>
173             <row>
174               <entry>8</entry><entry>int16_t</entry><entry>pres</entry><entry>pressure sensor</entry>
175             </row>
176             <row>
177               <entry>10</entry><entry>int16_t</entry><entry>temp</entry><entry>temperature sensor</entry>
178             </row>
179             <row>
180               <entry>12</entry><entry>int16_t</entry><entry>v_batt</entry><entry>battery voltage</entry>
181             </row>
182             <row>
183               <entry>14</entry><entry>int16_t</entry><entry>sense_d</entry><entry>drogue continuity sense (TM/Tm)</entry>
184             </row>
185             <row>
186               <entry>16</entry><entry>int16_t</entry><entry>sense_m</entry><entry>main continuity sense (TM/Tm)</entry>
187             </row>
188             <row>
189               <entry>18</entry><entry>int16_t</entry><entry>acceleration</entry><entry>m/s² * 16</entry>
190             </row>
191             <row>
192               <entry>20</entry><entry>int16_t</entry><entry>speed</entry><entry>m/s * 16</entry>
193             </row>
194             <row>
195               <entry>22</entry><entry>int16_t</entry><entry>height</entry><entry>m</entry>
196             </row>
197             <row>
198               <entry>24</entry><entry>int16_t</entry><entry>ground_pres</entry><entry>Average barometer reading on ground</entry>
199             </row>
200             <row>
201               <entry>26</entry><entry>int16_t</entry><entry>ground_accel</entry><entry>TM</entry>
202             </row>
203             <row>
204               <entry>28</entry><entry>int16_t</entry><entry>accel_plus_g</entry><entry>TM</entry>
205             </row>
206             <row>
207               <entry>30</entry><entry>int16_t</entry><entry>accel_minus_g</entry><entry>TM</entry>
208             </row>
209             <row>
210               <entry>32</entry>
211             </row>
212           </tbody>
213         </tgroup>
214       </table>
215     </section>
216     <section>
217       <title>Configuration 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'/>
222           <thead>
223             <row>
224               <entry>Type</entry>
225               <entry>Description</entry>
226             </row>
227           </thead>
228           <tbody>
229             <row>
230               <entry>0x04</entry>
231               <entry>Configuration Data</entry>
232             </row>
233           </tbody>
234         </tgroup>
235       </informaltable>
236       <para>
237         This provides a description of the software installed on the
238         flight computer as well as any user-specified configuration data.
239       </para>
240       <para>
241         Configuration data packets are transmitted once per second
242         during all phases of the flight
243       </para>
244       <table frame='all'>
245         <title>Sensor Packet Contents</title>
246         <tgroup cols='4' align='center' colsep='1' rowsep='1'>
247           <colspec align='center' colwidth='*' colname='Offset'/>
248           <colspec align='center' colwidth='3*' colname='Data Type'/>
249           <colspec align='left' colwidth='3*' colname='Name'/>
250           <colspec align='left' colwidth='9*' colname='Description'/>
251           <thead>
252             <row>
253               <entry align='center'>Offset</entry>
254               <entry align='center'>Data Type</entry>
255               <entry align='center'>Name</entry>
256               <entry align='center'>Description</entry>
257             </row>
258           </thead>
259           <tbody>
260             <row>
261               <entry>5</entry><entry>uint8_t</entry><entry>type</entry><entry>Device type</entry>
262             </row>
263             <row>
264               <entry>6</entry><entry>uint16_t</entry><entry>flight</entry><entry>Flight number</entry>
265             </row>
266             <row>
267               <entry>8</entry><entry>uint8_t</entry><entry>config_major</entry><entry>Config major version</entry>
268             </row>
269             <row>
270               <entry>9</entry><entry>uint8_t</entry><entry>config_minor</entry><entry>Config minor version</entry>
271             </row>
272             <row>
273               <entry>10</entry><entry>uint16_t</entry><entry>apogee_delay</entry>
274               <entry>Apogee deploy delay in seconds</entry>
275             </row>
276             <row>
277               <entry>12</entry><entry>uint16_t</entry><entry>main_deploy</entry><entry>Main deploy alt in meters</entry>
278             </row>
279             <row>
280               <entry>14</entry><entry>uint16_t</entry><entry>flight_log_max</entry>
281               <entry>Maximum flight log size (kB)</entry>
282             </row>
283             <row>
284               <entry>16</entry><entry>char</entry><entry>callsign[8]</entry><entry>Radio operator identifier</entry>
285             </row>
286             <row>
287               <entry>24</entry><entry>char</entry><entry>version[8]</entry><entry>Software version identifier</entry>
288             </row>
289             <row>
290               <entry>32</entry>
291             </row>
292           </tbody>
293         </tgroup>
294       </table>
295     </section>
296     <section>
297       <title>GPS Location</title>
298       <informaltable frame='none' label='' tocentry='0'>
299         <tgroup cols='2' align='center' colsep='1' rowsep='1'>
300           <colspec align='center' colwidth='*' colname='Offset'/>
301           <colspec align='left' colwidth='3*' colname='Description'/>
302           <thead>
303             <row>
304               <entry>Type</entry>
305               <entry>Description</entry>
306             </row>
307           </thead>
308           <tbody>
309             <row>
310               <entry>0x05</entry>
311               <entry>GPS Location</entry>
312             </row>
313           </tbody>
314         </tgroup>
315       </informaltable>
316       <para>
317         This packet provides all of the information available from the
318         Venus SkyTraq GPS receiver—position, time, speed and precision
319         estimates. 
320       </para>
321       <para>
322         GPS Location packets are transmitted once per second during
323         all phases of the flight
324       </para>
325       <table frame='all'>
326         <title>GPS Location Packet Contents</title>
327         <tgroup cols='4' align='center' colsep='1' rowsep='1'>
328           <colspec align='center' colwidth='*' colname='Offset'/>
329           <colspec align='center' colwidth='3*' colname='Data Type'/>
330           <colspec align='left' colwidth='3*' colname='Name'/>
331           <colspec align='left' colwidth='9*' colname='Description'/>
332           <thead>
333             <row>
334               <entry align='center'>Offset</entry>
335               <entry align='center'>Data Type</entry>
336               <entry align='center'>Name</entry>
337               <entry align='center'>Description</entry>
338             </row>
339           </thead>
340           <tbody>
341             <row>
342               <entry>5</entry><entry>uint8_t</entry><entry>flags</entry>
343               <entry>See GPS Flags table below</entry>
344             </row>
345             <row>
346               <entry>6</entry><entry>int16_t</entry><entry>altitude</entry><entry>m</entry>
347             </row>
348             <row>
349               <entry>8</entry><entry>int32_t</entry><entry>latitude</entry><entry>degrees * 10<superscript>7</superscript></entry>
350             </row>
351             <row>
352               <entry>12</entry><entry>int32_t</entry><entry>longitude</entry><entry>degrees * 10<superscript>7</superscript></entry>
353             </row>
354             <row>
355               <entry>16</entry><entry>uint8_t</entry><entry>year</entry>
356             </row>
357             <row>
358               <entry>17</entry><entry>uint8_t</entry><entry>month</entry>
359             </row>
360             <row>
361               <entry>18</entry><entry>uint8_t</entry><entry>day</entry>
362             </row>
363             <row>
364               <entry>19</entry><entry>uint8_t</entry><entry>hour</entry>
365             </row>
366             <row>
367               <entry>20</entry><entry>uint8_t</entry><entry>minute</entry>
368             </row>
369             <row>
370               <entry>21</entry><entry>uint8_t</entry><entry>second</entry>
371             </row>
372             <row>
373               <entry>22</entry><entry>uint8_t</entry><entry>pdop</entry><entry>* 5</entry>
374             </row>
375             <row>
376               <entry>23</entry><entry>uint8_t</entry><entry>hdop</entry><entry>* 5</entry>
377             </row>
378             <row>
379               <entry>24</entry><entry>uint8_t</entry><entry>vdop</entry><entry>* 5</entry>
380             </row>
381             <row>
382               <entry>25</entry><entry>uint8_t</entry><entry>mode</entry>
383               <entry>See GPS Mode table below</entry>
384             </row>
385             <row>
386               <entry>26</entry><entry>uint16_t</entry><entry>ground_speed</entry><entry>cm/s</entry>
387             </row>
388             <row>
389               <entry>28</entry><entry>int16_t</entry><entry>climb_rate</entry><entry>cm/s</entry>
390             </row>
391             <row>
392               <entry>30</entry><entry>uint8_t</entry><entry>course</entry><entry>/ 2</entry>
393             </row>
394             <row>
395               <entry>31</entry><entry>uint8_t</entry><entry>unused[1]</entry>
396             </row>
397             <row>
398               <entry>32</entry>
399             </row>
400           </tbody>
401         </tgroup>
402       </table>
403       <para>
404         Packed into a one byte field are status flags and the count of
405         satellites used to compute the position fix. Note that this
406         number may be lower than the number of satellites being
407         tracked; the receiver will not use information from satellites
408         with weak signals or which are close enough to the horizon to
409         have significantly degraded position accuracy.
410       </para>
411       <table frame='all'>
412         <title>GPS Flags</title>
413         <tgroup cols='3' colsep='1' rowsep='1'>
414           <colspec align='center' colwidth='*' colname='bits'/>
415           <colspec align='left' colwidth='2*' colname='name'/>
416           <colspec align='left' colwidth='7*' colname='description'/>
417           <thead>
418             <row>
419               <entry align='center'>Bits</entry>
420               <entry align='center'>Name</entry>
421               <entry align='center'>Description</entry>
422             </row>
423           </thead>
424           <tbody>
425             <row>
426               <entry>0-3</entry>
427               <entry>nsats</entry>
428               <entry>Number of satellites in solution</entry>
429             </row>
430             <row>
431               <entry>4</entry>
432               <entry>valid</entry>
433               <entry>GPS solution is valid</entry>
434             </row>
435             <row>
436               <entry>5</entry>
437               <entry>running</entry>
438               <entry>GPS receiver is operational</entry>
439             </row>
440             <row>
441               <entry>6</entry>
442               <entry>date_valid</entry>
443               <entry>Reported date is valid</entry>
444             </row>
445             <row>
446               <entry>7</entry>
447               <entry>course_valid</entry>
448               <entry>ground speed, course and climb rates are valid</entry>
449             </row>
450           </tbody>
451         </tgroup>
452       </table>
453       <para>
454         Here are all of the valid GPS operational modes. Altus Metrum
455         products will only ever report 'N' (not valid), 'A'
456         (Autonomous) modes or 'E' (Estimated). The remaining modes
457         are either testing modes or require additional data.
458       </para>
459       <table frame='all'>
460         <title>GPS Mode</title>
461         <tgroup cols='3' colsep='1' rowsep='1'>
462           <colspec align='center' colwidth='*' colname='value'/>
463           <colspec align='center' colwidth='3*' colname='name'/>
464           <colspec align='left' colwidth='7*' colname='description'/>
465           <thead>
466             <row>
467               <entry align='center'>Mode</entry>
468               <entry align='center'>Name</entry>
469               <entry align='center'>Decsription</entry>
470             </row>
471           </thead>
472           <tbody>
473             <row>
474               <entry>N</entry>
475               <entry>Not Valid</entry>
476               <entry>All data are invalid</entry>
477             </row>
478             <row>
479               <entry>A</entry>
480               <entry>Autonomous mode</entry>
481               <entry>Data are derived from satellite data</entry>
482             </row>
483             <row>
484               <entry>D</entry>
485               <entry>Differential Mode</entry>
486               <entry>
487                   Data are augmented with differential data from a
488                   known ground station. The SkyTraq unit in TeleMetrum
489                   does not support this mode
490                 </entry>
491             </row>
492             <row>
493               <entry>E</entry>
494               <entry>Estimated</entry>
495               <entry>
496                   Data are estimated using dead reckoning from the
497                   last known data
498                 </entry>
499             </row>
500             <row>
501               <entry>M</entry>
502               <entry>Manual</entry>
503               <entry>Data were entered manually</entry>
504             </row>
505             <row>
506               <entry>S</entry>
507               <entry>Simulated</entry>
508               <entry>GPS receiver testing mode</entry>
509             </row>
510           </tbody>
511         </tgroup>
512       </table>
513     </section>
514     <section>
515       <title>GPS Satellite Data</title>
516       <informaltable frame='none' label='' tocentry='0'>
517         <tgroup cols='2' align='center' colsep='1' rowsep='1'>
518           <colspec align='center' colwidth='*' colname='Offset'/>
519           <colspec align='left' colwidth='3*' colname='Description'/>
520           <thead>
521             <row>
522               <entry>Type</entry>
523               <entry>Description</entry>
524             </row>
525           </thead>
526           <tbody>
527             <row>
528               <entry>0x06</entry>
529               <entry>GPS Satellite Data</entry>
530             </row>
531           </tbody>
532         </tgroup>
533       </informaltable>
534       <para>
535         This packet provides space vehicle identifiers and signal
536         quality information in the form of a C/N1 number for up to 12
537         satellites. The order of the svids is not specified.
538       </para>
539       <para>
540         GPS Satellite data are transmitted once per second during all
541         phases of the flight.
542       </para>
543       <table frame='all'>
544         <title>GPS Satellite Data Contents</title>
545         <tgroup cols='4' align='center' colsep='1' rowsep='1'>
546           <colspec align='right' colwidth='*' colname='Offset'/>
547           <colspec align='center' colwidth='3*' colname='Data Type'/>
548           <colspec align='left' colwidth='3*' colname='Name'/>
549           <colspec align='left' colwidth='9*' colname='Description'/>
550           <thead>
551             <row>
552               <entry align='center'>Offset</entry>
553               <entry align='center'>Data Type</entry>
554               <entry align='center'>Name</entry>
555               <entry align='center'>Description</entry>
556             </row>
557           </thead>
558           <tbody>
559             <row>
560               <entry>5</entry><entry>uint8_t</entry><entry>channels</entry>
561               <entry>Number of reported satellite information</entry>
562             </row>
563             <row>
564               <entry>6</entry><entry>sat_info_t</entry><entry>sats[12]</entry>
565               <entry>See Per-Satellite data table below</entry>
566             </row>
567             <row>
568               <entry>30</entry><entry>uint8_t</entry><entry>unused[2]</entry>
569             </row>
570             <row>
571               <entry>32</entry>
572             </row>
573           </tbody>
574         </tgroup>
575       </table>
576       <table frame='all'>
577         <title>GPS Per-Satellite data (sat_info_t)</title>
578         <tgroup cols='4' align='center' colsep='1' rowsep='1'>
579           <colspec align='right' colwidth='*' colname='Offset'/>
580           <colspec align='center' colwidth='3*' colname='Data Type'/>
581           <colspec align='left' colwidth='3*' colname='Name'/>
582           <colspec align='left' colwidth='9*' colname='Description'/>
583           <thead>
584             <row>
585               <entry align='center'>Offset</entry>
586               <entry align='center'>Data Type</entry>
587               <entry align='center'>Name</entry>
588               <entry align='center'>Description</entry>
589             </row>
590           </thead>
591           <tbody>
592             <row>
593               <entry>0</entry><entry>uint8_t</entry><entry>svid</entry>
594               <entry>Space Vehicle Identifier</entry>
595             </row>
596             <row>
597               <entry>1</entry><entry>uint8_t</entry><entry>c_n_1</entry>
598               <entry>C/N1 signal quality indicator</entry>
599             </row>
600             <row>
601               <entry>2</entry>
602             </row>
603           </tbody>
604         </tgroup>
605       </table>
606     </section>
607   </section>
608   <section>
609     <title>Data Transmission</title>
610     <para>
611       Altus Metrum devices use the Texas Instruments CC1111
612       microcontroller which includes an integrated sub-GHz digital
613       transceiver. This transceiver is used to both transmit and
614       receive the telemetry packets. This section discusses what
615       modulation scheme is used and how this device is configured.
616     </para>
617     <section>
618       <title>Modulation Scheme</title>
619       <para>
620         Texas Instruments provides a tool for computing modulation
621         parameters given a desired modulation format and basic bit
622         rate. For AltOS, the basic bit rate was specified as 38 kBaud,
623         resulting in the following signal parmeters:
624       </para>
625       <table>
626         <title>Modulation Scheme</title>
627         <tgroup cols='3'>
628           <colspec align="center" colwidth="*" colname="parameter"/>
629           <colspec align="center" colwidth="*" colname="value"/>
630           <colspec align="center" colwidth="*" colname="description"/>
631           <thead>
632             <row>
633               <entry align='center'>Parameter</entry>
634               <entry align='center'>Value</entry>
635               <entry align='center'>Description</entry>
636             </row>
637           </thead>
638           <tbody>
639             <row>
640               <entry>Modulation</entry>
641               <entry>GFSK</entry>
642               <entry>Gaussian Frequency Shift Keying</entry>
643             </row>
644             <row>
645               <entry>Deviation</entry>
646               <entry>20.507812 kHz</entry>
647               <entry>Frequency modulation</entry>
648             </row>
649             <row>
650               <entry>Data rate</entry>
651               <entry>38.360596 kBaud</entry>
652               <entry>Raw bit rate</entry>
653             </row>
654             <row>
655               <entry>RX Filter Bandwidth</entry>
656               <entry>93.75 kHz</entry>
657               <entry>Receiver Band pass filter bandwidth</entry>
658             </row>
659             <row>
660               <entry>IF Frequency</entry>
661               <entry>140.62 kHz</entry>
662               <entry>Receiver intermediate frequency</entry>
663             </row>
664           </tbody>
665         </tgroup>
666       </table>
667     </section>
668     <section>
669       <title>Error Correction</title>
670       <para>
671         The cc1111 provides forward error correction in hardware,
672         which AltOS uses to improve reception of weak signals. The
673         overall effect of this is to halve the available bandwidth for
674         data from 38 kBaud to 19 kBaud.
675       </para>
676       <table>
677         <title>Error Correction</title>
678         <tgroup cols='3'>
679           <colspec align="center" colwidth="*" colname="parameter"/>
680           <colspec align="center" colwidth="*" colname="value"/>
681           <colspec align="center" colwidth="*" colname="description"/>
682           <thead>
683             <row>
684               <entry align='center'>Parameter</entry>
685               <entry align='center'>Value</entry>
686               <entry align='center'>Description</entry>
687             </row>
688           </thead>
689           <tbody>
690             <row>
691               <entry>Error Correction</entry>
692               <entry>Convolutional coding</entry>
693               <entry>1/2 rate, constraint length m=4</entry>
694             </row>
695             <row>
696               <entry>Interleaving</entry>
697               <entry>4 x 4</entry>
698               <entry>Reduce effect of noise burst</entry>
699             </row>
700             <row>
701               <entry>Data Whitening</entry>
702               <entry>XOR with 9-bit PNR</entry>
703               <entry>Rotate right with bit 8 = bit 0 xor bit 5, initial
704               value 111111111</entry>
705             </row>
706           </tbody>
707         </tgroup>
708       </table>
709     </section>
710   </section>
711   <section>
712     <title>TeleDongle packet format</title>
713     <para>
714       TeleDongle does not do any interpretation of the packet data,
715       instead it is configured to receive packets of a specified
716       length (32 bytes in this case). For each received packet,
717       TeleDongle produces a single line of text. This line starts with
718       the string "TELEM " and is followed by a list of hexadecimal
719       encoded bytes.
720     </para>
721     <programlisting>TELEM 224f01080b05765e00701f1a1bbeb8d7b60b070605140c000600000000000000003fa988</programlisting>
722     <para>
723       The hexadecimal encoded string of bytes contains a length byte,
724       the packet data, two bytes added by the cc1111 radio receiver
725       hardware and finally a checksum so that the host software can
726       validate that the line was transmitted without any errors.
727     </para>
728     <table>
729       <title>Packet Format</title>
730       <tgroup cols='4'>
731         <colspec align="center" colwidth="2*" colname="offset"/>
732         <colspec align="center" colwidth="*" colname="name"/>
733         <colspec align="center" colwidth="*" colname="value"/>
734         <colspec align="center" colwidth="5*" colname="description"/>
735         <thead>
736           <row>
737             <entry align='center'>Offset</entry>
738             <entry align='center'>Name</entry>
739             <entry align='center'>Example</entry>
740             <entry align='center'>Description</entry>
741           </row>
742         </thead>
743         <tbody>
744           <row>
745             <entry>0</entry>
746             <entry>length</entry>
747             <entry>22</entry>
748             <entry>Total length of data bytes in the line. Note that
749             this includes the added RSSI and status bytes</entry>
750           </row>
751           <row>
752             <entry>1 ·· length-3</entry>
753             <entry>packet</entry>
754             <entry>4f ·· 00</entry>
755             <entry>Bytes of actual packet data</entry>
756           </row>
757           <row>
758             <entry>length-2</entry>
759             <entry>rssi</entry>
760             <entry>3f</entry>
761             <entry>Received signal strength. dBm = rssi / 2 - 74</entry>
762           </row>
763           <row>
764             <entry>length-1</entry>
765             <entry>lqi</entry>
766             <entry>a9</entry>
767             <entry>Link Quality Indicator and CRC status. Bit 7
768             is set when the CRC is correct</entry>
769           </row>
770           <row>
771             <entry>length</entry>
772             <entry>checksum</entry>
773             <entry>88</entry>
774             <entry>(0x5a + sum(bytes 1 ·· length-1)) % 256</entry>
775           </row>
776         </tbody>
777       </tgroup>
778     </table>
779   </section>
780   <section>
781     <title>History and Motivation</title>
782     <para>
783       The original AltoOS telemetry mechanism encoded everything
784       available piece of information on the TeleMetrum hardware into a
785       single unified packet. Initially, the packets contained very
786       little data—some raw sensor readings along with the current GPS
787       coordinates when a GPS receiver was connected. Over time, the
788       amount of data grew to include sensor calibration data, GPS
789       satellite information and a host of internal state information
790       designed to help diagnose flight failures in case of a loss of
791       the on-board flight data.
792     </para>
793     <para>
794       Because every packet contained all of the data, packets were
795       huge—95 bytes long. Much of the information was also specific to
796       the TeleMetrum hardware. With the introduction of the TeleMini
797       flight computer, most of the data contained in the telemetry
798       packets was unavailable. Initially, a shorter, but still
799       comprehensive packet was implemented. This required that the
800       ground station be pre-configured as to which kind of packet to
801       expect.
802     </para>
803     <para>
804       The development of several companion boards also made the
805       shortcomings evident—each companion board would want to include
806       telemetry data in the radio link; with the original design, the
807       packet would have to hold the new data as well, requiring
808       additional TeleMetrum and ground station changes.
809     </para>
810   </section>
811 </article>