submodule madness
[fw/altos] / doc / system-operation.inc
1 [appendix]
2 == System Operation
3
4         === Firmware Modes
5
6                 The AltOS firmware build for the altimeters has two
7                 fundamental modes, “idle” and “flight”.  Which of these modes
8                 the firmware operates in is determined at start up
9                 time.
10                 ifdef::telemetrum,telemega,easymega[]
11                 For
12                 TeleMetrum, TeleMega and EasyMega, which have accelerometers, the mode is
13                 controlled by the orientation of the
14                 rocket (well, actually the board, of course...) at the time
15                 power is switched on.  If the rocket is “nose up”, then
16                 the flight computer assumes it's on a rail or rod being prepared for
17                 launch, so the firmware chooses flight mode.  However, if the
18                 rocket is more or less horizontal, the firmware instead enters
19                 idle mode.
20                 endif::telemetrum,telemega,easymega[]
21                 Since
22                 EasyMini doesn't
23                 have an
24                 accelerometer we can use to determine orientation, “idle” mode
25                 is selected if the board is connected via USB to a computer,
26                 otherwise the board enters “flight” mode.
27                 ifdef::telemini[]
28                 TeleMini v1.0
29                 selects “idle” mode if it receives a command packet within the
30                 first five seconds of operation.
31                 endif::telemini[]
32
33                 At power on, the altimeter will beep out the battery voltage
34                 to the nearest tenth of a volt.  Each digit is represented by
35                 a sequence of short “dit” beeps, with a pause between
36                 digits. A zero digit is represented with one long “dah”
37                 beep. Then there will be a short pause while the altimeter
38                 completes initialization and self test, and decides which mode
39                 to enter next.
40
41                 In flight or “pad” mode, the altimeter engages the flight
42                 state machine, goes into transmit-only mode to send telemetry,
43                 and waits for launch to be detected.  Flight mode is indicated
44                 by an “di-dah-dah-dit” (“P” for pad) on the beeper or lights,
45                 followed by beeps or flashes indicating the state of the
46                 pyrotechnic igniter continuity.  One beep/flash indicates
47                 apogee continuity, two beeps/flashes indicate main continuity,
48                 three beeps/flashes indicate both apogee and main continuity,
49                 and one longer “brap” sound which is made by rapidly
50                 alternating between two tones indicates no continuity.  For a
51                 dual deploy flight, make sure you're getting three beeps or
52                 flashes before launching!  For apogee-only or motor eject
53                 flights, do what makes sense.
54
55                 If idle mode is entered, you will hear an audible “di-dit” or
56                 see two short flashes (“I” for idle), and the flight state
57                 machine is disengaged, thus no ejection charges will fire.
58                 ifdef::radio[]
59                 The altimeters also listen for the radio link when in idle
60                 mode for requests sent via TeleDongle.  Commands can be issued
61                 in idle mode over either USB or the radio link
62                 equivalently.
63                 ifdef::telemini[TeleMini v1.0 only has the radio link.]
64                 endif::radio[]
65                 Idle mode is useful for configuring the altimeter, for
66                 extracting data from the on-board storage chip after
67                 flight, and for ground testing pyro charges.
68
69                 In “Idle” and “Pad” modes, once the mode indication
70                 beeps/flashes and continuity indication has been sent, if
71                 there is no space available to log the flight in on-board
72                 memory, the flight computer will emit a warbling tone (much
73                 slower than the “no continuity tone”)
74
75                 See <<_understanding_beeps>> for a summary of all of
76                 the audio signals used.
77
78                 Once landed, the flight computer will signal that by emitting
79                 the “Landed” sound described above, after which it will beep
80                 out the apogee height (in meters). Each digit is represented
81                 by a sequence of short “dit” beeps, with a pause between
82                 digits. A zero digit is represented with one long “dah”
83                 beep. The flight computer will continue to report landed mode
84                 and beep out the maximum height until turned off.
85
86                 ifdef::telemetrum,telemega,easymega[]
87                 One “neat trick” of particular value when TeleMetrum, TeleMega
88                 or EasyMega are used with
89                 very large air-frames, is that you can power the board up while the
90                 rocket is horizontal, such that it comes up in idle mode.  Then you can
91                 raise the air-frame to launch position, and issue a 'reset' command
92                 via TeleDongle over the radio link to cause the altimeter to reboot and
93                 come up in flight mode.  This is much safer than standing on the top
94                 step of a rickety step-ladder or hanging off the side of a launch
95                 tower with a screw-driver trying to turn on your avionics before
96                 installing igniters!
97                 endif::telemetrum,telemega,easymega[]
98
99                 ifdef::telemini[]
100                 TeleMini v1.0 is configured solely via the radio link. Of course, that
101                 means you need to know the TeleMini radio configuration values
102                 or you won't be able to communicate with it. For situations
103                 when you don't have the radio configuration values, TeleMini v1.0
104                 offers an 'emergency recovery' mode. In this mode, TeleMini is
105                 configured as follows:
106
107
108                  * Sets the radio frequency to 434.550MHz
109                  * Sets the radio calibration back to the factory value.
110                  * Sets the callsign to N0CALL
111                  * Does not go to 'pad' mode after five seconds.
112
113                 To get into 'emergency recovery' mode, first find the row of
114                 four small holes opposite the switch wiring. Using a short
115                 piece of small gauge wire, connect the outer two holes
116                 together, then power TeleMini up. Once the red LED is lit,
117                 disconnect the wire and the board should signal that it's in
118                 'idle' mode after the initial five second startup
119                 period.
120                 endif::telemini[]
121
122         ifdef::gps[]
123         === GPS
124
125                 TeleMetrum and TeleMega include a complete GPS receiver.  A
126                 complete explanation of how GPS works is beyond the scope of
127                 this manual, but the bottom line is that the GPS receiver
128                 needs to lock onto at least four satellites to obtain a solid
129                 3 dimensional position fix and know what time it is.
130
131                 The flight computers provide backup power to the GPS chip any time a
132                 battery is connected.  This allows the receiver to “warm start” on
133                 the launch rail much faster than if every power-on were a GPS
134                 “cold start”.  In typical operations, powering up
135                 on the flight line in idle mode while performing final air-frame
136                 preparation will be sufficient to allow the GPS receiver to cold
137                 start and acquire lock.  Then the board can be powered down during
138                 RSO review and installation on a launch rod or rail.  When the board
139                 is turned back on, the GPS system should lock very quickly, typically
140                 long before igniter installation and return to the flight line are
141                 complete.
142         endif::gps[]
143
144         ifdef::radio[]
145         === Controlling An Altimeter Over The Radio Link
146
147                 One of the unique features of the Altus Metrum system is the
148                 ability to create a two way command link between TeleDongle
149                 and an altimeter using the digital radio transceivers
150                 built into each device. This allows you to interact with the
151                 altimeter from afar, as if it were directly connected to the
152                 computer.
153
154                 Any operation which can be performed with a flight computer can
155                 either be done with the device directly connected to the
156                 computer via the USB cable, or through the radio
157                 link. TeleMini v1.0 doesn't provide a USB connector and so it is
158                 always communicated with over radio.  Select the appropriate
159                 TeleDongle device when the list of devices is presented and
160                 AltosUI will interact with an altimeter over the radio link.
161
162                 One oddity in the current interface is how AltosUI selects the
163                 frequency for radio communications. Instead of providing
164                 an interface to specifically configure the frequency, it uses
165                 whatever frequency was most recently selected for the target
166                 TeleDongle device in Monitor Flight mode. If you haven't ever
167                 used that mode with the TeleDongle in question, select the
168                 Monitor Flight button from the top level UI, and pick the
169                 appropriate TeleDongle device.  Once the flight monitoring
170                 window is open, select the desired frequency and then close it
171                 down again. All radio communications will now use that frequency.
172
173                  * Save Flight Data—Recover flight data from the
174                    rocket without opening it up.
175
176                  * Configure altimeter apogee delays, main deploy
177                    heights and additional pyro event conditions to
178                    respond to changing launch conditions. You can also
179                    'reboot' the altimeter. Use this to remotely enable
180                    the flight computer by turning TeleMetrum or
181                    TeleMega on in “idle” mode, then once the air-frame
182                    is oriented for launch, you can reboot the
183                    altimeter and have it restart in pad mode without
184                    having to climb the scary ladder.
185
186                  * Fire Igniters—Test your deployment charges without snaking
187                    wires out through holes in the air-frame. Simply assemble the
188                    rocket as if for flight with the apogee and main charges
189                    loaded, then remotely command the altimeter to fire the
190                    igniters.
191
192                 Operation over the radio link for configuring an
193                 altimeter, ground testing igniters, and so forth uses
194                 the same RF frequencies as flight telemetry.  To
195                 configure the desired TeleDongle frequency, select the
196                 monitor flight tab, then use the frequency selector
197                 and close the window before performing other desired
198                 radio operations.
199
200                 The flight computers only enable radio commanding in
201                 'idle' mode.  TeleMetrum and TeleMega use the
202                 accelerometer to detect which orientation they start
203                 up in, so make sure you have the flight computer lying
204                 horizontally when you turn it on. Otherwise, it will
205                 start in 'pad' mode ready for flight, and will not be
206                 listening for command packets from TeleDongle.
207
208                 TeleMini listens for a command packet for five seconds
209                 after first being turned on, if it doesn't hear
210                 anything, it enters 'pad' mode, ready for flight and
211                 will no longer listen for command packets. The easiest
212                 way to connect to TeleMini is to initiate the command
213                 and select the TeleDongle device. At this point, the
214                 TeleDongle will be attempting to communicate with the
215                 TeleMini. Now turn TeleMini on, and it should
216                 immediately start communicating with the TeleDongle
217                 and the desired operation can be performed.
218
219                 You can monitor the operation of the radio link by watching the
220                 lights on the devices. The red LED will flash each time a packet
221                 is transmitted, while the green LED will light up on TeleDongle when
222                 it is waiting to receive a packet from the altimeter.
223         endif::radio[]
224
225         === Ground Testing
226
227                 An important aspect of preparing a rocket using electronic deployment
228                 for flight is ground testing the recovery system.
229                 ifdef::radio[]
230                 Thanks
231                 to the bi-directional radio link central to the Altus Metrum system,
232                 this can be accomplished in a TeleMega, TeleMetrum or TeleMini equipped rocket
233                 with less work than you may be accustomed to with other systems.  It
234                 can even be fun!
235                 endif::radio[]
236
237                 Just prep the rocket for flight, then power up the altimeter
238                 in “idle”
239                 ifdef::telemetrum,telemega,telemini[]
240                         mode (placing air-frame horizontal for TeleMetrum or TeleMega, or
241                         selecting the Configure Altimeter tab for TeleMini).
242                         This will cause
243                         the firmware to go into “idle” mode, in which the normal flight
244                         state machine is disabled and charges will not fire without
245                         manual command.
246                 endif::telemetrum,telemega,telemini[]
247                 ifndef::telemetrum,telemega,telemini[]
248                         mode.
249                 endif::telemetrum,telemega,telemini[]
250                 You can now command the altimeter to fire the apogee
251                 or main charges from a safe distance using your
252                 computer and the Fire Igniter tab to complete ejection testing.
253
254         ifdef::radio[]
255         === Radio Link
256
257                 TeleMetrum, TeleMini and TeleMega all incorporate an
258                 RF transceiver, but it's not a full duplex system;
259                 each end can only be transmitting or receiving at any
260                 given moment. So we had to decide how to manage the
261                 link.
262
263                 By design, the altimeter firmware listens for the
264                 radio link when it's in “idle mode”, which allows us
265                 to use the radio link to configure the rocket, do
266                 things like ejection tests, and extract data after a
267                 flight without having to crack open the air-frame.
268                 However, when the board is in “flight mode”, the
269                 altimeter only transmits and doesn't listen at all.
270                 That's because we want to put ultimate priority on
271                 event detection and getting telemetry out of the
272                 rocket through the radio in case the rocket crashes
273                 and we aren't able to extract data later.
274
275                 We don't generally use a 'normal packet radio' mode
276                 like APRS because they're just too inefficient.  The
277                 GFSK modulation we use is FSK with the base-band
278                 pulses passed through a Gaussian filter before they go
279                 into the modulator to limit the transmitted bandwidth.
280                 When combined with forward error correction and
281                 interleaving, this allows us to have a very robust
282                 19.2 kilobit data link with only 10-40 milliwatts of
283                 transmit power, a whip antenna in the rocket, and a
284                 hand-held Yagi on the ground.  We've had flights to
285                 above 21k feet AGL with great reception, and
286                 calculations suggest we should be good to well over
287                 40k feet AGL with a 5-element yagi on the ground with
288                 our 10mW units and over 100k feet AGL with the 40mW
289                 devices.  We hope to fly boards to higher altitudes
290                 over time, and would of course appreciate customer
291                 feedback on performance in higher altitude flights!
292         endif::radio[]
293
294         ifdef::gps+radio[]
295         :aprsdevices: TeleMetrum v2.0 and TeleMega
296         :configure_section: _configure_altimeter
297         include::aprs-operation.raw[]
298         endif::gps+radio[]
299
300         === Configurable Parameters
301
302                 Configuring an Altus Metrum altimeter for flight is
303                 very simple.  Even on our baro-only TeleMini and
304                 EasyMini boards, the use of a Kalman filter means
305                 there is no need to set a “mach delay”.  All of the
306                 configurable parameters can be set using AltosUI. Read
307                 <<_configure_altimeter>> for more information.