summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* 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>
* altos: Don't init packet slave on TD. Make slave start optionalKeith Packard2011-03-19
| | | | | | | | | | | Oops. TeleDongle was starting the packet slave code, which kinda wrecked its ability to receive telemetry packets. This patch simply removes the packet slave code from teledongle as it cannot be used (yet), it also makes the packet slave code initialization take a parameter which controls whether to start that by default; in the future, perhaps TeleDongle will gain a command to start packet slave mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Baro-only boards must not detect launch on accel or speed dataKeith Packard2011-03-19
| | | | | | | The baro sensor generates too much noise to use small changes in computed speed or acceleration to cause a false launch detect. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Write height values to log for nano/miniKeith Packard2011-03-18
| | | | | | This is a lot more useful than the old filtered pressure data. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Add scripts to run lots of flights through the codeKeith Packard2011-03-18
| | | | | | | | This runs a long list of flights (there's a user-specific path pointing at the flights) and squawks if the baro and dual flight computers don't match. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Fix mini/nano default log size to available flash spaceKeith Packard2011-03-18
| | | | | | Also, remove accel cal code from boards without accel Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add TeleNano supportKeith Packard2011-03-18
| | | | | | This just uses the TeleMini bits, which should work fine for now. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Tiny logging fixes. Scan at start, stop when land or full.Keith Packard2011-03-18
| | | | | | | | | | Initialize the flight log for tiny systems by scanning the log area to find the current flight number and log area bounds. Stop logging data when the flight is over, or when the log area is full. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add kalman filters for baro-only boardsKeith Packard2011-03-18
| | | | | | | | This adds a baro-only kalman filter to track the state of the rocket, and then uses it to control flight events instead of the existing ad-hoc mechanisms. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Add tiny logging for TeleMini/TeleNanoKeith Packard2011-03-17
| | | | | | | | | | This splits the logging code into management of the log space within storage and separate code to actually write suitable log entries. A new log writing module, ao_log_tiny, is added which writes only altimeter data at a fairly low data rate for devices using on-chip storage. Signed-off-by: Keith Packard <keithp@keithp.com>
* ignore new flight test fileAnthony Towns2011-03-16
|
* altos: Internal flash ops block when running from flashKeith Packard2011-03-16
| | | | | | | | | The docs say that if you are executing from flash, then the CPU will stall after a flash write or erase command is started until the operation is complete. Take advantage of that to simplify the flash code. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: oops -- altitude reporting wasn't pausing between signalsKeith Packard2011-03-16
| | | | | | | need to actually alternate the LED/tone with some space so you can count. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch pins around for TeleMiniKeith Packard2011-03-16
| | | | | | TeleMini has fewer sensors and uses P0 for igniters instead of P2. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Switch LED usage for TeleMini aroundKeith Packard2011-03-16
| | | | | | | We're using the LEDs instead of tones, so make red mean 'low tone', green mean 'middle tone' and both mean 'high tone'. Signed-off-by: Keith Packard <keithp@keithp.com>
* ao_intflash: Avoid overwriting codeAnthony Towns2011-03-16
| | | | | | | Require firmware to specify the end of its codespace in its Makefile, and use this to determine where the start of available flash is. Should give compile time errors if either there's no room left for storage, or if there's not enough room for code.
* altos: Add TeleMini v1.0Keith Packard2011-03-16
| | | | | | | This adds initial code for the telemini board, a two channel flight computer with digital telemetry and a barometric sensor. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Start with packet slave running. Turn off in pad mode.Keith Packard2011-03-16
| | | | | | | | Instead of turning slave mode on in idle mode, start with it running and disable it in pad mode instead. This means packet mode is available in startup mode too. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Add baro-only flight test programKeith Packard2011-03-16
| | | | | | This builds the flight code in baro-only mode for testing. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Use ao_convert.c instead of hand-coded pres → alt funcKeith Packard2011-03-16
| | | | | | | Fix up ao_convert.c so that it can be used within the flight test code instead of having a (broken) copy of the code there. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Make serial, usb, beeper and accelerometer optional componentsKeith Packard2011-03-16
| | | | | | | Not all boards will have these, so fix places that use them to deal with that. Signed-off-by: Keith Packard <keithp@keithp.com>
* ao_intflash: Use internal flash for storageAnthony Towns2011-03-16
| | | | | Makes any free pages at end of CC1111's internal flash available via the ao_storage API.
* altos: Oops. Lost a couple of commands when merging the doc patchKeith Packard2011-03-07
| | | | | | | I didn't merge this carefully enough and managed to lose the 'f' and 'e' commands, which are kinda useful. Signed-off-by: Keith Packard <keithp@keithp.com>
* src/ao_cmd: Shave off bytes from doc stringsAnthony Towns2011-03-07
| | | | | | Switch to using { func, "X args\0Desc" } to specify command, saving a char field by looking at help[0] instead, and reduce help length by doing alignment with printf instead of hardcoded spaces.
* Revert "src/ao_gps_skytraq.c: Update logging rate to 10Hz"Keith Packard2011-03-07
| | | | | | | This reverts commit b080e933a65d268aaaec8cfd5f617a13d5babc43. 10Hz data isn't any better than 1Hz data; it still doesn't like going upwards rapidly.
* src/ao_gps_skytraq.c: Update logging rate to 10HzAnthony Towns2011-02-18
| | | | | Send commands to skytraq to update baud rate to 57,600 bps, and set NMEA output rate to 10Hz.
* src/ao_gps_skytraq: simplify parsing codeAnthony Towns2011-02-18
| | | | | Added macros to make correctly constructing skytraq commands easier. Simplified code path for NMEA processing marginally.
* ao_radio: generalise setup of packet sizeAnthony Towns2011-02-18
|
* altos/test: auto-configure acceleration parameters from the log fileKeith Packard2011-02-18
| | | | | | | | | The flight test code had static accelerometer configuration values, making it impossible to use data from different boards without recompiling. As the eeprom and telem log files both contain the necessary data, parse that instead. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos/test: Add dependencies in the Makefile for ao_flight_testKeith Packard2011-02-18
| | | | | | | Yes, it would be nice to automate dependency generation here, but I can't be bothered. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Program default flight log max value for new boardsKeith Packard2011-01-19
| | | | | | | | New boards have no config space values at all, and so they need each value to be set. Yes, this should be fixed so that there aren't two copies of these assignments. Signed-off-by: Keith Packard <keithp@keithp.com>
* 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: Sample the accelerometer reference voltage on v1.1 boardsKeith Packard2011-01-16
| | | | | | | This places the 5v reference samples in an array parallel to the basic ADC values. It doesn't do anything with the values, just stores them. 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>
* altos: Auto-calibrate linux-based flight testing codeKeith Packard2011-01-16
| | | | | | | | Use the provided ground acceleration average to set the two accelerometer calibration values so that the flight code will detect pad/idle mode correctly. 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: Add DATA_TO_XDATA to linux test harnessKeith Packard2011-01-16
| | | | | | | The flight test harness needs to expose every function used by the flight code in some form, and this macro is about to become used. Signed-off-by: Keith Packard <keithp@keithp.com>