1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

139 Commits

Author SHA1 Message Date
peabody124
b2abc73ae3 AHRS: Move getting mag data back into the main loop
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2998 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-07 19:28:25 +00:00
peabody124
aea0695f70 AHRS: Move out of bound checks to main loop instead of when getting the accel
data

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2997 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-03-07 19:28:11 +00:00
loris
463403ee82 OP-316 - UAVObject units Fix accelerations units
Fix default calibration values

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2869 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-24 02:52:19 +00:00
pip
f75539dcc6 Reverted GYRO calibration detection.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2791 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-14 09:01:47 +00:00
pip
74502852c3 Added GYRO calibration detection into the adc_callback() routine - to pass raw values when calibrating the gyro's.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2780 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-13 20:04:25 +00:00
stac
3fda65c5d3 hwinit: Convert SPI drivers to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2772 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:50 +00:00
stac
841b0d3d6d hwinit: Convert COM and USART to dynamic init
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2771 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-12 22:19:43 +00:00
peabody124
ebb8596db0 AHRS: FIx calibration. Move the mag data processing into the loop that acquires accel and gyro
data.  I don't like this but because of the way the calibration routine works
(sets all gains to 1) this makes the values so far out or range the EKF doesn't
get to run and the mag wasn't previously being updated.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2765 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-09 05:17:32 +00:00
peabody124
810fa70856 UAVObjects: Remove the raw versus filtered fields in the sensor data. Save
some memory.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2706 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-03 02:42:39 +00:00
pip
5daf6fd1c0 Added PIP_DUMP_RAW option in ahrs.c and brought back public acces to function PIOS_ADC_GetOverSampling(void).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2623 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-29 15:59:35 +00:00
pip
7bcdcee5ad Capitalised #define values
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2507 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 16:48:03 +00:00
pip
500a199a70 Added deg_to_rad & rad_to_deg to help understanding calculations.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2501 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-21 10:52:41 +00:00
pip
5f87966727 Corrected "mag_data.raw.axis[]" indexing errors
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2482 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-19 15:20:17 +00:00
edouard
b3ca037308 OP-277 Update all files to use a BOARD_TYPE and BOARD_REVISION scheme through the whole codebase.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2458 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 20:41:55 +00:00
peabody124
0259b6d1f1 OP-269 PIOS/ADC: First part of conversion to driver structures
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2444 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:39 +00:00
peabody124
81b0c3fdb6 OP-269 PiOS/ADC: Moved AHRS ADC code to PiOS and made all the projects use it
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2440 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-16 02:45:22 +00:00
peabody124
ccc8bc089b OP-235 AHRS: Not sending the out of range values to the mainboard was blocking
calibration.  Now only don't send them to the EKF.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2342 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-06 16:44:40 +00:00
peabody124
6eae425644 OP-235 AHRS: Because of range checking at initialization the EKF can be blocked
(which is good) but that stops the comms polling.  This makes it happen
ocassionally but not too much.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2335 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 10:34:48 +00:00
peabody124
77d798071e OP-235 AHRS: Check the downsampled data for either being ridiculously out of
range of NaN.  This would reflect a race condition probably from the SPI
interaction.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2334 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 10:34:45 +00:00
pip
4a91f20277 Turn AHRS orange LED on at bootup (to try and spot possible bootup hangs).
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2331 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-05 09:15:37 +00:00
corvus
a59d08b7af AHRS: Support for Linear Temperature Compensation Factors for Gyroscope X,Y,Z
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2327 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-04 00:54:31 +00:00
peabody124
7ccdb296ac AHRS: Add interface to get old dump_raw function working for Pip
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2305 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 17:48:45 +00:00
peabody124
2b0c75e46d AHRS: Fix LED flashing light
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2300 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-28 02:10:52 +00:00
pip
26650724e4 Fixed coding error on line 317 .. changed while (xxx & xxxx) to while (xxx && xxxx)
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2296 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-27 09:48:11 +00:00
peabody124
c364f45fb7 AHRS: If using mags then don't initialize until get a good mag update within
250 ms of init call (mag works at 10 Hz).

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2289 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-26 18:59:32 +00:00
peabody124
35bc1e7d9b Flight/AHRS: Make the mag raw data always update regardless of home location
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
2010-12-24 20:21:22 +00:00
peabody124
314a2fcf00 flight/AHRS: Make the 13 state INS default again, the accel bias drift can be a
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
2010-12-24 19:38:54 +00:00
zedamota
c034a35d2c OP-21/Bootloader - Changes to the IAPObject. Implements MB and AHRS user mode IAPObject. Added user mode reset command to the CLI. To many changes to bootloading system to write here, a Wiki page will have to be writen.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2238 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-15 19:06:28 +00:00
peabody124
68c656a724 AHRS: Add back the old 13 state INS if wanted and also code for tracking accel
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
2010-12-13 15:15:50 +00:00
peabody124
f30aa1d719 AHRS Comms: Send FirmwareIAP object to AHRS so that it can be remotely
rebooted.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2214 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-10 21:03:29 +00:00
peabody124
4e8c6588b6 OP-156 AHRS: Run the accel data through a fifo so it can output raw data faster
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
2010-12-04 17:34:29 +00:00
peabody124
45e3ed27a7 OP-156 AHRS_ADC: Make the ADC system use a callback to better separate ADC code
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
2010-12-04 17:34:27 +00:00
peabody124
6f1e7b4e41 AHRS: Add a configuration to export the sensor data either with or without INS
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
2010-12-04 17:34:25 +00:00
peabody124
81b2f88e75 AHRS: Swap to new code which tracks accel_bias and export the accelerometer
bias

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2188 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 17:34:22 +00:00
peabody124
0679e8d472 AHRS: In indoor mode correct with a high variance 0 for position to keep it
bounded.  Velocity variance still comes from AHRSCalibration.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2186 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-12-04 17:34:18 +00:00
dschin
18809ce3dc AHRS - fixed time constant of baro altitude offset filter, added the offset to the EKF dump
Added new EKF data parser (m-file) to ground



git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2178 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-29 23:28:38 +00:00
peabody124
74249f8e41 OP-171 AHRS: I was flipping sign of baro when putting into INS but shouldn't
have been.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2175 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-29 08:44:43 +00:00
peabody124
f51a5a824e AHRS: Export the bias drift corrected gyro values to OP so stabilization see
more accurate roll rates

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2174 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-29 08:44:41 +00:00
peabody124
75363896fb AHRS: In outdoor mode when no GPS for a few seconds start updating with zero
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
2010-11-26 15:57:14 +00:00
peabody124
b3251e2cfb AHRS: Accidentally was using mags when in indoor_nomag mode
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2159 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-26 15:57:13 +00:00
peabody124
6a33043297 AHRS: Tweak setting when mag is used to allow greater error in vector length
and start using from power up

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2158 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-26 15:57:12 +00:00
peabody124
e3d2645dea AHRS: Small bug in the conditions for using the mag
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2157 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-26 15:57:10 +00:00
peabody124
ebcb272da6 AHRS: Add a separate parameter for velocity and position variance and remove
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
2010-11-26 15:57:08 +00:00
peabody124
ac734d5f65 AHRS: Move structure definitions out of main code. Organized variable scopes
properly.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2155 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-26 15:57:06 +00:00
peabody124
44069e64bc AHRS: Separated out code for debugging output from the main code and cleaned up
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
2010-11-26 15:57:04 +00:00
peabody124
444dd5c311 AHRS: Split various update modes into individual functions
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2153 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-11-26 15:57:03 +00:00
dschin
b2a538375c Changes in files supporting AHRS for new initialization methods.
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
2010-11-24 01:27:43 +00:00
peabody124
33e6cbebdc AHRS debugging: Move dump to beginning of block to see the updated lines
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2015 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-27 17:16:25 +00:00
peabody124
4d7e053e06 AHRS Debugign code for dumping the EKF and importing into Matlab
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2013 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-27 14:31:34 +00:00
peabody124
2019edd612 AHRS: Store running time to make detect resets easier. Update OP and AHRS in
parallel for this update.  Also removed comment for rawhid

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2012 ebee16cc-31ac-478f-84a7-5cbb03baadba
2010-10-27 14:31:32 +00:00