e75e10b58a52b35613493dabc6e68e4e1cd5d8d6
[fw/altos] / doc / telemetrum-doc.xsl
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd">
4 <book>
5   <title>TeleMetrum</title>
6   <subtitle>Owner's Manual for the TeleMetrum System</subtitle>
7   <bookinfo>
8     <author>
9       <firstname>Bdale</firstname>
10       <surname>Garbee</surname>
11     </author>
12     <author>
13       <firstname>Keith</firstname>
14       <surname>Packard</surname>
15     </author>
16     <copyright>
17       <year>2010</year>
18       <holder>Bdale Garbee and Keith Packard</holder>
19     </copyright>
20     <legalnotice>
21       <para>
22         This document is released under the terms of the 
23         <ulink url="http://creativecommons.org/licenses/by-sa/3.0/">
24           Creative Commons ShareAlike 3.0
25         </ulink>
26         license.
27       </para>
28     </legalnotice>
29     <revhistory>
30       <revision>
31         <revnumber>0.8</revnumber>
32         <date>24 November 2010</date>
33         <revremark>Updated for software version 0.8 </revremark>
34       </revision>
35     </revhistory>
36   </bookinfo>
37   <chapter>
38     <title>Introduction and Overview</title>
39     <para>
40       Welcome to the Altus Metrum community!  Our circuits and software reflect
41       our passion for both hobby rocketry and Free Software.  We hope their
42       capabilities and performance will delight you in every way, but by
43       releasing all of our hardware and software designs under open licenses,
44       we also hope to empower you to take as active a role in our collective
45       future as you wish!
46     </para>
47     <para>
48       The focal point of our community is TeleMetrum, a dual deploy altimeter 
49       with fully integrated GPS and radio telemetry as standard features, and
50       a "companion interface" that will support optional capabilities in the 
51       future.
52     </para>
53     <para>    
54       Complementing TeleMetrum is TeleDongle, a USB to RF interface for 
55       communicating with TeleMetrum.  Combined with your choice of antenna and 
56       notebook computer, TeleDongle and our associated user interface software
57       form a complete ground station capable of logging and displaying in-flight
58       telemetry, aiding rocket recovery, then processing and archiving flight
59       data for analysis and review.
60     </para>
61     <para>
62       More products will be added to the Altus Metrum family over time, and
63       we currently envision that this will be a single, comprehensive manual
64       for the entire product family.
65     </para>
66   </chapter>
67   <chapter>
68     <title>Getting Started</title>
69     <para>
70       This chapter began as "The Mere-Mortals Quick Start/Usage Guide to 
71       the Altus Metrum Starter Kit" by Bob Finch, W9YA, NAR 12965, TRA 12350, 
72       w9ya@amsat.org.  Bob was one of our first customers for a production
73       TeleMetrum, and the enthusiasm that led to his contribution of this
74       section is immensely gratifying and highy appreciated!
75     </para>
76     <para>
77       The first thing to do after you check the inventory of parts in your 
78       "starter kit" is to charge the battery by plugging it into the 
79       corresponding socket of the TeleMetrum and then using the USB A to 
80 mini B 
81       cable to plug the Telemetrum into your computer's USB socket. The 
82       TeleMetrum circuitry will charge the battery whenever it is plugged 
83       in, because the TeleMetrum's on-off switch does NOT control the
84       charging circuitry.  When the GPS chip is initially searching for
85       satellites, TeleMetrum will consume more current than it can pull
86       from the usb port, so the battery must be attached in order to get
87       satellite lock.  Once GPS is locked, the current consumption goes back
88       down enough to enable charging while 
89       running. So it's a good idea to fully charge the battery as your 
90       first item of business so there is no issue getting and maintaining 
91       satellite lock.  The yellow charge indicator led will go out when the 
92       battery is nearly full and the charger goes to trickle charge. It
93         can takeseveral hours to fully recharge a deeply discharged battery.
94     </para>
95     <para>
96       The other active device in the starter kit is the TeleDongle USB to
97       RF interface.  If you plug it in to your Mac or Linux computer it should
98       "just work", showing up as a serial port device.  Windows systems need
99       driver information that is part of the AltOS download to know that the
100       existing USB modem driver will work.  If you are using Linux and are
101       having problems, try moving to a fresher kernel (2.6.33 or newer), as
102         the USB serial driver had ugly bugs in some earlier versions.
103     </para>
104     <para>
105       Next you should obtain and install the AltOS utilities.  These include
106       the AltosUI ground station program, current firmware images for
107       TeleMetrum and TeleDongle, and a number of standalone utilities that
108       are rarely needed.  Pre-built binary packages are available for Debian
109       Linux, Microsoft Windows, and recent MacOSX versions.  Full sourcecode
110       and build instructions for some other Linux variants are also available.
111       The latest version may always be downloaded from
112       http://altusmetrum.org/AltOS.
113     </para>
114     <para>
115       Both Telemetrum and TeleDongle can be directly communicated 
116       with using USB ports. The first thing you should try after getting 
117       both units plugged into to your computer's usb port(s) is to run 
118       'ao-list' from a terminal-window to see what port-device-name each 
119       device has been assigned by the operating system. 
120       You will need this information to access the devices via their 
121       respective on-board firmware and data using other command line
122       programs in the AltOS software suite.
123     </para>
124     <para>
125       To access the device's firmware for configuration you need a terminal
126       program such as you would use to talk to a modem.  The software 
127       authors prefer using the program 'cu' which comes from the UUCP package
128       on most Unix-like systems such as Linux.  An example command line for
129       cu might be 'cu -l /dev/ttyACM0', substituting the correct number 
130       indicated from running the
131       ao-list program.  Another reasonable terminal program for Linux is
132       'cutecom'.  The default 'escape' 
133       character used by CU (i.e. the character you use to
134       issue commands to cu itself instead of sending the command as input 
135       to the connected device) is a '~'. You will need this for use in 
136       only two different ways during normal operations. First is to exit 
137       the program by sending a '~.' which is called a 'escape-disconnect' 
138       and allows you to close-out from 'cu'. The
139       second use will be outlined later.
140     </para>
141     <para>
142       Both TeleMetrum and TeleDongle share the concept of a two level 
143       command set in their firmware.  
144       The first layer has several single letter commands. Once 
145       you are using 'cu' (or 'cutecom') sending (typing) a '?' 
146       returns a full list of these
147       commands. The second level are configuration sub-commands accessed 
148       using the 'c' command, for 
149       instance typing 'c?' will give you this second level of commands 
150       (all of which require the
151       letter 'c' to access).  Please note that most configuration options
152       are stored only in DataFlash memory, and only TeleMetrum has this
153       memory to save the various values entered like the channel number 
154       and your callsign when powered off.  TeleDongle requires that you
155       set these each time you plug it in, which ao-view can help with.
156     </para>
157     <para>
158       Try setting these config ('c' or second level menu) values.  A good
159       place to start is by setting your call sign.  By default, the boards
160       use 'N0CALL' which is cute, but not exactly legal!
161       Spend a few minutes getting comfortable with the units, their 
162       firmware, and 'cu' (or possibly 'cutecom').
163       For instance, try to send 
164       (type) a 'c r 2' and verify the channel change by sending a 'c s'. 
165       Verify you can connect and disconnect from the units while in your
166       terminal program by sending the escape-disconnect mentioned above.
167     </para>
168     <para>
169       Note that the 'reboot' command, which is very useful on TeleMetrum, 
170       will likely just cause problems with the dongle.  The *correct* way
171       to reset the dongle is just to unplug and re-plug it.
172     </para>
173     <para>
174       A fun thing to do at the launch site and something you can do while 
175       learning how to use these units is to play with the rf-link access 
176       of the TeleMetrum from the TeleDongle.  Be aware that you *must* create
177       some physical separation between the devices, otherwise the link will 
178       not function due to signal overload in the receivers in each device.
179     </para>
180     <para>
181       Now might be a good time to take a break and read the rest of this
182       manual, particularly about the two "modes" that the TeleMetrum 
183       can be placed in and how the position of the TeleMetrum when booting 
184       up will determine whether the unit is in "pad" or "idle" mode.
185     </para>
186     <para>
187       You can access a TeleMetrum in idle mode from the Teledongle's USB 
188       connection using the rf link
189       by issuing a 'p' command to the TeleDongle. Practice connecting and
190       disconnecting ('~~' while using 'cu') from the TeleMetrum.  If 
191       you cannot escape out of the "p" command, (by using a '~~' when in 
192       CU) then it is likely that your kernel has issues.  Try a newer version.
193     </para>
194     <para>
195       Using this rf link allows you to configure the TeleMetrum, test 
196       fire e-matches and igniters from the flight line, check pyro-match 
197       continuity and so forth. You can leave the unit turned on while it 
198       is in 'idle mode' and then place the
199       rocket vertically on the launch pad, walk away and then issue a 
200       reboot command.  The TeleMetrum will reboot and start sending data 
201       having changed to the "pad" mode. If the TeleDongle is not receiving 
202       this data, you can disconnect 'cu' from the Teledongle using the 
203       procedures mentioned above and THEN connect to the TeleDongle from 
204       inside 'ao-view'. If this doesn't work, disconnect from the
205       TeleDongle, unplug it, and try again after plugging it back in.
206     </para>
207     <para>
208       Eventually the GPS will find enough satellites, lock in on them, 
209       and 'ao-view' will both auditorially announce and visually indicate 
210       that GPS is ready.
211       Now you can launch knowing that you have a good data path and 
212       good satellite lock for flight data and recovery.  Remember 
213       you MUST tell ao-view to connect to the TeleDongle explicitly in 
214       order for ao-view to be able to receive data.
215     </para>
216     <para>
217       Both RDF (radio direction finding) tones from the TeleMetrum and 
218       GPS trekking data are available and together are very useful in 
219       locating the rocket once it has landed. (The last good GPS data 
220       received before touch-down will be on the data screen of 'ao-view'.)
221     </para>
222     <para>
223       Once you have recovered the rocket you can download the eeprom 
224       contents using either 'ao-dumplog' (or possibly 'ao-eeprom'), over
225       either a USB cable or over the radio link using TeleDongle.
226       And by following the man page for 'ao-postflight' you can create 
227       various data output reports, graphs, and even kml data to see the 
228       flight trajectory in google-earth. (Moving the viewing angle making 
229       sure to connect the yellow lines while in google-earth is the proper
230       technique.)
231     </para>
232     <para>
233       As for ao-view.... some things are in the menu but don't do anything 
234       very useful.  The developers have stopped working on ao-view to focus
235       on a new, cross-platform ground station program.  So ao-view may or 
236       may not be updated in the future.  Mostly you just use 
237       the Log and Device menus.  It has a wonderful display of the incoming 
238       flight data and I am sure you will enjoy what it has to say to you 
239       once you enable the voice output!
240     </para>
241     <section>
242       <title>FAQ</title>
243       <para>
244         The altimeter (TeleMetrum) seems to shut off when disconnected from the
245         computer.  Make sure the battery is adequately charged.  Remember the
246         unit will pull more power than the USB port can deliver before the 
247         GPS enters "locked" mode.  The battery charges best when TeleMetrum
248         is turned off.
249       </para>
250       <para>
251         It's impossible to stop the TeleDongle when it's in "p" mode, I have
252         to unplug the USB cable?  Make sure you have tried to "escape out" of 
253         this mode.  If this doesn't work the reboot procedure for the 
254         TeleDongle *is* to simply unplug it. 'cu' however will retain it's 
255         outgoing buffer IF your "escape out" ('~~') does not work. 
256         At this point using either 'ao-view' (or possibly
257         'cutemon') instead of 'cu' will 'clear' the issue and allow renewed
258         communication.
259       </para>
260       <para>
261         The amber LED (on the TeleMetrum/altimeter) lights up when both 
262         battery and USB are connected. Does this mean it's charging? 
263         Yes, the yellow LED indicates the charging at the 'regular' rate. 
264         If the led is out but the unit is still plugged into a USB port, 
265         then the battery is being charged at a 'trickle' rate.
266       </para>
267       <para>
268         There are no "dit-dah-dah-dit" sound like the manual mentions?
269         That's the "pad" mode.  Weak batteries might be the problem.
270         It is also possible that the unit is horizontal and the output 
271         is instead a "dit-dit" meaning 'idle'.
272       </para>
273       <para>
274         It's unclear how to use 'ao-view' and other programs when 'cu' 
275         is running. You cannot have more than one program connected to 
276         the TeleDongle at one time without apparent data loss as the 
277         incoming data will not make it to both programs intact. 
278         Disconnect whatever programs aren't currently being used.
279       </para>
280       <para>
281         How do I save flight data?   
282         Live telemetry is written to file(s) whenever 'ao-view' is connected 
283         to the TeleDongle.  The file area defaults to ~/altos
284         but is easily changed using the menus in 'ao-view'. The files that 
285         are written end in '.telem'. The after-flight
286         data-dumped files will end in .eeprom and represent continuous data 
287         unlike the rf-linked .telem files that are subject to the 
288         turnarounds/data-packaging time slots in the half-duplex rf data path. 
289         See the above instructions on what and how to save the eeprom stored 
290         data after physically retrieving your TeleMetrum.  Make sure to save
291         the on-board data after each flight, as the current firmware will
292         over-write any previous flight data during a new flight.
293       </para>
294     </section>
295   </chapter>
296   <chapter>
297     <title>Specifications</title>
298     <itemizedlist>
299       <listitem>
300         <para>
301           Recording altimeter for model rocketry.
302         </para>
303       </listitem>
304       <listitem>
305         <para>
306           Supports dual deployment (can fire 2 ejection charges).
307         </para>
308       </listitem>
309       <listitem>
310         <para>
311           70cm ham-band transceiver for telemetry downlink.
312         </para>
313       </listitem>
314       <listitem>
315         <para>
316           Barometric pressure sensor good to 45k feet MSL.
317         </para>
318       </listitem>
319       <listitem>
320         <para>
321           1-axis high-g accelerometer for motor characterization, capable of 
322           +/- 50g using default part.
323         </para>
324       </listitem>
325       <listitem>
326         <para>
327           On-board, integrated GPS receiver with 5hz update rate capability.
328         </para>
329       </listitem>
330       <listitem>
331         <para>
332           On-board 1 megabyte non-volatile memory for flight data storage.
333         </para>
334       </listitem>
335       <listitem>
336         <para>
337           USB interface for battery charging, configuration, and data recovery.
338         </para>
339       </listitem>
340       <listitem>
341         <para>
342           Fully integrated support for LiPo rechargeable batteries.
343         </para>
344       </listitem>
345       <listitem>
346         <para>
347           Uses LiPo to fire e-matches, support for optional separate pyro 
348           battery if needed.
349         </para>
350       </listitem>
351       <listitem>
352         <para>
353           2.75 x 1 inch board designed to fit inside 29mm airframe coupler tube.
354         </para>
355       </listitem>
356     </itemizedlist>
357   </chapter>
358   <chapter>
359     <title>Handling Precautions</title>
360     <para>
361       TeleMetrum is a sophisticated electronic device.  When handled gently and
362       properly installed in an airframe, it will deliver impressive results.
363       However, like all electronic devices, there are some precautions you
364       must take.
365     </para>
366     <para>
367       The Lithium Polymer rechargeable batteries used with TeleMetrum have an 
368       extraordinary power density.  This is great because we can fly with
369       much less battery mass than if we used alkaline batteries or previous
370       generation rechargeable batteries... but if they are punctured 
371       or their leads are allowed to short, they can and will release their 
372       energy very rapidly!
373       Thus we recommend that you take some care when handling our batteries 
374       and consider giving them some extra protection in your airframe.  We 
375       often wrap them in suitable scraps of closed-cell packing foam before 
376       strapping them down, for example.
377     </para>
378     <para>
379       The TeleMetrum barometric sensor is sensitive to sunlight.  In normal 
380       mounting situations, it and all of the other surface mount components 
381       are "down" towards whatever the underlying mounting surface is, so
382       this is not normally a problem.  Please consider this, though, when
383       designing an installation, for example, in a 29mm airframe with a 
384       see-through plastic payload bay.
385     </para>
386     <para>
387       The TeleMetrum barometric sensor sampling port must be able to 
388       "breathe",
389       both by not being covered by foam or tape or other materials that might
390       directly block the hole on the top of the sensor, but also by having a
391       suitable static vent to outside air.  
392     </para>
393     <para>
394       As with all other rocketry electronics, TeleMetrum must be protected 
395       from exposure to corrosive motor exhaust and ejection charge gasses.
396     </para>
397   </chapter>
398   <chapter>
399     <title>Hardware Overview</title>
400     <para>
401       TeleMetrum is a 1 inch by 2.75 inch circuit board.  It was designed to
402       fit inside coupler for 29mm airframe tubing, but using it in a tube that
403       small in diameter may require some creativity in mounting and wiring 
404       to succeed!  The default 1/4
405       wave UHF wire antenna attached to the center of the nose-cone end of
406       the board is about 7 inches long, and wiring for a power switch and
407       the e-matches for apogee and main ejection charges depart from the 
408       fin can end of the board.  Given all this, an ideal "simple" avionics 
409       bay for TeleMetrum should have at least 10 inches of interior length.
410     </para>
411     <para>
412       A typical TeleMetrum installation using the on-board GPS antenna and
413       default wire UHF antenna involves attaching only a suitable
414       Lithium Polymer battery, a single pole switch for power on/off, and 
415       two pairs of wires connecting e-matches for the apogee and main ejection
416       charges.  
417     </para>
418     <para>
419       By default, we use the unregulated output of the LiPo battery directly
420       to fire ejection charges.  This works marvelously with standard 
421       low-current e-matches like the J-Tek from MJG Technologies, and with 
422       Quest Q2G2 igniters.  However, if you
423       want or need to use a separate pyro battery, you can do so by adding
424       a second 2mm connector to position B2 on the board and cutting the
425       thick pcb trace connecting the LiPo battery to the pyro circuit between
426       the two silk screen marks on the surface mount side of the board shown
427       here [insert photo]
428     </para>
429     <para>
430       We offer two choices of pyro and power switch connector, or you can 
431       choose neither and solder wires directly to the board.  All three choices
432       are reasonable depending on the constraints of your airframe.  Our
433       favorite option when there is sufficient room above the board is to use
434       the Tyco pin header with polarization and locking.  If you choose this
435       option, you crimp individual wires for the power switch and e-matches
436       into a mating connector, and installing and removing the TeleMetrum
437       board from an airframe is as easy as plugging or unplugging two 
438       connectors.  If the airframe will not support this much height or if
439       you want to be able to directly attach e-match leads to the board, we
440       offer a screw terminal block.  This is very similar to what most other
441       altimeter vendors provide and so may be the most familiar option.  
442       You'll need a very small straight blade screwdriver to connect
443       and disconnect the board in this case, such as you might find in a
444       jeweler's screwdriver set.  Finally, you can forego both options and
445       solder wires directly to the board, which may be the best choice for
446       minimum diameter and/or minimum mass designs. 
447     </para>
448     <para>
449       For most airframes, the integrated GPS antenna and wire UHF antenna are
450       a great combination.  However, if you are installing in a carbon-fiber
451       electronics bay which is opaque to RF signals, you may need to use 
452       off-board external antennas instead.  In this case, you can order
453       TeleMetrum with an SMA connector for the UHF antenna connection, and
454       you can unplug the integrated GPS antenna and select an appropriate 
455       off-board GPS antenna with cable terminating in a U.FL connector.
456     </para>
457   </chapter>
458   <chapter>
459     <title>System Operation</title>
460     <section>
461       <title>Firmware Modes </title>
462       <para>
463         The AltOS firmware build for TeleMetrum has two fundamental modes,
464         "idle" and "flight".  Which of these modes the firmware operates in
465         is determined by the orientation of the rocket (well, actually the
466         board, of course...) at the time power is switched on.  If the rocket
467         is "nose up", then TeleMetrum assumes it's on a rail or rod being
468         prepared for launch, so the firmware chooses flight mode.  However,
469         if the rocket is more or less horizontal, the firmware instead enters
470         idle mode.
471       </para>
472       <para>
473         At power on, you will hear three beeps 
474         ("S" in Morse code for startup) and then a pause while 
475         TeleMetrum completes initialization and self tests, and decides which
476         mode to enter next.
477       </para>
478       <para>
479         In flight or "pad" mode, TeleMetrum turns on the GPS system, 
480         engages the flight
481         state machine, goes into transmit-only mode on the RF link sending 
482         telemetry, and waits for launch to be detected.  Flight mode is
483         indicated by an audible "di-dah-dah-dit" ("P" for pad) on the 
484         beeper, followed by
485         beeps indicating the state of the pyrotechnic igniter continuity.
486         One beep indicates apogee continuity, two beeps indicate
487         main continuity, three beeps indicate both apogee and main continuity,
488         and one longer "brap" sound indicates no continuity.  For a dual
489         deploy flight, make sure you're getting three beeps before launching!
490         For apogee-only or motor eject flights, do what makes sense.
491       </para>
492       <para>
493         In idle mode, you will hear an audible "di-dit" ("I" for idle), and
494         the normal flight state machine is disengaged, thus
495         no ejection charges will fire.  TeleMetrum also listens on the RF
496         link when in idle mode for packet mode requests sent from TeleDongle.
497         Commands can be issued to a TeleMetrum in idle mode over either
498         USB or the RF link equivalently.
499         Idle mode is useful for configuring TeleMetrum, for extracting data 
500         from the on-board storage chip after flight, and for ground testing
501         pyro charges.
502       </para>
503       <para>
504         One "neat trick" of particular value when TeleMetrum is used with very
505         large airframes, is that you can power the board up while the rocket
506         is horizontal, such that it comes up in idle mode.  Then you can 
507         raise the airframe to launch position, use a TeleDongle to open
508         a packet connection, and issue a 'reset' command which will cause
509         TeleMetrum to reboot, realize it's now nose-up, and thus choose
510         flight mode.  This is much safer than standing on the top step of a
511         rickety step-ladder or hanging off the side of a launch tower with
512         a screw-driver trying to turn on your avionics before installing
513         igniters!
514       </para>
515     </section>
516     <section>
517       <title>GPS </title>
518       <para>
519         TeleMetrum includes a complete GPS receiver.  See a later section for
520         a brief explanation of how GPS works that will help you understand
521         the information in the telemetry stream.  The bottom line is that
522         the TeleMetrum GPS receiver needs to lock onto at least four 
523         satellites to obtain a solid 3 dimensional position fix and know 
524         what time it is!
525       </para>
526       <para>
527         TeleMetrum provides backup power to the GPS chip any time a LiPo
528         battery is connected.  This allows the receiver to "warm start" on
529         the launch rail much faster than if every power-on were a "cold start"
530         for the GPS receiver.  In typical operations, powering up TeleMetrum
531         on the flight line in idle mode while performing final airframe
532         preparation will be sufficient to allow the GPS receiver to cold
533         start and acquire lock.  Then the board can be powered down during
534         RSO review and installation on a launch rod or rail.  When the board
535         is turned back on, the GPS system should lock very quickly, typically
536         long before igniter installation and return to the flight line are
537         complete.
538       </para>
539     </section>
540     <section>
541       <title>Ground Testing </title>
542       <para>
543         An important aspect of preparing a rocket using electronic deployment
544         for flight is ground testing the recovery system.  Thanks
545         to the bi-directional RF link central to the Altus Metrum system, 
546         this can be accomplished in a TeleMetrum-equipped rocket without as
547         much work as you may be accustomed to with other systems.  It can
548         even be fun!
549       </para>
550       <para>
551         Just prep the rocket for flight, then power up TeleMetrum while the
552         airframe is horizontal.  This will cause the firmware to go into 
553         "idle" mode, in which the normal flight state machine is disabled and
554         charges will not fire without manual command.  Then, establish an
555         RF packet connection from a TeleDongle-equipped computer using the 
556         P command from a safe distance.  You can now command TeleMetrum to
557         fire the apogee or main charges to complete your testing.
558       </para>
559       <para>
560         In order to reduce the chance of accidental firing of pyrotechnic
561         charges, the command to fire a charge is intentionally somewhat
562         difficult to type, and the built-in help is slightly cryptic to 
563         prevent accidental echoing of characters from the help text back at
564         the board from firing a charge.  The command to fire the apogee
565         drogue charge is 'i DoIt drogue' and the command to fire the main
566         charge is 'i DoIt main'.
567       </para>
568     </section>
569     <section>
570       <title>Radio Link </title>
571       <para>
572         The chip our boards are based on incorporates an RF transceiver, but
573         it's not a full duplex system... each end can only be transmitting or
574         receiving at any given moment.  So we had to decide how to manage the
575         link.
576       </para>
577       <para>
578         By design, TeleMetrum firmware listens for an RF connection when
579         it's in "idle mode" (turned on while the rocket is horizontal), which
580         allows us to use the RF link to configure the rocket, do things like
581         ejection tests, and extract data after a flight without having to 
582         crack open the airframe.  However, when the board is in "flight 
583         mode" (turned on when the rocket is vertical) the TeleMetrum only 
584         transmits and doesn't listen at all.  That's because we want to put 
585         ultimate priority on event detection and getting telemetry out of 
586         the rocket and out over
587         the RF link in case the rocket crashes and we aren't able to extract
588         data later... 
589       </para>
590       <para>
591         We don't use a 'normal packet radio' mode because they're just too
592         inefficient.  The GFSK modulation we use is just FSK with the 
593         baseband pulses passed through a
594         Gaussian filter before they go into the modulator to limit the
595         transmitted bandwidth.  When combined with the hardware forward error
596         correction support in the cc1111 chip, this allows us to have a very
597         robust 38.4 kilobit data link with only 10 milliwatts of transmit power,
598         a whip antenna in the rocket, and a hand-held Yagi on the ground.  We've
599         had flights to above 21k feet AGL with good reception, and calculations
600         suggest we should be good to well over 40k feet AGL with a 5-element yagi on
601         the ground.  We hope to fly boards to higher altitudes soon, and would
602         of course appreciate customer feedback on performance in higher
603         altitude flights!
604       </para>
605     </section>
606     <section>
607       <title>Configurable Parameters</title>
608       <para>
609         Configuring a TeleMetrum board for flight is very simple.  Because we
610         have both acceleration and pressure sensors, there is no need to set
611         a "mach delay", for example.  The few configurable parameters can all
612         be set using a simple terminal program over the USB port or RF link
613         via TeleDongle.
614       </para>
615       <section>
616         <title>Radio Channel</title>
617         <para>
618           Our firmware supports 10 channels.  The default channel 0 corresponds
619           to a center frequency of 434.550 Mhz, and channels are spaced every 
620           100 khz.  Thus, channel 1 is 434.650 Mhz, and channel 9 is 435.550 Mhz.
621           At any given launch, we highly recommend coordinating who will use
622           each channel and when to avoid interference.  And of course, both 
623           TeleMetrum and TeleDongle must be configured to the same channel to
624           successfully communicate with each other.
625         </para>
626         <para>
627           To set the radio channel, use the 'c r' command, like 'c r 3' to set
628           channel 3.  
629           As with all 'c' sub-commands, follow this with a 'c w' to write the 
630           change to the parameter block in the on-board DataFlash chip on
631           your TeleMetrum board if you want the change to stay in place across reboots.
632         </para>
633       </section>
634       <section>
635         <title>Apogee Delay</title>
636         <para>
637           Apogee delay is the number of seconds after TeleMetrum detects flight
638           apogee that the drogue charge should be fired.  In most cases, this
639           should be left at the default of 0.  However, if you are flying
640           redundant electronics such as for an L3 certification, you may wish 
641           to set one of your altimeters to a positive delay so that both 
642           primary and backup pyrotechnic charges do not fire simultaneously.
643         </para>
644         <para>
645           To set the apogee delay, use the [FIXME] command.
646           As with all 'c' sub-commands, follow this with a 'c w' to write the 
647           change to the parameter block in the on-board DataFlash chip.
648         </para>
649         <para>
650           Please note that the TeleMetrum apogee detection algorithm always
651           fires a fraction of a second *after* apogee.  If you are also flying
652           an altimeter like the PerfectFlite MAWD, which only supports selecting
653           0 or 1 seconds of apogee delay, you may wish to set the MAWD to 0
654           seconds delay and set the TeleMetrum to fire your backup 2 or 3
655           seconds later to avoid any chance of both charges firing 
656           simultaneously.  We've flown several airframes this way quite happily,
657           including Keith's successful L3 cert.
658         </para>
659       </section>
660       <section>
661         <title>Main Deployment Altitude</title>
662         <para>
663           By default, TeleMetrum will fire the main deployment charge at an
664           elevation of 250 meters (about 820 feet) above ground.  We think this
665           is a good elevation for most airframes, but feel free to change this 
666           to suit.  In particular, if you are flying two altimeters, you may
667           wish to set the
668           deployment elevation for the backup altimeter to be something lower
669           than the primary so that both pyrotechnic charges don't fire
670           simultaneously.
671         </para>
672         <para>
673           To set the main deployment altitude, use the [FIXME] command.
674           As with all 'c' sub-commands, follow this with a 'c w' to write the 
675           change to the parameter block in the on-board DataFlash chip.
676         </para>
677       </section>
678     </section>
679     <section>
680       <title>Calibration</title>
681       <para>
682         There are only two calibrations required for a TeleMetrum board, and
683         only one for TeleDongle.
684       </para>
685       <section>
686         <title>Radio Frequency</title>
687         <para>
688           The radio frequency is synthesized from a clock based on the 48 Mhz
689           crystal on the board.  The actual frequency of this oscillator must be
690           measured to generate a calibration constant.  While our GFSK modulation
691           bandwidth is wide enough to allow boards to communicate even when 
692           their oscillators are not on exactly the same frequency, performance
693           is best when they are closely matched.
694           Radio frequency calibration requires a calibrated frequency counter.
695           Fortunately, once set, the variation in frequency due to aging and
696           temperature changes is small enough that re-calibration by customers
697           should generally not be required.
698         </para>
699         <para>
700           To calibrate the radio frequency, connect the UHF antenna port to a
701           frequency counter, set the board to channel 0, and use the 'C' 
702           command to generate a CW carrier.  Wait for the transmitter temperature
703           to stabilize and the frequency to settle down.  
704           Then, divide 434.550 Mhz by the 
705           measured frequency and multiply by the current radio cal value show
706           in the 'c s' command.  For an unprogrammed board, the default value
707           is 1186611.  Take the resulting integer and program it using the 'c f'
708           command.  Testing with the 'C' command again should show a carrier
709           within a few tens of Hertz of the intended frequency.
710           As with all 'c' sub-commands, follow this with a 'c w' to write the 
711           change to the parameter block in the on-board DataFlash chip.
712         </para>
713       </section>
714       <section>
715         <title>Accelerometer</title>
716         <para>
717           The accelerometer we use has its own 5 volt power supply and
718           the output must be passed through a resistive voltage divider to match
719           the input of our 3.3 volt ADC.  This means that unlike the barometric
720           sensor, the output of the acceleration sensor is not ratiometric to 
721           the ADC converter, and calibration is required.  We also support the 
722           use of any of several accelerometers from a Freescale family that 
723           includes at least +/- 40g, 50g, 100g, and 200g parts.  Using gravity,
724           a simple 2-point calibration yields acceptable results capturing both
725           the different sensitivities and ranges of the different accelerometer
726           parts and any variation in power supply voltages or resistor values
727           in the divider network.
728         </para>
729         <para>
730           To calibrate the acceleration sensor, use the 'c a 0' command.  You
731           will be prompted to orient the board vertically with the UHF antenna
732           up and press a key, then to orient the board vertically with the 
733           UHF antenna down and press a key.
734           As with all 'c' sub-commands, follow this with a 'c w' to write the 
735           change to the parameter block in the on-board DataFlash chip.
736         </para>
737         <para>
738           The +1g and -1g calibration points are included in each telemetry
739           frame and are part of the header extracted by ao-dumplog after flight.
740           Note that we always store and return raw ADC samples for each
741           sensor... nothing is permanently "lost" or "damaged" if the 
742           calibration is poor.
743         </para>
744         <para>
745          In the unlikely event an accel cal that goes badly, it is possible
746          that TeleMetrum may always come up in 'pad mode' and as such not be
747          listening to either the USB or radio interfaces.  If that happens,
748          there is a special hook in the firmware to force the board back
749          in to 'idle mode' so you can re-do the cal.  To use this hook, you
750          just need to ground the SPI clock pin at power-on.  This pin is
751          available as pin 2 on the 8-pin companion connector, and pin 1 is
752          ground.  So either carefully install a fine-gauge wire jumper
753          between the two pins closest to the index hole end of the 8-pin
754          connector, or plug in the programming cable to the 8-pin connector
755          and use a small screwdriver or similar to short the two pins closest
756          to the index post on the 4-pin end of the programming cable, and
757          power up the board.  It should come up in 'idle mode' (two beeps).
758         </para>
759       </section>
760     </section>
761
762
763
764   <section>
765     <title>Updating Device Firmware</title>
766     <para>
767       The big conceptual thing to realize is that you have to use a
768       TeleDongle as a programmer to update a TeleMetrum, and vice versa.
769       Due to limited memory resources in the cc1111, we don't support
770       programming either unit directly over USB.
771     </para>
772     <para>
773       You may wish to begin by ensuring you have current firmware images.
774       These are distributed as part of the AltOS software bundle that
775       also includes the AltosUI ground station program.  Newer ground
776       station versions typically work fine with older firmware versions, 
777       so you don't need to update your devices just to try out new 
778       software features.  You can always download the most recent 
779       version from http://www.altusmetrum.org/AltOS/.
780     </para>
781     <para>
782       We recommend updating TeleMetrum first, before updating TeleDongle.
783     </para>
784     <section>
785       <title>Updating TeleMetrum Firmware</title>
786       <orderedlist inheritnum='inherit' numeration='arabic'>
787         <listitem> 
788           Find the 'programming cable' that you got as part of the starter
789           kit, that has a red 8-pin MicroMaTch connector on one end and a
790           red 4-pin MicroMaTch connector on the other end.  
791         </listitem>
792         <listitem> 
793           Take the 2 screws out of the TeleDongle case to get access 
794           to the circuit board.  
795         </listitem>
796         <listitem>
797           Plug the 8-pin end of the programming cable to the
798           matching connector on the TeleDongle, and the 4-pin end to the
799           matching connector on the TeleMetrum.  
800           Note that each MicroMaTch connector has an alignment pin that
801           goes through a hole in the PC board when you have the cable
802           oriented correctly.
803         </listitem>
804         <listitem>
805           Attach a battery to the TeleMetrum board.
806         </listitem>
807         <listitem>
808           Plug the TeleDongle into your computer's USB port, and power 
809           up the TeleMetrum. 
810         </listitem>
811         <listitem>
812           Run AltosUI, and select 'Flash Image' from the File menu.
813         </listitem>
814         <listitem>
815           Pick the TeleDongle device from the list, identifying it as the 
816           programming device.
817         </listitem>
818         <listitem>
819           Select the image you want put on the TeleMetrum, which should have a 
820           name in the form telemetrum-v1.0-0.7.1.ihx.  It should be visible 
821         in the default directory, if not you may have to poke around 
822         your system to find it.
823         </listitem>
824         <listitem>
825           Make sure the configuration parameters are reasonable
826           looking. If the serial number and/or RF configuration
827           values aren't right, you'll need to change them.
828         </listitem>
829         <listitem>
830           Hit the 'OK' button and the software should proceed to flash 
831           the TeleMetrum with new firmware, showing a progress bar.
832         </listitem>
833         <listitem>
834           Confirm that the TeleMetrum board seems to have updated ok, which you
835           can do by plugging in to it over USB and using a terminal program
836           to connect to the board and issue the 'v' command to check
837           the version, etc.
838         </listitem>
839         <listitem>
840           If something goes wrong, give it another try.
841         </listitem>
842       </orderedlist>
843     </section>
844     <section>
845       <title>Updating TeleDongle Firmware</title>
846       <para>
847         Updating TeleDongle's firmware is just like updating TeleMetrum
848         firmware, but you switch which board is the programmer and which
849         is the programming target.
850         </para>
851       <orderedlist inheritnum='inherit' numeration='arabic'>
852         <listitem> 
853           Find the 'programming cable' that you got as part of the starter
854           kit, that has a red 8-pin MicroMaTch connector on one end and a
855           red 4-pin MicroMaTch connector on the other end.  
856         </listitem>
857         <listitem>
858           Find the USB cable that you got as part of the starter kit, and
859           plug the "mini" end in to the mating connector on TeleMetrum.
860         </listitem>
861         <listitem>
862           Take the 2 screws out of the TeleDongle case to get access 
863           to the circuit board.  
864         </listitem>
865         <listitem>
866           Plug the 8-pin end of the programming cable to the (latching)
867           matching connector on the TeleMetrum, and the 4-pin end to the
868           matching connector on the TeleDongle.  
869           Note that each MicroMaTch connector has an alignment pin that
870           goes through a hole in the PC board when you have the cable
871           oriented correctly.
872         </listitem>
873         <listitem>
874           Attach a battery to the TeleMetrum board.
875         </listitem>
876         <listitem>
877           Plug both TeleMetrum and TeleDongle into your computer's USB 
878           ports, and power up the TeleMetrum. 
879         </listitem>
880         <listitem>
881           Run AltosUI, and select 'Flash Image' from the File menu.
882         </listitem>
883         <listitem>
884           Pick the TeleMetrum device from the list, identifying it as the 
885           programming device.
886         </listitem>
887         <listitem>
888           Select the image you want put on the TeleDongle, which should have a 
889           name in the form teledongle-v0.2-0.7.1.ihx.  It should be visible 
890         in the default directory, if not you may have to poke around 
891         your system to find it.
892         </listitem>
893         <listitem>
894           Make sure the configuration parameters are reasonable
895           looking. If the serial number and/or RF configuration
896           values aren't right, you'll need to change them.  The TeleDongle
897           serial number is on the "bottom" of the circuit board, and can 
898           usually be read through the translucent blue plastic case without
899           needing to remove the board from the case.
900         </listitem>
901         <listitem>
902           Hit the 'OK' button and the software should proceed to flash 
903           the TeleDongle with new firmware, showing a progress bar.
904         </listitem>
905         <listitem>
906           Confirm that the TeleDongle board seems to have updated ok, which you
907           can do by plugging in to it over USB and using a terminal program
908           to connect to the board and issue the 'v' command to check
909           the version, etc.  Once you're happy, remove the programming cable
910           and put the cover back on the TeleDongle.     
911         </listitem>
912         <listitem>
913           If something goes wrong, give it another try.
914         </listitem>
915       </orderedlist>
916       <para>
917         Be careful removing the programming cable from the locking 8-pin
918         connector on TeleMetrum.  You'll need a fingernail or perhaps a thin
919         screwdriver or knife blade to gently pry the locking ears out 
920         slightly to extract the connector.  We used a locking connector on 
921         TeleMetrum to help ensure that the cabling to companion boards 
922         used in a rocket don't ever come loose accidentally in flight.
923       </para>
924     </section>
925   </section>
926
927
928
929   </chapter>
930   <chapter>
931     
932     <title>AltosUI</title>
933     <para>
934       The AltosUI program provides a graphical user interface for
935       interacting with the Altus Metrum product family, including
936       TeleMetrum and TeleDongle. AltosUI can monitor telemetry data,
937       configure TeleMetrum and TeleDongle devices and many other
938       tasks. The primary interface window provides a selection of
939       buttons, one for each major activity in the system.  This manual
940       is split into chapters, each of which documents one of the tasks
941       provided from the top-level toolbar.
942     </para>
943     <section>
944       <title>Packet Command Mode</title>
945       <subtitle>Controlling TeleMetrum Over The Radio Link</subtitle>
946       <para>
947         One of the unique features of the Altos Metrum environment is
948         the ability to create a two way command link between TeleDongle
949         and TeleMetrum using the digital radio transceivers built into
950         each device. This allows you to interact with TeleMetrum from
951         afar, as if it were directly connected to the computer.
952       </para>
953       <para>
954         Any operation which can be performed with TeleMetrum
955         can either be done with TeleMetrum directly connected to
956         the computer via the USB cable, or through the packet
957         link. Simply select the appropriate TeleDongle device when
958         the list of devices is presented and AltosUI will use packet
959         command mode.
960       </para>
961       <itemizedlist>
962         <listitem>
963           <para>
964             Save Flight Data—Recover flight data from the rocket without
965             opening it up.
966           </para>
967         </listitem>
968         <listitem>
969           <para>
970             Configure TeleMetrum—Reset apogee delays or main deploy
971             heights to respond to changing launch conditions. You can
972             also 'reboot' the TeleMetrum device. Use this to remotely
973             enable the flight computer by turning TeleMetrum on while
974             horizontal, then once the airframe is oriented for launch,
975             you can reboot TeleMetrum and have it restart in pad mode
976             without having to climb the scary ladder.
977           </para>
978         </listitem>
979         <listitem>
980           <para>
981             Fire Igniters—Test your deployment charges without snaking
982             wires out through holes in the airframe. Simply assembly the
983             rocket as if for flight with the apogee and main charges
984             loaded, then remotely command TeleMetrum to fire the
985             igniters.
986           </para>
987         </listitem>
988       </itemizedlist>
989       <para>
990         Packet command mode uses the same RF channels as telemetry
991         mode. Configure the desired TeleDongle channel using the
992         flight monitor window channel selector and then close that
993         window before performing the desired operation.
994       </para>
995       <para>
996         TeleMetrum only enables packet command mode in 'idle' mode, so
997         make sure you have TeleMetrum lying horizontally when you turn
998         it on. Otherwise, TeleMetrum will start in 'pad' mode ready for
999         flight and will not be listening for command packets from TeleDongle.
1000       </para>
1001       <para>
1002         When packet command mode is enabled, you can monitor the link
1003         by watching the lights on the TeleDongle and TeleMetrum
1004         devices. The red LED will flash each time TeleDongle or
1005         TeleMetrum transmit a packet while the green LED will light up
1006         on TeleDongle while it is waiting to receive a packet from
1007         TeleMetrum.
1008       </para>
1009     </section>
1010     <section>
1011       <title>Monitor Flight</title>
1012       <subtitle>Receive, Record and Display Telemetry Data</subtitle>
1013       <para>
1014         Selecting this item brings up a dialog box listing all of the
1015         connected TeleDongle devices. When you choose one of these,
1016         AltosUI will create a window to display telemetry data as
1017         received by the selected TeleDongle device.
1018       </para>
1019       <para>
1020         All telemetry data received are automatically recorded in
1021         suitable log files. The name of the files includes the current
1022         date and rocket serial and flight numbers.
1023       </para>
1024       <para>
1025         The radio channel being monitored by the TeleDongle device is
1026         displayed at the top of the window. You can configure the
1027         channel by clicking on the channel box and selecting the desired
1028         channel. AltosUI remembers the last channel selected for each
1029         TeleDongle and selects that automatically the next time you use
1030         that device.
1031       </para>
1032       <para>
1033         Below the TeleDongle channel selector, the window contains a few
1034         significant pieces of information about the TeleMetrum providing
1035         the telemetry data stream:
1036       </para>
1037       <itemizedlist>
1038         <listitem>
1039           <para>The TeleMetrum callsign</para>
1040         </listitem>
1041         <listitem>
1042           <para>The TeleMetrum serial number</para>
1043         </listitem>
1044         <listitem>
1045           <para>The flight number. Each TeleMetrum remembers how many
1046             times it has flown.
1047           </para>
1048         </listitem>
1049         <listitem>
1050           <para>
1051             The rocket flight state. Each flight passes through several
1052             states including Pad, Boost, Fast, Coast, Drogue, Main and
1053             Landed.
1054           </para>
1055         </listitem>
1056         <listitem>
1057           <para>
1058             The Received Signal Strength Indicator value. This lets
1059             you know how strong a signal TeleDongle is receiving. The
1060             radio inside TeleDongle operates down to about -99dBm;
1061             weaker signals may not be receiveable. The packet link uses
1062             error correction and detection techniques which prevent
1063             incorrect data from being reported.
1064           </para>
1065         </listitem>
1066       </itemizedlist>
1067       <para>
1068         Finally, the largest portion of the window contains a set of
1069         tabs, each of which contain some information about the rocket.
1070         They're arranged in 'flight order' so that as the flight
1071         progresses, the selected tab automatically switches to display
1072         data relevant to the current state of the flight. You can select
1073         other tabs at any time. The final 'table' tab contains all of
1074         the telemetry data in one place.
1075       </para>
1076       <section>
1077         <title>Launch Pad</title>
1078         <para>
1079           The 'Launch Pad' tab shows information used to decide when the
1080           rocket is ready for flight. The first elements include red/green
1081           indicators, if any of these is red, you'll want to evaluate
1082           whether the rocket is ready to launch:
1083           <itemizedlist>
1084             <listitem>
1085               <para>
1086                 Battery Voltage. This indicates whether the LiPo battery
1087                 powering the TeleMetrum has sufficient charge to last for
1088                 the duration of the flight. A value of more than
1089                 3.7V is required for a 'GO' status.
1090               </para>
1091             </listitem>
1092             <listitem>
1093               <para>
1094                 Apogee Igniter Voltage. This indicates whether the apogee
1095                 igniter has continuity. If the igniter has a low
1096                 resistance, then the voltage measured here will be close
1097                 to the LiPo battery voltage. A value greater than 3.2V is
1098                 required for a 'GO' status.
1099               </para>
1100             </listitem>
1101             <listitem>
1102               <para>
1103                 Main Igniter Voltage. This indicates whether the main
1104                 igniter has continuity. If the igniter has a low
1105                 resistance, then the voltage measured here will be close
1106                 to the LiPo battery voltage. A value greater than 3.2V is
1107                 required for a 'GO' status.
1108               </para>
1109             </listitem>
1110             <listitem>
1111               <para>
1112                 GPS Locked. This indicates whether the GPS receiver is
1113                 currently able to compute position information. GPS requires
1114                 at least 4 satellites to compute an accurate position.
1115               </para>
1116             </listitem>
1117             <listitem>
1118               <para>
1119                 GPS Ready. This indicates whether GPS has reported at least
1120                 10 consecutive positions without losing lock. This ensures
1121                 that the GPS receiver has reliable reception from the
1122                 satellites.
1123               </para>
1124             </listitem>
1125           </itemizedlist>
1126           <para>
1127             The LaunchPad tab also shows the computed launch pad position
1128             and altitude, averaging many reported positions to improve the
1129             accuracy of the fix.
1130           </para>
1131         </para>
1132       </section>
1133       <section>
1134         <title>Ascent</title>
1135         <para>
1136           This tab is shown during Boost, Fast and Coast
1137           phases. The information displayed here helps monitor the
1138           rocket as it heads towards apogee.
1139         </para>
1140         <para>
1141           The height, speed and acceleration are shown along with the
1142           maxium values for each of them. This allows you to quickly
1143           answer the most commonly asked questions you'll hear during
1144           flight.
1145         </para>
1146         <para>
1147           The current latitude and longitude reported by the GPS are
1148           also shown. Note that under high acceleration, these values
1149           may not get updated as the GPS receiver loses position
1150           fix. Once the rocket starts coasting, the receiver should
1151           start reporting position again.
1152         </para>
1153         <para>
1154           Finally, the current igniter voltages are reported as in the
1155           Launch Pad tab. This can help diagnose deployment failures
1156           caused by wiring which comes loose under high acceleration.
1157         </para>
1158       </section>
1159       <section>
1160         <title>Descent</title>
1161         <para>
1162           Once the rocket has reached apogee and (we hope) activated the
1163           apogee charge, attention switches to tracking the rocket on
1164           the way back to the ground, and for dual-deploy flights,
1165           waiting for the main charge to fire.
1166         </para>
1167         <para>
1168           To monitor whether the apogee charge operated correctly, the
1169           current descent rate is reported along with the current
1170           height. Good descent rates generally range from 15-30m/s.
1171         </para>
1172         <para>
1173           To help locate the rocket in the sky, use the elevation and
1174           bearing information to figure out where to look. Elevation is
1175           in degrees above the horizon. Bearing is reported in degrees
1176           relative to true north. Range can help figure out how big the
1177           rocket will appear. Note that all of these values are relative
1178           to the pad location. If the elevation is near 90°, the rocket
1179           is over the pad, not over you.
1180         </para>
1181         <para>
1182           Finally, the igniter voltages are reported in this tab as
1183           well, both to monitor the main charge as well as to see what
1184           the status of the apogee charge is.
1185         </para>
1186       </section>
1187       <section>
1188         <title>Landed</title>
1189         <para>
1190           Once the rocket is on the ground, attention switches to
1191           recovery. While the radio signal is generally lost once the
1192           rocket is on the ground, the last reported GPS position is
1193           generally within a short distance of the actual landing location.
1194         </para>
1195         <para>
1196           The last reported GPS position is reported both by
1197           latitude and longitude as well as a bearing and distance from
1198           the launch pad. The distance should give you a good idea of
1199           whether you'll want to walk or hitch a ride. Take the reported
1200           latitude and longitude and enter them into your handheld GPS
1201           unit and have that compute a track to the landing location.
1202         </para>
1203         <para>
1204           Finally, the maximum height, speed and acceleration reported
1205           during the flight are displayed for your admiring observers.
1206         </para>
1207       </section>
1208       <section>
1209         <title>Site Map</title>
1210         <para>
1211           When the rocket gets a GPS fix, the Site Map tab will map
1212           the rocket's position to make it easier for you to locate the
1213           rocket, both while it is in the air, and when it has landed. The
1214           rocket's state is indicated by colour: white for pad, red for
1215           boost, pink for fast, yellow for coast, light blue for drogue,
1216           dark blue for main, and black for landed.
1217         </para>
1218         <para>
1219           The map's scale is approximately 3m (10ft) per pixel. The map
1220           can be dragged using the left mouse button. The map will attempt
1221           to keep the rocket roughly centred while data is being received.
1222         </para>
1223         <para>
1224           Images are fetched automatically via the Google Maps Static API,
1225           and are cached for reuse. If map images cannot be downloaded,
1226           the rocket's path will be traced on a dark grey background
1227           instead.
1228         </para>
1229       </section>
1230     </section>
1231     <section>
1232       <title>Save Flight Data</title>
1233       <para>
1234         TeleMetrum records flight data to its internal flash memory.
1235         This data is recorded at a much higher rate than the telemetry
1236         system can handle, and is not subject to radio drop-outs. As
1237         such, it provides a more complete and precise record of the
1238         flight. The 'Save Flight Data' button allows you to read the
1239         flash memory and write it to disk.
1240       </para>
1241       <para>
1242         Clicking on the 'Save Flight Data' button brings up a list of
1243         connected TeleMetrum and TeleDongle devices. If you select a
1244         TeleMetrum device, the flight data will be downloaded from that
1245         device directly. If you select a TeleDongle device, flight data
1246         will be downloaded from a TeleMetrum device connected via the
1247         packet command link to the specified TeleDongle. See the chapter
1248         on Packet Command Mode for more information about this.
1249       </para>
1250       <para>
1251         The filename for the data is computed automatically from the recorded
1252         flight date, TeleMetrum serial number and flight number
1253         information.
1254       </para>
1255     </section>
1256     <section>
1257       <title>Replay Flight</title>
1258       <para>
1259         Select this button and you are prompted to select a flight
1260         record file, either a .telem file recording telemetry data or a
1261         .eeprom file containing flight data saved from the TeleMetrum
1262         flash memory.
1263       </para>
1264       <para>
1265         Once a flight record is selected, the flight monitor interface
1266         is displayed and the flight is re-enacted in real time. Check
1267         the Monitor Flight chapter above to learn how this window operates.
1268       </para>
1269     </section>
1270     <section>
1271       <title>Graph Data</title>
1272       <para>
1273         Select this button and you are prompted to select a flight
1274         record file, either a .telem file recording telemetry data or a
1275         .eeprom file containing flight data saved from the TeleMetrum
1276         flash memory.
1277       </para>
1278       <para>
1279         Once a flight record is selected, the acceleration (blue),
1280         velocity (green) and altitude (red) of the flight are plotted and
1281         displayed, measured in metric units.
1282       </para>
1283       <para>
1284         The graph can be zoomed into a particular area by clicking and
1285         dragging down and to the right. Once zoomed, the graph can be
1286         reset by clicking and dragging up and to the left. Holding down
1287         control and clicking and dragging allows the graph to be panned.
1288         The right mouse button causes a popup menu to be displayed, giving
1289         you the option save or print the plot.
1290       </para>
1291       <para>
1292         Note that telemetry files will generally produce poor graphs
1293         due to the lower sampling rate and missed telemetry packets,
1294         and will also often have significant amounts of data received
1295         while the rocket was waiting on the pad. Use saved flight data
1296         for graphing where possible.
1297       </para>
1298     </section>
1299     <section>
1300       <title>Export Data</title>
1301       <para>
1302         This tool takes the raw data files and makes them available for
1303         external analysis. When you select this button, you are prompted to select a flight
1304         data file (either .eeprom or .telem will do, remember that
1305         .eeprom files contain higher resolution and more continuous
1306         data). Next, a second dialog appears which is used to select
1307         where to write the resulting file. It has a selector to choose
1308         between CSV and KML file formats.
1309       </para>
1310       <section>
1311         <title>Comma Separated Value Format</title>
1312         <para>
1313           This is a text file containing the data in a form suitable for
1314           import into a spreadsheet or other external data analysis
1315           tool. The first few lines of the file contain the version and
1316           configuration information from the TeleMetrum device, then
1317           there is a single header line which labels all of the
1318           fields. All of these lines start with a '#' character which
1319           most tools can be configured to skip over.
1320         </para>
1321         <para>
1322           The remaining lines of the file contain the data, with each
1323           field separated by a comma and at least one space. All of
1324           the sensor values are converted to standard units, with the
1325           barometric data reported in both pressure, altitude and
1326           height above pad units.
1327         </para>
1328       </section>
1329       <section>
1330         <title>Keyhole Markup Language (for Google Earth)</title>
1331         <para>
1332           This is the format used by
1333           Googleearth to provide an overlay within that
1334           application. With this, you can use Googleearth to see the
1335           whole flight path in 3D.
1336         </para>
1337       </section>
1338     </section>
1339     <section>
1340       <title>Configure TeleMetrum</title>
1341       <para>
1342         Select this button and then select either a TeleMetrum or
1343         TeleDongle Device from the list provided. Selecting a TeleDongle
1344         device will use Packet Comamnd Mode to configure remote
1345         TeleMetrum device. Learn how to use this in the Packet Command
1346         Mode chapter.
1347       </para>
1348       <para>
1349         The first few lines of the dialog provide information about the
1350         connected TeleMetrum device, including the product name,
1351         software version and hardware serial number. Below that are the
1352         individual configuration entries.
1353       </para>
1354       <para>
1355         At the bottom of the dialog, there are four buttons:
1356       </para>
1357       <itemizedlist>
1358         <listitem>
1359           <para>
1360             Save. This writes any changes to the TeleMetrum
1361             configuration parameter block in flash memory. If you don't
1362             press this button, any changes you make will be lost.
1363           </para>
1364         </listitem>
1365         <listitem>
1366           <para>
1367             Reset. This resets the dialog to the most recently saved values,
1368             erasing any changes you have made.
1369           </para>
1370         </listitem>
1371         <listitem>
1372           <para>
1373             Reboot. This reboots the TeleMetrum device. Use this to
1374             switch from idle to pad mode by rebooting once the rocket is
1375             oriented for flight.
1376           </para>
1377         </listitem>
1378         <listitem>
1379           <para>
1380             Close. This closes the dialog. Any unsaved changes will be
1381             lost.
1382           </para>
1383         </listitem>
1384       </itemizedlist>
1385       <para>
1386         The rest of the dialog contains the parameters to be configured.
1387       </para>
1388       <section>
1389         <title>Main Deploy Altitude</title>
1390         <para>
1391           This sets the altitude (above the recorded pad altitude) at
1392           which the 'main' igniter will fire. The drop-down menu shows
1393           some common values, but you can edit the text directly and
1394           choose whatever you like. If the apogee charge fires below
1395           this altitude, then the main charge will fire two seconds
1396           after the apogee charge fires.
1397         </para>
1398       </section>
1399       <section>
1400         <title>Apogee Delay</title>
1401         <para>
1402           When flying redundant electronics, it's often important to
1403           ensure that multiple apogee charges don't fire at precisely
1404           the same time as that can overpressurize the apogee deployment
1405           bay and cause a structural failure of the airframe. The Apogee
1406           Delay parameter tells the flight computer to fire the apogee
1407           charge a certain number of seconds after apogee has been
1408           detected.
1409         </para>
1410       </section>
1411       <section>
1412         <title>Radio Channel</title>
1413         <para>
1414           This configures which of the 10 radio channels to use for both
1415           telemetry and packet command mode. Note that if you set this
1416           value via packet command mode, you will have to reconfigure
1417           the TeleDongle channel before you will be able to use packet
1418           command mode again.
1419         </para>
1420       </section>
1421       <section>
1422         <title>Radio Calibration</title>
1423         <para>
1424           The radios in every Altus Metrum device are calibrated at the
1425           factory to ensure that they transmit and receive on the
1426           specified frequency for each channel. You can adjust that
1427           calibration by changing this value. To change the TeleDongle's
1428           calibration, you must reprogram the unit completely.
1429         </para>
1430       </section>
1431       <section>
1432         <title>Callsign</title>
1433         <para>
1434           This sets the callsign included in each telemetry packet. Set this
1435           as needed to conform to your local radio regulations.
1436         </para>
1437       </section>
1438     </section>
1439     <section>
1440       <title>Configure AltosUI</title>
1441       <para>
1442         This button presents a dialog so that you can configure the AltosUI global settings.
1443       </para>
1444       <section>
1445         <title>Voice Settings</title>
1446         <para>
1447           AltosUI provides voice annoucements during flight so that you
1448           can keep your eyes on the sky and still get information about
1449           the current flight status. However, sometimes you don't want
1450           to hear them.
1451         </para>
1452         <itemizedlist>
1453           <listitem>
1454             <para>Enable—turns all voice announcements on and off</para>
1455           </listitem>
1456           <listitem>
1457             <para>
1458               Test Voice—Plays a short message allowing you to verify
1459               that the audio systme is working and the volume settings
1460               are reasonable
1461             </para>
1462           </listitem>
1463         </itemizedlist>
1464       </section>
1465       <section>
1466         <title>Log Directory</title>
1467         <para>
1468           AltosUI logs all telemetry data and saves all TeleMetrum flash
1469           data to this directory. This directory is also used as the
1470           staring point when selecting data files for display or export.
1471         </para>
1472         <para>
1473           Click on the directory name to bring up a directory choosing
1474           dialog, select a new directory and click 'Select Directory' to
1475           change where AltosUI reads and writes data files.
1476         </para>
1477       </section>
1478       <section>
1479         <title>Callsign</title>
1480         <para>
1481           This value is used in command packet mode and is transmitted
1482           in each packet sent from TeleDongle and received from
1483           TeleMetrum. It is not used in telemetry mode as that transmits
1484           packets only from TeleMetrum to TeleDongle. Configure this
1485           with the AltosUI operators callsign as needed to comply with
1486           your local radio regulations.
1487         </para>
1488       </section>
1489     </section>
1490     <section>
1491       <title>Flash Image</title>
1492       <para>
1493         This reprograms any Altus Metrum device by using a TeleMetrum or
1494         TeleDongle as a programming dongle. Please read the directions
1495         for connecting the programming cable in the main TeleMetrum
1496         manual before reading these instructions.
1497       </para>
1498       <para>
1499         Once you have the programmer and target devices connected,
1500         push the 'Flash Image' button. That will present a dialog box
1501         listing all of the connected devices. Carefully select the
1502         programmer device, not the device to be programmed.
1503       </para>
1504       <para>
1505         Next, select the image to flash to the device. These are named
1506         with the product name and firmware version. The file selector
1507         will start in the directory containing the firmware included
1508         with the AltosUI package. Navigate to the directory containing
1509         the desired firmware if it isn't there.
1510       </para>
1511       <para>
1512         Next, a small dialog containing the device serial number and
1513         RF calibration values should appear. If these values are
1514         incorrect (possibly due to a corrupted image in the device),
1515         enter the correct values here.
1516       </para>
1517       <para>
1518         Finally, a dialog containing a progress bar will follow the
1519         programming process.
1520       </para>
1521       <para>
1522         When programming is complete, the target device will
1523         reboot. Note that if the target device is connected via USB, you
1524         will have to unplug it and then plug it back in for the USB
1525         connection to reset so that you can communicate with the device
1526         again.
1527       </para>
1528     </section>
1529     <section>
1530       <title>Fire Igniter</title>
1531       <para>
1532       </para>
1533     </section>
1534   </chapter>
1535   <chapter>
1536     <title>Using Altus Metrum Products</title>
1537     <section>
1538       <title>Being Legal</title>
1539       <para>
1540         First off, in the US, you need an [amateur radio license](../Radio) or 
1541         other authorization to legally operate the radio transmitters that are part
1542         of our products.
1543       </para>
1544       <section>
1545         <title>In the Rocket</title>
1546         <para>
1547           In the rocket itself, you just need a [TeleMetrum](../TeleMetrum) board and 
1548           a LiPo rechargeable battery.  An 860mAh battery weighs less than a 9V 
1549           alkaline battery, and will run a [TeleMetrum](../TeleMetrum) for hours.
1550         </para>
1551         <para>
1552           By default, we ship TeleMetrum with a simple wire antenna.  If your 
1553           electronics bay or the airframe it resides within is made of carbon fiber, 
1554           which is opaque to RF signals, you may choose to have an SMA connector 
1555           installed so that you can run a coaxial cable to an antenna mounted 
1556           elsewhere in the rocket.
1557         </para>
1558       </section>
1559       <section>
1560         <title>On the Ground</title>
1561         <para>
1562           To receive the data stream from the rocket, you need an antenna and short 
1563           feedline connected to one of our [TeleDongle](../TeleDongle) units.  The
1564           TeleDongle in turn plugs directly into the USB port on a notebook 
1565           computer.  Because TeleDongle looks like a simple serial port, your computer
1566           does not require special device drivers... just plug it in.
1567         </para>
1568         <para>
1569           Right now, all of our application software is written for Linux.  However, 
1570           because we understand that many people run Windows or MacOS, we are working 
1571           on a new ground station program written in Java that should work on all
1572           operating systems.
1573         </para>
1574         <para>
1575           After the flight, you can use the RF link to extract the more detailed data 
1576           logged in the rocket, or you can use a mini USB cable to plug into the 
1577           TeleMetrum board directly.  Pulling out the data without having to open up
1578           the rocket is pretty cool!  A USB cable is also how you charge the LiPo 
1579           battery, so you'll want one of those anyway... the same cable used by lots 
1580           of digital cameras and other modern electronic stuff will work fine.
1581         </para>
1582         <para>
1583           If your rocket lands out of sight, you may enjoy having a hand-held GPS 
1584           receiver, so that you can put in a waypoint for the last reported rocket 
1585           position before touch-down.  This makes looking for your rocket a lot like 
1586           Geo-Cacheing... just go to the waypoint and look around starting from there.
1587         </para>
1588         <para>
1589           You may also enjoy having a ham radio "HT" that covers the 70cm band... you 
1590           can use that with your antenna to direction-find the rocket on the ground 
1591           the same way you can use a Walston or Beeline tracker.  This can be handy 
1592           if the rocket is hiding in sage brush or a tree, or if the last GPS position 
1593           doesn't get you close enough because the rocket dropped into a canyon, or 
1594           the wind is blowing it across a dry lake bed, or something like that...  Keith
1595           and Bdale both currently own and use the Yaesu VX-7R at launches.
1596         </para>
1597         <para>
1598           So, to recap, on the ground the hardware you'll need includes:
1599           <orderedlist inheritnum='inherit' numeration='arabic'>
1600             <listitem> 
1601               an antenna and feedline
1602             </listitem>
1603             <listitem> 
1604               a TeleDongle
1605             </listitem>
1606             <listitem> 
1607               a notebook computer
1608             </listitem>
1609             <listitem> 
1610               optionally, a handheld GPS receiver
1611             </listitem>
1612             <listitem> 
1613               optionally, an HT or receiver covering 435 Mhz
1614             </listitem>
1615           </orderedlist>
1616         </para>
1617         <para>
1618           The best hand-held commercial directional antennas we've found for radio 
1619           direction finding rockets are from 
1620           <ulink url="http://www.arrowantennas.com/" >
1621             Arrow Antennas.
1622           </ulink>
1623           The 440-3 and 440-5 are both good choices for finding a 
1624           TeleMetrum-equipped rocket when used with a suitable 70cm HT.  
1625         </para>
1626       </section>
1627       <section>
1628         <title>Data Analysis</title>
1629         <para>
1630           Our software makes it easy to log the data from each flight, both the 
1631           telemetry received over the RF link during the flight itself, and the more
1632           complete data log recorded in the DataFlash memory on the TeleMetrum 
1633           board.  Once this data is on your computer, our postflight tools make it
1634           easy to quickly get to the numbers everyone wants, like apogee altitude, 
1635           max acceleration, and max velocity.  You can also generate and view a 
1636           standard set of plots showing the altitude, acceleration, and
1637           velocity of the rocket during flight.  And you can even export a data file 
1638           useable with Google Maps and Google Earth for visualizing the flight path 
1639           in two or three dimensions!
1640         </para>
1641         <para>
1642           Our ultimate goal is to emit a set of files for each flight that can be
1643           published as a web page per flight, or just viewed on your local disk with 
1644           a web browser.
1645         </para>
1646       </section>
1647       <section>
1648         <title>Future Plans</title>
1649         <para>
1650           In the future, we intend to offer "companion boards" for the rocket that will
1651           plug in to TeleMetrum to collect additional data, provide more pyro channels,
1652           and so forth.  A reference design for a companion board will be documented
1653           soon, and will be compatible with open source Arduino programming tools.
1654         </para>
1655         <para>
1656           We are also working on the design of a hand-held ground terminal that will
1657           allow monitoring the rocket's status, collecting data during flight, and
1658           logging data after flight without the need for a notebook computer on the
1659           flight line.  Particularly since it is so difficult to read most notebook
1660           screens in direct sunlight, we think this will be a great thing to have.
1661         </para>
1662         <para>
1663           Because all of our work is open, both the hardware designs and the software,
1664           if you have some great idea for an addition to the current Altus Metrum family,
1665           feel free to dive in and help!  Or let us know what you'd like to see that 
1666           we aren't already working on, and maybe we'll get excited about it too... 
1667         </para>
1668       </section>
1669     </section>
1670   </chapter>
1671 </book>
1672