Keith Packard [Tue, 18 Aug 2009 19:19:31 +0000 (12:19 -0700)]
Use --tty/-T on command line to specify target device
Also, use the ALTOS_TTY environment variable in all tools. Note that
the magic value of "BITBANG" switches the library to connecting
through a CP2103 instead.
Keith Packard [Tue, 18 Aug 2009 18:34:28 +0000 (11:34 -0700)]
Remove unused cctools code paths for old libusb and cp2103 ioctls.
Communication with the CP2103 board has gone through three revisions,
first using ioctls supported by the CP2103 kernel driver, then using
the old synchronous usb library and now using the newer libusb
asynchronous interface. There's no reason to keep shipping the old
stale code now that the new stuff works reliably.
Keith Packard [Sat, 18 Jul 2009 04:30:53 +0000 (21:30 -0700)]
Add AO_GPS_RUNNING state.
This tracks whether the GPS receiver has ever sent a valid report to the
flight computer, allowing the user to tell whether the GPS receiver is
working at all.
Keith Packard [Sat, 18 Jul 2009 00:09:20 +0000 (17:09 -0700)]
Try harder to get the GPS receiver serial link sync'd up.
We cannot assume that the GPS receiver is in any particular state when it
boots, so we try to send the serial configuration at several rates and hope
that it eventually sees something that it likes.
Keith Packard [Sat, 18 Jul 2009 00:06:18 +0000 (17:06 -0700)]
Rolling average for pad location. Say 'GPS ready'.
Use a rolling average for the pad location, instead of just averaging all
positions. This filters out old (presumably less accurate) values eventually.
When enough GPS samples have been acquired, say 'GPS ready'.
Keith Packard [Sat, 11 Jul 2009 07:56:13 +0000 (00:56 -0700)]
Hook aoview directly to alsa
This skips the flite internal audio stuff which opened and closed the audio
device for each phrase. This caused the first part of some phrases to be
missed when using an external audio device.
Keith Packard [Fri, 10 Jul 2009 03:55:10 +0000 (20:55 -0700)]
Show speed. Format numbers. Timeout and report final status.
The speed value is now shown in the top label bar. Ascent shows
accelerometer-derived data, otherwise it's baro derived.
All of the numbers displayed are now given sensible printf formats so they
don't contain way too many digits.
Instead of doing periodic reporting based on flight tick count, data is
reported every 10 seconds based on wall time. After landing, or when no data
have been received for a while, final flight information is spoken.
Keith Packard [Mon, 29 Jun 2009 20:54:00 +0000 (13:54 -0700)]
Convert GPS to SiRF binary protocol.
This switches the GPS unit from NMEA to SiRF protocol at startup and then
parses the binary data. The binary data uses a different encoding of lat/lon
than the NMEA strings, and so the telemetry and eeprom data formats change
with this switch.
Keith Packard [Wed, 17 Jun 2009 20:55:23 +0000 (13:55 -0700)]
Fix clock initialization to not try to use 32kHz xtal on P2_3/P2_4
None of our boards have a 32kHz xtal oscillator, instead we use those pins
(on Telemetrum) for the deployment firing circuits. The old clock
initialization code was switching from the 32kHz RC oscillator to the 32kHz
crystal and overriding our use of those pins.
Keith Packard [Wed, 3 Jun 2009 17:57:46 +0000 (10:57 -0700)]
Stop log dumping at flight end. Print 'end' at end of log.
No reason to continue dumping data past the end of the flight now that the
logging stuff has been demonstrated to work reliably. Also, to make
automated log dumping easier, this prints out 'end' after the log data so
that aoview knows when to stop reading.
Keith Packard [Fri, 29 May 2009 06:17:33 +0000 (23:17 -0700)]
Eliminate RDF tone generation.
Now that we have a viable telemetry-signal based RDF device via TeleDongle,
there's no reason to continue to waste power and bandwidth with a NFM tone.
Keith Packard [Sun, 24 May 2009 04:16:22 +0000 (21:16 -0700)]
Avoid 16-bit overflow in velocity computation.
Adding two 16 bit integers together can wrap around to negative numbers,
this resulted in velocity values which never decreased, making the switch
from coast to apogee state not occur.
Keith Packard [Mon, 18 May 2009 06:36:21 +0000 (23:36 -0700)]
Transmit computed ground pressure and acceleration values
These are the last two values relevant to figuring out the state of the
flight computer, and as they are computed by averaging 10 seconds of 100Hz
sample data, they're a lot more accurate than anything the receiver could do
on its own.
Keith Packard [Mon, 18 May 2009 05:29:54 +0000 (22:29 -0700)]
Send computed accel/vel/pres values over the radio
These computed values reflect what the flight computer is actually refering
to for state changes, and will be useful in debugging the flight software as
well as provide a filtered view of the data.
Keith Packard [Mon, 18 May 2009 05:24:53 +0000 (22:24 -0700)]
While on the pad, zero out velocity every second
We integrate acceleration to get velocity, but that means sitting on the pad
for a long time can add substantial error to the velocity value. Each
second, take the velocity value from a full second ago and subtract that out
of the current velocity. Once we detect boost, this will stop, which means
that as long as we detect boost within a second, we won't have subtracted
out any "real" velocity.
This keeps the pad velocity hovering around zero, which is pretty useful.
Keith Packard [Sun, 17 May 2009 03:04:31 +0000 (20:04 -0700)]
Abandon use of accelerometer for apogee detect.
Integrating the accelerometer data to compute velocity worked for one rocket
flight, but additional testing shows that it doesn't work in other
airframes. Until we figure out how this should work, we'll rely on the
altimeter to detect apogee.
Keith Packard [Sat, 16 May 2009 09:25:04 +0000 (02:25 -0700)]
Add preliminary aoview code
AoView connects with TeleDongle to present telemetry information in a
reasonable form. Right now, it just displays information to stdout, but it
does have fancy dialogs for finding the USB devices.
Keith Packard [Thu, 14 May 2009 03:41:54 +0000 (20:41 -0700)]
Discard usb output before connection. Handle USB reset.
Discarding output before USB is plugged in allows threads that send output
and do other things to work without a USB connection. Unfortuantely, there
doesn't appear to be any way to detect when the USB link is disconnected,
which means that once USB is enabled, future writes will continue to block.
USB reset causes the USB interrupts to all be reconfigured back to power-on
state.
Keith Packard [Wed, 13 May 2009 18:00:43 +0000 (11:00 -0700)]
Accelerometer-based velocity values are invalid after apogee
Because the orientation of the flight computer relative to the ground is
unknown after apogee, the accelerometer data cannot be integrated to compute
velocity. Main deploy is now based purely on barometric altitude and landing
detection no longer checks for a low velocity value.
Keith Packard [Wed, 13 May 2009 17:59:04 +0000 (10:59 -0700)]
Add velocity check for boost detect via accelerometer
Bumping the rocket can cause a brief period of high acceleration, which may
cause a mistaken boost detection. Require both a high acceleration and
reasonable velocity to trigger boost phase.
Keith Packard [Mon, 11 May 2009 06:11:06 +0000 (23:11 -0700)]
Use recorded accelerometer baseline data in ao_flight_test
With the flight computer recording a long-term average value for the
accelerometer in the flight record, use that to prime the flight test code
when running a log file through the simulator.