summaryrefslogtreecommitdiff
path: root/ao_flight.c
Commit message (Collapse)AuthorAge
* Use autotools, move altos to src subdirKeith Packard2009-06-04
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Eliminate RDF tone generation.Keith Packard2009-05-28
| | | | | | | 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>
* Avoid 16-bit overflow in velocity computation.Keith Packard2009-05-23
| | | | | | | | 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>
* While on the pad, zero out velocity every secondKeith Packard2009-05-17
| | | | | | | | | | | | | 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>
* Abandon use of accelerometer for apogee detect.Keith Packard2009-05-16
| | | | | | | | | 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>
* Accelerometer-based velocity values are invalid after apogeeKeith Packard2009-05-13
| | | | | | | | | 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>
* Add velocity check for boost detect via accelerometerKeith Packard2009-05-13
| | | | | | | | 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>
* Don't re-initialize the landing range data at each apogee detect sampleKeith Packard2009-05-10
| | | | | | | 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>
* Initialize ao_min_vel with |ao_flight_vel|Keith Packard2009-05-10
| | | | | | | | 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>
* Decrease telemetry rate on the pad to 1/sec instead of 20/secKeith Packard2009-05-10
| | | | | | | | 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>
* Increase the initial accel/baro average to 1000 samplesKeith Packard2009-05-10
| | | | | | | 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>
* Reset landing interval tests at apogeeKeith Packard2009-04-29
| | | | | | 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
* Make sure full log is written and flushed on landing.Keith Packard2009-04-26
| | | | | | 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.
* Add configuration supportKeith Packard2009-04-26
| | | | | | | | | | | Current config variables: Main deploy altitude above launch (in meters) Acceleration zero g calibration (manual or automatic) Radio channel (freq = 435.550MHz + channel * 100kHz) Callsign (max 8 characters) Supporting this involved shuffling code around so that the non-telemetrum builds could include only the stuff they needed.
* Allow for slower ADC operation. Add power saving code.Keith Packard2009-04-25
| | | | | | This tries to make the flight computer use less power by disabling USB in flight mode, lowering the telemetry rate after ascent. It also disables the RDF beacon during ascent and re-enables it once descent has started.
* Enabling apogee detect via speed: < 200m/s && < max_speed - 50m/sKeith Packard2009-04-24
| | | | | | | | | This change ensures that we actually got going fairly fast, and then slowed down a bunch before enabling apogee detect. Otherwise, we'll detect apogee right off the pad as we're not going very fast at that point... This also adds the 'f' command to show the current flight status on the USB port.
* Update flight algorithm based on data collected from SN-1 Flight 1Keith Packard2009-04-24
| | | | | | | | This now correctly sequences through the flight data collected from the first TeleMetrum test flight. This also completes up the flight algorithm test harness (ao_flight_test), which runs the flight algorithm on the Linux host from a captured data log.
* Add igniters and update flight control algorithmKeith Packard2009-04-24
|
* Add radio support. Build separate executables for TeleMetrum and the TI dongleKeith Packard2009-04-20
| | | | | | | | | Ok, way too big a patch, but things were in rough shape. This patch adds support for the radio, both transmit and receive. Then, because I could no longer run the TeleMetrum code on the TI dongle, I ended up building a separate image for the TI board, which involved creating a mechanism for having multiple command sets and splitting code for different functions into different files.
* Add task names and 'T' command to show task status.Keith Packard2009-04-18
| | | | The T command shows the current wchan and PC for each task in the system.
* Fix GPL version at 2Keith Packard2009-04-18
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* Add gps, debug dongle support and pressure alt tablesKeith Packard2009-04-17
| | | | | | | | GPS also pulled in serial support. The altitude tables take raw 11-bit pressure sample numbers and convert them to standard pressure altitude values. Signed-off-by: Keith Packard <keithp@keithp.com>
* use red LED to indicate system startupKeith Packard2009-04-14
|
* Add in existing flight pieces: flight/report/logKeith Packard2009-04-14
These pieces come from the old telemetrum firmware. Signed-off-by: Keith Packard <keithp@keithp.com>