Randy Mackay
f6b909d0a5
AHRS_NavEKF: resolve compiler warning re signed vs unsigned comparison
2016-01-07 12:31:47 +09:00
Andrew Tridgell
f8b52c6a67
AP_AHRS: try to start EKF2 slightly before EKF2
...
this gives priority to EKF2 on memory
2016-01-07 08:34:32 +11:00
Jonathan Challinger
a2999ece54
AP_AHRS_NavEKF: add setTakeoffExpected, setTouchdownExpected
2015-12-28 13:51:24 +09:00
Jonathan Challinger
6682b27456
AP_AHRS: rename get_dcm_matrix to get_rotation_body_to_ned
2015-12-18 18:08:37 +11:00
Andrew Tridgell
1e8c391024
AP_AHRS: fixed float exception on start in SITL
...
zero DCM matrix
2015-12-01 15:19:45 +11:00
Andrew Tridgell
b3e6129fd4
AP_AHRS: added EKF type 10 for SITL
...
this bypasses all attitude and position estimators and uses the SITL
state directly. It can be used for when the SITL backend cannot
provide perfect sensor data
2015-11-22 17:30:28 +11:00
Andrew Tridgell
7b38f2185f
AP_AHRS: use the right DCM matrix for right EKF
...
this fixes a bug where the EKF2 DCM matrix would be used for
get_dcm_matrix() when EKF1 was active
2015-11-20 18:34:08 +11:00
Caio Marcelo de Oliveira Filho
4ea45b8df1
AP_AHRS_NavEKF: use millis/micros/panic functions
2015-11-20 12:28:53 +09:00
Paul Riseborough
803817821d
AP_AHRS: Support changes to EKF2 interfaces that specify the instance
...
An instance of -1 is specified which causes data for the primary instance to be returned.
2015-11-08 15:37:28 +11:00
Paul Riseborough
7ed36d8e65
AP_AHRS: Enable pre-flight GPS check status reporting for EKF2
2015-11-02 14:12:17 +11:00
Randy Mackay
4e959ef6f9
AP_AHRS: constify getLastPosNorthEastReset
...
Also constify getLastVelNortEastReset
2015-10-30 12:24:13 +09:00
Randy Mackay
7c20577ee0
AP_AHRS: constify getLastYawResetAngle
2015-10-30 12:24:10 +09:00
Paul Riseborough
f67f6b01f4
AP_AHRS: Publish the EKF position and velocity reset deltas
2015-10-30 12:24:05 +09:00
Caio Marcelo de Oliveira Filho
9d2e3157fe
AP_AHRS: add a runtime flag for always using EKF
...
The AHRS_EKF_USE_ALWAYS define is used to force EKF to be always
used. It is defined only for building ArduCopter. Change it to be a
runtime flag. Keep its default value still based on the original define,
once the Copter uses it the define will be removed.
The motivation is to move vehicle specifc code out of the general
libraries. This patch shouldn't change behavior.
2015-10-21 11:01:10 +11:00
Andrew Tridgell
eac91430a2
AP_AHRS: update _dcm_attitude() on reset()
...
this prevents the roll/pitch being overwritten by the AHRS_NavEKF
update code on next update
2015-10-21 08:58:30 +11:00
Paul Riseborough
0722ebe8a0
AP_AHRS: Add EKF variance checks
2015-10-20 15:21:38 +11:00
Paul Riseborough
ae830b44c4
AP_AHRS: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough
e8037f94ad
AP_AHRS: Make EKF2 PosDownDerivative interface follow coding conventions
...
Updates arising from peer review
2015-10-20 15:21:37 +11:00
Paul Riseborough
58d57994f4
AP_AHRS: Rectify coding errors found during peer review
...
Fixes code that didn't take into account fall-through behaviour of C++ switch statements
Makes get_rigin furnction more generic allowing the consumer to decide what to do with an invalid origin
2015-10-20 15:21:36 +11:00
Paul Riseborough
e65ae51564
AP_AHRS: Enable AP_InertialNav to access all EKF functions via AP_AHRS
...
This patch adds additional methods to the the AHRS library so that the AP_InertialNav library dow nto have to access the EKF directly. This enables Copter to fly using the EKF nominated by AHRS_EKF_TYPE.
It will also pave the way to elimination of the AP_InertialNav library.
2015-10-20 15:21:36 +11:00
Andrew Tridgell
232fc8a64d
AP_AHRS: added send_ekf_status_report()
2015-09-29 10:58:54 +10:00
Randy Mackay
9f59b6f7b5
AP_AHRS: getLastYawResetAngle returns reset time
2015-09-24 16:57:41 +09:00
Paul Riseborough
f77bdd90fc
AP_AHRS: Update EKF2 data logging
2015-09-24 12:58:44 +10:00
Andrew Tridgell
dde8330077
AP_AHRS: rename using_EKF to active_EKF_type()
...
thanks to Randy for the suggestion
2015-09-23 17:53:44 +10:00
Andrew Tridgell
f9348887c5
AP_AHRS: added getLastYawResetAngle() and resetHeightDatum()
2015-09-23 17:46:51 +10:00
Andrew Tridgell
0677c2c80c
AP_AHRS: run astyle for formatting
2015-09-23 17:31:00 +10:00
Andrew Tridgell
7ba45444a2
AP_AHRS: added selection of EKF type using AHRS_EKF_TYPE
2015-09-23 11:57:18 +10:00
Andrew Tridgell
c18c6d894e
AP_AHRS: added prearm_failure_reason()
2015-09-08 15:50:22 +10:00
Randy Mackay
a7569e3a61
AHRS_NavEKF: integrate INS use_accel
2015-08-19 16:44:22 +09:00
Gustavo Jose de Sousa
54d5277842
AP_AHRS: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
2015-08-11 16:28:42 +10:00
Randy Mackay
9067abc037
AHRS_NavEKF: fix blended accel to use primary accel
2015-08-01 17:19:45 +09:00
Andrew Tridgell
5514a9f690
AP_NavEKF: base EKF decisions on vehicle class
...
using the vehicle class rather than the build macros allows this to
work correctly in replay
2015-05-19 15:21:22 +10:00
Andrew Tridgell
92daa15ccc
AP_AHRS: on plane and rover make AHRS unhealthy when EKF not initialised
...
planes and rovers need full absolute position from the EKF if the EKF
is going to be used. We don't want users to arm without full
capabilities
2015-05-19 15:21:21 +10:00
Andrew Tridgell
29f0561ce4
AP_AHRS: reject EKF for plane when we have GPS and aren't fusing
...
plane users would prefer to use GPS in this case
2015-05-17 21:24:57 +10:00
Paul Riseborough
c2ac80cc63
AP_AHRS: Prevent copter from switching to DCM unless EKF has severe errors
2015-05-13 16:11:13 +09:00
Andrew Tridgell
3529e02675
AP_AHRS: if we have 3 gyros then only use first two
...
the 3rd gyro on a PH2 has a lot more noise as it is not vibration
isolated
2015-05-09 21:00:49 +10:00
Paul Riseborough
7f1749dc1c
AP_AHRS: Allow EKF to pull data from range finder object
2015-04-24 10:56:58 +09:00
Paul Riseborough
405862bd8f
AP_AHRS: Reduce time delay for EKF initialisation
2015-04-23 20:35:52 +09:00
Randy Mackay
c6f71ea2e0
AHRS: make get_error_rp and get_error_yaw const
2015-04-21 22:42:17 +09:00
Andrew Tridgell
d7249cc1e6
AP_AHRS: only use EKF for plane and rover if all data available
...
we need position and velocity to be working for plane and rover
2015-04-14 09:57:45 +10:00
Paul Riseborough
ff9917d338
AP_AHRS: Fix bug preventing EKF from initialising
2015-04-10 11:07:42 +09:00
Jonathan Challinger
dc5bdd5ad8
AP_AHRS: use filtered INS output to compute _accel_ef_blended
2015-04-09 20:19:56 +09:00
Paul Riseborough
d44cf14178
AP_AHRS : Publish EKF learned compass offsets
2015-04-03 15:24:47 -07:00
Andrew Tridgell
8ba043e593
AP_AHRS: fixed EKF startup bug
...
This fixes the EKF for when GPS lock takes more than 10 seconds
fixes issue #2010
2015-03-28 10:52:22 -07:00
Randy Mackay
98efcd5f03
AHRS: always use EKF for copter
2015-03-19 15:15:51 +09:00
Andrew Tridgell
6781a8d329
AP_AHRS: fixed get_position for EKF to use correct relative altitude
...
we need to use the EKF relative height plus the current AHRS home
2015-02-21 10:12:53 +11:00
Andrew Tridgell
68f64fa11c
AP_AHRS: make the healthy() method const
2015-02-01 14:13:52 +11:00
priseborough
5b8265ad6f
AP_AHRS: Expand EKF speed limit public method to handle control limits
2014-12-06 18:16:50 +11:00
priseborough
83775554ea
AP_AHRS: Publish EKF ground speed limit
2014-12-06 18:16:50 +11:00
priseborough
5532750a99
AP_AHRS: Add public method to inhibit GPS useage when using EKF
...
This provides the calling vehicle software the abiity to request the EKF to not use GPS.
An integer is returned that indicates the type of operation available:
0 = request rejected (request will only be accepted if the EKF is in static mode, eg pre-armed)
1 = request accepted, attitude, vertical velocity and position estimates available
2 = request accepted, attitude, height rate, height, horizontal velocity and relative position estimates available
2014-12-06 18:16:49 +11:00