From: Keith Packard Date: Mon, 17 Dec 2012 00:06:41 +0000 (-0800) Subject: Merge branch 'aprs' into 'master' X-Git-Tag: 1.1.9.3~10^2~7 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=dfff41c2bec16fe4c7b198a4720eb40d8e740ac4;hp=22a58b0f9b82ea8c7abeda79ca7a4cd21c3dc93c Merge branch 'aprs' into 'master' --- diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index f940b150..99b8e39d 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -485,13 +485,15 @@ public class AltosConfigData implements Iterable { reset(); link.printf("c s\nf\nv\n"); read_link(link, "software-version"); + System.out.printf("Log format %d\n", log_format); switch (log_format) { - case AltosLib.AO_LOG_FORMAT_TELEMETRY: - case AltosLib.AO_LOG_FORMAT_TELESCIENCE: - break; - default: + case AltosLib.AO_LOG_FORMAT_FULL: + case AltosLib.AO_LOG_FORMAT_TINY: + case AltosLib.AO_LOG_FORMAT_MEGAMETRUM: link.printf("l\n"); read_link(link, "done"); + default: + break; } } diff --git a/altoslib/AltosLink.java b/altoslib/AltosLink.java index 6d510563..1b722026 100644 --- a/altoslib/AltosLink.java +++ b/altoslib/AltosLink.java @@ -284,8 +284,8 @@ public abstract class AltosLink implements Runnable { frequency = in_frequency; config_data(); set_radio_frequency(frequency, - config_data.radio_frequency != 0, - config_data.radio_setting != 0, + config_data.radio_frequency > 0, + config_data.radio_setting > 0, config_data.radio_calibration); } @@ -339,10 +339,10 @@ public abstract class AltosLink implements Runnable { public String name; public void start_remote() throws TimeoutException, InterruptedException { - if (debug) - System.out.printf("start remote %7.3f\n", frequency); if (frequency == 0.0) frequency = AltosPreferences.frequency(serial); + if (debug) + System.out.printf("start remote %7.3f\n", frequency); set_radio_frequency(frequency); set_callsign(AltosPreferences.callsign()); printf("p\nE 0\n"); diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index f28dd1c6..218c598a 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -92,6 +92,9 @@ public class AltosState { public void init (AltosRecord cur, AltosState prev_state) { data = cur; + /* Discard previous state if it was for a different board */ + if (prev_state != null && prev_state.data.serial != data.serial) + prev_state = null; ground_altitude = data.ground_altitude(); altitude = data.altitude(); diff --git a/doc/altusmetrum.xsl b/doc/altusmetrum.xsl index b2677a02..e7ab353b 100644 --- a/doc/altusmetrum.xsl +++ b/doc/altusmetrum.xsl @@ -277,6 +277,19 @@ NAR #88757, TRA #12200 apogee and main ejection charges. All Altus Metrum products are designed for use with single-cell batteries with 3.7 volts nominal. + + The battery connectors are a standard 2-pin JST connector and + match batteries sold by Spark Fun. These batteries are + single-cell Lithium Polymer batteries that nominally provide 3.7 + volts. Other vendors sell similar batteries for RC aircraft + using mating connectors, however the polarity for those is + generally reversed from the batteries used by Altus Metrum + products. In particular, the Tenergy batteries supplied for use + in Featherweight flight computers are not compatible with Altus + Metrum flight computers or battery chargers. Check + polarity and voltage before connecting any battery not purchased + from Altus Metrum or Spark Fun. + By default, we use the unregulated output of the Li-Po battery directly to fire ejection charges. This works marvelously with standard @@ -481,7 +494,7 @@ NAR #88757, TRA #12200 You can monitor the operation of the radio link by watching the lights on the devices. The red LED will flash each time a packet - is tramsitted, while the green LED will light up on TeleDongle when + is transmitted, while the green LED will light up on TeleDongle when it is waiting to receive a packet from the altimeter. @@ -2199,7 +2212,7 @@ NAR #88757, TRA #12200 - RF interface for battery charging, configuration, and data recovery. + RF interface for configuration, and data recovery. diff --git a/doc/micropeak.xsl b/doc/micropeak.xsl index 284d0fb0..aa1adaef 100644 --- a/doc/micropeak.xsl +++ b/doc/micropeak.xsl @@ -37,6 +37,13 @@ Updates for version 1.0 release. + + 1.1 + 12 December 2012 + + Add comments about EEPROM storage format and programming jig. + + @@ -223,10 +230,10 @@ NAR #88757, TRA #12200 with the negative battery terminal. - Shipping restrictions prevent us from including a CR1025 - battery with MicroPeak. Many stores carry CR1025 batteries as - they are commonly used in small electronic devices such as - flash lights. + Shipping restrictions may prevent us from including a CR1025 + battery with MicroPeak. If so, many stores carry CR1025 + batteries as they are commonly used in small electronic + devices such as flash lights.
@@ -272,6 +279,118 @@ NAR #88757, TRA #12200 serve to further protect the switch from launch forces.
+
+ On-board data storage + + The ATtiny85 has 512 bytes of non-volatile storage, separate + from the code storage memory. The MicroPeak firmware uses this + to store information about the last completed + flight. Barometric measurements from the ground before launch + and at apogee are stored, and used at power-on to compute the + height of the last flight. + + + 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 + tool. + + + MicroPeak EEPROM Data Storage + + + + + + + Address + Size (bytes) + Description + + + + + 0x000 + 4 + Average ground pressure (Pa) + + + 0x004 + 4 + Minimum flight pressure (Pa) + + + 0x008 + 2 + Number of in-flight samples + + + 0x00a … 0x1fe + 2 + Instantaneous flight pressure (Pa) low 16 bits + + + +
+ + All EEPROM data are stored least-significant byte first. The + instantaneous flight pressure data are stored without the + upper 16 bits of data. The upper bits can be reconstructed + from the previous sample, assuming that pressure doesn't + change by more more than 32kPa in a single sample + interval. Note that this pressure data is not + filtered in any way, while both the recorded ground and apogee + pressure values are, so you shouldn't expect the minimum + instantaneous pressure value to match the recorded minimum + pressure value exactly. + + + MicroPeak samples pressure every 96ms, but stores only every + other sample in the EEPROM. This provides for 251 pressure + samples at 192ms intervals, or 48.192s of storage. The clock + used for these samples is a factory calibrated RC circuit + built into the ATtiny85 and is accurate only to within ±10% at + 25°C. So, you can count on the pressure data being accurate, + but speed or acceleration data computed from this will be + limited by the accuracy of this clock. + +
+
+ MicroPeak Programming Interface + + MicroPeak exposes a standard 6-pin AVR programming interface, + but not using the usual 2x3 array of pins on 0.1" + centers. Instead, there is a single row of tiny 0.60mm × + 0.85mm pads on 1.20mm centers exposed near the edge of the + circuit board. We couldn't find any connector that was + small enough to include on the circuit board. + + + In lieu of an actual connector, the easiest way to connect to + the bare pads is through a set of Pogo pins. These + spring-loaded contacts are designed to connect in precisely + this way. We've designed a programming jig, the MicroPeak + Pogo Pin board which provides a standard AVR interface on one + end and a recessed slot for MicroPeak to align the board with + the Pogo Pins. + + + The MicroPeak Pogo Pin board is not a complete AVR programmer, + it is an interface board that provides a 3.3V regulated power + supply to run the MicroPeak via USB and a standard 6-pin AVR + programming interface with the usual 2x3 grid of pins on 0.1" + centers. This can be connected to any AVR programming + dongle. + + + The AVR programming interface cannot run faster than ¼ of the + AVR CPU clock frequency. Because MicroPeak runs at 250kHz to + save power, you must configure your AVR programming system to + clock the AVR programming interface at no faster than + 62.5kHz, or a clock period of 32µS. + +