fw/altos
11 years agoReset GPS at boot time
Keith Packard [Sat, 18 Jul 2009 05:11:03 +0000 (22:11 -0700)]
Reset GPS at boot time

11 years agoFix up serial debug output
Keith Packard [Sat, 18 Jul 2009 05:10:43 +0000 (22:10 -0700)]
Fix up serial debug output

11 years agoAllow the GPS port to run at 4800 baud if desired
Keith Packard [Sat, 18 Jul 2009 04:34:13 +0000 (21:34 -0700)]
Allow the GPS port to run at 4800 baud if desired

11 years agoInitialize the GPS serial protocol state
Keith Packard [Sat, 18 Jul 2009 04:33:53 +0000 (21:33 -0700)]
Initialize the GPS serial protocol state

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoUse uint8_t for comparisons to avoid int conversions
Keith Packard [Sat, 18 Jul 2009 04:33:18 +0000 (21:33 -0700)]
Use uint8_t for comparisons to avoid int conversions

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd AO_GPS_RUNNING state.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd M command to monitor serial bytes
Keith Packard [Sat, 18 Jul 2009 04:25:35 +0000 (21:25 -0700)]
Add M command to monitor serial bytes

11 years agoSupport the not-connected GPS state
Keith Packard [Sat, 18 Jul 2009 04:24:45 +0000 (21:24 -0700)]
Support the not-connected GPS state

11 years agoUse 57600 baud for GPS. Clean up gps init.
Keith Packard [Sat, 18 Jul 2009 02:23:10 +0000 (19:23 -0700)]
Use 57600 baud for GPS. Clean up gps init.

Assume GPS is either in 4800 NMEA or 57600 SiRF mode, send just the sequence
to get from 4800 NMEA to 5760 SiRF.

Also, eliminate threads from the gps test program.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoTry harder to get the GPS receiver serial link sync'd up.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoRolling average for pad location. Say 'GPS ready'.
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'.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoSplit GPS data into a separate column
Keith Packard [Fri, 17 Jul 2009 23:22:51 +0000 (16:22 -0700)]
Split GPS data into a separate column

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoFix up SiRF parsing and test code so that it actually works
Keith Packard [Fri, 17 Jul 2009 23:03:35 +0000 (16:03 -0700)]
Fix up SiRF parsing and test code so that it actually works

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd host-side gps protocol testing program
Keith Packard [Fri, 17 Jul 2009 20:58:14 +0000 (13:58 -0700)]
Add host-side gps protocol testing program

11 years agoHook aoview directly to alsa
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoShow speed. Format numbers. Timeout and report final status.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoDont smash aoview_monitor_parse input buffer
Keith Packard [Sun, 5 Jul 2009 15:35:28 +0000 (08:35 -0700)]
Dont smash aoview_monitor_parse input buffer

11 years agoIntegrate flite into aoview directly. Fix great circle computation.
Keith Packard [Tue, 30 Jun 2009 22:25:52 +0000 (15:25 -0700)]
Integrate flite into aoview directly. Fix great circle computation.

Use a separate thread for flite rather than a separate program.
Save voice state to gconf.
Add filters for replay file selection

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMake window taller
Keith Packard [Tue, 30 Jun 2009 22:24:53 +0000 (15:24 -0700)]
Make window taller

11 years agoUse 16kHz voice
Keith Packard [Tue, 30 Jun 2009 22:24:31 +0000 (15:24 -0700)]
Use 16kHz voice

11 years agoAdd telem replay and larger labels
Keith Packard [Tue, 30 Jun 2009 18:58:30 +0000 (11:58 -0700)]
Add telem replay and larger labels

Replays telemetry files in real time
Shows height/state/rssi in big values at the top.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoUpdate aoview/.gitignore
Keith Packard [Tue, 30 Jun 2009 06:06:47 +0000 (23:06 -0700)]
Update aoview/.gitignore

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoUse flite to announce flight state
Keith Packard [Tue, 30 Jun 2009 06:05:27 +0000 (23:05 -0700)]
Use flite to announce flight state

This uses the flite voice synthesis library from festival to announce
altitude and speed information during the rocket flight.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd GPS speed and error data to telemetry and aoview
Keith Packard [Tue, 30 Jun 2009 06:03:58 +0000 (23:03 -0700)]
Add GPS speed and error data to telemetry and aoview

Having switched to the SiRF binary GPS format, the velocity and error data
can now be displayed.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoConvert GPS to SiRF binary protocol.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd ejection computation utility
Keith Packard [Thu, 18 Jun 2009 06:22:25 +0000 (23:22 -0700)]
Add ejection computation utility

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoFix clock initialization to not try to use 32kHz xtal on P2_3/P2_4
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoSome kernels reference USB ttys as tty/tty* instead of tty:tty*
Keith Packard [Mon, 15 Jun 2009 00:25:34 +0000 (17:25 -0700)]
Some kernels reference USB ttys as tty/tty* instead of tty:tty*

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoRename state apogee -> coast
Keith Packard [Sun, 14 Jun 2009 23:45:19 +0000 (16:45 -0700)]
Rename state apogee -> coast

11 years agorename states. launchpad -> pad, coast -> fast
Keith Packard [Sun, 14 Jun 2009 23:39:28 +0000 (16:39 -0700)]
rename states. launchpad -> pad, coast -> fast

11 years agoDisable monitor mode when communicating via usb
Keith Packard [Sun, 14 Jun 2009 23:36:29 +0000 (16:36 -0700)]
Disable monitor mode when communicating via usb

11 years agoFormat GPS seconds as %02d.%04d to avoid spaces in the value
Keith Packard [Thu, 4 Jun 2009 21:38:45 +0000 (14:38 -0700)]
Format GPS seconds as %02d.%04d to avoid spaces in the value

The aoview GPS parsing code doesn't deal well with spaces in the middle of
the value, so pad the seconds field with a zero as needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agonewer INSTALL file pulled in by autogen.sh
Bdale Garbee [Thu, 4 Jun 2009 19:11:48 +0000 (13:11 -0600)]
newer INSTALL file pulled in by autogen.sh

11 years agoadd a distclean target to src/Makefile
Bdale Garbee [Thu, 4 Jun 2009 19:09:29 +0000 (13:09 -0600)]
add a distclean target to src/Makefile

11 years agoadd lib to the front of the subdir list
Bdale Garbee [Thu, 4 Jun 2009 19:07:10 +0000 (13:07 -0600)]
add lib to the front of the subdir list

11 years agoMove build and debug tools to 'cctools' directory.
Keith Packard [Thu, 4 Jun 2009 18:20:10 +0000 (11:20 -0700)]
Move build and debug tools to 'cctools' directory.

These tools were merged in from the ccdbg package.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMerge ccdbg and altos sources into one giant repository
Keith Packard [Thu, 4 Jun 2009 18:13:15 +0000 (11:13 -0700)]
Merge ccdbg and altos sources into one giant repository

Keeping these separate isn't making things any easier.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoUse autotools, move altos to src subdir
Keith Packard [Thu, 4 Jun 2009 17:41:34 +0000 (10:41 -0700)]
Use autotools, move altos to src subdir

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMake menu seperator insensitive
Keith Packard [Thu, 4 Jun 2009 17:25:30 +0000 (10:25 -0700)]
Make menu seperator insensitive

11 years agoaoview: Add eeprom data fetching
Keith Packard [Thu, 4 Jun 2009 00:07:34 +0000 (17:07 -0700)]
aoview: Add eeprom data fetching

Fetches the last flight data from a TM device connected via USB and writes
it to the flight log directory.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoStop log dumping at flight end. Print 'end' at end of log.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoStart adding bi-directional packet link
Keith Packard [Sun, 31 May 2009 16:22:01 +0000 (09:22 -0700)]
Start adding bi-directional packet link

11 years agoEliminate RDF tone generation.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoChange .gitignore to match new aoload procedure
Keith Packard [Fri, 29 May 2009 06:17:25 +0000 (23:17 -0700)]
Change .gitignore to match new aoload procedure

11 years agoLeave serial number writing to aoload
Keith Packard [Thu, 28 May 2009 05:01:37 +0000 (22:01 -0700)]
Leave serial number writing to aoload

Instead of building per-serial hex files, leave that
process to the new aoload program

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd aoload to load serial-numbered altos binaries.
Keith Packard [Thu, 28 May 2009 04:53:15 +0000 (21:53 -0700)]
Add aoload to load serial-numbered altos binaries.

aoload is a custom version of ccload which edits the data before sending it
to the target machine, writing the target serial number into the data.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoFix aoview telemetry GPS parsing code to use correct columns
Keith Packard [Sun, 24 May 2009 04:20:12 +0000 (21:20 -0700)]
Fix aoview telemetry GPS parsing code to use correct columns

This code was trying to pull the GPS data from the wrong columns, causing
aoview to fail to display GPS information.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoParse both telemetry or log data ao_flight_test
Keith Packard [Sun, 24 May 2009 04:18:57 +0000 (21:18 -0700)]
Parse both telemetry or log data ao_flight_test

Change the way data is fed from files to the flight test rig to handle
either kind of input file.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAvoid 16-bit overflow in velocity computation.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMake file handling more general so it can be reused.
Keith Packard [Wed, 20 May 2009 16:44:55 +0000 (09:44 -0700)]
Make file handling more general so it can be reused.

The log file handling stuff will be useful for saving eeprom data, so pull
it out of the real-time log handling code and make a general interface.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoIgnore aoview_glade.h
Keith Packard [Mon, 18 May 2009 06:54:44 +0000 (23:54 -0700)]
Ignore aoview_glade.h

11 years agoTransmit computed ground pressure and acceleration values 0.4
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoProvide install target
Keith Packard [Mon, 18 May 2009 06:18:09 +0000 (23:18 -0700)]
Provide install target

11 years agoEmbed glade file in executable
Keith Packard [Mon, 18 May 2009 06:13:20 +0000 (23:13 -0700)]
Embed glade file in executable

This eliminates install issues nicely.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd About dialog to aoview.
Keith Packard [Mon, 18 May 2009 06:05:23 +0000 (23:05 -0700)]
Add About dialog to aoview.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoUSB device names can contain '.' too
Keith Packard [Mon, 18 May 2009 05:44:19 +0000 (22:44 -0700)]
USB device names can contain '.' too

Depending on the hierarchy of devices, names can contain '.', so allow those
too.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoscandir returns -1 on error
Keith Packard [Mon, 18 May 2009 05:43:34 +0000 (22:43 -0700)]
scandir returns -1 on error

In which case, the namelist is invalid, so don't look at it, and don't free
it.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoSend computed accel/vel/pres values over the radio 0.3
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoHandle disappearing serial devices
Keith Packard [Mon, 18 May 2009 05:29:06 +0000 (22:29 -0700)]
Handle disappearing serial devices

Put up a dialog when the serial open fails, and shut down monitoring when
the serial device disappears while running.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoWhile on the pad, zero out velocity every second
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoClear table, reset log on disconnect
Keith Packard [Sun, 17 May 2009 08:29:06 +0000 (01:29 -0700)]
Clear table, reset log on disconnect

11 years agoAdd pad lat/lon, max accel, max height
Keith Packard [Sun, 17 May 2009 08:28:16 +0000 (01:28 -0700)]
Add pad lat/lon, max accel, max height

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoClean up GPS display
Keith Packard [Sun, 17 May 2009 07:46:09 +0000 (00:46 -0700)]
Clean up GPS display

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMake aoview window taller
Keith Packard [Sun, 17 May 2009 07:45:38 +0000 (00:45 -0700)]
Make aoview window taller

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd lots more aoview UI bits
Keith Packard [Sun, 17 May 2009 07:13:45 +0000 (00:13 -0700)]
Add lots more aoview UI bits

Logs data to files, displays current state in window.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoWhen logging starts up, right the whole ring to the log.
Keith Packard [Sun, 17 May 2009 03:45:26 +0000 (20:45 -0700)]
When logging starts up, right the whole ring to the log.

This preserves the data pre boost-detect for later analysis.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAbandon use of accelerometer for apogee detect.
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd preliminary aoview code sn4-flight1 sn4-flight2
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoDiscard usb output before connection. Handle USB reset. 0.2
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoEnable radio monitor by default in teleterra, teledongle and tidongle
Keith Packard [Thu, 14 May 2009 03:40:42 +0000 (20:40 -0700)]
Enable radio monitor by default in teleterra, teledongle and tidongle

These ground loads want to monitor the radio constantly, and not require use
of the 'm' command before listening.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoRemove monitor/rssi functions from telemetrum load
Keith Packard [Thu, 14 May 2009 03:39:28 +0000 (20:39 -0700)]
Remove monitor/rssi functions from telemetrum load

Telemetrum is now a flight-only load, use teleterra or teledongle for ground
boards.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoSplit out ao_state_names to separate file
Keith Packard [Thu, 14 May 2009 03:38:11 +0000 (20:38 -0700)]
Split out ao_state_names to separate file

Allows state names to be used in programs without monitoring enabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoIndicate RSSI with a blinking LED
Keith Packard [Wed, 13 May 2009 21:29:30 +0000 (14:29 -0700)]
Indicate RSSI with a blinking LED

Blink the red LED at a rate proportional to the RSSI value.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMake ao_flight_test show AGL altitude and positive acceleration under boost
Keith Packard [Wed, 13 May 2009 18:19:13 +0000 (11:19 -0700)]
Make ao_flight_test show AGL altitude and positive acceleration under boost

This makes the output more readable

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoMake ao_flight_test able to read raw logging data
Keith Packard [Wed, 13 May 2009 18:18:24 +0000 (11:18 -0700)]
Make ao_flight_test able to read raw logging data

Protect ao_flight_test reading functions so that a simple
'script' output can be fed to the program and have it work correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoPrint only RSSI when packet CRC is invalid
Keith Packard [Wed, 13 May 2009 18:16:53 +0000 (11:16 -0700)]
Print only RSSI when packet CRC is invalid

Packets with invalid CRC usually contain bogus data, so don't print that,
just print out the RSSI which may contain useful data.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAccelerometer-based velocity values are invalid after apogee
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd velocity check for boost detect via accelerometer
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoTypo in callsign
Keith Packard [Wed, 13 May 2009 17:58:30 +0000 (10:58 -0700)]
Typo in callsign

11 years agoUse recorded accelerometer baseline data in ao_flight_test
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.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoDon't re-initialize the landing range data at each apogee detect sample
Keith Packard [Mon, 11 May 2009 06:01:16 +0000 (23:01 -0700)]
Don't re-initialize the landing range data at each apogee detect sample

The landing range values are used only after apogee detect, so we need only
initialize them on the transition from apogee to drogue.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoInitialize ao_min_vel with |ao_flight_vel|
Keith Packard [Mon, 11 May 2009 06:00:06 +0000 (23:00 -0700)]
Initialize ao_min_vel with |ao_flight_vel|

As ao_min_vel is stored as an absolute value, it's important to preserve
that invariant, even though we don't expect ao_flight_vel to be negative at
coast.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoDecrease telemetry rate on the pad to 1/sec instead of 20/sec
Keith Packard [Mon, 11 May 2009 05:58:31 +0000 (22:58 -0700)]
Decrease telemetry rate on the pad to 1/sec instead of 20/sec

Transmitting telemetry through the radio consumes a significant amount of
battery; reducing the rate to 1/sec will reduce power usage while waiting
for launch.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoIncrease the initial accel/baro average to 1000 samples
Keith Packard [Mon, 11 May 2009 05:57:19 +0000 (22:57 -0700)]
Increase the initial accel/baro average to 1000 samples

To get an accurate baseline of the launchpad state, take a longer average of
the two sensors as the unit boots up.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoRecord average accelerometer value in flight start log record
Keith Packard [Mon, 11 May 2009 05:54:14 +0000 (22:54 -0700)]
Record average accelerometer value in flight start log record

The average accelerometer value cannot be extracted from the log as the
record starts after that is computed. As that drives much of the
accelerometer-based state transition logic, it is an important value to
have, so we log it as part of the flight start record now.

Signed-off-by: Keith Packard <keithp@keithp.com>
11 years agoAdd version command to show product information
Keith Packard [Sat, 9 May 2009 17:24:10 +0000 (10:24 -0700)]
Add version command to show product information

11 years agoPad callsign with nuls
Keith Packard [Sat, 9 May 2009 17:23:49 +0000 (10:23 -0700)]
Pad callsign with nuls

11 years agoUSB spec limits bulk endpoints to 64 byte payload max.
Keith Packard [Fri, 1 May 2009 15:14:57 +0000 (08:14 -0700)]
USB spec limits bulk endpoints to 64 byte payload max.

For full-speed devices, bulk endpoints may use 8, 16, 32 or 64 bytes, but no
more.

11 years agoUse 'char' instead of 'uint8_t' for character data
Keith Packard [Thu, 30 Apr 2009 00:46:56 +0000 (17:46 -0700)]
Use 'char' instead of 'uint8_t' for character data

String and character constants are of char type, so using uint8_t causes
promotion to 16-bit types when comparing the two.

11 years agoEliminate incorrect cast in printf string argument
Keith Packard [Thu, 30 Apr 2009 00:46:36 +0000 (17:46 -0700)]
Eliminate incorrect cast in printf string argument

char * is a pointer to a string in the default address space, not a generic pointer
to a string. As such, the compiler (at least 2.9.0) mis-compiles this if the
cast is included.

11 years agoCorrect radio frequency shown in config display.
Keith Packard [Thu, 30 Apr 2009 00:44:41 +0000 (17:44 -0700)]
Correct radio frequency shown in config display.

Radio frequency base is 434.550, not 435.550

11 years agoReset landing interval tests at apogee
Keith Packard [Thu, 30 Apr 2009 00:42:26 +0000 (17:42 -0700)]
Reset landing interval tests at apogee

This moves all of the interval management into the landing test code and
out of the main loop. The interval is reset at apogee to make sure the
sensors produce a stable reading for at least 20 seconds

11 years agoclean up host programs, too
Bdale Garbee [Sun, 26 Apr 2009 23:53:13 +0000 (17:53 -0600)]
clean up host programs, too

11 years agoWas missing v_batt in adc dump command 0.1
Keith Packard [Sun, 26 Apr 2009 23:04:07 +0000 (16:04 -0700)]
Was missing v_batt in adc dump command

11 years agoAdd manual ignition and igniter test commands
Keith Packard [Sun, 26 Apr 2009 22:38:28 +0000 (15:38 -0700)]
Add manual ignition and igniter test commands

11 years agoClean up commands a bit
Keith Packard [Sun, 26 Apr 2009 22:38:03 +0000 (15:38 -0700)]
Clean up commands a bit

11 years agoClear more files on make clean
Keith Packard [Sun, 26 Apr 2009 22:08:58 +0000 (15:08 -0700)]
Clear more files on make clean

11 years agoLabel binaries with product and serial info
Keith Packard [Sun, 26 Apr 2009 22:05:29 +0000 (15:05 -0700)]
Label binaries with product and serial info

11 years agoMake sure full log is written and flushed on landing.
Keith Packard [Sun, 26 Apr 2009 08:37:02 +0000 (01:37 -0700)]
Make sure full log is written and flushed on landing.

The final state change to landing is recorded in the logging thread, so have
that turn off logging once it has recorded that state. Then make it go to
sleep.

11 years agoClean up monitor output a bit
Keith Packard [Sun, 26 Apr 2009 08:36:53 +0000 (01:36 -0700)]
Clean up monitor output a bit