| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Need to rebuild ao_flight_test when any of the flight sources change
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Not having logging wasn't very useful.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This provides tracking when GPS fails, or on TeleMini.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
New telemetry format needed to support TeleNano and TeleMini
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This automates flight code testing by reporting mis-detected apogee or
main events.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Fixed point computations are a pain.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Trace the kalman filter to make sure it's working.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Remove some spurious printf debugging.
Remove an attempt at discovering broken accelerometer code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This generates the constants needed to implement Kalman filtering in
the flight firmware.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
My sdcdb script uses this to set command line options automatically
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Eventually, telenano will run different code; prepare for this by
creating a telenano-specific main routine.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This is a lot more useful than the old filtered pressure data.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Also, remove accel cal code from boards without accel
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This just uses the TeleMini bits, which should work fine for now.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
need to actually alternate the LED/tone with some space so you can
count.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
TeleMini has fewer sensors and uses P0 for igniters instead of P2.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This builds the flight code in baro-only mode for testing.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Not all boards will have these, so fix places that use them to deal
with that.
Signed-off-by: Keith Packard <keithp@keithp.com>
|