summaryrefslogtreecommitdiff
path: root/src/ao_flight.c
Commit message (Collapse)AuthorAge
* altos: Use 5V reference data to correct accelerometer measurements.Keith Packard2011-01-16
| | | | | | | | | When the 3.3V and 5V values shift relative to each other (usually due to changes in power consumption), the measured acceleration will appear to shift. This patch converts the 3.3V referenced acceleration value into a 5V referenced acceleration, eliminating this error. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Optimize fetching of ADC data in flight codeKeith Packard2011-01-16
| | | | | | | This stores the address of the desired sample in a local variable and then fetches through that. Saves quite a few instructions. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Ensure flight code gets first crack at new ADC dataKeith Packard2011-01-16
| | | | | | | | Instead of having everyone wait on the raw ADC ring, have the flight code wait on that and have everyone else wait for the flight code to finish looking at the data and move its pointer forwards. Signed-off-by: Keith Packard <keithp@keithp.com>
* Rework invalid accel cal detection codeMike Beattie2011-01-17
| | | | | | | | Slightly reduces code space. Uncalibrated accelerometer now enters invalid state as well. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altos: Added check for out of bounds accelMike Beattie2011-01-16
| | | | | | Chose invalid flight mode instead of idle to give user feedback. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altos: Added check for an accel value above 1.5gMike Beattie2011-01-16
| | | | | | | When detecting flight or idle mode, this should indicate that accel cal values are out of whack. Signed-off-by: Mike Beattie <mike@ethernal.org>
* altos: average 512 accel/baro samples at startup instead of 1000Keith Packard2011-01-16
| | | | | | | This lets us use a simple shift instead of a divide, saving a huge amount of code space. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove redundant initialization of ao_interval variablesAnthony Towns2011-01-07
| | | | | | These are all initialized in the ao_flight_drogue state transition. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Remove unused accel_vel_mach and accel_vel_boost variablesAnthony Towns2011-01-07
| | | | | | Presumably left-over debugging code. Signed-off-by: Keith Packard <keithp@keithp.com>
* Log GPS data on pad after boost detect.Keith Packard2010-02-13
| | | | | | | | | This wakes up the two GPS reporting tasks and gets them to report out any existing GPS data to the log file. To make sure the timestamps in that GPS data are accurate, this also records GPS time on receipt of the GPS data instead of when that is logged. Signed-off-by: Keith Packard <keithp@keithp.com>
* Force idle mode by shorting the SPI clock to ground at boot time.Keith Packard2010-01-09
| | | | | | | | This allows you to override the flight mode detection code in case the accelerometer calibration is broken somehow. Hold the SPI clock shoted to ground until the LED comes on, then remove it. Signed-off-by: Keith Packard <keithp@keithp.com>
* Loosen tolerances for main->landed transitionKeith Packard2009-11-14
| | | | | | | | | | | | | | | Detecting that the rocket has landed is required for the system to flush the eeprom log and re-enable the RDF beacon. This patch changes the landed state entry requirements for the accelerometer to require only that the accelerometer stay within a quarter of a g (down from 1/10g) and changes the testing interval from 20 seconds to 5 seconds. The requirement that the barometric altitude be within 1000m of the launch altitude and that the barometer change by no more than 0.05kPa are unchanged. Signed-off-by: Keith Packard <keithp@keithp.com>
* Remove "f" commandKeith Packard2009-11-02
|
* Add two-point accelerometer calibration.Keith Packard2009-11-02
| | | | | | | Calibration now uses two values, one upside right and the other upside down instead of a single horizontal value. This allows the use of other accelerometers and compensates for variations in the divider circuit to provide more accurate data.
* Enable packet-based communcation to command processorKeith Packard2009-11-01
| | | | | | | This splits the packet code into master/slave halves and hooks the slave side up to the getchar/putchar/flush logic in ao_stdio.c Signed-off-by: Keith Packard <keithp@keithp.com>
* Save some DSEG space by marking cmd functions __reentrantKeith Packard2009-10-16
| | | | | | | __reentrant causes the compiler to place args and locals on the stack instead of in the data segment. Signed-off-by: Keith Packard <keithp@keithp.com>
* Make RDF beacon only run on pad and after landing.Keith Packard2009-09-04
| | | | | | | | | | | | It's pretty much impossible to RDF the rocket during flight, and it interferes with the telemetry data stream. Leave it enabled on the pad so that radios can be tested, and then re-enable it once the rocket has landed. This patch also turns the rdf 'on' time into a parameter so it can be changed, and then sets that parameter to 500ms, once every 5 seconds. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add back the RDF tone generatorKeith Packard2009-09-04
| | | | | | | | | Tracking the rocket on the ground may be easier using tones than using the digital data stream, so we'll try that and see what we think. This reverts commit 3a3bfd471a868d546d83cdc431b53c8f5208edb9. Signed-off-by: Keith Packard <keithp@keithp.com>
* Rename state apogee -> coastKeith Packard2009-06-14
|
* rename states. launchpad -> pad, coast -> fastKeith Packard2009-06-14
|
* Use autotools, move altos to src subdirKeith Packard2009-06-04
Signed-off-by: Keith Packard <keithp@keithp.com>