Commit Graph

153 Commits

Author SHA1 Message Date
Lucas De Marchi 40fd1b346c global: remove rangefinder from AP_AHRS_NavEKF
AP_AHRS_NavEKF doesn't use the rangefinder, it just delegates the
calls to the right estimator.

For libraries/AP_AHRS/examples/AHRS_Test/AHRS_Test.cpp the initialization
order has also been modified to match the order on vehicles. It's more
correct since it passes a reference when EKF2/EKF3 are already
constructed, while thos constructors use a pointer.  Ideally these
should be moved to an init() method though, or use a get_instance().
2017-09-26 03:01:21 +01:00
Peter Barker 97b6ca218b AP_AHRS: send ekf status reports even when EKF inactive 2017-09-06 10:50:49 +10:00
chobits d6845a911a AP_AHRS: fix get_relative_position_NE_home calcalation 2017-08-19 10:23:24 +09:00
Randy Mackay 1ddf38869a AP_AHRS: set AP_Notify gps_glitching flag 2017-07-27 14:16:23 +09:00
priseborough a3483d0d34 AP_AHRS: Update for compatibility with EKF interface change 2017-06-14 12:44:41 +01:00
Randy Mackay 3e130273a9 AP_AHRS: do not fallback to DCM if EKF can provide relative position 2017-06-14 09:12:20 +09:00
Matt 6354ca7096 AP_AHRS: Set the new gps_fusion notify flag
Uses EKF filter state to set the new gps_fusion notify flag. This allows
the GCS and notify devices to specifically be notified if the GPS is or
is not usable.
2017-06-06 10:38:42 +09:00
Andrew Tridgell b6568b1c7e AP_AHRS: support set_origin and get_origin for EKF 10 2017-05-08 13:38:10 +10:00
Andrew Tridgell d9223165c7 AP_AHRS: fixed get_accel_ef_blended() for SITL EKF 10 2017-05-07 09:10:44 +10:00
Andrew Tridgell 28030dd85c AP_AHRS: use SIM_ODOM_ENABLE to enable visual odom in SITL 2017-05-01 15:06:46 +10:00
Andrew Tridgell e78f55ef9b AP_AHRS: change order of EK2/EK3 update
if EK3 is our primary estimator when we want to run the EK3 update
first, so it gets time priority for inter-EKF scheduling.
2017-05-01 14:24:55 +10:00
Randy Mackay 0af9433c8e AP_AHRS: add set_origin 2017-04-22 10:37:31 +09:00
priseborough 90cd46f4d7 AP_AHRS: simulate body frame odometry sensor 2017-04-19 11:04:40 +09:00
priseborough 3b82f60b08 AP_AHRS: add interface for use of visual odometry data 2017-04-19 11:04:40 +09:00
Andrew Tridgell 5758532326 AP_AHRS: make AHRS2 quaternion available 2017-04-16 14:01:36 +10:00
Michael du Breuil 33d0fa3e82 AP_AHRS: Fix an index out of bounds
Coverity 137817, getPrimaryCoreIMUIndex() can return -1, which is then invalid to pass to get_delta_velocity_dt
2017-04-06 08:44:57 +10:00
Andrew Tridgell a11dca5229 AP_AHRS: added optional skip_ins_update to AHRS::update()
avoid the ins update if already done in copter fast_loop()
2017-04-03 13:04:11 +09:00
Randy Mackay d3aca5544e AP_AHRS: get_gyro_latest returns latest rates from IMU with drift correction
Pulling the gyro values from the IMU allows our rate controllers to run before the EKF
2017-03-03 13:14:28 +11:00
Andrew Tridgell c62c64d27b AP_AHRS: added support for AP_AHRS_View 2017-02-18 17:26:43 +11:00
Michael du Breuil 3274f1dbb1 AP_AHRS: Split all NED methods into a collection of NED relative to home vs origin 2017-02-13 09:23:14 +11:00
priseborough 93aa40a9e0 AP_AHRS: Fix EKF3 gyro bias reporting and improve code clarity 2017-02-08 19:11:08 +00:00
priseborough e2757c17c8 AP_AHRS_NavEKF: fix ekf variable naming and initialisation 2017-01-27 16:57:42 +09:00
Andrew Tridgell 33a84624c6 AP_AHRS: use const reference
save a bit of stack and CPU
2017-01-23 21:36:34 +11:00
Julien Beraud d2afa1cac8 AP_AHRS_NavEKF: Push gyro bias for optical flow
Push gyro bias for optical flow usage only if there is an optical
flow declared in the HAL
2017-01-23 21:23:16 +11:00
Andrew Tridgell 09c969477f AP_AHRS: fixed fallback to DCM for get_position
this fixes dead-reckoning on fixed wing on GPS loss, and fallback to
DCM on loss of EKF position in fixed wing

This was broken by the EKF3 merge
2017-01-22 13:40:46 +11:00
Andrew Tridgell 7a5ee29b6e AP_AHRS: fixed a build warning 2016-12-31 08:53:16 +11:00
Andrew Tridgell ad518f0cc7 AP_AHRS: fixed EKF type 10 EKF nav scaler return 2016-12-29 18:43:32 +11:00
murata 4c320373eb AP_AHRS: Change indentation.
AP_AHRS: Delete inserted message "no break"
2016-12-24 11:30:37 +09:00
Andrew Tridgell 22fd2025de AP_AHRS: fixed EKF type 10 2016-12-21 10:52:12 +11:00
Peter Barker 802206baed AP_AHRS: remove use of uninitialised value 2016-12-19 19:51:16 -08:00
priseborough 33a7c682a3 AP_AHRS: Add EKF3 and remove EKF1 2016-12-19 08:07:10 +11:00
Andrew Tridgell ab05472e0e AP_AHRS: added EKF3 for EKF experimentation
Conflicts:
	libraries/AP_AHRS/AP_AHRS_NavEKF.cpp
2016-12-18 10:28:04 +11:00
Randy Mackay c615bac1cd AP_AHRS: add getLastPosDownReset accessor 2016-11-24 19:57:53 +09:00
Andrew Tridgell 772209b3f3 AP_AHRS: make posOffset a const reference 2016-10-27 15:45:24 +11:00
priseborough 6069c37b19 AP_AHRS: add position offset to optical flow interface 2016-10-27 14:54:42 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Jonathan Challinger 25a14fe0dc AP_AHRS: add interface to retrieve corrected delta velocities in NED frame 2016-10-14 10:45:58 +09:00
Jonathan Challinger 5ff78b8e47 AP_AHRS: fix rotation of acceleration into earth frame 2016-10-13 10:02:13 +11:00
Andrew Tridgell 334db0a1a5 AP_AHRS: added get_primary_accel_index() and get_primary_gyro_index() 2016-09-05 12:56:36 +10:00
Andrew Tridgell c62fc336cb AP_AHRS: use current EKF2 IMU core in gyro estimate
The EKF2 implementation uses one IMU per EKF2 core. When reporting the
gyro estimate, accel_ef estimate and gyro bias estimate we need to use
the values associated with the current IMU index being used by the
current EKF2 core. Otherwise we will have an inconsistency between the
gyro estimate and attitude estimate

This affects all multi-IMU systems using EKF2
2016-09-05 12:54:53 +10:00
Andrew Tridgell bf1e0e1536 AP_AHRS: fixed EKF GPS arming check for fixed wing
when in a quadplane mode we set fly_forward to zero. We need to ensure
the GPS checks for EKF health are applied when doing arming checks, so
we use the checks always when disarmed
2016-09-02 11:12:19 +10:00
Peter Barker 78fa23440c AP_AHRS: remove use of uninitialised variable
clang told us:

../../libraries/AP_AHRS/AP_AHRS_NavEKF.cpp:695:35: fatal error: variable 'posD' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
2016-07-20 00:06:49 -03:00
priseborough 01ce3e7f1e AP_AHRS: fix documentation errors 2016-07-19 12:16:49 +10:00
priseborough 5454f76702 AP_AHRS: Add separate interfaces for local horizontal and vertical position 2016-07-19 12:16:49 +10:00
Andrew Tridgell e82468a529 AP_AHRS: avoid ifdef for AP_MODULE_SUPPORTED 2016-07-14 13:39:47 +10:00
Andrew Tridgell 36181b78de AP_AHRS: fixed build for px4 2016-07-14 13:39:46 +10:00
Andrew Tridgell 15a01eefb1 AP_AHRS: added AHRS_update hook 2016-07-14 13:39:46 +10:00
Andrew Tridgell 2db2486b3a AP_AHRS: send zero EKF_STATUS_REPORT with EKF type 10 2016-06-19 22:02:25 +10:00
Andrew Tridgell d17e3b17bf AP_AHRS: special handling for flying fixed wing with no compass
we need to accept EKF having no absolute position and velocity before
takeoff with no compass
2016-05-27 10:18:53 +10:00
Paul Riseborough 597ec61673 AP_AHRS: extend ekf fault status reporting coverage 2016-05-21 15:13:50 +10:00