Merge branch 'branch-1.3' into debian
authorBdale Garbee <bdale@gag.com>
Fri, 14 Feb 2014 04:54:46 +0000 (21:54 -0700)
committerBdale Garbee <bdale@gag.com>
Fri, 14 Feb 2014 04:54:46 +0000 (21:54 -0700)
61 files changed:
ChangeLog
altoslib/AltosEepromMega.java
altoslib/AltosLink.java
altoslib/AltosState.java
altosui/AltosConfigPyroUI.java
altosui/AltosFlightStats.java
altosui/AltosFlightStatsTable.java
ao-bringup/turnon_teledongle
ao-bringup/turnon_telemetrum
configure.ac
doc/.gitignore
doc/Makefile
doc/MicroPeakUSB-2.0-inuse.jpg [new file with mode: 0644]
doc/MicroPeakUSB-2.0.jpg [new file with mode: 0644]
doc/altusmetrum.xsl
doc/ascent.png
doc/configure-pyro.png
doc/descent.png
doc/fire-igniter.png
doc/graph-configure.png
doc/landed.png
doc/launch-pad.png
doc/micropeak-app.png [new file with mode: 0644]
doc/micropeak-back.jpg [new file with mode: 0644]
doc/micropeak-device-dialog.png [new file with mode: 0644]
doc/micropeak-dime.jpg [new file with mode: 0644]
doc/micropeak-download.png [new file with mode: 0644]
doc/micropeak-graph-configure.png [new file with mode: 0644]
doc/micropeak-graph.png [new file with mode: 0644]
doc/micropeak-nofont.svg [new file with mode: 0644]
doc/micropeak-preferences.png [new file with mode: 0644]
doc/micropeak-raw-data.png [new file with mode: 0644]
doc/micropeak-save-dialog.png [new file with mode: 0644]
doc/micropeak-statistics.png [new file with mode: 0644]
doc/micropeak.xsl
doc/release-notes-1.3.2.xsl [new file with mode: 0644]
doc/site-map.png
doc/table.png
doc/telemini-v1-top.jpg
doc/titlepage.templates.xml [new file with mode: 0644]
doc/xorg-fo.xsl
micropeak/Makefile.am
micropeak/MicroData.java
micropeak/MicroDownload.java
micropeak/MicroPeak.java
micropeak/MicroSerial.java
micropeak/MicroSerialLog.java [new file with mode: 0644]
src/core/ao_gps_report_mega.c
src/drivers/ao_aprs.c
src/drivers/ao_bufio.c
src/drivers/ao_fat.c
src/drivers/ao_gps_ublox.c
src/drivers/ao_sdcard.c
src/drivers/ao_watchdog.c [new file with mode: 0644]
src/drivers/ao_watchdog.h [new file with mode: 0644]
src/product/ao_flash_pins.h
src/stm/ao_adc_stm.c
src/stm/ao_flash_loader_stm.c
src/stm/ao_flash_stm.c
src/stm/ao_timer.c
src/telegps-v0.1/Makefile

index 083233ba2f34f8097ffcc8eb3db2267604bde36b..51afdad19891739481ac7888a39baa11b2e95f5a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,409 @@
+commit e53be56179f4cd93227b6bdc28c2ae60b81db57d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sun Feb 9 23:47:47 2014 -0800
+
+    doc: Update the 1.3.2 release notes to include APRS and Fire Igniter changes
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d24ef4aa9429f4884548e5c9fd48d57e640f0d9d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sun Feb 9 23:46:39 2014 -0800
+
+    doc: Add remaining configurable parameters to the System Operation chapter
+    
+    Yes, this duplicates the section in the AltosUI chapter, but I'm not
+    sure how to describe the device without talking about it in two
+    places, so we might as well make both of them complete.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit e76948d382cf6980c3a5b6c48405d71c8811780b
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sun Feb 9 22:54:31 2014 -0800
+
+    altos: Put locked/unlocked GPS status in APRS comments
+    
+    Replace the 'S' (which marks the field showing sats in view) with
+    either 'L' or 'U' to tell the user whether the GPS receiver is locked
+    or unlocked.
+    
+    This also removes the colons in the comment field to shorten it. This
+    makes it fit on one line of my FT1D display.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 5001a0f882af53dde33fc531215944c9d727baf4
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sun Feb 9 22:53:05 2014 -0800
+
+    altos: Re-send previous GPS position in APRS if lock is lost
+    
+    APRS radios often show only the last received APRS packet, which means
+    that erasing the last known GPS position when we lose lock by sending
+    0/0/0 is unhelpful. Instead, just send the last known position, and
+    make sure that we send 0/0/0 before we're locked the first time.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 864d1e2282ac1d241478cf663ee24112c9d3dc37
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 22:02:02 2014 -0800
+
+    altos: Fixup named ADC printing
+    
+    Print all ADC values on one line when using named ADC values
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f750ef6f9745b15af45bb80f5b46b9e6f51796d8
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 20:05:02 2014 -0800
+
+    altos: Add needed math sources to TeleGPS v0.1 build
+    
+    APRS requires the logf function to report altitude.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 6367ab2dec718c512073f70dfab86dbd1656b1fe
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 20:02:54 2014 -0800
+
+    altos: Report nsat in view in APRS packet
+    
+    This adds the number of sats in view (as opposed to the number of sats
+    in solution) to the APRS packet.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 8ddbbdcdc498a19ebf4a440bbf5d73b6538e0a57
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 20:00:56 2014 -0800
+
+    altos: Don't write more than 12 sat infos in ublox driver
+    
+    This was overwriting memory past the end of the ao_gps_tracking_data
+    array, which isn't a good idea.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 324073d14ed8215b74d9df51f2229827cd4401d0
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 1 00:32:43 2014 -0800
+
+    altos/stm: Block interrupts while reprogramming flash
+    
+    Wouldn't work well to get interrupted...
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit d6d56c20465455b759f60a03fc96aa228ab9102e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 1 00:06:30 2014 -0800
+
+    altos: Enable system timer in flash loader and prod watchdog with it
+    
+    This makes it possible to reflash the board without needing to disable
+    the watchdog.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 1d3420e51db4d1a46237e97aeb189d2a8eba7f5e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 31 17:44:45 2014 -0800
+
+    altos: Eliminate warnings in FAT code
+    
+    The FAT file system code wasn't cleaned up when the warning fixes were
+    done recently.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7a8adfed8fbbcaac71da9c6d54bbd3091f4d7511
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Mar 21 10:16:35 2013 -0700
+
+    altos: Add watchdog timer task
+    
+    This new task frobs a pin periodically to inform the hardware that the
+    operating system is running.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 63683f91f5fe9588c1d905a572509cb674aaad68
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Jan 23 21:36:18 2013 -0800
+
+    altos: Add names when reporting STM ADC values
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7fdf6a6cc252c7813a857714f6088b7fd5bfab40
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 14:31:06 2014 -0800
+
+    doc: Add title page image to altusmetrum.pdf
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2c70a7a49cc0e92df90ea17a870d661ca857c145
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 14:30:52 2014 -0800
+
+    doc: Ignore generate template XSL file
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 2320b788c47757032b2874e64479ef382456c2d3
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 14:24:48 2014 -0800
+
+    doc: Document GPS max height addition
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 8363326cd87fb1e53ad78146c0503aa476d2da89
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 14:24:13 2014 -0800
+
+    doc: Update micropeak docs to include lots of pictures
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 306028b33ebed45bcf379740cc3c01c2360c51f4
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Feb 8 10:25:33 2014 -0800
+
+    doc: Micropeak doc updates for 1.3.2
+    
+    New 'download' button.
+    Update download instructions for new USB adapter.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 28d5239bff234cc1158a270a29c0e39067f613c3
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Feb 7 22:45:26 2014 -0800
+
+    micropeak: Missing a couple of new exceptions when loading files
+    
+    The change to keep reading on invalid chars from the serial port
+    exposed a couple of new exceptions from the MicroData code which the
+    file loading code needs to cope with.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 8d0d59c51138dc1b1bbf6933354fe9faf4d67986
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Feb 7 22:32:17 2014 -0800
+
+    micropeak: Keep reading until we get valid data
+    
+    Don't stop just because we saw something invalid on the serial line;
+    let the user try again, or cancel when they get bored.
+    
+    However, if the serial line disappears or some other fatal error
+    occurs, then do stop and put up an error dialog.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 4a5b3837b460d1b6fcea99312728114c4734495a
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Feb 6 17:08:34 2014 -0800
+
+    altos: report 0/0/0 for APRS position when GPS is not locked
+    
+    We were reporting whatever the GPS device sent, even if it wasn't
+    reporting a valid status. That's not terribly useful.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9e0bda088c097ac6bcc677d7b6d00683e73a68fb
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Feb 3 00:24:38 2014 -0800
+
+    micropeak: Watch serial data during download
+    
+    This adds a text area to monitor the incoming serial data in case some
+    problem occurs.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 0c2f28cbc1cb312d3bcc8951176d79f234a1af04
+Author: Keith Packard <keithp@keithp.com>
+Date:   Mon Feb 3 00:26:42 2014 -0800
+
+    altoslib: Use existing unicode Charset in AltosLink
+    
+    Instead of making AltosLink look up the unicode charset, just provide
+    it directly.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7df221c42948cb42cf777b899263c8ec9067bd55
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 31 18:09:26 2014 -0800
+
+    doc: Mention that an APRS interval of 0 disables it entirely
+    
+    And mention that the value is a time in seconds between APRS packets.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 230af613d372afe540c6a8860199d717eedecf57
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jan 30 20:54:24 2014 -0800
+
+    doc: Replace screen captures with 'active' window ones
+    
+    These are the same as the previous captures, just with the titlebar
+    highlighted instead of grey so that they're all consistent. These were
+    also done with the gimp which makes the areas outside of the window
+    (like outside the rounded corners) have zero alpha so that the white
+    background shows through.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 7e3088ece81ef85f3dbd4df51954bc90681d6b6e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jan 30 18:42:08 2014 -0800
+
+    doc: Update screen capture of pyro config with correct names
+    
+    With the UI now using letters as TeleMega does, update the screen shot
+    used in the manual to match
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit eb9262901aff4f69fa3d2357693634cbee9bca46
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jan 30 18:38:01 2014 -0800
+
+    altosui: Use letter names for pyro channels in pyro config UI
+    
+    TeleMega has the extra pyro channels labeled A, B, C, D instead of 0,
+    1, 2, 3. Use those names in the UI to avoid confusion.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 4e94d785d9a1cce4eb5b3063d55e825719afb58e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Jan 28 21:52:57 2014 -0800
+
+    doc: Add explicit paragraph about using one battery with Tmega
+    
+    Just in case the factory-supplied jumper gets lost.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit f4f31590518875eda40473dd2178d6976a4f86a3
+Author: Bdale Garbee <bdale@gag.com>
+Date:   Tue Jan 28 18:21:10 2014 -0700
+
+    use firmware in /usr/share/altos for teledongle, update telemetrum for v2.0
+
+commit 6b70b8b6bb4e8eae8159ec966847092d0b1deab3
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 22:43:25 2014 -0800
+
+    altoslib: Don't lose gps_height value between GPS samples
+    
+    gps_height is now reliably updated whenever GPS altitude data is
+    received, so don't try to reset it between samples.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit ea8c9ca9dd24a026ea5bfe5a1ac70857181a88c8
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 22:40:49 2014 -0800
+
+    altosui: Show GPS max height in flight stats window of graph
+    
+    Uses the new state.max_gps_height() function.#
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit e4616233f3942d2796ba6633477670a83669957b
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 22:39:10 2014 -0800
+
+    altoslib: Track GPS altitude values to be able to report max gps height
+    
+    This adds separate GPS altitude and GPS ground altitude values so that
+    the AltosState object can report GPS max height.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit aa2edc97ac0c880e569baca453ff6302ad6da65f
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 21:34:39 2014 -0800
+
+    doc: Fix spelling of decelerate
+
+commit eb3ffd06575ddd0be061aa2717c7075c823ed54e
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 21:31:17 2014 -0800
+
+    doc: Document flight computer wiring connections
+    
+    This details all of the wiring connections for each flight computer
+    and explains how to wire batteries, switches and how to use external
+    pyro batteries and active switches with each one.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit ee480d180cbdd712ab13d39716c38aabd4678d95
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 10:10:00 2014 -0800
+
+    Set version to 1.3.2 in preparation for release
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 9c4674d90f9b111e1b47abb7aee714ed12fa3aa5
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 09:35:55 2014 -0800
+
+    doc: Add 1.3.2 release notes
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit 94be1e3eb9f94a59522743374d02a1f229266931
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Jan 24 09:21:46 2014 -0800
+
+    altos: Tmega Don't try to log info about more than 12 GPS sats
+    
+    The mega log format has a single packet for GPS info which holds a
+    maximum of 12 satellites. Bdale managed to get 14 sats in view, which
+    ended up crashing the ground station software, and also overflowed the
+    gps_tracking_data structure.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit dd28429405498fca0788ce9c19093898c84b10e5
+Author: Keith Packard <keithp@keithp.com>
+Date:   Thu Jan 23 22:16:36 2014 -0800
+
+    altoslib: Validate TeleMega GPS_SAT log packet nsat
+    
+    Make sure nsat is not more than the size of the array
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit afbae4c6b7a658f690cb827acfef015e9e2da318
+Author: Bdale Garbee <bdale@gag.com>
+Date:   Wed Jan 22 21:31:03 2014 -0700
+
+    update notes on how to release
+
+commit 0ef0c50536e5eb6ad3455b5828983307edbab828
+Author: Bdale Garbee <bdale@gag.com>
+Date:   Wed Jan 22 20:53:03 2014 -0700
+
+    freshen ChangeLog for release
+
 commit 200137060651f48c99276c8feb0e15980a9b46be
 Author: Bdale Garbee <bdale@gag.com>
 Date:   Wed Jan 22 20:52:09 2014 -0700
index 1ac72b1c4f5d65e491de6fc548d2d8238ff330ae..b8a1b9e86dc61ad09403b33c9de4ec54274a3150 100644 (file)
@@ -24,6 +24,8 @@ import java.text.*;
 public class AltosEepromMega extends AltosEeprom {
        public static final int record_length = 32;
 
+       public static final int max_sat = 12;
+
        public int record_length() { return record_length; }
 
        /* AO_LOG_FLIGHT elements */
@@ -176,6 +178,8 @@ public class AltosEepromMega extends AltosEeprom {
                        gps = state.make_temp_gps(true);
 
                        int n = nsat();
+                       if (n > max_sat)
+                               n = max_sat;
                        for (int i = 0; i < n; i++)
                                gps.add_sat(svid(i), c_n(i));
                        break;
index 8346d281f1e2a0be012f2b69fcef15fa302e04e8..97fa70625ce8d90aa5e1e84eb1f1b01b7c4ba8e2 100644 (file)
@@ -251,13 +251,7 @@ public abstract class AltosLink implements Runnable {
 
        public void add_bytes(byte[] bytes, int len) throws InterruptedException {
                String  line;
-               try {
-                       line = new String(bytes, 0, len, "UTF-8");
-               } catch (UnsupportedEncodingException ue) {
-                       line = "";
-                       for (int i = 0; i < len; i++)
-                               line = line + bytes[i];
-               }
+               line = new String(bytes, 0, len, AltosLib.unicode_set);
                if (debug)
                        System.out.printf("\t\t\t\t\t%s\n", line);
                add_string(line);
index 08dafbb4c8ad6d12333e458638e6732abc04aede..758fd6366b7b7f40d1b3967bcc24bdcb8f4d9313 100644 (file)
@@ -299,6 +299,30 @@ public class AltosState implements Cloneable {
                ground_altitude.set_measured(a, time);
        }
 
+       class AltosGpsGroundAltitude extends AltosValue {
+               void set(double a, double t) {
+                       super.set(a, t);
+                       pad_alt = value();
+                       gps_altitude.set_gps_height();
+               }
+
+               void set_filtered(double a, double t) {
+                       super.set_filtered(a, t);
+                       pad_alt = value();
+                       gps_altitude.set_gps_height();
+               }
+       }
+
+       private AltosGpsGroundAltitude gps_ground_altitude;
+
+       public double gps_ground_altitude() {
+               return gps_ground_altitude.value();
+       }
+
+       public void set_gps_ground_altitude(double a) {
+               gps_ground_altitude.set(a, time);
+       }
+
        class AltosGroundPressure extends AltosCValue {
                void set_filtered(double p, double time) {
                        computed.set_filtered(p, time);
@@ -344,26 +368,56 @@ public class AltosState implements Cloneable {
 
        private AltosAltitude   altitude;
 
+       class AltosGpsAltitude extends AltosValue {
+
+               private void set_gps_height() {
+                       double  a = value();
+                       double  g = gps_ground_altitude.value();
+
+                       if (a != AltosLib.MISSING && g != AltosLib.MISSING)
+                               gps_height = a - g;
+                       else
+                               gps_height = AltosLib.MISSING;
+               }
+
+               void set(double a, double t) {
+                       super.set(a, t);
+                       set_gps_height();
+               }
+       }
+
+       private AltosGpsAltitude        gps_altitude;
+
        public double altitude() {
                double a = altitude.value();
                if (a != AltosLib.MISSING)
                        return a;
-               if (gps != null)
-                       return gps.alt;
-               return AltosLib.MISSING;
+               return gps_altitude.value();
        }
 
        public double max_altitude() {
                double a = altitude.max();
                if (a != AltosLib.MISSING)
                        return a;
-               return AltosLib.MISSING;
+               return gps_altitude.max();
        }
 
        public void set_altitude(double new_altitude) {
                altitude.set_measured(new_altitude, time);
        }
 
+       public double gps_altitude() {
+               return gps_altitude.value();
+       }
+
+       public double max_gps_altitude() {
+               return gps_altitude.max();
+       }
+
+       public void set_gps_altitude(double new_gps_altitude) {
+               gps_altitude.set(new_gps_altitude, time);
+       }
+
        class AltosPressure extends AltosValue {
                void set(double p, double time) {
                        super.set(p, time);
@@ -408,6 +462,24 @@ public class AltosState implements Cloneable {
                return AltosLib.MISSING;
        }
 
+       public double gps_height() {
+               double a = gps_altitude();
+               double g = gps_ground_altitude();
+
+               if (a != AltosLib.MISSING && g != AltosLib.MISSING)
+                       return a - g;
+               return AltosLib.MISSING;
+       }
+
+       public double max_gps_height() {
+               double a = gps_altitude.max();
+               double g = gps_ground_altitude();
+
+               if (a != AltosLib.MISSING && g != AltosLib.MISSING)
+                       return a - g;
+               return AltosLib.MISSING;
+       }
+
        class AltosSpeed extends AltosCValue {
                
                void set_accel() {
@@ -608,6 +680,9 @@ public class AltosState implements Cloneable {
                pad_lon = AltosLib.MISSING;
                pad_alt = AltosLib.MISSING;
 
+               gps_altitude = new AltosGpsAltitude();
+               gps_ground_altitude = new AltosGpsGroundAltitude();
+
                speak_tick = AltosLib.MISSING;
                speak_altitude = AltosLib.MISSING;
 
@@ -730,6 +805,10 @@ public class AltosState implements Cloneable {
                range = old.range;
 
                gps_height = old.gps_height;
+
+               gps_altitude.copy(old.gps_altitude);
+               gps_ground_altitude.copy(old.gps_ground_altitude);
+
                pad_lat = old.pad_lat;
                pad_lon = old.pad_lon;
                pad_alt = old.pad_alt;
@@ -759,7 +838,6 @@ public class AltosState implements Cloneable {
        void update_gps() {
                elevation = 0;
                range = -1;
-               gps_height = 0;
 
                if (gps == null)
                        return;
@@ -771,14 +849,15 @@ public class AltosState implements Cloneable {
                                if (pad_lat != AltosLib.MISSING) {
                                        pad_lat = (pad_lat * 31 + gps.lat) / 32;
                                        pad_lon = (pad_lon * 31 + gps.lon) / 32;
-                                       pad_alt = (pad_alt * 31 + gps.alt) / 32;
+                                       gps_ground_altitude.set_filtered(gps.alt, time);
                                }
                        }
                        if (pad_lat == AltosLib.MISSING) {
                                pad_lat = gps.lat;
                                pad_lon = gps.lon;
-                               pad_alt = gps.alt;
+                               gps_ground_altitude.set(gps.alt, time);
                        }
+                       gps_altitude.set(gps.alt, time);
                }
                if (gps.lat != 0 && gps.lon != 0 &&
                    pad_lat != AltosLib.MISSING &&
@@ -791,7 +870,6 @@ public class AltosState implements Cloneable {
                        from_pad = new AltosGreatCircle(pad_lat, pad_lon, 0, gps.lat, gps.lon, h);
                        elevation = from_pad.elevation;
                        range = from_pad.range;
-                       gps_height = gps.alt - pad_alt;
                }
        }
 
index 47b2b662bb5ac7b49d4804527384cfc2feb85599..b14c39ab86e1c5ea2f0ca74d92194003d66394a3 100644 (file)
@@ -232,7 +232,7 @@ public class AltosConfigPyroUI
                        c.fill = GridBagConstraints.NONE;
                        c.anchor = GridBagConstraints.CENTER;
                        c.insets = il;
-                       label = new JLabel(String.format("Pyro Channel %d", channel));
+                       label = new JLabel(String.format("Pyro Channel %c", 'A' + channel));
                        pane.add(label, c);
                        y++;
 
index bf5644c39888a26940df8fbb866836fe5ad32968..0be49c2fb82167890ab9da39f363fc2f8c2f0fca 100644 (file)
@@ -22,6 +22,7 @@ import org.altusmetrum.altoslib_3.*;
 
 public class AltosFlightStats {
        double          max_height;
+       double          max_gps_height;
        double          max_speed;
        double          max_acceleration;
        double[]        state_speed = new double[Altos.ao_flight_invalid + 1];
@@ -153,6 +154,7 @@ public class AltosFlightStats {
                                max_height = state.max_height();
                                max_speed = state.max_speed();
                                max_acceleration = state.max_acceleration();
+                               max_gps_height = state.max_gps_height();
                        }
                        if (state.gps != null && state.gps.locked && state.gps.nsat >= 4) {
                                if (state_id <= Altos.ao_flight_pad) {
index 3e7e9fe11c5737878798985b5e73262aeba30dbc..cb0c1562bf7b73c95ad2cdb123ac600e5aab7eab 100644 (file)
@@ -91,6 +91,11 @@ public class AltosFlightStatsTable extends JComponent {
                new FlightStat(layout, y++, "Maximum height",
                               String.format("%5.0f m", stats.max_height),
                               String.format("%5.0f ft", AltosConvert.meters_to_feet(stats.max_height)));
+               if (stats.max_gps_height != AltosLib.MISSING) {
+                       new FlightStat(layout, y++, "Maximum GPS height",
+                                      String.format("%5.0f m", stats.max_gps_height),
+                                      String.format("%5.0f ft", AltosConvert.meters_to_feet(stats.max_gps_height)));
+               }
                new FlightStat(layout, y++, "Maximum speed",
                               String.format("%5.0f m/s", stats.max_speed),
                               String.format("%5.0f mph", AltosConvert.meters_to_mph(stats.max_speed)),
index 320cd8ff147ff92fb2c0dc6672b3e0695d8cb3be..a11683dbb5eada2d6f294468a09172cb44c8c699 100755 (executable)
@@ -42,7 +42,7 @@ read FREQ
 CAL_VALUE=`nickle -e "floor(434.55 / $FREQ * 1186611 + 0.5)"`
 
 echo "Programming flash with cal value " $CAL_VALUE
-$AOLOAD -D 100 --cal $CAL_VALUE /usr/share/altos/stable/teledongle-v0.2*.ihx $SERIAL
+$AOLOAD -D 100 --cal $CAL_VALUE /usr/share/altos/teledongle-v0.2*.ihx $SERIAL
 
 echo "Serial number "$SERIAL" programmed with RF cal value "$CAL_VALUE
 echo "Unplug and replug USB, cu to the board, confirm freq and record power"
index faf49d43db36f297fdc1cf35cd9b97066552ff5b..bcf6239fafa62f7baf65f9fe071efec676769466 100755 (executable)
@@ -1,49 +1,60 @@
 #!/bin/sh
 
-if [ -x ../ao-tools/ao-load/ao-load ]; then
-       AOLOAD=../ao-tools/ao-load/ao-load
-elif [ -x /usr/bin/ao-load ]; then
-       AOLOAD=/usr/bin/ao-load
+if [ -x ../ao-tools/ao-stmload/ao-stmload ]; then
+       STMLOAD=../ao-tools/ao-stmload/ao-stmload
+elif [ -x /usr/bin/ao-stmload ]; then
+       STMLOAD=/usr/bin/ao-stmload
 else
-       echo "Can't find ao-load!  Aborting."
+       echo "Can't find ao-stmload!  Aborting."
        exit 1
 fi
 
-if [ -x ../ao-tools/ao-rawload/ao-rawload ]; then
-       RAWLOAD=../ao-tools/ao-rawload/ao-rawload
-elif [ -x /usr/bin/ao-rawload ]; then
-       RAWLOAD=/usr/bin/ao-rawload
+if [ -x ../ao-tools/ao-usbload/ao-usbload ]; then
+       USBLOAD=../ao-tools/ao-usbload/ao-usbload
+elif [ -x /usr/bin/ao-usbload ]; then
+       USBLOAD=/usr/bin/ao-usbload
 else
-       echo "Can't find ao-rawload!  Aborting."
+       echo "Can't find ao-usbload!  Aborting."
        exit 1
 fi
 
-echo "TeleMetrum v1.2 Turn-On and Calibration Program"
-echo "Copyright 2010 by Bdale Garbee.  Released under GPL v2"
+VERSION=2.0
+
+echo "TeleMetrum v$VERSION Turn-On and Calibration Program"
+echo "Copyright 2014 by Bdale Garbee.  Released under GPL v2"
 echo
 echo "Expectations:"
-echo "\tTeleMetrum v1.2 powered from USB"
-echo "\t\twith TeleDongle (on /dev/ttyACM0) cabled to debug header"
+echo "\tTeleMetrum v$VERSIOn powered from USB"
+echo "\t\twith ST-Link-V2 cabled to debug header"
 echo "\t\twith coax from UHF to frequency counter"
 echo
-echo -n "TeleMetrum serial number: "
+echo -n "TeleMetrum-$VERSION serial number: "
 read SERIAL
 
-echo $RAWLOAD
+echo $STMLOAD
+
+$STMLOAD --raw ../src/telemetrum-v$VERSION/flash-loader/*.elf || exit 1
+
+sleep 2
 
-$RAWLOAD --device 100 -r ao_led_blink.ihx
-echo "the red LED should be blinking"
-sleep 5
+$USBLOAD --serial=$SERIAL /usr/share/altos/telemetrum-v$VERSION*.ihx || exit 1
 
-$RAWLOAD --device 100 -r ao_radio_xmit.ihx
-echo -n "Generating RF carrier.  Please enter measured frequency: "
-read FREQ
+sleep 2
+
+dev=`ao-list | awk '/TeleMetrum-v'"$VERSION"'/ { print $3; exit(0); }'`
+
+case "$dev" in
+/dev/tty*)
+       echo "TeleMetrum found on $dev"
+       ;;
+*)
+       echo 'No TeleMetrum-v'"$VERSION"' found'
+       exit 1
+       ;;
+esac
 
-CAL_VALUE=`nickle -e "floor(434.55 / $FREQ * 1186611 + 0.5)"`
+echo 'E 0' > $dev
 
-echo "Programming flash with cal value " $CAL_VALUE
-$AOLOAD --device 100 --cal $CAL_VALUE \
-       /usr/share/altos/stable/telemetrum-v1.2*.ihx $SERIAL
+SERIAL=$SERIAL ./cal-freq $dev
 
-echo "Serial number "$SERIAL" programmed with RF cal value "$CAL_VALUE
-echo "Unplug and replug USB, cu to the board, confirm freq and record power"
+./cal-accel $dev
index 93767fe7924ff3b47298b68b85c659c4bad949d6..6be99d1fc5d122152ea92ccca4451383d221ce4f 100644 (file)
@@ -18,7 +18,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([altos], 1.3.1)
+AC_INIT([altos], 1.3.2)
 AC_CONFIG_SRCDIR([src/core/ao.h])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
index 54ca39bcd9f7d332cf6073396bb9e6557c46bfd4..73fe56e6e18bb0b0f65cddf49324a9bd2014db02 100644 (file)
@@ -1,3 +1,4 @@
 *.html
 *.pdf
 *.fo
+titlepage.templates.xsl
index 80310869a4ef4d0b29032999d2328c98904e8401..83731fbe8f1998378f96c53472da2a76e3e8870c 100644 (file)
@@ -13,7 +13,8 @@ RELNOTES=\
        release-notes-1.2.html \
        release-notes-1.2.1.html \
        release-notes-1.3.html \
-       release-notes-1.3.1.html
+       release-notes-1.3.1.html \
+       release-notes-1.3.2.html
 
 PICTURES=\
        altosui.png \
@@ -51,11 +52,12 @@ HTML=altusmetrum.html altos.html telemetry.html companion.html micropeak.html $(
 PDF=altusmetrum.pdf altos.pdf telemetry.pdf companion.pdf micropeak.pdf
 HTMLSTYLE=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
 FOSTYLE=xorg-fo.xsl
+TEMPLATES=titlepage.templates.xsl
 PDFSTYLE=
 IMAGES=$(PICTURES) $(SVG)
 DOC=$(HTML) $(PDF) $(PICTURES)
 
-.SUFFIXES: .xsl .html .pdf
+.SUFFIXES: .xml .xsl .html .pdf
 
 XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
 
@@ -65,6 +67,9 @@ XSLTFLAGS=--stringparam section.autolabel 1 --xinclude
 .xsl.pdf:
        xmlto -x $(FOSTYLE) --with-fop pdf $*.xsl
 
+.xml.xsl:
+       xsltproc --output $@ /usr/share/xml/docbook/stylesheet/docbook-xsl/template/titlepage.xsl $*.xml
+
 all:   $(HTML) $(PDF)
 
 install:       all
@@ -78,7 +83,7 @@ publish:      $(DOC)
         git push)
 
 clean:
-       rm -f $(HTML) $(PDF)
+       rm -f $(HTML) $(PDF) $(TEMPLATES)
 
 distclean:
        rm -f $(HTML) $(PDF)
@@ -86,7 +91,7 @@ distclean:
 altusmetrum.html: $(RELNOTES_XSL) $(IMAGES)
 altusmetrum.pdf: $(RELNOTES_XSL) $(IMAGES)
 
-$(PDF): $(FOSTYLE)
+$(PDF): $(FOSTYLE) $(TEMPLATES)
 
 indent:                altusmetrum.xsl
        xmlindent -i 2 < altusmetrum.xsl > altusmetrum.new
diff --git a/doc/MicroPeakUSB-2.0-inuse.jpg b/doc/MicroPeakUSB-2.0-inuse.jpg
new file mode 100644 (file)
index 0000000..8e1936a
Binary files /dev/null and b/doc/MicroPeakUSB-2.0-inuse.jpg differ
diff --git a/doc/MicroPeakUSB-2.0.jpg b/doc/MicroPeakUSB-2.0.jpg
new file mode 100644 (file)
index 0000000..110f054
Binary files /dev/null and b/doc/MicroPeakUSB-2.0.jpg differ
index 036b0b6177b992de9f0b47937cb6a2d9b25a8053..fb08f5c642fa32f284ba2958a14d76a77b762794 100644 (file)
       <year>2014</year>
       <holder>Bdale Garbee and Keith Packard</holder>
     </copyright>
+    <mediaobject>
+      <imageobject>
+       <imagedata fileref="../themes/background.png" width="6.0in"/>
+      </imageobject>
+    </mediaobject>
     <legalnotice>
       <para>
         This document is released under the terms of the
       </para>
     </legalnotice>
     <revhistory>
+      <revision>
+       <revnumber>1.3.2</revnumber>
+       <date>24 January 2014</date>
+       <revremark>
+         Bug fixes for TeleMega and AltosUI.
+       </revremark>
+      </revision>
       <revision>
        <revnumber>1.3.1</revnumber>
        <date>21 January 2014</date>
@@ -330,7 +342,115 @@ NAR #88757, TRA #12200
   <chapter>
     <title>Altus Metrum Hardware</title>
     <section>
-      <title>Overview</title>
+      <title>General Usage Instructions</title>
+      <para>
+       Here are general instructions for hooking up an Altus Metrum
+       flight computer. Instructions specific to each model will be
+       found in the section devoted to that model below.
+      </para>
+      <para>
+       To prevent electrical interference from affecting the
+       operation of the flight computer, it's important to always
+       twist pairs of wires connected to the board. Twist the switch
+       leads, the pyro leads and the battery leads. This reduces
+       interference through a mechanism called common mode rejection.
+      </para>
+      <section>
+       <title>Hooking Up Lithium Polymer Batteries</title>
+       <para>
+         All Altus Metrum flight computers have a two pin JST PH
+         series connector to connect up a single-cell Lithium Polymer
+         cell (3.7V nominal). You can purchase matching batteries
+         from the Altus Metrum store, or other vendors, or you can
+         make your own. Pin 1 of the connector is positive, pin 2 is
+         negative. Spark Fun sells a cable with the connector
+         attached, which they call a <ulink
+         url="https://www.sparkfun.com/products/9914">JST Jumper 2
+         Wire Assembly</ulink>.
+       </para>
+       <para>
+         Many RC vendors also sell lithium polymer batteries with
+         this same connector. All that we have found use the opposite
+         polarity, and if you use them that way, you will damage or
+         destroy the flight computer.
+       </para>
+      </section>
+      <section>
+       <title>Hooking Up Pyro Charges</title>
+       <para>
+         Altus Metrum flight computers always have two screws for
+         each pyro charge. This means you shouldn't need to put two
+         wires into a screw terminal or connect leads from pyro
+         charges together externally.
+       </para>
+       <para>
+         On the flight computer, one lead from each charge is hooked
+         to the positive battery terminal through the power switch.
+         The other lead is connected through the pyro circuit, which
+         is connected to the negative battery terminal when the pyro
+         circuit is fired.
+       </para>
+      </section>
+      <section>
+       <title>Hooking Up a Power Switch</title>
+       <para>
+         Altus Metrum flight computers need an external power switch
+         to turn them on. This disconnects both the computer and the
+         pyro charges from the battery, preventing the charges from
+         firing when in the Off position. The switch is in-line with
+         the positive battery terminal.
+       </para>
+       <section>
+         <title>Using an External Active Switch Circuit</title>
+         <para>
+           You can use an active switch circuit, such as the
+           Featherweight Magnetic Switch, with any Altus Metrum
+           flight computer. These require three connections, one to
+           the battery, one to the positive power input on the flight
+           computer and one to ground. Find instructions on how to
+           hook these up for each flight computer below. The follow
+           the instructions that come with your active switch to
+           connect it up.
+         </para>
+       </section>
+      </section>
+      <section>
+       <title>Using a Separate Pyro Battery</title>
+       <para>
+         As mentioned above in the section on hooking up pyro
+         charges, one lead for each of the pyro charges is connected
+         through the power switch directly to the positive battery
+         terminal. The other lead is connected to the pyro circuit,
+         which connects it to the negative battery terminal when the
+         pyro circuit is fired. The pyro circuit on all of the flight
+         computers is designed to handle up to 16V.
+       </para>
+       <para>
+         To use a separate pyro battery, connect the negative pyro
+         battery terminal to the flight computer ground terminal,
+         the positive battery terminal to the igniter and the other
+         igniter lead to the negative pyro terminal on the flight
+         computer. When the pyro channel fires, it will complete the
+         circuit between the negative pyro terminal and the ground
+         terminal, firing the igniter. Specific instructions on how
+         to hook this up will be found in each section below.
+       </para>
+      </section>
+      <section>
+       <title>Using a Different Kind of Battery</title>
+       <para>
+         EasyMini and TeleMini v2 are designed to use either a
+         lithium polymer battery or any other battery producing
+         between 4 and 12 volts, such as a rectangular 9V
+         battery. TeleMega and TeleMetrum are not designed for this,
+         and must only be powered by a lithium polymer battery. Find
+         instructions on how to use other batteries in the EasyMini
+         and TeleMini sections below.
+       </para>
+      </section>
+    </section>
+    <section>
+      <title>Specifications</title>
       <para>
        Here's the full set of Altus Metrum products, both in
        production and retired.
@@ -573,9 +693,107 @@ NAR #88757, TRA #12200
        fin can end of the board, meaning an ideal “simple” avionics
        bay for TeleMetrum should have at least 10 inches of interior length.
       </para>
+      <section>
+       <title>TeleMetrum Screw Terminals</title>
+       <para>
+         TeleMetrum has six screw terminals on the end of the board
+         opposite the telemetry antenna. Two are for the power
+         switch, and two each for the apogee and main igniter
+         circuits. Using the picture above and starting from the top,
+         the terminals are as follows:
+       </para>
+       <table frame='all'>
+         <title>TeleMetrum Screw Terminals</title>
+         <?dbfo keep-together="always"?>
+         <tgroup cols='3' align='center' colsep='1' rowsep='1'>
+           <colspec align='center' colwidth='*' colname='Pin #'/>
+           <colspec align='center' colwidth='2*' colname='Pin Name'/>
+           <colspec align='left' colwidth='5*' colname='Description'/>
+           <thead>
+             <row>
+               <entry align='center'>Terminal #</entry>
+               <entry align='center'>Terminal Name</entry>
+               <entry align='center'>Description</entry>
+             </row>
+           </thead>
+           <tbody>
+             <row>
+               <entry>1</entry>
+               <entry>Switch Output</entry>
+               <entry>Switch connection to flight computer</entry>
+             </row>
+             <row>
+               <entry>2</entry>
+               <entry>Switch Input</entry>
+               <entry>Switch connection to positive battery terminal</entry>
+             </row>
+             <row>
+               <entry>3</entry>
+               <entry>Main +</entry>
+               <entry>Main pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>4</entry>
+               <entry>Main -</entry>
+               <entry>Main pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>5</entry>
+               <entry>Apogee +</entry>
+               <entry>Apogee pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>6</entry>
+               <entry>Apogee -</entry>
+               <entry>Apogee pyro channel connection to pyro circuit</entry>
+             </row>
+           </tbody>
+         </tgroup>
+       </table>
+      </section>
+      <section>
+       <title>Using a Separate Pyro Battery with TeleMetrum</title>
+       <para>
+         As described above, using an external pyro battery involves
+         connecting the negative battery terminal to the flight
+         computer ground, connecting the positive battery terminal to
+         one of the igniter leads and connecting the other igniter
+         lead to the per-channel pyro circuit connection.
+       </para>
+       <para>
+         To connect the negative battery terminal to the TeleMetrum
+         ground, insert a small piece of wire, 24 to 28 gauge
+         stranded, into the GND hole just above the screw terminal
+         strip and solder it in place.
+       </para>
+       <para>
+         Connecting the positive battery terminal to the pyro
+         charges must be done separate from TeleMetrum, by soldering
+         them together or using some other connector.
+       </para>
+       <para>
+         The other lead from each pyro charge is then inserted into
+         the appropriate per-pyro channel screw terminal (terminal 4 for the
+         Main charge, terminal 6 for the Apogee charge).
+       </para>
+      </section>
+      <section>
+       <title>Using an Active Switch with TeleMetrum</title>
+       <para>
+         As explained above, an external active switch requires three
+         connections, one to the positive battery terminal, one to
+         the flight computer positive input and one to ground.
+       </para>
+       <para>
+         The positive battery terminal is available on screw terminal
+         2, the positive flight computer input is on terminal 1. To
+         hook a lead to ground, solder a piece of wire, 24 to 28
+         gauge stranded, to the GND hole just above terminal 1.
+       </para>
+      </section>
     </section>
     <section>
-      <title>TeleMini</title>
+      <title>TeleMini v1.0</title>
       <informalfigure>
        <mediaobject>
          <imageobject>
@@ -597,6 +815,113 @@ NAR #88757, TRA #12200
        the board, meaning an ideal “simple” avionics bay for TeleMini
        should have at least 9 inches of interior length.
       </para>
+      <section>
+       <title>TeleMini v1.0 Screw Terminals</title>
+       <para>
+         TeleMini v1.0 has four screw terminals on the end of the
+         board opposite the telemetry antenna. Two are for the apogee
+         and two are for main igniter circuits. There are also wires
+         soldered to the board for the power switch.  Using the
+         picture above and starting from the top for the terminals
+         and from the left for the power switch wires, the
+         connections are as follows:
+       </para>
+       <table frame='all'>
+         <title>TeleMini v1.0 Connections</title>
+         <?dbfo keep-together="always"?>
+         <tgroup cols='3' align='center' colsep='1' rowsep='1'>
+           <colspec align='center' colwidth='*' colname='Pin #'/>
+           <colspec align='center' colwidth='2*' colname='Pin Name'/>
+           <colspec align='left' colwidth='5*' colname='Description'/>
+           <thead>
+             <row>
+               <entry align='center'>Terminal #</entry>
+               <entry align='center'>Terminal Name</entry>
+               <entry align='center'>Description</entry>
+             </row>
+           </thead>
+           <tbody>
+             <row>
+               <entry>1</entry>
+               <entry>Apogee -</entry>
+               <entry>Apogee pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>2</entry>
+               <entry>Apogee +</entry>
+               <entry>Apogee pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>3</entry>
+               <entry>Main -</entry>
+               <entry>Main pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>4</entry>
+               <entry>Main +</entry>
+               <entry>Main pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Left</entry>
+               <entry>Switch Output</entry>
+               <entry>Switch connection to flight computer</entry>
+             </row>
+             <row>
+               <entry>Right</entry>
+               <entry>Switch Input</entry>
+               <entry>Switch connection to positive battery terminal</entry>
+             </row>
+           </tbody>
+         </tgroup>
+       </table>
+      </section>
+      <section>
+       <title>Using a Separate Pyro Battery with TeleMini v1.0</title>
+       <para>
+         As described above, using an external pyro battery involves
+         connecting the negative battery terminal to the flight
+         computer ground, connecting the positive battery terminal to
+         one of the igniter leads and connecting the other igniter
+         lead to the per-channel pyro circuit connection. Because
+         there is no solid ground connection to use on TeleMini, this
+         is not recommended.
+       </para>
+       <para>
+         The only available ground connection on TeleMini v1.0 are
+         the two mounting holes next to the telemetry
+         antenna. Somehow connect a small piece of wire to one of
+         those holes and hook it to the negative pyro battery terminal.
+       </para>
+       <para>
+         Connecting the positive battery terminal to the pyro
+         charges must be done separate from TeleMini v1.0, by soldering
+         them together or using some other connector.
+       </para>
+       <para>
+         The other lead from each pyro charge is then inserted into
+         the appropriate per-pyro channel screw terminal (terminal 3 for the
+         Main charge, terminal 1 for the Apogee charge).
+       </para>
+      </section>
+      <section>
+       <title>Using an Active Switch with TeleMini v1.0</title>
+       <para>
+         As explained above, an external active switch requires three
+         connections, one to the positive battery terminal, one to
+         the flight computer positive input and one to ground. Again,
+         because TeleMini doesn't have any good ground connection,
+         this is not recommended.
+       </para>
+       <para>
+         The positive battery terminal is available on the Right
+         power switch wire, the positive flight computer input is on
+         the left power switch wire. Hook a lead to either of the
+         mounting holes for a ground connection.
+       </para>
+      </section>
+    </section>
+    <section>
+      <title>TeleMini v2.0</title>
       <informalfigure>
        <mediaobject>
          <imageobject>
@@ -611,6 +936,117 @@ NAR #88757, TRA #12200
        board fits in a 24mm coupler. There's also a battery connector
        for a LiPo battery if you want to use one of those.
       </para>
+      <section>
+       <title>TeleMini v2.0 Screw Terminals</title>
+       <para>
+         TeleMini v2.0 has two sets of four screw terminals on the end of the
+         board opposite the telemetry antenna. Using the picture
+         above, the top four have connections for the main pyro
+         circuit and an external battery and the bottom four have
+         connections for the apogee pyro circuit and the power
+         switch. Counting from the left, the connections are as follows:
+       </para>
+       <table frame='all'>
+         <title>TeleMini v2.0 Connections</title>
+         <?dbfo keep-together="always"?>
+         <tgroup cols='3' align='center' colsep='1' rowsep='1'>
+           <colspec align='center' colwidth='*' colname='Pin #'/>
+           <colspec align='center' colwidth='2*' colname='Pin Name'/>
+           <colspec align='left' colwidth='5*' colname='Description'/>
+           <thead>
+             <row>
+               <entry align='center'>Terminal #</entry>
+               <entry align='center'>Terminal Name</entry>
+               <entry align='center'>Description</entry>
+             </row>
+           </thead>
+           <tbody>
+             <row>
+               <entry>Top 1</entry>
+               <entry>Main -</entry>
+               <entry>Main pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Top 2</entry>
+               <entry>Main +</entry>
+               <entry>Main pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Top 3</entry>
+               <entry>Battery +</entry>
+               <entry>Positive external battery terminal</entry>
+             </row>
+             <row>
+               <entry>Top 4</entry>
+               <entry>Battery -</entry>
+               <entry>Negative external battery terminal</entry>
+             </row>
+             <row>
+               <entry>Bottom 1</entry>
+               <entry>Apogee -</entry>
+               <entry>Apogee pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Bottom 2</entry>
+               <entry>Apogee +</entry>
+               <entry>Apogee pyro channel common connection to
+               battery +</entry>
+             </row>
+             <row>
+               <entry>Bottom 3</entry>
+               <entry>Switch Output</entry>
+               <entry>Switch connection to flight computer</entry>
+             </row>
+             <row>
+               <entry>Bottom 4</entry>
+               <entry>Switch Input</entry>
+               <entry>Switch connection to positive battery terminal</entry>
+             </row>
+           </tbody>
+         </tgroup>
+       </table>
+      </section>
+      <section>
+       <title>Using a Separate Pyro Battery with TeleMini v2.0</title>
+       <para>
+         As described above, using an external pyro battery involves
+         connecting the negative battery terminal to the flight
+         computer ground, connecting the positive battery terminal to
+         one of the igniter leads and connecting the other igniter
+         lead to the per-channel pyro circuit connection.
+       </para>
+       <para>
+         To connect the negative pyro battery terminal to TeleMini
+         ground, connect it to the negative external battery
+         connection, top terminal 4.
+       </para>
+       <para>
+         Connecting the positive battery terminal to the pyro
+         charges must be done separate from TeleMini v2.0, by soldering
+         them together or using some other connector.
+       </para>
+       <para>
+         The other lead from each pyro charge is then inserted into
+         the appropriate per-pyro channel screw terminal (top
+         terminal 1 for the Main charge, bottom terminal 1 for the
+         Apogee charge).
+       </para>
+      </section>
+      <section>
+       <title>Using an Active Switch with TeleMini v2.0</title>
+       <para>
+         As explained above, an external active switch requires three
+         connections, one to the positive battery terminal, one to
+         the flight computer positive input and one to ground. Use
+         the negative external battery connection, top terminal 4 for
+         ground.
+       </para>
+       <para>
+         The positive battery terminal is available on bottom
+         terminal 4, the positive flight computer input is on the
+         bottom terminal 3.
+       </para>
+      </section>
     </section>
     <section>
       <title>EasyMini</title>
@@ -627,6 +1063,117 @@ NAR #88757, TRA #12200
        screw terminals match TeleMini v2.0, so you can easily swap between
        EasyMini and TeleMini.
       </para>
+      <section>
+       <title>EasyMini Screw Terminals</title>
+       <para>
+         EasyMini has two sets of four screw terminals on the end of the
+         board opposite the telemetry antenna. Using the picture
+         above, the top four have connections for the main pyro
+         circuit and an external battery and the bottom four have
+         connections for the apogee pyro circuit and the power
+         switch. Counting from the left, the connections are as follows:
+       </para>
+       <table frame='all'>
+         <title>EasyMini Connections</title>
+         <?dbfo keep-together="always"?>
+         <tgroup cols='3' align='center' colsep='1' rowsep='1'>
+           <colspec align='center' colwidth='*' colname='Pin #'/>
+           <colspec align='center' colwidth='2*' colname='Pin Name'/>
+           <colspec align='left' colwidth='5*' colname='Description'/>
+           <thead>
+             <row>
+               <entry align='center'>Terminal #</entry>
+               <entry align='center'>Terminal Name</entry>
+               <entry align='center'>Description</entry>
+             </row>
+           </thead>
+           <tbody>
+             <row>
+               <entry>Top 1</entry>
+               <entry>Main -</entry>
+               <entry>Main pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Top 2</entry>
+               <entry>Main +</entry>
+               <entry>Main pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Top 3</entry>
+               <entry>Battery +</entry>
+               <entry>Positive external battery terminal</entry>
+             </row>
+             <row>
+               <entry>Top 4</entry>
+               <entry>Battery -</entry>
+               <entry>Negative external battery terminal</entry>
+             </row>
+             <row>
+               <entry>Bottom 1</entry>
+               <entry>Apogee -</entry>
+               <entry>Apogee pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Bottom 2</entry>
+               <entry>Apogee +</entry>
+               <entry>Apogee pyro channel common connection to
+               battery +</entry>
+             </row>
+             <row>
+               <entry>Bottom 3</entry>
+               <entry>Switch Output</entry>
+               <entry>Switch connection to flight computer</entry>
+             </row>
+             <row>
+               <entry>Bottom 4</entry>
+               <entry>Switch Input</entry>
+               <entry>Switch connection to positive battery terminal</entry>
+             </row>
+           </tbody>
+         </tgroup>
+       </table>
+      </section>
+      <section>
+       <title>Using a Separate Pyro Battery with EasyMini</title>
+       <para>
+         As described above, using an external pyro battery involves
+         connecting the negative battery terminal to the flight
+         computer ground, connecting the positive battery terminal to
+         one of the igniter leads and connecting the other igniter
+         lead to the per-channel pyro circuit connection.
+       </para>
+       <para>
+         To connect the negative pyro battery terminal to TeleMini
+         ground, connect it to the negative external battery
+         connection, top terminal 4.
+       </para>
+       <para>
+         Connecting the positive battery terminal to the pyro
+         charges must be done separate from EasyMini, by soldering
+         them together or using some other connector.
+       </para>
+       <para>
+         The other lead from each pyro charge is then inserted into
+         the appropriate per-pyro channel screw terminal (top
+         terminal 1 for the Main charge, bottom terminal 1 for the
+         Apogee charge).
+       </para>
+      </section>
+      <section>
+       <title>Using an Active Switch with EasyMini</title>
+       <para>
+         As explained above, an external active switch requires three
+         connections, one to the positive battery terminal, one to
+         the flight computer positive input and one to ground. Use
+         the negative external battery connection, top terminal 4 for
+         ground.
+       </para>
+       <para>
+         The positive battery terminal is available on bottom
+         terminal 4, the positive flight computer input is on the
+         bottom terminal 3.
+       </para>
+      </section>
     </section>
     <section>
       <title>TeleMega</title>
@@ -644,6 +1191,161 @@ NAR #88757, TRA #12200
        the board is aligned with the flight axis. It can be mounted
        either antenna up or down.
       </para>
+      <section>
+       <title>TeleMega Screw Terminals</title>
+       <para>
+         TeleMega has two sets of nine screw terminals on the end of
+         the board opposite the telemetry antenna. They are as follows:
+       </para>
+       <table frame='all'>
+         <title>TeleMega Screw Terminals</title>
+         <?dbfo keep-together="always"?>
+         <tgroup cols='3' align='center' colsep='1' rowsep='1'>
+           <colspec align='center' colwidth='*' colname='Pin #'/>
+           <colspec align='center' colwidth='2*' colname='Pin Name'/>
+           <colspec align='left' colwidth='5*' colname='Description'/>
+           <thead>
+             <row>
+               <entry align='center'>Terminal #</entry>
+               <entry align='center'>Terminal Name</entry>
+               <entry align='center'>Description</entry>
+             </row>
+           </thead>
+           <tbody>
+             <row>
+               <entry>Top 1</entry>
+               <entry>Switch Input</entry>
+               <entry>Switch connection to positive battery terminal</entry>
+             </row>
+             <row>
+               <entry>Top 2</entry>
+               <entry>Switch Output</entry>
+               <entry>Switch connection to flight computer</entry>
+             </row>
+             <row>
+               <entry>Top 3</entry>
+               <entry>GND</entry>
+               <entry>Ground connection for use with external active switch</entry>
+             </row>
+             <row>
+               <entry>Top 4</entry>
+               <entry>Main -</entry>
+               <entry>Main pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Top 5</entry>
+               <entry>Main +</entry>
+               <entry>Main pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Top 6</entry>
+               <entry>Apogee -</entry>
+               <entry>Apogee pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Top 7</entry>
+               <entry>Apogee +</entry>
+               <entry>Apogee pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Top 8</entry>
+               <entry>D -</entry>
+               <entry>D pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Top 9</entry>
+               <entry>D +</entry>
+               <entry>D pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Bottom 1</entry>
+               <entry>GND</entry>
+               <entry>Ground connection for negative pyro battery terminal</entry>
+             </row>
+             <row>
+               <entry>Bottom 2</entry>
+               <entry>Pyro</entry>
+               <entry>Positive pyro battery terminal</entry>
+             </row>
+             <row>
+               <entry>Bottom 3</entry>
+               <entry>Lipo</entry>
+               <entry>
+                 Power switch output. Use to connect main battery to
+                 pyro battery input
+               </entry>
+             </row>
+             <row>
+               <entry>Bottom 4</entry>
+               <entry>A -</entry>
+               <entry>A pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Bottom 5</entry>
+               <entry>A +</entry>
+               <entry>A pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Bottom 6</entry>
+               <entry>B -</entry>
+               <entry>B pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Bottom 7</entry>
+               <entry>B +</entry>
+               <entry>B pyro channel common connection to battery +</entry>
+             </row>
+             <row>
+               <entry>Bottom 8</entry>
+               <entry>C -</entry>
+               <entry>C pyro channel connection to pyro circuit</entry>
+             </row>
+             <row>
+               <entry>Bottom 9</entry>
+               <entry>C +</entry>
+               <entry>C pyro channel common connection to battery +</entry>
+             </row>
+           </tbody>
+         </tgroup>
+       </table>
+      </section>
+      <section>
+       <title>Using a Separate Pyro Battery with TeleMega</title>
+       <para>
+         TeleMega provides explicit support for an external pyro
+         battery. All that is required is to remove the jumper
+         between the lipo terminal (Bottom 3) and the pyro terminal
+         (Bottom 2). Then hook the negative pyro battery terminal to ground
+         (Bottom 1) and the positive pyro battery to the pyro battery
+         input (Bottom 2). You can then use the existing pyro screw
+         terminals to hook up all of the pyro charges.
+       </para>
+      </section>
+      <section>
+       <title>Using Only One Battery With TeleMega</title>
+       <para>
+         Because TeleMega has built-in support for a separate pyro
+         battery, if you want to fly with just one battery running
+         both the computer and firing the charges, you need to
+         connect the flight computer battery to the pyro
+         circuit. TeleMega has two screw terminals for this—hook a
+         wire from the Lipo terminal (Bottom 3) to the Pyro terminal
+         (Bottom 2).
+       </para>
+      </section>
+      <section>
+       <title>Using an Active Switch with TeleMega</title>
+       <para>
+         As explained above, an external active switch requires three
+         connections, one to the positive battery terminal, one to
+         the flight computer positive input and one to ground.
+       </para>
+       <para>
+         The positive battery terminal is available on Top terminal
+         1, the positive flight computer input is on Top terminal
+         2. Ground is on Top terminal 3.
+       </para>
+      </section>
     </section>
     <section>
       <title>Flight Data Recording</title>
@@ -789,7 +1491,6 @@ NAR #88757, TRA #12200
        pyro battery, check out the “External Pyro Battery” section in this 
        manual for instructions on how to wire that up. The altimeters are 
        designed to work with an external pyro battery of no more than 15 volts.
-
       </para>
       <para>
        Ejection charges are wired directly to the screw terminal block
@@ -912,7 +1613,7 @@ NAR #88757, TRA #12200
                <entry>dit dit dah dit</entry>
                <entry>
                  <para>
-                   Decellerating, but moving faster than 200m/s.
+                   Decelerating, but moving faster than 200m/s.
                  </para>
                </entry>
              </row>
@@ -922,7 +1623,7 @@ NAR #88757, TRA #12200
                <entry>dah dit dah dit</entry>
                <entry>
                  <para>
-                   Decellerating, moving slower than 200m/s
+                   Decelerating, moving slower than 200m/s
                  </para>
                </entry>
              </row>
@@ -1308,22 +2009,112 @@ NAR #88757, TRA #12200
         time, and would of course appreciate customer feedback on
         performance in higher altitude flights!
       </para>
+    </section>
+    <section>
+      <title>APRS</title>
       <para>
        TeleMetrum v2.0 and TeleMega can send APRS if desired, and the
        interval between APRS packets can be configured. As each APRS
        packet takes a full second to transmit, we recommend an
        interval of at least 5 seconds to avoid consuming too much
-       battery power or radio channel bandwidth.
+       battery power or radio channel bandwidth. You can configure
+       the APRS interval using AltosUI; that process is described in
+       the Configure Altimeter section of the AltosUI chapter.
+      </para>
+      <para>
+       AltOS uses the APRS compressed position report data format,
+       which provides for higher position precision and shorter
+       packets than the original APRS format. It also includes
+       altitude data, which is invaluable when tracking rockets. We
+       haven't found a receiver which doesn't handle compressed
+       positions, but it's just possible that you have one, so if you
+       have an older device that can receive the raw packets but
+       isn't displaying position information, it's possible that this
+       is the cause.
+      </para>
+      <para>
+       The APRS packet format includes a comment field that can have
+       arbitrary text in it. AltOS uses this to send status
+       information about the flight computer. It sends four fields as
+       shown in the following table.
+      </para>
+      <table frame='all'>
+       <title>Altus Metrum APRS Comments</title>
+       <?dbfo keep-together="always"?>
+       <tgroup cols='3' align='center' colsep='1' rowsep='1'>
+         <colspec align='center' colwidth='*' colname='Field'/>
+         <colspec align='center' colwidth='*' colname='Example'/>
+         <colspec align='center' colwidth='4*' colname='Description'/>
+         <thead>
+           <row>
+             <entry align='center'>Field</entry>
+             <entry align='center'>Example</entry>
+             <entry align='center'>Description</entry>
+           </row>
+         </thead>
+         <tbody>
+           <row>
+             <entry>1</entry>
+             <entry>L</entry>
+             <entry>GPS Status U for unlocked, L for locked</entry>
+           </row>
+           <row>
+             <entry>2</entry>
+             <entry>6</entry>
+             <entry>Number of Satellites in View</entry>
+           </row>
+           <row>
+             <entry>3</entry>
+             <entry>B4.0</entry>
+             <entry>Altimeter Battery Voltage</entry>
+           </row>
+           <row>
+             <entry>4</entry>
+             <entry>A3.7</entry>
+             <entry>Apogee Igniter Voltage</entry>
+           </row>
+           <row>
+             <entry>5</entry>
+             <entry>M3.7</entry>
+             <entry>Main Igniter Voltage</entry>
+           </row>
+         </tbody>
+       </tgroup>
+      </table>
+      <para>
+       Here's an example of an APRS comment showing GPS lock with 6
+       satellites in view, a primary battery at 4.0V, and
+       apogee and main igniters both at 3.7V.
+       <screen>
+         L6 B4.0 A3.7 M3.7
+       </screen>
+      </para>
+      <para>
+       Make sure your primary battery is above 3.8V, any connected
+       igniters are above 3.5V and GPS is locked with at least 5 or 6
+       satellites in view before flying. If GPS is switching between
+       L and U regularly, then it doesn't have a good lock and you
+       should wait until it becomes stable.
+      </para>
+      <para>
+       If the GPS receiver loses lock, the APRS data transmitted will
+       contain the last position for which GPS lock was
+       available. You can tell that this has happened by noticing
+       that the GPS status character switches from 'L' to 'U'. Before
+       GPS has locked, APRS will transmit zero for latitude,
+       longitude and altitude.
       </para>
     </section>
     <section>
       <title>Configurable Parameters</title>
       <para>
         Configuring an Altus Metrum altimeter for flight is very
-        simple.  Even on our baro-only TeleMini and EasyMini boards, the use of a Kalman 
-        filter means there is no need to set a “mach delay”.  The few 
-        configurable parameters can all be set using AltosUI over USB or
-        or radio link via TeleDongle.
+        simple.  Even on our baro-only TeleMini and EasyMini boards,
+        the use of a Kalman filter means there is no need to set a
+        “mach delay”.  The few configurable parameters can all be set
+        using AltosUI over USB or or radio link via TeleDongle. Read
+       the Configure Altimeter section in the AltosUI chapter below
+       for more information.
       </para>
       <section>
         <title>Radio Frequency</title>
@@ -1339,6 +2130,35 @@ NAR #88757, TRA #12200
          frequency to successfully communicate with each other.
         </para>
       </section>
+      <section>
+       <title>Callsign</title>
+       <para>
+         This sets the callsign used for telemetry, APRS and the
+         packet link. For telemetry and APRS, this is used to
+         identify the device. For the packet link, the callsign must
+         match that configured in AltosUI or the link will not
+         work. This is to prevent accidental configuration of another
+         Altus Metrum flight computer operating on the same frequency nearby.
+       </para>
+      </section>
+      <section>
+       <title>Telemetry/RDF/APRS Enable</title>
+       <para>
+         You can completely disable the radio while in flight, if
+         necessary. This doesn't disable the packet link in idle
+         mode.
+       </para>
+      </section>
+      <section>
+       <title>APRS Interval</title>
+       <para>
+         This selects how often APRS packets are transmitted. Set
+         this to zero to disable APRS without also disabling the
+         regular telemetry and RDF transmissions. As APRS takes a
+         full second to transmit a single position report, we
+         recommend sending packets no more than once every 5 seconds.
+       </para>
+      </section>
       <section>
         <title>Apogee Delay</title>
         <para>
@@ -1533,7 +2353,7 @@ NAR #88757, TRA #12200
                <listitem>
                  <para>
                    Fast. The motor has burned out and the rocket is
-                   descellerating, but it is going faster than 200m/s.
+                   decelerating, but it is going faster than 200m/s.
                  </para>
                </listitem>
                <listitem>
@@ -2248,9 +3068,10 @@ NAR #88757, TRA #12200
       <section>
        <title>APRS Interval</title>
        <para>
-         How often to transmit GPS information via APRS. This option
-         is available on TeleMetrum v2 and TeleMega
-         boards. TeleMetrum v1 boards cannot transmit APRS
+         How often to transmit GPS information via APRS (in
+         seconds). When set to zero, APRS transmission is
+         disabled. This option is available on TeleMetrum v2 and
+         TeleMega boards. TeleMetrum v1 boards cannot transmit APRS
          packets. Note that a single APRS packet takes nearly a full
          second to transmit, so enabling this option will prevent
          sending any other telemetry during that time.
@@ -4456,6 +5277,13 @@ NAR #88757, TRA #12200
   </appendix>
   <appendix>
     <title>Release Notes</title>
+    <simplesect>
+      <title>Version 1.3.2</title>
+      <xi:include
+         xmlns:xi="http://www.w3.org/2001/XInclude"
+         href="release-notes-1.3.2.xsl"
+         xpointer="xpointer(/article/*)"/>
+    </simplesect>
     <simplesect>
       <title>Version 1.3.1</title>
       <xi:include
index 6601ecb7d281609e049cbd83c47e0b96f01a0401..d486d19ca12b3c4ffca6a7ec49b7964b6ca56a0f 100644 (file)
Binary files a/doc/ascent.png and b/doc/ascent.png differ
index 4f03c0a59cbb99352b91c867574ad747ee4fac22..1c6ae066db5ac7cb7646fb62b804cf8f5b5e5753 100644 (file)
Binary files a/doc/configure-pyro.png and b/doc/configure-pyro.png differ
index 3dd838d490edb75f6549edc3e0feaa8a79cdf167..4ac4b9624635753801724c4e03757ebcd0a498e8 100644 (file)
Binary files a/doc/descent.png and b/doc/descent.png differ
index f870c49351fe05c994774894a0c76d1d86ef888d..5fb2bc6ab7e4bbf2b325e1e1c391f15521e21752 100644 (file)
Binary files a/doc/fire-igniter.png and b/doc/fire-igniter.png differ
index e72b6c5f5e2db2a169c470278acd9283b199ed11..d3374ba84d9b0c81eb5b0c1226fcfe869c89a615 100644 (file)
Binary files a/doc/graph-configure.png and b/doc/graph-configure.png differ
index 41eeba22f5b940a91df8b91a4f0fd2739dfd14ca..777d2445abb16aa45c4fd73a046059a37df2aa71 100644 (file)
Binary files a/doc/landed.png and b/doc/landed.png differ
index 701074eaba682e15f5db7d871bbf637e852d0db2..a7a05c08acaaea467f5bedb9c90077fe55b51d9b 100644 (file)
Binary files a/doc/launch-pad.png and b/doc/launch-pad.png differ
diff --git a/doc/micropeak-app.png b/doc/micropeak-app.png
new file mode 100644 (file)
index 0000000..abdb93f
Binary files /dev/null and b/doc/micropeak-app.png differ
diff --git a/doc/micropeak-back.jpg b/doc/micropeak-back.jpg
new file mode 100644 (file)
index 0000000..5c531aa
Binary files /dev/null and b/doc/micropeak-back.jpg differ
diff --git a/doc/micropeak-device-dialog.png b/doc/micropeak-device-dialog.png
new file mode 100644 (file)
index 0000000..95d444d
Binary files /dev/null and b/doc/micropeak-device-dialog.png differ
diff --git a/doc/micropeak-dime.jpg b/doc/micropeak-dime.jpg
new file mode 100644 (file)
index 0000000..0614eb5
Binary files /dev/null and b/doc/micropeak-dime.jpg differ
diff --git a/doc/micropeak-download.png b/doc/micropeak-download.png
new file mode 100644 (file)
index 0000000..d78f35f
Binary files /dev/null and b/doc/micropeak-download.png differ
diff --git a/doc/micropeak-graph-configure.png b/doc/micropeak-graph-configure.png
new file mode 100644 (file)
index 0000000..215c9bc
Binary files /dev/null and b/doc/micropeak-graph-configure.png differ
diff --git a/doc/micropeak-graph.png b/doc/micropeak-graph.png
new file mode 100644 (file)
index 0000000..002370c
Binary files /dev/null and b/doc/micropeak-graph.png differ
diff --git a/doc/micropeak-nofont.svg b/doc/micropeak-nofont.svg
new file mode 100644 (file)
index 0000000..5e96b58
--- /dev/null
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="45.75"
+   height="50.5"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="micropeak-nofont.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient5343">
+      <stop
+         style="stop-color:#7200a4;stop-opacity:1;"
+         offset="0"
+         id="stop5345" />
+      <stop
+         style="stop-color:#da7000;stop-opacity:1;"
+         offset="1"
+         id="stop5347" />
+    </linearGradient>
+    <marker
+       inkscape:stockid="Arrow2Send"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Send"
+       style="overflow:visible">
+      <path
+         id="path3798"
+         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-0.3,0,0,-0.3,0.69,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Send"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Send"
+       style="overflow:visible">
+      <path
+         id="path3780"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+         transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Mend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Mend"
+       style="overflow:visible">
+      <path
+         id="path3792"
+         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="scale(-0.6,-0.6)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow1Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow1Lend"
+       style="overflow:visible">
+      <path
+         id="path3768"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       inkscape:stockid="Arrow2Lend"
+       orient="auto"
+       refY="0"
+       refX="0"
+       id="Arrow2Lend"
+       style="overflow:visible">
+      <path
+         id="path3786"
+         style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
+         d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+         transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5343"
+       id="linearGradient5349"
+       x1="255.48561"
+       y1="275.90405"
+       x2="280.61411"
+       y2="275.90405"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16.321712"
+     inkscape:cx="39.182144"
+     inkscape:cy="19.678463"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1871"
+     inkscape:window-height="1383"
+     inkscape:window-x="653"
+     inkscape:window-y="147"
+     inkscape:window-maximized="0"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-241.93841,-252.5196)">
+    <g
+       style="font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#7200a4;fill-opacity:1;stroke:none;font-family:Minion Pro;-inkscape-font-specification:Minion Pro"
+       id="text2985">
+      <path
+         d="m 257.20241,268.30647 c 0,-1.07999 -0.396,-1.872 -1.584,-1.872 -1.188,0 -1.584,0.79201 -1.584,1.872 l 0,8.676 c 0,2.88 -2.052,5.112 -4.824,5.112 -3.06,0 -4.104,-1.872 -4.104,-5.076 l 0,-8.712 c 0,-1.07999 -0.396,-1.872 -1.584,-1.872 -1.188,0 -1.584,0.79201 -1.584,1.872 l 0,21.924 c 0,1.08 0.396,1.872 1.584,1.872 1.188,0 1.584,-0.792 1.584,-1.872 l 0,-6.156 c 0.792,0.612 2.088,0.972 3.564,0.972 2.304,0 4.428,-0.792 5.652,-2.988 l 0.072,0.072 0,1.26 c 0,0.864 0.54,1.44 1.404,1.44 0.864,0 1.404,-0.576 1.404,-1.44 l 0,-15.084"
+         style="font-size:36px;font-weight:500;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#7200a4;font-family:ITC Benguiat Gothic Std;-inkscape-font-specification:ITC Benguiat Gothic Std Medium"
+         id="path3003"
+         inkscape:connector-curvature="0" />
+    </g>
+    <path
+       style="fill:none;stroke:url(#linearGradient5349);stroke-width:2.9000001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:none"
+       d="m 256.93561,290.70327 c 3.04022,-0.24413 4.30317,-2.66932 5.38268,-5.56604 1.68059,-4.50963 3.67214,-15.86904 8.62227,-20.55527 4.0668,-3.85 8.22354,-3.46656 8.22354,-3.46656"
+       id="path2991"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cssc" />
+    <path
+       sodipodi:type="star"
+       style="fill:none;stroke:#da7000;stroke-width:1.10000002;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path5341"
+       sodipodi:sides="5"
+       sodipodi:cx="279.29056"
+       sodipodi:cy="261.05426"
+       sodipodi:r1="7.2514729"
+       sodipodi:r2="3.6257365"
+       sodipodi:arg1="1.0731354"
+       sodipodi:arg2="1.7014539"
+       inkscape:flatsided="false"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="m 282.7522,267.42614 -3.93403,-2.77705 -4.51792,1.66641 1.42544,-4.59964 -2.98096,-3.78185 4.815,-0.0657 2.67559,-4.00372 1.55039,4.55904 4.63457,1.30742 -3.85681,2.88333 z"
+       inkscape:transform-center-x="-0.29194889"
+       inkscape:transform-center-y="-0.40889198" />
+    <g
+       style="font-size:10px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#7200a4;fill-opacity:1;stroke:none;font-family:ITC Benguiat Gothic Std;-inkscape-font-specification:ITC Benguiat Gothic Std Bold"
+       id="text5351">
+      <path
+         d="m 245.09283,298.56959 c -0.41,-0.49999 -0.65,-1.14 -0.99,-1.97 -0.16,-0.38999 -0.4,-0.55 -0.8,-0.55 -0.77,0 -0.8,0.59001 -0.96,1.55 -0.19,1.13 -0.36,3.09001 -0.36,4.23 0,0.7 0.05,1.16 0.62,1.16 0.56,0 0.64,-0.38 0.64,-0.85 l 0,-1.58 c 0,-0.86999 0.1,-1.77 0.24,-2.69 l 0.02,0 c 0.16,0.51 0.89,2.18 1.59,2.18 0.7,0 1.43,-1.67 1.59,-2.18 l 0.02,0 c 0.14,0.92 0.24,1.82001 0.24,2.69 l 0,1.58 c 0,0.47 0.08,0.85 0.64,0.85 0.57,0 0.62,-0.46 0.62,-1.16 0,-1.13999 -0.17,-3.1 -0.36,-4.23 -0.16,-0.95999 -0.19,-1.55 -0.96,-1.55 -0.4,0 -0.64,0.16001 -0.8,0.55 -0.34,0.83 -0.58,1.47001 -0.99,1.97"
+         id="path3006"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 250.6994,298.46959 c 0,-0.35999 -0.19,-0.65 -0.6,-0.65 -0.41,0 -0.6,0.29001 -0.6,0.65 l 0,3.87 c 0,0.36 0.19,0.65 0.6,0.65 0.41,0 0.6,-0.29 0.6,-0.65 l 0,-3.87 m -0.6,-2.65 c -0.37,0 -0.66,0.26001 -0.66,0.74 0,0.48 0.29,0.74 0.66,0.74 0.37,0 0.66,-0.26 0.66,-0.74 0,-0.47999 -0.29,-0.74 -0.66,-0.74"
+         id="path3008"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 253.96283,297.87959 c -1.31999,0 -2.16,1.00001 -2.16,2.19 0,1.35 1.04001,2.89 3.46,2.89 0.94,0 1.2,-0.17 1.2,-0.56 0,-0.44999 -0.2,-0.58 -1.03,-0.58 -1.33999,0 -2.31,-0.58 -2.31,-1.78 0,-0.51999 0.38,-1.02 1.08,-1.02 l 1.51,0 c 0.34,0 0.61,-0.18 0.61,-0.57 0,-0.38999 -0.27,-0.57 -0.61,-0.57 l -1.75,0"
+         id="path3010"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 257.17283,302.30959 c 0,0.39 0.22,0.68 0.6,0.68 0.38,0 0.6,-0.29 0.6,-0.68 l 0,-2.19 c 0,-0.91999 0.29,-1.16 0.88,-1.16 0.43,0 0.69,-0.18 0.69,-0.56 0,-0.33999 -0.18,-0.58 -0.62,-0.58 -0.56,0 -0.94,0.24001 -1.02,0.79 l -0.02,0 -0.02,-0.31 c -0.04,-0.44999 -0.32,-0.48 -0.54,-0.48 -0.35,0 -0.55,0.20001 -0.55,0.61 l 0,3.88"
+         id="path3012"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 265.06268,300.41959 c 0,-1.45999 -0.9,-2.6 -2.46,-2.6 -1.56,0 -2.46,1.14001 -2.46,2.6 0,1.46 0.9,2.6 2.46,2.6 1.56,0 2.46,-1.14 2.46,-2.6 m -1.26,0 c 0,0.8 -0.38,1.52 -1.2,1.52 -0.82,0 -1.2,-0.72 -1.2,-1.52 0,-0.79999 0.38,-1.52 1.2,-1.52 0.82,0 1.2,0.72001 1.2,1.52"
+         id="path3014"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 266.07908,302.30959 c 0,0.38 0.2,0.68 0.63,0.68 0.43,0 0.63,-0.3 0.63,-0.68 l 0,-2.07 c 2.5,-0.67999 3.6,-1.44 3.6,-2.74 0,-0.83999 -0.54,-1.42 -1.58,-1.42 l -2.65,0 c -0.43,0 -0.63,0.22001 -0.63,0.54 l 0,5.69 m 1.26,-5.15 1.46,0 c 0.74,0 0.88,0.16 0.88,0.43 0,0.61 -1.68,1.31 -2.34,1.45 l 0,-1.88"
+         id="path3016"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 275.53549,302.95959 c 0.32,0 0.58,-0.17 0.58,-0.54 0,-0.36999 -0.26,-0.54 -0.58,-0.54 l -1.29,0 c -0.84,0 -1.55,-0.25 -1.63,-1.19 l 3.06,0 c 0.42,0 0.49,-0.25 0.49,-0.59 0,-1.16999 -0.69,-2.28 -2.36,-2.28 -1.53,0 -2.51,1.17001 -2.51,2.67 0,1.49 1,2.47 2.78,2.47 l 1.46,0 m -2.84,-3.17 c 0.14,-0.59999 0.64,-0.97 1.11,-0.97 0.47,0 0.97,0.37001 1.1,0.97 l -2.21,0"
+         id="path3018"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 281.2219,299.57959 c 0,-1.22999 -0.62,-1.7 -1.68,-1.7 l -1.75,0 c -0.33,0 -0.59,0.17001 -0.59,0.54 0,0.37 0.26,0.54 0.59,0.54 l 1.83,0 c 0.27,0 0.4,0.14001 0.4,0.65 l -0.42,0 c -1.17,0 -2.78,0.39001 -2.78,1.83 0,0.96 0.74,1.58 1.75,1.58 0.69,0 1.23,-0.18 1.55,-0.58 0.03,0.38 0.18,0.58 0.51,0.58 0.44,0 0.59,-0.25 0.59,-0.66 l 0,-2.78 m -1.14,1.57 c 0,0.57 -0.58,0.91 -1.14,0.91 -0.6,0 -0.92,-0.27 -0.92,-0.68 0,-0.46999 0.67,-0.87 2.06,-0.87 l 0,0.64"
+         id="path3020"
+         inkscape:connector-curvature="0" />
+      <path
+         d="m 283.9183,300.21959 c 1.34,0.08 1.87,1.30001 1.85,1.87 -0.02,0.63 0.19,0.9 0.6,0.9 0.47,0 0.6,-0.33 0.6,-0.66 0,-0.75999 -0.24,-2.1 -1.66,-2.61 l 0,-0.02 c 0.68,-0.2 1.32,-0.79 1.32,-1.39 0,-0.28999 -0.2,-0.49 -0.54,-0.49 -0.21,0 -0.43,0.12 -0.58,0.39 -0.3,0.56 -0.82,0.94 -1.59,1.01 l 0,-2.72 c 0,-0.35999 -0.19,-0.65 -0.6,-0.65 -0.41,0 -0.6,0.29001 -0.6,0.65 l 0,5.84 c 0,0.36 0.19,0.65 0.6,0.65 0.41,0 0.6,-0.29 0.6,-0.65 l 0,-2.12"
+         id="path3022"
+         inkscape:connector-curvature="0" />
+    </g>
+  </g>
+</svg>
diff --git a/doc/micropeak-preferences.png b/doc/micropeak-preferences.png
new file mode 100644 (file)
index 0000000..ba6d37a
Binary files /dev/null and b/doc/micropeak-preferences.png differ
diff --git a/doc/micropeak-raw-data.png b/doc/micropeak-raw-data.png
new file mode 100644 (file)
index 0000000..ef4a133
Binary files /dev/null and b/doc/micropeak-raw-data.png differ
diff --git a/doc/micropeak-save-dialog.png b/doc/micropeak-save-dialog.png
new file mode 100644 (file)
index 0000000..cb5771b
Binary files /dev/null and b/doc/micropeak-save-dialog.png differ
diff --git a/doc/micropeak-statistics.png b/doc/micropeak-statistics.png
new file mode 100644 (file)
index 0000000..97c28cd
Binary files /dev/null and b/doc/micropeak-statistics.png differ
index 8c487e5d97d0d60d8d1cfc892b431356107892e7..66b04072a7634cc3b047adedab05f411554725cd 100644 (file)
       <year>2012</year>
       <holder>Bdale Garbee and Keith Packard</holder>
     </copyright>
+    <mediaobject>
+      <imageobject>
+       <imagedata fileref="micropeak-dime.jpg" width="6in"/>
+      </imageobject>
+    </mediaobject>
     <legalnotice>
       <para>
         This document is released under the terms of the
          determination.
        </revremark>
       </revision>
+      <revision>
+       <revnumber>1.3.2</revnumber>
+       <date>12 February 2014</date>
+       <revremark>
+         Add a "Download" button to the main window, which makes it
+         quicker to access the download function. Update the data
+         download documentation to reflect the new MicroPeak USB
+         adapter design. Monitor data during download to let you see
+         if the USB connection is working at all by showing the
+         characters received from the MicroPeak USB adapter.
+       </revremark>
+      </revision>
     </revhistory>
   </bookinfo>
   <dedication>
@@ -87,6 +104,13 @@ NAR #88757, TRA #12200
          holder with the positive (+) terminal facing away from the
          circuit board.
        </para>
+       <informalfigure>
+         <mediaobject>
+           <imageobject>
+             <imagedata fileref="micropeak-back.jpg" width="4.5in"/>
+           </imageobject>
+         </mediaobject>
+       </informalfigure>
       </listitem>
       <listitem>
        <para>
@@ -187,6 +211,13 @@ NAR #88757, TRA #12200
   </chapter>
   <chapter>
     <title>The MicroPeak USB adapter</title>
+    <informalfigure>
+      <mediaobject>
+       <imageobject>
+         <imagedata fileref="MicroPeakUSB-2.0.jpg" width="4.5in"/>
+       </imageobject>
+      </mediaobject>
+    </informalfigure>
     <para>
       MicroPeak stores barometric pressure information for the first
       48 seconds of the flight in on-board non-volatile memory. The
@@ -213,32 +244,80 @@ NAR #88757, TRA #12200
       <itemizedlist>
        <listitem>
          <para>
-           Connect the MicroPeak USB adapter to a USB cable and plug it
-           in to your computer.
+           Plug the MicroPeak USB adapter in to your computer.
          </para>
        </listitem>
        <listitem>
+         <?dbfo keep-together="always"?>
          <para>
-           Start the MicroPeak application, locate the File menu and
-           select the Download entry.
+           Start the MicroPeak application.
          </para>
+         <informalfigure>
+           <mediaobject>
+             <imageobject>
+               <imagedata fileref="micropeak-nofont.svg" width="0.5in"/>
+             </imageobject>
+           </mediaobject>
+         </informalfigure>
        </listitem>
        <listitem>
+         <?dbfo keep-together="always"?>
          <para>
-           The MicroPeak USB adapter has a small phototransistor on
-           the end of the board furthest from the USB
-           connector. Locate this and place the LED on the MicroPeak
-           directly in contact with it. The MicroPeak LED and the
-           MicroPeak USB adapter photo need to be touching—even a
-           millimeters of space between them will reduce the light
-           intensity from the LED enough that the phototransistor
-           will not sense it. Turn on the MicroPeak board and adjust
-           the position until the blue LED on the MicroPeak USB
-           adapter blinks in time with the orange LED on the
-           MicroPeak board.
+            Click on the Download button at the top of the window.
          </para>
+         <informalfigure>
+           <mediaobject>
+             <imageobject>
+               <imagedata fileref="micropeak-app.png" width="4.5in"/>
+             </imageobject>
+           </mediaobject>
+         </informalfigure>
        </listitem>
        <listitem>
+         <?dbfo keep-together="always"?>
+         <para>
+           Select from the listed devices. There will probably be
+           only one.
+         </para>
+         <informalfigure>
+           <mediaobject>
+             <imageobject>
+               <imagedata fileref="micropeak-device-dialog.png" width="2.3in"/>
+             </imageobject>
+           </mediaobject>
+         </informalfigure>
+       </listitem>
+       <listitem>
+         <para>
+           The application will now wait until it receives valid data
+           from the MicroPeak USB adapter.
+         </para>
+         <informalfigure>
+           <mediaobject>
+             <imageobject>
+               <imagedata fileref="micropeak-download.png" width="2in"/>
+             </imageobject>
+           </mediaobject>
+         </informalfigure>
+         <para>
+           The MicroPeak USB adapter has a small phototransistor
+           under the hole in the center of the box.
+           Locate this, turn on the MicroPeak and place the orange LED on the MicroPeak
+           directly inside the hole, resting the MicroPeak itself on
+           the box. You should see the blue LED on the MicroPeak USB
+           adapter blinking in time with the orange LED on the
+           MicroPeak board itself.
+         </para>
+         <informalfigure>
+           <mediaobject>
+             <imageobject>
+               <imagedata fileref="MicroPeakUSB-2.0-inuse.jpg" width="4.5in"/>
+             </imageobject>
+           </mediaobject>
+         </informalfigure>
+       </listitem>
+       <listitem>
+         <?dbfo keep-together="always"?>
          <para>
            After the maximum flight height is reported, MicroPeak will
            pause for a few seconds, blink the LED four times rapidly
@@ -248,6 +327,22 @@ NAR #88757, TRA #12200
            data to a file. If not, you can power cycle the MicroPeak
            board and try again.
          </para>
+         <informalfigure>
+           <mediaobject>
+             <imageobject>
+               <imagedata fileref="micropeak-save-dialog.png" width="2.3in"/>
+             </imageobject>
+           </mediaobject>
+         </informalfigure>
+       </listitem>
+       <listitem>
+         <?dbfo keep-together="always"?>
+         <para>
+           Once the data are saved, a graph will be displayed with
+           height, speed and acceleration values computed from the
+           recorded barometric pressure data. See the next section
+           for more details on that.
+         </para>
        </listitem>
       </itemizedlist>
     </section>
@@ -275,26 +370,6 @@ NAR #88757, TRA #12200
        reasonably smooth speed and acceleration data, which would
        otherwise be swamped with noise.
       </para>
-      <para>
-       Under the Graph tab, the height, speed and acceleration values
-       are displayed together. You can zoom in on the graph by
-       clicking and dragging to sweep out an area of
-       interest. Right-click on the plot to bring up a menu that will
-       let you save, copy or print the graph.
-      </para>
-      <para>
-       The Statistics tab presents overall data from the flight. Note
-       that the Maximum height value is taken from the minumum
-       pressure captured in flight, and may be different from the
-       apparant apogee value as the on-board data are sampled twice
-       as fast as the recorded values, or because the true apogee
-       occurred after the on-board memory was full. Each value is
-       presented in several units as appropriate.
-      </para>
-      <para>
-       A table consisting of the both the raw barometric pressure
-       data and values computed from that for each recorded time.
-      </para>
       <para>
        The File menu has operations to open existing flight logs,
        Download new data from MicroPeak, Save a copy of the flight
@@ -303,9 +378,80 @@ NAR #88757, TRA #12200
        the current window or close all windows and Exit the
        application.
       </para>
+      <section>
+       <title>MicroPeak Graphs</title>
+       <para>
+         Under the Graph tab, the height, speed and acceleration values
+         are displayed together. You can zoom in on the graph by
+         clicking and dragging to sweep out an area of
+         interest. Right-click on the plot to bring up a menu that will
+         let you save, copy or print the graph.
+       </para>
+       <informalfigure>
+         <mediaobject>
+           <imageobject>
+             <imagedata fileref="micropeak-graph.png" width="4.5in"/>
+           </imageobject>
+         </mediaobject>
+       </informalfigure>
+      </section>
+      <section>
+       <title>MicroPeak Flight Statistics</title>
+       <para>
+         The Statistics tab presents overall data from the flight. Note
+         that the Maximum height value is taken from the minumum
+         pressure captured in flight, and may be different from the
+         apparant apogee value as the on-board data are sampled twice
+         as fast as the recorded values, or because the true apogee
+         occurred after the on-board memory was full. Each value is
+         presented in several units as appropriate.
+       </para>
+       <informalfigure>
+         <mediaobject>
+           <imageobject>
+             <imagedata fileref="micropeak-statistics.png" width="4.5in"/>
+           </imageobject>
+         </mediaobject>
+       </informalfigure>
+      </section>
+      <section>
+       <title>Raw Data</title>
+       <para>
+         A table consisting of the both the raw barometric pressure
+         data and values computed from that for each recorded time.
+       </para>
+       <informalfigure>
+         <mediaobject>
+           <imageobject>
+             <imagedata fileref="micropeak-raw-data.png" width="4.5in"/>
+           </imageobject>
+         </mediaobject>
+       </informalfigure>
+      </section>
+      <section>
+       <title>Configuring the Graph</title>
+       <para>
+         This selects which graph elements to show, and lets you
+         switch between metric and imperial units
+       </para>
+       <informalfigure>
+         <mediaobject>
+           <imageobject>
+             <imagedata fileref="micropeak-graph-configure.png" width="4.5in"/>
+           </imageobject>
+         </mediaobject>
+       </informalfigure>
+      </section>
     </section>
     <section>
-      <title>Configuring the MicroPeak application</title>
+      <title>Setting MicroPeak Preferences</title>
+      <informalfigure>
+       <mediaobject>
+         <imageobject>
+           <imagedata fileref="micropeak-preferences.png" width="1.8in"/>
+         </imageobject>
+       </mediaobject>
+      </informalfigure>
       <para>
        The MicroPeak application has a few user settings which are
        configured through the Preferences dialog, which can be
@@ -377,9 +523,11 @@ NAR #88757, TRA #12200
       </para>
       <para>
        Ground pressure is computed from an average of 16 samples,
-       taken while the altimeter is at rest. Flight pressure is
-       computed from a Kalman filter designed to smooth out any minor
-       noise in the sensor values. 
+       taken while the altimeter is at rest. The flight pressure used to
+       report maximum height is computed from a Kalman filter
+       designed to smooth out any minor noise in the sensor
+       values. The flight pressure recorded to non-volatile storage
+       is unfiltered, coming directly from the pressure sensor.
       </para>
     </section>
     <section>
@@ -426,14 +574,14 @@ NAR #88757, TRA #12200
       <para>
        MicroPeak contains a fixed atmospheric model which is used to
        convert barometric pressure into altitude. The model was
-       converted into a 469-element piece wise linear approximation
+       converted into a 469-element piece-wise linear approximation
        which is then used to compute the altitude of the ground and
        apogee. The difference between these represents the maximum
        height of the flight.
       </para>
       <para>
        The model assumes a particular set of atmospheric conditions,
-       which while a reasonable average cannot represent the changing
+       which, while a reasonable average, cannot represent the changing
        nature of the real atmosphere. Fortunately, for flights
        reasonably close to the ground, the effect of this global
        inaccuracy are largely canceled out when the computed ground
@@ -441,6 +589,11 @@ NAR #88757, TRA #12200
        the resulting height is more accurate than either the ground
        or apogee altitudes.
       </para>
+      <para>
+       Because the raw pressure data is recorded to non-volatile
+       storage, you can use that, along with a more sophisticated
+       atmospheric model, to compute your own altitude values.
+      </para>
     </section>
     <section>
       <title>Mechanical Considerations</title>
@@ -477,8 +630,9 @@ NAR #88757, TRA #12200
       <para>
        In addition to the data used to present the height of the last
        flight, MicroPeak also stores barometric information sampled
-       at regular intervals during the flight. This information can
-       be extracted from MicroPeak through any AVR programming
+       at regular intervals during the flight. This is the
+       information captured with the MicroPeak USB adapter. It can
+       also be read from MicroPeak through any AVR programming
        tool.
       </para>
       <table frame='all'>
diff --git a/doc/release-notes-1.3.2.xsl b/doc/release-notes-1.3.2.xsl
new file mode 100644 (file)
index 0000000..279762c
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"/usr/share/xml/docbook/schema/dtd/4.5/docbookx.dtd">
+
+<article>
+  <para>
+    Version 1.3.2 is a minor release. It includes small bug fixes for
+    the TeleMega flight software and AltosUI ground station
+  </para>
+  <para>
+    AltOS Firmware Changes
+    <itemizedlist>
+      <listitem>
+       <para>
+         On TeleMega, limit number of logged GPS status information
+         to 12 satellites. That's all there is room for in the log
+         structure.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+         Improve APRS behavior. Remembers last known GPS position and
+         keeps sending that if we lose GPS lock. Marks
+         locked/unlocked by sending L/U in the APRS comment field
+         along with the number of sats in view and voltages.
+       </para>
+      </listitem>
+    </itemizedlist>
+  </para>
+  <para>
+    AltosUI changes
+    <itemizedlist>
+      <listitem>
+       <para>
+         If the TeleMega flight firmware reports that it has logged
+         information about more than 12 satellites, don't believe it
+         as the log only holds 12 satellite records.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+         Track the maximum height as computed from GPS altitude
+         data and report that in the flight summary data.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+         Use letters (A, B, C, D) for alternate pyro channel names
+         instead of numbers (0, 1, 2, 3) in the Fire Igniter dialog.
+       </para>
+      </listitem>
+    </itemizedlist>
+  </para>
+</article>
index e0a99ecced4cd3fee0e730b675cace7a916d6162..755e73619234966c048d2ac788f134a5cf9a592c 100644 (file)
Binary files a/doc/site-map.png and b/doc/site-map.png differ
index ee61219707f3dba51c83f138e1474ba9f53c9f7c..10e2a9631edf3a0dbad554b0b86c22a3a2383093 100644 (file)
Binary files a/doc/table.png and b/doc/table.png differ
index f79714c448ac2212760a06b8c3bc4cd4b9c6b1db..2457e8a2ade16f6b17f168a0a667d783b494f08d 100644 (file)
Binary files a/doc/telemini-v1-top.jpg and b/doc/telemini-v1-top.jpg differ
diff --git a/doc/titlepage.templates.xml b/doc/titlepage.templates.xml
new file mode 100644 (file)
index 0000000..59fa5ba
--- /dev/null
@@ -0,0 +1,1580 @@
+<!DOCTYPE t:templates [
+<!ENTITY hsize0 "10pt">
+<!ENTITY hsize1 "12pt">
+<!ENTITY hsize2 "14.4pt">
+<!ENTITY hsize3 "17.28pt">
+<!ENTITY hsize4 "20.736pt">
+<!ENTITY hsize5 "24.8832pt">
+<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 -->
+<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 -->
+<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 -->
+<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 -->
+<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 -->
+<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 -->
+]>
+<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
+            xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
+             xmlns:fo="http://www.w3.org/1999/XSL/Format"
+             xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- ********************************************************************
+     $Id: titlepage.templates.xml 9722 2013-02-01 19:44:13Z bobstayton $
+     ********************************************************************
+
+     This file is part of the DocBook XSL Stylesheet distribution.
+     See ../README or http://docbook.sf.net/ for copyright
+     copyright and other information.
+
+     ******************************************************************** -->
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="article" t:wrapper="fo:block"
+             font-family="{$title.fontset}">
+
+  <t:titlepage-content t:side="recto"
+            start-indent="0pt"
+             text-align="center">
+
+    <title t:named-template="component.title"
+          param:node="ancestor-or-self::article[1]"
+          keep-with-next.within-column="always"
+          font-size="&hsize5;"
+          font-weight="bold"/>
+
+    <subtitle/>
+
+    <corpauthor space-before="0.5em"
+                font-size="&hsize2;"/>
+    <authorgroup space-before="0.5em"
+                 font-size="&hsize2;"/>
+    <author space-before="0.5em"
+            font-size="&hsize2;"/>
+
+    <!-- If you add editor, include this t:predicate attribute
+         because only the first editor generates the list of editors.
+    <editor t:predicate="[position() = 1]"/>
+    -->
+    <othercredit space-before="0.5em"/>
+    <releaseinfo space-before="0.5em"/>
+    <copyright space-before="0.5em"/>
+    <legalnotice text-align="start"
+                 margin-left="0.5in"
+                 margin-right="0.5in"
+                 font-family="{$body.fontset}"/>
+    <pubdate space-before="0.5em"/>
+    <revision space-before="0.5em"/>
+    <revhistory space-before="0.5em"/>
+    <abstract space-before="0.5em"
+             text-align="start"
+             margin-left="0.5in"
+              margin-right="0.5in"
+              font-family="{$body.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="set" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+      <title
+            t:named-template="division.title"
+            param:node="ancestor-or-self::set[1]"
+            text-align="center"
+            font-size="&hsize5;"
+            space-before="&hsize5space;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"
+             text-align="center"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="book" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:named-template="division.title"
+            param:node="ancestor-or-self::book[1]"
+            text-align="center"
+            font-size="&hsize5;"
+            space-before="&hsize5space;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+      <subtitle
+               text-align="center"
+               font-size="&hsize4;"
+               space-before="&hsize4space;"
+               font-family="{$title.fontset}"/>
+      <corpauthor font-size="&hsize3;"
+                 keep-with-next.within-column="always"
+                 space-before="2in"/>
+      <authorgroup space-before="2in"/>
+      <author font-size="&hsize3;"
+             space-before="&hsize2space;"
+             keep-with-next.within-column="always"/>
+      <!-- If you add editor, include this t:predicate attribute
+           because only the first editor generates the list of editors.
+      <editor t:predicate="[position() = 1]"/>
+      -->
+      <mediaobject space-before="1.5in"/>
+      <itermset/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+      <title
+            t:named-template="book.verso.title"
+            font-size="&hsize2;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+      <corpauthor/>
+      <authorgroup t:named-template="verso.authorgroup"/>
+      <author/>
+      <!-- If you add editor, include this t:predicate attribute
+           because only the first editor generates the list of editors.
+      <editor t:predicate="[position() = 1]"/>
+      -->
+      <othercredit/>
+      <releaseinfo space-before="0.5em"/>
+      <pubdate space-before="1em"/>
+      <copyright/>
+      <abstract/>
+      <legalnotice font-size="8pt"/>
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+      <fo:block break-after="page"/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+      <fo:block break-after="page"/>
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="part" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+      <title
+            t:named-template="division.title"
+            param:node="ancestor-or-self::part[1]"
+            text-align="center"
+            font-size="&hsize5;"
+            space-before="&hsize5space;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    <subtitle
+             text-align="center"
+             font-size="&hsize4;"
+             space-before="&hsize4space;"
+             font-weight='bold'
+             font-style='italic'
+             font-family="{$title.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="partintro" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          text-align="center"
+          font-size="&hsize5;"
+          font-weight="bold"
+          space-before="1em"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             text-align="center"
+             font-size="&hsize2;"
+             font-weight="bold"
+             font-style="italic"
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="reference" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+      <title
+            t:named-template="division.title"
+            param:node="ancestor-or-self::reference[1]"
+            text-align="center"
+            font-size="&hsize5;"
+            space-before="&hsize5space;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"
+             text-align="center"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          font-family="{$title.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsection" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          font-family="{$title.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsect1" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          font-family="{$title.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsect2" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          font-family="{$title.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refsect3" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          font-family="{$title.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="dedication" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::dedication[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<!-- Same formatting as dedication -->
+ <t:titlepage t:element="acknowledgements" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::acknowledgements[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="preface" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::preface[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <corpauthor/>
+      <authorgroup/>
+      <author/>
+      <othercredit/>
+      <releaseinfo/>
+      <copyright/>
+      <legalnotice/>
+      <pubdate/>
+      <revision/>
+      <revhistory/>
+      <abstract/>
+      <itermset/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="chapter" t:wrapper="fo:block"
+               font-family="{$title.fontset}">
+    <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}">
+      <title t:named-template="component.title"
+            param:node="ancestor-or-self::chapter[1]"
+            font-size="&hsize5;"
+            font-weight="bold"/>
+
+      <subtitle space-before="0.5em"
+               font-style="italic"
+               font-size="&hsize2;"
+               font-weight="bold"/>
+
+      <corpauthor  space-before="0.5em"
+                  space-after="0.5em"
+                   font-size="&hsize2;"/>
+
+      <authorgroup space-before="0.5em"
+                  space-after="0.5em"
+                   font-size="&hsize2;"/>
+
+      <author      space-before="0.5em"
+                  space-after="0.5em"
+                   font-size="&hsize2;"/>
+
+      <othercredit/>
+      <releaseinfo/>
+      <copyright/>
+      <legalnotice/>
+      <pubdate/>
+      <revision/>
+      <revhistory/>
+      <abstract/>
+      <itermset/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="appendix" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:named-template="component.title"
+            param:node="ancestor-or-self::appendix[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize5;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <corpauthor/>
+      <authorgroup/>
+      <author/>
+      <othercredit/>
+      <releaseinfo/>
+      <copyright/>
+      <legalnotice/>
+      <pubdate/>
+      <revision/>
+      <revhistory/>
+      <abstract/>
+      <itermset/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="section" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          margin-left="{$title.margin.left}"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect1" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          margin-left="{$title.margin.left}"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect2" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          margin-left="{$title.margin.left}"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect3" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          margin-left="{$title.margin.left}"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect4" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          margin-left="{$title.margin.left}"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect5" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          margin-left="{$title.margin.left}"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="simplesect" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          margin-left="{$title.margin.left}"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    <abstract/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="topic" t:wrapper="fo:block">
+  <t:titlepage-content t:side="recto">
+    <title
+          font-weight="bold"
+           font-size="&hsize3;"
+           space-before="1em"
+           space-after="1em"
+          font-family="{$title.fontset}"/>
+    <subtitle
+             font-family="{$title.fontset}"/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="bibliography" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::bibliography[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="bibliodiv" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title t:named-template="component.title"
+            param:node="ancestor-or-self::bibliodiv[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize4;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="glossary" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::glossary[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="glossdiv" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title t:named-template="component.title"
+            param:node="ancestor-or-self::glossdiv[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize4;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="index" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::index[1]"
+             param:pagewide="1"
+            margin-left="0pt"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <!-- The indexdiv.title template is used so that manual and -->
+  <!-- automatically generated indexdiv titles get the same -->
+  <!-- formatting. -->
+
+  <t:titlepage t:element="indexdiv" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title t:force="1"
+            t:named-template="indexdiv.title"
+            param:title="title"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="setindex" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::setindex[1]"
+             param:pagewide="1"
+            margin-left="0pt"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="colophon" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="component.title"
+            param:node="ancestor-or-self::colophon[1]"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize5;"
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="sidebar" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title 
+            font-family="{$title.fontset}"
+            font-weight="bold"/>
+      <subtitle
+               font-family="{$title.fontset}"/>
+      <itermset/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+<t:titlepage t:element="qandaset" t:wrapper="fo:block"
+             font-family="{$title.fontset}">
+
+  <t:titlepage-content t:side="recto"
+            start-indent="0pt"
+             text-align="center">
+
+    <title t:named-template="component.title"
+          param:node="ancestor-or-self::qandaset[1]"
+          keep-with-next.within-column="always"
+          font-size="&hsize5;"
+          font-weight="bold"/>
+
+    <subtitle/>
+
+    <corpauthor space-before="0.5em"
+                font-size="&hsize2;"/>
+    <authorgroup space-before="0.5em"
+                 font-size="&hsize2;"/>
+    <author space-before="0.5em"
+            font-size="&hsize2;"/>
+
+    <othercredit space-before="0.5em"/>
+    <releaseinfo space-before="0.5em"/>
+    <copyright space-before="0.5em"/>
+    <legalnotice text-align="start"
+                 margin-left="0.5in"
+                 margin-right="0.5in"
+                 font-family="{$body.fontset}"/>
+    <pubdate space-before="0.5em"/>
+    <revision space-before="0.5em"/>
+    <revhistory space-before="0.5em"/>
+    <abstract space-before="0.5em"
+             text-align="start"
+             margin-left="0.5in"
+              margin-right="0.5in"
+              font-family="{$body.fontset}"/>
+    <itermset/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="table.of.contents" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'TableofContents'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+            space-after="0.5em"
+            start-indent="0pt"
+            font-size="&hsize3;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.tables" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofTables'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+            space-after="0.5em"
+            start-indent="0pt"
+            font-size="&hsize3;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.figures" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofFigures'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+            space-after="0.5em"
+            start-indent="0pt"
+            font-size="&hsize3;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.examples" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofExamples'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+            space-after="0.5em"
+            start-indent="0pt"
+            font-size="&hsize3;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.equations" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofEquations'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+            space-after="0.5em"
+            start-indent="0pt"
+            font-size="&hsize3;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofProcedures'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+            space-after="0.5em"
+            start-indent="0pt"
+            font-size="&hsize3;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofUnknown'"
+             space-before.minimum="1em"
+             space-before.optimum="1.5em"
+             space-before.maximum="2em"
+            space-after="0.5em"
+            start-indent="0pt"
+            font-size="&hsize3;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="component.list.of.tables" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofTables'"
+             space-before.minimum="1em"
+             space-before.optimum="1em"
+             space-before.maximum="1em"
+            space-after="0.5em"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize1;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="component.list.of.figures" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofFigures'"
+             space-before.minimum="1em"
+             space-before.optimum="1em"
+             space-before.maximum="1em"
+            space-after="0.5em"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize1;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="component.list.of.examples" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofExamples'"
+             space-before.minimum="1em"
+             space-before.optimum="1em"
+             space-before.maximum="1em"
+            space-after="0.5em"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize1;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="component.list.of.equations" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofEquations'"
+             space-before.minimum="1em"
+             space-before.optimum="1em"
+             space-before.maximum="1em"
+            space-after="0.5em"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize1;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="component.list.of.procedures" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofProcedures'"
+             space-before.minimum="1em"
+             space-before.optimum="1em"
+             space-before.maximum="1em"
+            space-after="0.5em"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize1;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+  <t:titlepage t:element="component.list.of.unknowns" t:wrapper="fo:block">
+    <t:titlepage-content t:side="recto">
+      <title
+            t:force="1"
+            t:named-template="gentext"
+            param:key="'ListofUnknown'"
+             space-before.minimum="1em"
+             space-before.optimum="1em"
+             space-before.maximum="1em"
+            space-after="0.5em"
+            margin-left="{$title.margin.left}"
+            font-size="&hsize1;"
+            font-weight="bold"
+            font-family="{$title.fontset}"/>
+    </t:titlepage-content>
+
+    <t:titlepage-content t:side="verso">
+    </t:titlepage-content>
+
+    <t:titlepage-separator>
+    </t:titlepage-separator>
+
+    <t:titlepage-before t:side="recto">
+    </t:titlepage-before>
+
+    <t:titlepage-before t:side="verso">
+    </t:titlepage-before>
+  </t:titlepage>
+
+<!-- ==================================================================== -->
+
+</t:templates>
index a36b88f3e177a2bd574676a03f9bfa07b3386716..4b8c619fd8e30ed624ad528b1ee921a4eab059f7 100644 (file)
@@ -13,6 +13,7 @@
     xmlns:fo="http://www.w3.org/1999/XSL/Format" 
     >
 <xsl:import href="file:///usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl"/>
+<xsl:include href="titlepage.templates.xsl"/>
 
 
                        <!-- Reference Pages HTML/FO Parameters -->
index 33b1420acc5a3329d3d3cd137b6447fa62893635..1a614cbdcac694719d9678d284572ecc2cb24e10 100644 (file)
@@ -23,6 +23,7 @@ micropeak_JAVA= \
        MicroRaw.java \
        MicroSave.java \
        MicroSerial.java \
+       MicroSerialLog.java \
        MicroStats.java \
        MicroStatsTable.java \
        MicroFileChooser.java \
index 04e9ad3206e5400638a46c44254ca1df1e595e8c..e786ff1ed136de4e6800feb1263094f38af42a30 100644 (file)
@@ -100,13 +100,13 @@ public class MicroData implements AltosUIDataSet {
        String                  name;
        MicroStats              stats;
        
-       class FileEndedException extends Exception {
+       public class FileEndedException extends Exception {
        }
 
-       class NonHexcharException extends Exception {
+       public class NonHexcharException extends Exception {
        }
 
-       class InvalidCrcException extends Exception {
+       public class InvalidCrcException extends Exception {
        }
 
        private int getc(InputStream f) throws IOException, FileEndedException {
@@ -167,14 +167,10 @@ public class MicroData implements AltosUIDataSet {
                return h;
        }
 
-       private boolean find_header(InputStream f) throws IOException {
-               try {
-                       for (;;) {
-                               if (get_nonwhite(f) == 'M' && get_nonwhite(f) == 'P')
-                                       return true;
-                       }
-               } catch (FileEndedException fe) {
-                       return false;
+       private boolean find_header(InputStream f) throws IOException, FileEndedException {
+               for (;;) {
+                       if (get_nonwhite(f) == 'M' && get_nonwhite(f) == 'P')
+                               return true;
                }
        } 
 
@@ -339,7 +335,7 @@ public class MicroData implements AltosUIDataSet {
                this.name = name;
        }
 
-       public MicroData (InputStream f, String name) throws IOException, InterruptedException {
+       public MicroData (InputStream f, String name) throws IOException, InterruptedException, NonHexcharException, FileEndedException {
                this.name = name;
                bytes = new ArrayList<Integer>();
                if (!find_header(f))
@@ -384,8 +380,6 @@ public class MicroData implements AltosUIDataSet {
                        stats = new MicroStats(this);
                } catch (FileEndedException fe) {
                        throw new IOException("File Ended Unexpectedly");
-               } catch (NonHexcharException ne) {
-                       throw new IOException("Non hexadecimal character found");
                }
        }
 
index ec76824d9b816da64a188cd9ac88804fd44146c9..7d2e9eb4b1f42c711eca1f4c6cc1c44e2fd9a05f 100644 (file)
@@ -26,30 +26,107 @@ import java.util.*;
 import org.altusmetrum.altoslib_3.*;
 import org.altusmetrum.altosuilib_1.*;
 
-public class MicroDownload extends AltosUIDialog implements Runnable, ActionListener {
+public class MicroDownload extends AltosUIDialog implements Runnable, ActionListener, MicroSerialLog, WindowListener {
        MicroPeak       owner;
        Container       pane;
        AltosDevice     device;
        JButton         cancel;
        MicroData       data;
        MicroSerial     serial;
+       LinkedList<Integer> log_queue = new LinkedList<Integer>();
+       Runnable        log_run;
+       JTextArea       serial_log;
+       JLabel          status_value;
+       int             log_column;
+
+       public void windowActivated(WindowEvent e) {
+       }
+
+       public void windowClosed(WindowEvent e) {
+               setVisible(false);
+               dispose();
+       }
+
+       public void windowClosing(WindowEvent e) {
+       }
+
+       public void windowDeactivated(WindowEvent e) {
+       }
+
+       public void windowDeiconified(WindowEvent e) {
+       }
+
+       public void windowIconified(WindowEvent e) {
+       }
+
+       public void windowOpened(WindowEvent e) {
+       }
 
        private void done_internal() {
                setVisible(false);
-               if (data != null) {
-                       if (data.crc_valid) {
-                               owner = owner.SetData(data);
-                               MicroSave save = new MicroSave(owner, data);
-                               if (save.runDialog())
-                                       owner.SetName(data.name);
+               dispose();
+
+               if (data != null && data.crc_valid) {
+                       status_value.setText("Received MicroPeak Data");
+                       owner = owner.SetData(data);
+                       MicroSave save = new MicroSave(owner, data);
+                       if (save.runDialog())
+                               owner.SetName(data.name);
+               } else {
+                       JOptionPane.showMessageDialog(owner,
+                                                     "Download Failed",
+                                                     "Flight data corrupted",
+                                                     JOptionPane.ERROR_MESSAGE);
+               }
+       }
+
+       public void drain_queue() {
+               for (;;) {
+                       int     c;
+                       synchronized(this) {
+                               if (log_queue.isEmpty()) {
+                                       log_run = null;
+                                       break;
+                               }
+                               c = log_queue.remove();
+                       }
+                       if (c == '\r')
+                               continue;
+                       if (c == '\0')
+                               continue;
+                       String s;
+                       if (c == '\n') {
+                               s = "\n";
+                               log_column = 0;
+                       } else if (' ' <= c && c <= '~') {
+                               byte[] bytes = new byte[1];
+                               bytes[0] = (byte) c;
+                               s = new String(bytes, AltosLib.unicode_set);
+                               log_column += 1;
                        } else {
-                               JOptionPane.showMessageDialog(owner,
-                                                             "Flight data corrupted",
-                                                             "Download Failed",
-                                                             JOptionPane.ERROR_MESSAGE);
+                               s = String.format("\\0x%02x", c & 0xff);
+                               log_column += 5;
+                       }
+                       serial_log.append(s);
+                       if (log_column > 40) {
+                               serial_log.append("\n");
+                               log_column = 0;
+                       }
+               }
+       }
+
+       public void log_char(int c) {
+               synchronized(this) {
+                       log_queue.add(c);
+                       if (log_run == null) {
+                               log_run = new Runnable() {
+                                               public void run() {
+                                                       drain_queue();
+                                               }
+                                       };
+                               SwingUtilities.invokeLater(log_run);
                        }
                }
-               dispose();
        }
 
        public void done() {
@@ -66,12 +143,20 @@ public class MicroDownload extends AltosUIDialog implements Runnable, ActionList
 
        public void run() {
                try {
-                       data = new MicroData(serial, device.toShortString());
-                       serial.close();
+                       for (;;) {
+                               try {
+                                       data = new MicroData(serial, device.toShortString());
+                                       if (data != null && data.crc_valid)
+                                               break;
+                               } catch (MicroData.NonHexcharException nhe) {
+                               }
+                       }
                } catch (FileNotFoundException fe) {
                } catch (IOException ioe) {
                } catch (InterruptedException ie) {
+               } catch (MicroData.FileEndedException fee) {
                }
+               serial.close();
                done();
        }
 
@@ -80,6 +165,7 @@ public class MicroDownload extends AltosUIDialog implements Runnable, ActionList
        public void start() {
                try {
                        serial = new MicroSerial(device);
+                       serial.set_log(this);
                } catch (FileNotFoundException fe) {
                        return;
                }
@@ -120,7 +206,7 @@ public class MicroDownload extends AltosUIDialog implements Runnable, ActionList
 
                c = new GridBagConstraints();
                c.gridx = 1; c.gridy = y;
-               c.fill = GridBagConstraints.HORIZONTAL;
+               c.fill = GridBagConstraints.NONE;
                c.weightx = 1;
                c.anchor = GridBagConstraints.LINE_START;
                c.insets = ir;
@@ -132,42 +218,53 @@ public class MicroDownload extends AltosUIDialog implements Runnable, ActionList
                c.gridx = 0; c.gridy = y;
                c.gridwidth = GridBagConstraints.REMAINDER;
                c.fill = GridBagConstraints.HORIZONTAL;
-               c.weightx = 1;
+               c.weightx = 0;
                c.anchor = GridBagConstraints.LINE_START;
                c.insets = ir;
-               JTextArea help_text = new JTextArea(
-
-                       "Locate the photo transistor on the MicroPeak USB adapter\n" +
-                       "and place the LED on the MicroPeak directly in contact\n" +
-                       "with it.\n" +
-                       "\n" +
-                       "The MicroPeak LED and the MicroPeak USB adapter\n" +
-                       "photo need to be touching—even a millimeters of space\n" +
-                       "between them will reduce the light intensity from the LED\n" +
-                       "enough that the phototransistor will not sense it.\n" +
-                       "\n" +
-                       "Turn on the MicroPeak board and adjust the position until\n" +
-                       "the blue LED on the MicroPeak USB adapter blinks in time\n" +
-                       "with the orange LED on the MicroPeak board.");
+               JLabel help_text = new JLabel(
+                       "<html><i>Turn on the MicroPeak and place the LED inside the<br>" +
+                       "opening in the top of the MicroPeak USB adapter.<br> " +
+                       "Verify that the blue LED in the side of the USB adapter<br>" +
+                       "is blinking along with the orange LED on the MicroPeak.</i></html>");
+//             help_text.setEditable(false);
 
                pane.add(help_text, c);
                y++;
 
                c = new GridBagConstraints();
                c.gridx = 0; c.gridy = y;
-               c.gridwidth = 1;
+               c.gridwidth = 2;
                c.fill = GridBagConstraints.HORIZONTAL;
                c.weightx = 1;
                c.anchor = GridBagConstraints.LINE_START;
                c.insets = ir;
-               JLabel waiting_value = new JLabel("Waiting for MicroPeak data...");
-               pane.add(waiting_value, c);
+               status_value = new JLabel("Waiting for MicroPeak data...");
+               pane.add(status_value, c);
+               y++;
+
+               serial_log = new JTextArea(10, 20);
+               serial_log.setEditable(false);
+
+               JScrollPane serial_scroll = new JScrollPane(serial_log);
+               serial_scroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
+
+               c = new GridBagConstraints();
+               c.gridx = 0; c.gridy = y;
+               c.gridwidth = GridBagConstraints.REMAINDER;
+               c.fill = GridBagConstraints.BOTH;
+               c.weightx = 1;
+               c.weighty = 1;
+               c.anchor = GridBagConstraints.LINE_START;
+               c.insets = ir;
+
+               pane.add(serial_scroll, c);
+               y++;
 
                cancel = new JButton("Cancel");
                c = new GridBagConstraints();
                c.fill = GridBagConstraints.NONE;
-               c.anchor = GridBagConstraints.CENTER;
-               c.gridx = 1; c.gridy = y;
+               c.anchor = GridBagConstraints.EAST;
+               c.gridx = 0; c.gridy = y;
                c.gridwidth = GridBagConstraints.REMAINDER;
                Insets ic = new Insets(4,4,4,4);
                c.insets = ic;
index 2a8e2ca63c754e0aa8b4d0e193a212bead74de85..78bc857ec2818746a3fc9f05a5b5d97556286ce0 100644 (file)
@@ -65,6 +65,10 @@ public class MicroPeak extends MicroFrame implements ActionListener, ItemListene
                try {
                        data = new MicroData((InputStream) fis, filename.getName());
                        AltosUIPreferences.set_last_logdir(filename);
+               } catch (MicroData.NonHexcharException nhe) {
+                       data = null;
+               } catch (MicroData.FileEndedException nhe) {
+                       data = null;
                } catch (InterruptedException ie) {
                        data = null;
                } finally {
index 376223f16098a38e8fe262a5f40161b7aba3e5f2..39f421ec6b7fb3f1ccb7ed3fd6cc4396d90ef550 100644 (file)
@@ -24,6 +24,7 @@ import org.altusmetrum.altosuilib_1.*;
 
 public class MicroSerial extends InputStream {
        SWIGTYPE_p_altos_file   file;
+       private MicroSerialLog  log;
 
        public int read() {
                int     c = libaltos.altos_getchar(file, 0);
@@ -33,6 +34,8 @@ public class MicroSerial extends InputStream {
                        return -1;
                if (AltosUIPreferences.serial_debug)
                        System.out.printf("%c", c);
+               if (log != null)
+                       log.log_char(c);
                return c;
        }
 
@@ -43,8 +46,13 @@ public class MicroSerial extends InputStream {
                }
        }
 
+       public void set_log(MicroSerialLog log) {
+               this.log = log;
+       }
+
        public MicroSerial(AltosDevice device) throws FileNotFoundException {
                file = device.open();
+               log = null;
                if (file == null) {
                        final String message = device.getErrorString();
                        throw new FileNotFoundException(String.format("%s (%s)",
diff --git a/micropeak/MicroSerialLog.java b/micropeak/MicroSerialLog.java
new file mode 100644 (file)
index 0000000..0a5a0b9
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright © 2014 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+package org.altusmetrum.micropeak;
+
+import java.util.*;
+import java.io.*;
+import libaltosJNI.*;
+import org.altusmetrum.altosuilib_1.*;
+
+public interface MicroSerialLog {
+
+       public void log_char(int c);
+}
index 07a2bc5b0ce7790f0c43ed4bcb88e2897ed761ab..5e3c71bfa309e1ecb6f3fecb954dde596ff12283 100644 (file)
@@ -70,6 +70,8 @@ ao_gps_report_mega(void)
                                {
                                        gps_log.u.gps_sat.sats[i].c_n = gps_tracking_data.sats[c].c_n_1;
                                        i++;
+                                       if (i >= 12)
+                                               break;
                                }
                        gps_log.u.gps_sat.channels = i;
                        ao_log_mega(&gps_log);
index 56d984375ba82f725875cddd1cc921e74c285aa5..0a6c72ce9e2a1af03fd81f131982bf660e6e78fb 100644 (file)
@@ -488,9 +488,29 @@ static void tncCompressInt(uint8_t *dest, int32_t value, int len) {
        }
 }
 
-#if HAS_ADC
+static int ao_num_sats(void)
+{
+    int i;
+    int n = 0;
+
+    for (i = 0; i < ao_gps_tracking_data.channels; i++) {
+       if (ao_gps_tracking_data.sats[i].svid)
+           n++;
+    }
+    return n;
+}
+
+static char ao_gps_locked(void)
+{
+    if (ao_gps_data.flags & AO_GPS_VALID)
+       return 'L';
+    else
+       return 'U';
+}
+
 static int tncComment(uint8_t *buf)
 {
+#if HAS_ADC
        struct ao_data packet;
        
        ao_arch_critical(ao_data_get(&packet););
@@ -500,61 +520,70 @@ static int tncComment(uint8_t *buf)
        int16_t main = ao_ignite_decivolt(AO_SENSE_MAIN(&packet));
 
        return sprintf((char *) buf,
-                      "B:%d.%d A:%d.%d M:%d.%d",
+                      "%c%d B%d.%d A%d.%d M%d.%d",
+                      ao_gps_locked(),
+                      ao_num_sats(),
                       battery/10,
                       battery % 10,
                       apogee/10,
                       apogee%10,
                       main/10,
                       main%10);
-}
+#else
+       return sprintf((char *) buf,
+                      "%c%d",
+                      ao_gps_locked(),
+                      ao_num_sats());
 #endif
+}
 
 /**
  *   Generate the plain text position packet.
  */
 static int tncPositionPacket(void)
 {
-    int32_t    latitude = ao_gps_data.latitude;
-    int32_t    longitude = ao_gps_data.longitude;
-    int32_t    altitude = ao_gps_data.altitude;
+    static int32_t     latitude;
+    static int32_t     longitude;
+    static int32_t     altitude;
+    int32_t            lat, lon, alt;
     uint8_t    *buf;
 
-    if (altitude < 0)
-       altitude = 0;
-    altitude = (altitude * (int32_t) 10000 + (3048/2)) / (int32_t) 3048;
-    
+    if (ao_gps_data.flags & AO_GPS_VALID) {
+       latitude = ao_gps_data.latitude;
+       longitude = ao_gps_data.longitude;
+       altitude = ao_gps_data.altitude;
+       if (altitude < 0)
+           altitude = 0;
+    }
+
     buf = tncBuffer;
     *buf++ = '!';
 
     /* Symbol table ID */
     *buf++ = '/';
 
-    latitude = ((uint64_t) 380926 * (900000000 - latitude)) / 10000000;
-    longitude = ((uint64_t) 190463 * (1800000000 + longitude)) / 10000000;
+    lat = ((uint64_t) 380926 * (900000000 - latitude)) / 10000000;
+    lon = ((uint64_t) 190463 * (1800000000 + longitude)) / 10000000;
 
 #define ALTITUDE_LOG_BASE      0.001998002662673f      /* log(1.002) */
 
-    altitude = logf((float) altitude) * (1/ALTITUDE_LOG_BASE);
+    alt = (altitude * (int32_t) 10000 + (3048/2)) / (int32_t) 3048;
+    alt = logf((float) altitude) * (1/ALTITUDE_LOG_BASE);
 
-    tncCompressInt(buf, latitude, 4);
+    tncCompressInt(buf, lat, 4);
     buf += 4;
-    tncCompressInt(buf, longitude, 4);
+    tncCompressInt(buf, lon, 4);
     buf += 4;
 
     /* Symbol code */
     *buf++ = '\'';
 
-    tncCompressInt(buf, altitude, 2);
+    tncCompressInt(buf, alt, 2);
     buf += 2;
 
     *buf++ = 33 + ((1 << 5) | (2 << 3));
 
-#if HAS_ADC
     buf += tncComment(buf);
-#else
-    *buf = '\0';
-#endif
 
     return buf - tncBuffer;
 }
index c0fe604a8784943b3bc4033ca2aaa71fdc07c9f9..70e30b67fee98897f22dd473b114b72063d991dc 100644 (file)
@@ -45,7 +45,7 @@ static uint8_t                ao_bufio_mutex;
 #if 0
 #define DBG(...) printf(__VA_ARGS__)
 #else
-#define DBG(...)
+#define DBG(...) (void) 0
 #endif
 
 static inline void
index 1a1b8eb02444007565e15bcf1622dc78dfb0c6c9..cbcd42bc12a5c8a1aafa308072e896bdea12de8f 100644 (file)
@@ -187,7 +187,7 @@ _ao_fat_entry_replace(cluster_t  cluster, cluster_t new_value)
        sector_t                sector;
        cluster_offset_t        offset;
        uint8_t                 *buf;
-       cluster_t               ret;
+       cluster_t               ret = 0;
        cluster_t               old_value;
        uint8_t                 fat;
 
@@ -747,7 +747,7 @@ _ao_fat_current_sector(struct ao_file *file)
        DBG("current sector offset %d size %d\n",
            file->offset, file->dirent->size);
 
-       if (file->offset > file->dirent->size) {
+       if (file->offset > (offset_t) file->dirent->size) {
                printf ("file offset %d larger than size %d\n",
                        file->offset, file->dirent->size);
                return 0xffffffff;
@@ -761,7 +761,7 @@ _ao_fat_current_sector(struct ao_file *file)
                DBG("\treset to start of file %08x\n", file->cluster);
        }
 
-       if (file->cluster_offset + bytes_per_cluster <= file->offset) {
+       if ((offset_t) (file->cluster_offset + bytes_per_cluster) <= file->offset) {
                cluster_t       cluster_distance;
 
                cluster_offset = sector_offset / sectors_per_cluster;
@@ -804,7 +804,7 @@ _ao_fat_invalidate_cluster_offset(struct ao_fat_dirent *dirent)
                if (!file->busy)
                        continue;
                if (file->dirent == dirent) {
-                       if (file->cluster_offset >= dirent->size) {
+                       if (file->cluster_offset >= (offset_t) dirent->size) {
                                file->cluster_offset = 0;
                                file->cluster = dirent->cluster;
                        }
@@ -838,7 +838,7 @@ _ao_fat_set_size(struct ao_file *file, uint32_t size)
 
        DBG ("\tfirst cluster %08x have %d need %d\n", first_cluster, have_clusters, need_clusters);
        if (have_clusters != need_clusters) {
-               if (file->cluster && size > file->cluster_offset) {
+               if (file->cluster && (offset_t) size > file->cluster_offset) {
                        cluster_t       offset_clusters = (file->cluster_offset + bytes_per_cluster) / bytes_per_cluster;
                        cluster_t       extra_clusters = need_clusters - offset_clusters;
                        cluster_t       next_cluster;
@@ -888,6 +888,7 @@ _ao_fat_set_size(struct ao_file *file, uint32_t size)
 static void
 _ao_fat_root_init(uint8_t *dent, char name[11], uint8_t attr)
 {
+       (void) attr;
        memset(dent, '\0', 0x20);
        memmove(dent, name, 11);
 
@@ -1249,7 +1250,7 @@ ao_fat_read(int8_t fd, void *dst, int len)
                goto done;
        }
 
-       if (file->offset + len > file->dirent->size)
+       if (file->offset + len > (offset_t) file->dirent->size)
                len = file->dirent->size - file->offset;
 
        if (len < 0)
@@ -1296,7 +1297,7 @@ ao_fat_write(int8_t fd, void *src, int len)
                goto done;
        }
 
-       if (file->offset + len > file->dirent->size) {
+       if (file->offset + len > (offset_t) file->dirent->size) {
                ret = _ao_fat_set_size(file, file->offset + len);
                if (ret < 0)
                        goto done;
@@ -1424,6 +1425,8 @@ done:
 int8_t
 ao_fat_rename(char old[11], char new[11])
 {
+       (void) old;
+       (void) new;
        return -AO_FAT_EIO;
 }
 
@@ -1499,7 +1502,7 @@ ao_fat_list_cmd(void)
                putchar('.');
                for (; i < 11; i++)
                        putchar(dirent.name[i]);
-               for (i = 0; i < NUM_FAT_ATTR; i++)
+               for (i = 0; i < (int) NUM_FAT_ATTR; i++)
                        putchar (dirent.attr & ao_fat_attr[i].bit ? ao_fat_attr[i].label : ' ');
                printf (" @%08x %d\n", dirent.cluster, dirent.size);
        }
@@ -1507,7 +1510,7 @@ ao_fat_list_cmd(void)
                printf ("readdir failed: %d\n", status);
 }
 
-static uint8_t
+static void
 ao_fat_parse_name(char name[11])
 {
        uint8_t c;
@@ -1560,8 +1563,6 @@ ao_fat_write_cmd(void)
 {
        static char     name[11];
        int8_t          fd;
-       int             cnt, i;
-       static char     buf[64];
        char            c;
        int             status;
 
index 4fb907462c43691807e355a21549b63a6dd1658b..01169522f2ae49f53852098b8c2e9d797dc25a3f 100644 (file)
@@ -746,18 +746,20 @@ ao_gps(void) __reentrant
                                ao_gps_tracking_data.channels = 0;
 
                                struct ao_telemetry_satellite_info *dst = &ao_gps_tracking_data.sats[0];
+                               struct nav_svinfo_sat *src = &nav_svinfo_sat[0];
 
                                for (i = 0; i < nav_svinfo_nsat; i++) {
-                                       struct nav_svinfo_sat *src = &nav_svinfo_sat[i];
-
                                        if (!(src->flags & (1 << NAV_SVINFO_SAT_FLAGS_UNHEALTHY)) &&
                                            src->quality >= NAV_SVINFO_SAT_QUALITY_ACQUIRED)
                                        {
-                                               dst->svid = src->svid;
-                                               dst->c_n_1 = src->cno;
-                                               dst++;
-                                               ao_gps_tracking_data.channels++;
+                                               if (ao_gps_tracking_data.channels < AO_TELEMETRY_SATELLITE_MAX_SAT) {
+                                                       dst->svid = src->svid;
+                                                       dst->c_n_1 = src->cno;
+                                                       dst++;
+                                                       ao_gps_tracking_data.channels++;
+                                               }
                                        }
+                                       src++;
                                }
 
                                ao_mutex_put(&ao_gps_mutex);
index 7806bc194a6b910d946498d5a95c66bd258933ed..47188ef3cf171ade2d34e5d6e1d1155e8ca149bd 100644 (file)
@@ -56,13 +56,13 @@ static enum ao_sdtype sdtype;
 #if SDCARD_TRACE
 #define DBG(...) printf(__VA_ARGS__)
 #else
-#define DBG(...)
+#define DBG(...) (void) 0
 #endif
 
 #if SDCARD_WARN
 #define WARN(...) printf(__VA_ARGS__)
 #else
-#define WARN(...)
+#define WARN(...) (void) 0
 #endif
 
 #define later(x,y)     ((int16_t) ((x) - (y)) >= 0)
@@ -100,7 +100,6 @@ ao_sdcard_send_cmd(uint8_t cmd, uint32_t arg)
 {
        uint8_t data[6];
        uint8_t reply;
-       int i;
        uint16_t timeout;
 
        DBG ("\tsend_cmd %d arg %08x\n", cmd, arg);
@@ -111,7 +110,7 @@ ao_sdcard_send_cmd(uint8_t cmd, uint32_t arg)
                        return SDCARD_STATUS_TIMEOUT;
        }
        
-       data[0] = cmd & 0x3f | 0x40;
+       data[0] = (cmd & 0x3f) | 0x40;
        data[1] = arg >> 24;
        data[2] = arg >> 16;
        data[3] = arg >> 8;
@@ -402,7 +401,7 @@ static uint8_t
 _ao_sdcard_reset(void)
 {
        int i;
-       uint8_t ret;
+       uint8_t ret = 0x3f;
        uint8_t response[10];
 
        for (i = 0; i < SDCARD_IDLE_RETRY; i++) {
@@ -419,12 +418,12 @@ _ao_sdcard_reset(void)
         */
        if (ao_sdcard_send_if_cond(0x1aa, response) == SDCARD_STATUS_IDLE_STATE) {
                uint32_t        arg = 0;
-               uint8_t         sdver2 = 0;
+//             uint8_t         sdver2 = 0;
 
                /* Check for SD version 2 */
                if ((response[2] & 0xf) == 1 && response[3] == 0xaa) {
                        arg = 0x40000000;
-                       sdver2 = 1;
+//                     sdver2 = 1;
                }
 
                for (i = 0; i < SDCARD_IDLE_RETRY; i++) {
@@ -487,7 +486,7 @@ ao_sdcard_wait_block_start(void)
 uint8_t
 ao_sdcard_read_block(uint32_t block, uint8_t *data)
 {
-       uint8_t ret;
+       uint8_t ret = 0x3f;
        uint8_t start_block;
        uint8_t crc[2];
        int tries;
@@ -518,6 +517,7 @@ ao_sdcard_read_block(uint32_t block, uint8_t *data)
                        WARN ("read block command failed %d status %02x\n", block, ret);
                        status = _ao_sdcard_send_status();
                        WARN ("\tstatus now %04x\n", status);
+                       (void) status;
                        goto bail;
                }
 
@@ -567,8 +567,6 @@ ao_sdcard_write_block(uint32_t block, uint8_t *data)
        uint8_t response[1];
        uint8_t start_block[8];
        uint16_t status;
-       static uint8_t  check_data[512];
-       int     i;
        int     tries;
 
        ao_sdcard_lock();
@@ -612,7 +610,7 @@ ao_sdcard_write_block(uint32_t block, uint8_t *data)
                if ((response[0] & SDCARD_DATA_RES_MASK) != SDCARD_DATA_RES_ACCEPTED) {
                        int i;
                        WARN("Data not accepted, response");
-                       for (i = 0; i < sizeof (response); i++)
+                       for (i = 0; i < (int) sizeof (response); i++)
                                WARN(" %02x", response[i]);
                        WARN("\n");
                        ret = 0x3f;
diff --git a/src/drivers/ao_watchdog.c b/src/drivers/ao_watchdog.c
new file mode 100644 (file)
index 0000000..096a556
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright © 2013 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include <ao.h>
+
+static int     ao_watchdog_enabled = TRUE;
+
+static void
+ao_watchdog(void)
+{
+       for (;;) {
+               while (!ao_watchdog_enabled)
+                       ao_sleep(&ao_watchdog_enabled);
+               while (ao_watchdog_enabled) {
+                       ao_delay(AO_WATCHDOG_INTERVAL);
+                       ao_gpio_set(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG_PIN, 1);
+                       ao_delay(1);
+                       ao_gpio_set(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG_PIN, 0);
+               }
+       }
+}
+
+static void
+ao_watchdog_set(void)
+{
+       ao_cmd_hex();
+       if (ao_cmd_status == ao_cmd_success) {
+               ao_watchdog_enabled = ao_cmd_lex_i != 0;
+               ao_wakeup(&ao_watchdog_enabled);
+       }
+}
+       
+
+static __code struct ao_cmds ao_watchdog_cmds[] = {
+       { ao_watchdog_set,      "Q <0 off, 1 on>\0Enable or disable watchdog timer" },
+       { 0,                    NULL },
+};
+
+static struct ao_task watchdog_task;
+
+void
+ao_watchdog_init(void)
+{
+       ao_enable_output(AO_WATCHDOG_PORT, AO_WATCHDOG_BIT, AO_WATCHDOG, 0);
+       ao_cmd_register(&ao_watchdog_cmds[0]);
+       ao_add_task(&watchdog_task, ao_watchdog, "watchdog");
+}
+
diff --git a/src/drivers/ao_watchdog.h b/src/drivers/ao_watchdog.h
new file mode 100644 (file)
index 0000000..73e1559
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright © 2013 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#ifndef _AO_WATCHDOG_H_
+#define _AO_WATCHDOG_H_
+
+void
+ao_watchdog_init(void);
+
+#endif /* _AO_WATCHDOG_H_ */
index dd67d820ea0f99f7cae75873448f1c9bdf4d247b..4917ee6f9f1f2eb00f364bb7ea146c5e9ccf4101 100644 (file)
@@ -27,7 +27,9 @@
 #define HAS_BEEP               0
 #define HAS_TASK               0
 #define HAS_ECHO               0
+#ifndef HAS_TICK
 #define HAS_TICK               0
+#endif
 
 #define PACKET_HAS_SLAVE       0
 
index 53d4b8c3f64ece0d2e0126cbd37846de6d8fe071..67416a9d43ae9a5a2fec6f3f03f5dcd85031b8fd 100644 (file)
@@ -106,6 +106,72 @@ ao_adc_get(__xdata struct ao_adc *packet)
        memcpy(packet, (void *) &ao_data_ring[i].adc, sizeof (struct ao_adc));
 }
 
+#ifdef AO_ADC_SQ1_NAME
+static const char *ao_adc_name[AO_NUM_ADC] = {
+       AO_ADC_SQ1_NAME,
+#ifdef AO_ADC_SQ2_NAME
+       AO_ADC_SQ2_NAME,
+#endif
+#ifdef AO_ADC_SQ3_NAME
+       AO_ADC_SQ3_NAME,
+#endif
+#ifdef AO_ADC_SQ4_NAME
+       AO_ADC_SQ4_NAME,
+#endif
+#ifdef AO_ADC_SQ5_NAME
+       AO_ADC_SQ5_NAME,
+#endif
+#ifdef AO_ADC_SQ6_NAME
+       AO_ADC_SQ6_NAME,
+#endif
+#ifdef AO_ADC_SQ7_NAME
+       AO_ADC_SQ7_NAME,
+#endif
+#ifdef AO_ADC_SQ8_NAME
+       AO_ADC_SQ8_NAME,
+#endif
+#ifdef AO_ADC_SQ9_NAME
+       AO_ADC_SQ9_NAME,
+#endif
+#ifdef AO_ADC_SQ10_NAME
+       AO_ADC_SQ10_NAME,
+#endif
+#ifdef AO_ADC_SQ11_NAME
+       AO_ADC_SQ11_NAME,
+#endif
+#ifdef AO_ADC_SQ12_NAME
+       AO_ADC_SQ12_NAME,
+#endif
+#ifdef AO_ADC_SQ13_NAME
+       AO_ADC_SQ13_NAME,
+#endif
+#ifdef AO_ADC_SQ14_NAME
+       AO_ADC_SQ14_NAME,
+#endif
+#ifdef AO_ADC_SQ15_NAME
+       AO_ADC_SQ15_NAME,
+#endif
+#ifdef AO_ADC_SQ16_NAME
+       AO_ADC_SQ16_NAME,
+#endif
+#ifdef AO_ADC_SQ17_NAME
+       AO_ADC_SQ17_NAME,
+#endif
+#ifdef AO_ADC_SQ18_NAME
+       AO_ADC_SQ18_NAME,
+#endif
+#ifdef AO_ADC_SQ19_NAME
+       AO_ADC_SQ19_NAME,
+#endif
+#ifdef AO_ADC_SQ20_NAME
+       AO_ADC_SQ20_NAME,
+#endif
+#ifdef AO_ADC_SQ21_NAME
+       #error "too many ADC names"
+#endif
+};
+#endif
+
 static void
 ao_adc_dump(void) __reentrant
 {
@@ -121,8 +187,14 @@ ao_adc_dump(void) __reentrant
 #else
        printf("tick: %5u",  packet.tick);
        d = (int16_t *) (&packet.adc);
-       for (i = 0; i < AO_NUM_ADC; i++)
-               printf (" %2d: %5d", i, d[i]);
+       for (i = 0; i < AO_NUM_ADC; i++) {
+#ifdef AO_ADC_SQ1_NAME
+               if (ao_adc_name[i])
+                       printf (" %s: %5d", ao_adc_name[i], d[i]);
+               else            
+#endif
+                       printf (" %2d: %5d", i, d[i]);
+       }
        printf("\n");
 #endif
 }
@@ -178,6 +250,42 @@ ao_adc_init(void)
 #ifdef AO_ADC_PIN12_PORT
        stm_moder_set(AO_ADC_PIN12_PORT, AO_ADC_PIN12_PIN, STM_MODER_ANALOG);
 #endif
+#ifdef AO_ADC_PIN13_PORT
+       stm_moder_set(AO_ADC_PIN13_PORT, AO_ADC_PIN13_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN14_PORT
+       stm_moder_set(AO_ADC_PIN14_PORT, AO_ADC_PIN14_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN15_PORT
+       stm_moder_set(AO_ADC_PIN15_PORT, AO_ADC_PIN15_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN16_PORT
+       stm_moder_set(AO_ADC_PIN16_PORT, AO_ADC_PIN16_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN17_PORT
+       stm_moder_set(AO_ADC_PIN17_PORT, AO_ADC_PIN17_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN18_PORT
+       stm_moder_set(AO_ADC_PIN18_PORT, AO_ADC_PIN18_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN19_PORT
+       stm_moder_set(AO_ADC_PIN19_PORT, AO_ADC_PIN19_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN20_PORT
+       stm_moder_set(AO_ADC_PIN20_PORT, AO_ADC_PIN20_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN21_PORT
+       stm_moder_set(AO_ADC_PIN21_PORT, AO_ADC_PIN21_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN22_PORT
+       stm_moder_set(AO_ADC_PIN22_PORT, AO_ADC_PIN22_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN23_PORT
+       stm_moder_set(AO_ADC_PIN23_PORT, AO_ADC_PIN23_PIN, STM_MODER_ANALOG);
+#endif
+#ifdef AO_ADC_PIN24_PORT
+       #error "Too many ADC ports"
+#endif
 
        stm_rcc.apb2enr |= (1 << STM_RCC_APB2ENR_ADC1EN);
 
@@ -248,6 +356,24 @@ ao_adc_init(void)
        stm_adc.sqr4 |= (AO_ADC_SQ12 << 25);
 #endif
 #if AO_NUM_ADC > 12
+       stm_adc.sqr3 |= (AO_ADC_SQ13 << 0);
+#endif
+#if AO_NUM_ADC > 13
+       stm_adc.sqr3 |= (AO_ADC_SQ14 << 5);
+#endif
+#if AO_NUM_ADC > 14
+       stm_adc.sqr3 |= (AO_ADC_SQ15 << 10);
+#endif
+#if AO_NUM_ADC > 15
+       stm_adc.sqr3 |= (AO_ADC_SQ16 << 15);
+#endif
+#if AO_NUM_ADC > 16
+       stm_adc.sqr3 |= (AO_ADC_SQ17 << 20);
+#endif
+#if AO_NUM_ADC > 17
+       stm_adc.sqr3 |= (AO_ADC_SQ18 << 25);
+#endif
+#if AO_NUM_ADC > 18
 #error "need to finish stm_adc.sqr settings"
 #endif
        
@@ -258,6 +384,9 @@ ao_adc_init(void)
        while (!(stm_adc.sr & (1 << STM_ADC_SR_ADONS)))
                ;
 
+#ifndef HAS_ADC_TEMP
+#error Please define HAS_ADC_TEMP
+#endif
 #if HAS_ADC_TEMP
        stm_adc.ccr = ((1 << STM_ADC_CCR_TSVREFE));
 #else
index 2ab548cfa452a4fdfc2706e6b08125d61d3f8c04..6bf89234b702a18a9d9caa1a64b7ff9e84e1e463 100644 (file)
@@ -27,6 +27,13 @@ main(void)
 
        ao_usb_init();
 
+#if HAS_TICK
+       ao_timer_init();
+#endif
+
+#ifdef AO_FLASH_LOADER_INIT
+       AO_FLASH_LOADER_INIT;
+#endif 
        ao_flash_task();
        return 0;
 }
index 38b1c2d8b585c154b8d6a24cfca28cbeaddb0e36..39dc81444a1bb23bc1e48e885b9d594f213094b9 100644 (file)
@@ -83,12 +83,14 @@ _ao_flash_erase_page(uint32_t *page)
 void
 ao_flash_erase_page(uint32_t *page)
 {
+       ao_arch_block_interrupts();
        ao_flash_pecr_unlock();
        ao_flash_pgr_unlock();
 
        _ao_flash_erase_page(page);
 
        ao_flash_lock();
+       ao_arch_release_interrupts();
 }
 
 static void __attribute__ ((section(".ramtext"), noinline))
@@ -116,6 +118,8 @@ ao_flash_page(uint32_t *page, uint32_t *src)
        uint8_t         h;
 
        ao_flash_erase_page(page);
+
+       ao_arch_block_interrupts();
        ao_flash_pecr_unlock();
        ao_flash_pgr_unlock();
        for (h = 0; h < 2; h++) {
@@ -124,4 +128,5 @@ ao_flash_page(uint32_t *page, uint32_t *src)
                src += 32;
        }
        ao_flash_lock();
+       ao_arch_release_interrupts();
 }
index 34f9edb90b084d40b5fbee14cdca7d313a03d30c..d93531fc7da8623d1e4531959f50ce8fea75cd51 100644 (file)
@@ -52,6 +52,9 @@ void stm_systick_isr(void)
                        ao_wakeup((void *) &ao_data_count);
 #endif
                }
+#endif
+#ifdef AO_TIMER_HOOK
+               AO_TIMER_HOOK;
 #endif
        }
 }
index 49e325ac9b48b376057259f1c072e67c67bcb3f8..77ef9c4a8e9c6a394f7f85be0cde32325260e8a5 100644 (file)
@@ -32,6 +32,9 @@ INC = \
 #STACK_GUARD=ao_mpu_stm.c
 #STACK_GUARD_DEF=-DHAS_STACK_GUARD=1
 
+MATH_SRC=\
+       ef_log.c
+
 ALTOS_SRC = \
        ao_boot_chain.c \
        ao_interrupt.c \
@@ -64,7 +67,8 @@ ALTOS_SRC = \
        ao_log_fat.c \
        ao_gps_report_mega.c \
        ao_telemetry.c \
-       $(SAMPLE_PROFILE)
+       $(SAMPLE_PROFILE) \
+       $(MATH_SRC)
 
 PRODUCT=TeleGPS-v0.1
 PRODUCT_DEF=-DTELEGPS