settings but only be used when home location is valid. Also discard any mag
data that is all zeros although we shouldn't see this.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2283 ebee16cc-31ac-478f-84a7-5cbb03baadba
little aggressive. Also increased the drift rate of the gyro bias per Sambas'
testing (thanks) although not to the levels required for flying through 40 deg
C transitions.
Made the dump_ekf function handle both numbers of states
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2282 ebee16cc-31ac-478f-84a7-5cbb03baadba
FirmwareIAP to get me back for breaking Sys_Reset. You got me! :)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2246 ebee16cc-31ac-478f-84a7-5cbb03baadba
bias as gravity vector facing down (bad for planes) which is diabled by
default.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2232 ebee16cc-31ac-478f-84a7-5cbb03baadba
than the ekf runs and also be more tolerant of timing jitter
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2191 ebee16cc-31ac-478f-84a7-5cbb03baadba
from the AHRS code (which will facilitate code integration with new INS) and
also will help set up a fifo queue for the downsampled data to allow gyro data
output from AHRS faster than EKF output. Also decreased ADC interrupt priority
so the SPI comms don't drop out.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2190 ebee16cc-31ac-478f-84a7-5cbb03baadba
bias correction. This is useful for stabilization to get rid of the gyro bias.
Making it an option is important for calibration.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2189 ebee16cc-31ac-478f-84a7-5cbb03baadba
bounded. Velocity variance still comes from AHRSCalibration.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2186 ebee16cc-31ac-478f-84a7-5cbb03baadba
Three files added to AHRS which add accelerometer biases (16 states) to the INS/GPS. Added for evaluation (give it a try James).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2182 ebee16cc-31ac-478f-84a7-5cbb03baadba
velocity to help stabilize attitude. In principle the mag should be fine but
in practice I need this.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2160 ebee16cc-31ac-478f-84a7-5cbb03baadba
indoor from the name since it's used for both indoor and outdoor mode now.
Increased default value to 0.4 to better reflect the GPS accuracy.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2156 ebee16cc-31ac-478f-84a7-5cbb03baadba
how various sensors are used in the INS update. Also added slow filter to
track offset between GPS and baro in outdoor mode.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2154 ebee16cc-31ac-478f-84a7-5cbb03baadba
Changes in ahrs.c for new initialization and to fix issues with outdoor algorithm. The changes in ahrs.c are pretty messy, but committed mostly to get the code to Peabody for more extensive restructuring of ahrs.c.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2150 ebee16cc-31ac-478f-84a7-5cbb03baadba
parallel for this update. Also removed comment for rawhid
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2012 ebee16cc-31ac-478f-84a7-5cbb03baadba
1) Moved the criteria for using GPS to defines in anticipation of moving into
AHRSSettings
2) Only use the mags for updates if the vector length is within 20% of nominal
to avoid updating when it's nonsense
3) Reinitialize position when swapping between indoor and outdoor
4) Dont use mags for first 5 seconds after initialization, sometimes seems to
cause issues
5) Dont use mags until magnetic field at your location is set and a magnetic
field is loaded
6) Dont use GPS if home location hasnt been set
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1959 ebee16cc-31ac-478f-84a7-5cbb03baadba
moved around where the axis are swapped and made the negative sign come from
calibration.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1931 ebee16cc-31ac-478f-84a7-5cbb03baadba
uavobjectgenerator to support multiple fields (thanks Les!). Also
changed default scale on mag to +/-6g
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1899 ebee16cc-31ac-478f-84a7-5cbb03baadba
home location. If you use INSGPS_INDOORS make sure your HomeLocation.Be fields
are correct for your GPS coordinates
http://maps.alfiordalis.com/declination.html
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1862 ebee16cc-31ac-478f-84a7-5cbb03baadba
fly (EKF rate up to a limit). Also, now the algorithm selects if you are
indoor or outdoor as well as if you use a mag indoor (if you do set the z
variance higher than it calibrates to).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1841 ebee16cc-31ac-478f-84a7-5cbb03baadba
approach again because ran out of numerical precision for single pass. Also
made ground force the gyro signs to be correct.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1806 ebee16cc-31ac-478f-84a7-5cbb03baadba
Flight: Create PositionDesired (the active waypoint) UAVObject and make the FlightSituationActual no update since it not used.
Flight: New velocity desired object that passes information between the look computing the desired velocity and the PID loop to get it (updated at different rates)
UAVObjects/PositionActual: Remove unused GPS fields
UAVObjects/PositionActual VelocityActual: Split the velocity into a separate object. ALso make sure all the information telemetered around is in cm to avoid using floats.
UAVObject/GuidanceSettings: New guidance settings object for the guidance module
Flight/Posix: Add the new objects to the Posix sim
Flight/Guidance: Computes a desired velocity based on position error than runs a PID loop to control roll and pitch to achieve that velocity. All distances are in cm, and updated the PositionActual fields to reflect this and use int32.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1760 ebee16cc-31ac-478f-84a7-5cbb03baadba
determine retransmitting calibration, home location and such.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1755 ebee16cc-31ac-478f-84a7-5cbb03baadba
Calibration should take less time now too (using second moments to estimate
variance in one pass). Now need to change to multiple messages to get the
calibration in to keep the request message size minimal. Also currently
running sensor calibrate doesn't store the gyro bias so if you want to use this
you'll have to tweak it manually. I'll fix that step tomorrow.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1741 ebee16cc-31ac-478f-84a7-5cbb03baadba
Leaving debug on allows the -g option to be enabled
so that we can have symbols in gdb even though we're
forcing the optimization flags to -Os.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1631 ebee16cc-31ac-478f-84a7-5cbb03baadba
The AHRS mainloop was reading the mag data on every
loop regardless of whether new data was actually
available. Now that the MAG_DRDY signal is monitored,
we can read only at the rate (10Hz) new data is actually
produced by the sensor.
This also enables future improvements that will remove the
filtering work that is still being done on the mag data on
every iteration.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1630 ebee16cc-31ac-478f-84a7-5cbb03baadba
Way too much was being exposed in the API for the
HMC5843. This commit properly hides internal
details of the driver.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1629 ebee16cc-31ac-478f-84a7-5cbb03baadba
The DRDY signal from the magnetometer is connected to PB8
on the STM32. This pin is now configured as an external
interrupt and is now used to signal when new data is
available from the magnetometer.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1628 ebee16cc-31ac-478f-84a7-5cbb03baadba
Squashed commit of the following:
commit 897e3365ab6c762584c34238efd12dc144e72af0
Author: James Cotton <peabody124@gmail.com>
Date: Mon Sep 13 22:15:21 2010 -0500
AHRS: Getting it running nice and quickly.
commit 53d72fb849164730c89873cab81c9e09be0b112b
Author: James Cotton <peabody124@gmail.com>
Date: Mon Sep 13 15:57:46 2010 -0500
AHRS: Make more variables volatile for -Os.
commit 4fa90821b5d3d8c2ea5e67756313a8a63c0eeb8c
Author: James Cotton <peabody124@gmail.com>
Date: Mon Sep 13 15:11:31 2010 -0500
AHRS/Makefile: -O0 not added to allow me to try various space flags that don't break code.
commit 5bd17a304dc28dc271c2f3e8c6cb8ad4a830404f
Author: James Cotton <peabody124@gmail.com>
Date: Mon Sep 13 14:44:05 2010 -0500
AHRS: Make debuggign USART easy to disable
commit 5453f2a7939492769fe9e9cc822e69c107320670
Author: James Cotton <peabody124@gmail.com>
Date: Mon Sep 13 14:38:37 2010 -0500
AHRS: Explicitly expand covariance prediction. Brings computations from 160 to 90. Makes it not fit in AHRS though.
commit b6712da7eece2a464a2073d24b77be22bfa47094
Author: James Cotton <peabody124@gmail.com>
Date: Sun Sep 12 22:59:42 2010 -0500
AHRS: Make it easy to comment out the I2C/Magnetometers.
commit 8c84d0091f3d6f6bedc7a0224a4ed9cb099b022b
Author: James Cotton <peabody124@gmail.com>
Date: Thu Sep 9 00:49:50 2010 -0500
AHRS: Small change to INSGPS analysis tools
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1613 ebee16cc-31ac-478f-84a7-5cbb03baadba
This makes the AHRS continually process SPI messages
while waiting for new samples to be ready. This has
the side effect of making the CPU utilization on the
AHRS pin at 99-100% (ie. we make use of all of our
otherwise idle time).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1581 ebee16cc-31ac-478f-84a7-5cbb03baadba
in. Also change the velocity variance in indoor mode to lower to make it get a better attitude estimate (primarily faster convergence - probably will tweak this in the future dynamically). Finally decreased barometer variance - in scope it's actually quite reasonable, normally within +/- .5 m.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1546 ebee16cc-31ac-478f-84a7-5cbb03baadba