summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * altos: Write a few pre-launch samples for Tm/Tn devicesKeith Packard2011-04-14
| | | | | | | | | | | | | | | | Record pre-launch samples in a small ring and flush that to flash when launch is detected. This provides a complete record of the flight, rather than simply starting after launch detect. Signed-off-by: Keith Packard <keithp@keithp.com>
| * altos/altosui: Log averaged baro sensor data in Tm/TnKeith Packard2011-04-09
| | | | | | | | | | | | | | | | Instead of logging the best height guess from the kalman filter, log barometer data. The logged data consists of the average value betwen log points to reduce noise. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altosui: Eliminate ao_cmd_filter hookKeith Packard2011-04-19
| | | | | | | | | | | | | | Disabling status messages means we don't need to filter them out of the input stream. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: remove BT logging codeKeith Packard2011-04-19
| | | | | | | | | | | | This was used to debug the serial line startup. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Remove bt debug commandKeith Packard2011-04-19
| | | | | | | | | | | | This will permit some additional cleanups. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Simplify BT communicationsKeith Packard2011-04-19
| | | | | | | | | | | | Eliminate stdio I/O wrappers Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Solidify BT connectionsKeith Packard2011-04-19
| | | | | | | | | | | | | | | | | | Use delays while sending commands to BT module. Don't use BT for stdio until the module is initialized. Add \r to name setting command Don't require 'connected' signal for command input. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add delays to bt startup sequenceKeith Packard2011-04-19
| | | | | | | | | | | | | | The BT device takes a few seconds after power-up before it is ready to receive commands. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Use PIO(6) on BTM to monitor BT connection. Fix BTM init.Keith Packard2011-04-07
| | | | | | | | | | | | | | | | PIo(6) appears to be an active-low indication of the Bluetooth connection status. Hook this up using an interrupt to track the link state instead of using in-band status messages. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Clean up BT serial communcationsKeith Packard2011-04-01
| | | | | | | | | | | | | | | | | | Disable echo on both ends in command mode to eliminate looping error values. Switch to 57600 baud to improve performance. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Make cmd echo per-connection instead of globalKeith Packard2011-04-01
| | | | | | | | | | | | | | Allow different connections to use different echo values, permitting the packet link to turn off echo while the USB link still has it on. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Clean up serial initializationKeith Packard2011-04-01
| | | | | | | | | | | | | | Flush serial input buffers when switching speeds. Ensure pin configuration is correct. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Clean up usage of serial port for stdioKeith Packard2011-04-01
| | | | | | | | | | | | | | Code wanting to use this must invoke ao_add_stdio; that way the link can be configured before command processing starts. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Make ao_serial_drain publicKeith Packard2011-04-01
| | | | | | | | | | | | Allow external code to discard serial input Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Remove serial monitor commandKeith Packard2011-04-01
| | | | | | | | | | | | This takes up space and isn't that useful these days Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Allow any stdio to be used with packet forwardingKeith Packard2011-04-01
| | | | | | | | | | | | | | There's no reason to restrict packet forwarding to work only from USB. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Provide for a pre-filter on commandsKeith Packard2011-04-01
| | | | | | | | | | | | | | This allows for external code to see each command line before it is processed and potentially skip it. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: expose set of available stdio valuesKeith Packard2011-04-01
| | | | | | | | | | | | | | This lets external code manipulate which connection to communicate over. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add P2SEL_*_MASK defines to cc1111.hKeith Packard2011-04-01
| | | | | | | | | | | | | | These are used to avoid having the code "know" which selections are 1 and which are 0 bits. Signed-off-by: Keith Packard <keithp@keithp.com>
* | altos: Add initial TeleBT codeKeith Packard2011-03-31
|/ | | | | | | Prototyping with a TeleMetrum v0.1 board and a serial link to a bluetooth module. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make ao_flight_test show true height but report saturated heightKeith Packard2011-03-31
| | | | | | | | To simulate a saturated baro sensor, clip baro data at a specified altitude. Continue to report the 'true' altitude in the output so that the resulting graphs are useful. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Baro useful ceiling is MSL, not AGLKeith Packard2011-03-31
| | | | | | | Use MSL instead of AGL for detecting over-range baro sensor values. Always trust baro sensor during descent; it'll get there eventually. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Reflect ao_flight split in ao_flight_test dependenciesKeith Packard2011-03-31
| | | | | | Need to rebuild ao_flight_test when any of the flight sources change Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Enable logging during nano flightsKeith Packard2011-03-29
| | | | | | Not having logging wasn't very useful. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Run RDF beacon after apogee instead of waiting for landingKeith Packard2011-03-29
| | | | | | This provides tracking when GPS fails, or on TeleMini. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: ao_sample_preflight was exiting preflight mode immediatelyKeith Packard2011-03-29
| | | | | | | | Need to stay in pre-flight mode until we've gotten enough sensor data to calibrate things appropriately. The conversion from a unified ao_flight.c file was just broken here. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Create custom nano flight codeKeith Packard2011-03-28
| | | | | | | No igniters, just 'pad/drogue/landed' modes (where 'drogue' == 'flying'). A constant 1Hz telemetry and RDF rate. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split up flight code into separate flight/sample/kalman bitsKeith Packard2011-03-28
| | | | | | | | | | | | | | | The flight code mashed together data processing, filtering and actual flight managament into one giant pile. Split things up so that we have: ao_sample.c: Sensor data processing. Reads the ring, handles calibration ao_kalman.c: Filter the data to track the accel/speed/height values ao_flight.c: Flight state management, specific to rocketry. The plan is to re-use ao_sample.c and ao_kalman.c for hardware not specifically designed for rocketry, like TeleNano. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: full logging must flush pending data before checking stateKeith Packard2011-03-26
| | | | | | | | | | | | Flight state must be checked only after any pending data have been written to the log as the 'current' flight state is only valid when the pending data values have been processed. This ensures that the 'boost' state is not marked until the full ring of data is written. This ensures that the data processing code can find the barometer values from before boost to get an idea of the ground pressure value. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Variable log rate in full logging code tooKeith Packard2011-03-26
| | | | | | | | | | With the fixed ADC rate used to get better data during flight, the logging code now needs to vary the data storage rate so that descent data is recorded at 10 samples/second while ascent data is recorded at 1 sample per second. Having the logging code do this itself eliminates any interaction with the flight code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altosui: Add support for telemetry version 4Keith Packard2011-03-24
| | | | | | New telemetry format needed to support TeleNano and TeleMini Signed-off-by: Keith Packard <keithp@keithp.com>
* Add description to test flightsKeith Packard2011-03-23
|
* altos: Exit flight test at landing. Allow description in test flight listKeith Packard2011-03-23
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Ignore alt error for fast->coast. Allow larger error for baro apogee.Keith Packard2011-03-23
| | | | | | | | | | | | | | With the fixed kalman filter, transitions across mach don't cause bumps in the merged filter. And, with working kalman bits, the signal for broken baro detection is stronger and so we can allow for baro apogee detection in cases where noise occurs close to apogee. Bump the kalman filter to trust the baro less so that the model tracks across mach. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Restore sensible kalman valuesKeith Packard2011-03-22
| | | | | | | Now that the kalman code seems to work correctly, restore the sensor errors and model errors to match reality Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix up flight code testingKeith Packard2011-03-22
| | | | | | | This automates flight code testing by reporting mis-detected apogee or main events. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Missing parens and some bad arithmetic in the kalman codeKeith Packard2011-03-22
| | | | | | Fixed point computations are a pain. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add ao_flight_debug codeKeith Packard2011-03-22
| | | | | | Trace the kalman filter to make sure it's working. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Clean up some debug stuff in ao_flight.cKeith Packard2011-03-22
| | | | | | | Remove some spurious printf debugging. Remove an attempt at discovering broken accelerometer code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/kalman: Kalman terms can be > 1, use 32-bit fixed pointKeith Packard2011-03-22
| | | | | | | | Because speed and acceleration are scaled by 16, it's fairly common for the kalman terms to end up larger than 1. Instead of trying to fuss with 16-bit values and shifts, just use 32-bit values. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Compute a 'trust' value for the barometerKeith Packard2011-03-22
| | | | | | | | Instead of making the baro use/don't-use decision binary, use a 'trust value' which slowly migrates from baro+accel to accel-only mode. This eliminates bumps in the data from a rapid shift. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch telemetrum over to kalman filterKeith Packard2011-03-22
| | | | | | | | | | | | This changes the full telemetry stream to include kalman data instead of the old ad-hoc flight data. It's compatible in that the packet sizes are the same so teledongle can receive either and figure out which it has received. A few plotting and testing tools are added to make validating the new code easier. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add nickle kalman implementation.Keith Packard2011-03-21
| | | | | | | This generates the constants needed to implement Kalman filtering in the flight firmware. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add .sdcdbrc file for teledongleKeith Packard2011-03-19
| | | | | | My sdcdb script uses this to set command line options automatically Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: New telemetry report format (version 4). Supports tiny telemetry.Keith Packard2011-03-19
| | | | | | | | | | | This completely replaces the version 3 format with a much simpler and easier to parse scheme. It's described in detail in ao_telem.h, but the basic idea is that the whole line is split into name/value pairs, separated by whitespace. Every name is unique, and the values are either strings or integers. No extraneous formatting or units are provided. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: The kalman code requires a constant sample rateKeith Packard2011-03-19
| | | | | | | | The kalman function can't handle a variable sample rate, so keep the ADC running at full speed for the whole flight instead of slowing it down after apogee. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split telenano main from teleminiKeith Packard2011-03-19
| | | | | | | Eventually, telenano will run different code; prepare for this by creating a telenano-specific main routine. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Split out tiny telemetry from full telemetryKeith Packard2011-03-19
| | | | | | | | | | | | | | | The TeleMini and TeleNano boards do not have either GPS or accelermeters, and they also run the kalman filter which produces standard unit measurements for the flight height/speed/accel values. This makes the telemetry significantly different. ao_telemetry_tiny.c sends the required data. Note that TeleNano sends the same telemetry as telemini at this point; there are a couple of values which are not useful, but the overhead of sending them is small enough that the hassle of having three telemetry formats seemed excessive. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make telemetry interval more consistentKeith Packard2011-03-19
| | | | | | | | | | | | | | | Instead of using a delay between telemetry packets, use a telemetry period and compute an appropriate delay each time. This requires changing the ascent telemetry from a 50ms delay to a 100ms interval, to provide a regular 10 packets-per-second rate. Before, we counted on the telemetry packet taking about 50ms to send so that we would receive about 10 per second. This also eliminates delays during descent for RDF tones -- those will get transmitted in the interval between telemetry packets without interrupting the spacing of those packets. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Configure packet size from send/recv parameters.Keith Packard2011-03-19
| | | | | | | | | | Instead of setting the packet size at configuration time, use the provided packet size to the send/recv functions to configure the radio. This eliminates many configuration calls, leaving us with 'RDF' mode and 'packet' mode, the latter working for telemetry and the bi-directional link. Signed-off-by: Keith Packard <keithp@keithp.com>