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
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
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
No functional changes. Whitespace/tab fixups only.
Use TRUE/FALSE instead of 1/0.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1430 ebee16cc-31ac-478f-84a7-5cbb03baadba
No need to have boolean flags being floats.
Some of the attitude message was being populated twice.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1428 ebee16cc-31ac-478f-84a7-5cbb03baadba
Debug code was previously using the q4 element
in the attitude message to encode a cycle counter
to measure performance on the AHRS. This is no
longer valid.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1357 ebee16cc-31ac-478f-84a7-5cbb03baadba
into NED reference frame and used in the INSGPS algorithm, although currently this
information isn't propagated back to OP. Data structures related to the GPS position
into the algorithm and the position estimate out will likely be in flux.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1334 ebee16cc-31ac-478f-84a7-5cbb03baadba
Altitude/pressure sensor data is sent to the AHRS whenever
the AltitudeActual object is updated.
Altitude, Pressure and Temperature are sent as floats.
Same as in the UAVObject that goes to the GCS.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1291 ebee16cc-31ac-478f-84a7-5cbb03baadba
- AHRS mainloop now runs flat out updating sensor data and
processing any messages sent from the OP board.
- Raw data is provided from the magnetometers
- Fake data is provided for attitude solution
- Correct data is provided for serial number queries
Note: There is a bug in the i2c code that very quickly leaves the
magnetometer in a broken state and returning incorrect values.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1013 ebee16cc-31ac-478f-84a7-5cbb03baadba
- Created a pluggable COM layer
- Converted COM + USART init into static initializers
rather than typedefs
- Generalized the USB HID COM API to match the USART
API.
- Changed USART and COM layers to be data driven rather
than #ifdef'ing/switching on the specifics of each port
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@760 ebee16cc-31ac-478f-84a7-5cbb03baadba
Added support for SPI slave configurations to the pios SPI layer.
Converted the board specific configuration for the PIOS SPI layer to
use const static initializers rather than #defines (see pios_board.c).
SPI interface between the OP board and the AHRS is now operational at
a basic level, capable of moving simple single byte messages between
boards. Multi-byte, CRC protected messages will be added on top of this.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@759 ebee16cc-31ac-478f-84a7-5cbb03baadba