Andrew Tridgell
096aab9388
AP_NavEKF3: convert to use AP_DAL for new replay structure
...
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2020-11-10 16:15:45 +11:00
Paul Riseborough
6c7820dd8d
AP_NavEKF3: Add verification of tiltErrorVariance() method in SITL
2020-10-26 11:03:50 +11:00
Paul Riseborough
16ae75a681
AP_NavEKF3: Consolidate and log tilt error variance calculation
2020-10-26 11:03:50 +11:00
Paul Riseborough
4e41e9f5f1
AP_NavEKF3: Ensure consistent use of 312 or 321 rotation order
...
Prevents possibility of a differnt sequence being used to calculate the yaw and application of the yaw to the quaternions
2020-10-26 11:03:50 +11:00
Paul Riseborough
73d5ca5ad3
AP_NavEKF3: Fix yaw drift after yaw reset at +-90 deg pitch
...
Use existing covariance prediction code to set quaternion state covariances.
Assumes tilt error is 3 deg 1-sigma.
TODO derive and add function that calculates tilt error variance.
2020-10-26 11:03:50 +11:00
Paul Riseborough
a97d030e4b
AP_NavEKF3: Reset earth field variances when starting mag field estimation
2020-10-26 11:03:50 +11:00
Randy Mackay
c3fd82b6d7
AP_NavEKF3: minor spelling fix
2020-10-24 12:35:58 +11:00
Randy Mackay
2f1ae29a9c
AP_NavEKF3: extnav data gets corrected boolean
...
CorrectExtNavForSensorOffset and CorrectExtNavVelForSensorOffset use
corrected boolean to avoid correcting twice
2020-10-24 12:35:58 +11:00
Randy Mackay
71487e9c10
AP_NavEKF3: gps_elements gets corrected flag
...
CorrectGPSForAntennaOffset uses this flag to ensure position and velocity are only corrected once
2020-10-24 08:49:33 +09:00
Peter Barker
0496ecc4f6
AP_NavEKF2: remove unused state variables
2020-10-22 08:47:08 +11:00
Peter Barker
ef505df78a
AP_NavEKF3: remove unused quat2Tbn method
2020-10-20 11:40:54 +11:00
Peter Barker
0eafe4b662
AP_NavEKF3: remove dangling method declarations
2020-10-20 11:40:54 +11:00
Peter Barker
3dc67f09fd
AP_NavEKF3: remove unused innovationIncrement and lastInnovation
2020-10-20 11:24:34 +11:00
Andrew Tridgell
8a4b0f858a
AP_NavEKF3: reset body mag variances at key points
...
we need to reset the body mag variances if we change sensors or if we
are starting 3D fusion. When not doing 3D fusion we zero the
variances, so they must be initialised again when we restart
fusion. This fixes a bug in handling the variances on a 2nd flight
2020-09-20 09:25:57 +10:00
Andrew Tridgell
e9185f526b
AP_NavEKF3: add comments on state indexes
...
make it easier to check indexes
2020-09-20 09:25:57 +10:00
Andrew Tridgell
2bc7d17e7a
AP_NavEKF3: improved core comparison to check alignment
...
this adds coreBetterScore() which takes account of tilt and yaw
alignment when comparing cores for lane switching
this ensures we don't switch to a lane that is unaligned due to the
zero error score for unaligned lanes
2020-09-14 20:29:04 +10:00
Andrew Tridgell
3836b59041
AP_NavEKF3: fixed handling of failed compass
...
when a compass goes unhealthy due to sensor failure we should try
another compass after 10s if another compass is available
2020-09-08 11:01:14 +10:00
Harshit Kumar Sankhla
edc3709653
AP_NavEKF3: implement sensor affinity using EK3_AFFINITY parameter
...
this allows the EKF core index to be used to select a GPS/baro/mag
instance. This is an alternative to GPS blending that allows EKF lane
switching to be used to select the right combination of GPS and IMU
add logging to XKFS message
2020-08-27 20:20:51 +10:00
Randy Mackay
384029d278
AP_NavEKF3: rngBcnDataNew made local
2020-08-25 09:38:10 +09:00
Randy Mackay
8c877f02af
AP_NavEKF3: shrink beacon arrays and add assert
2020-08-25 09:38:10 +09:00
Randy Mackay
4c40d2ac3f
AP_NavEKF3: readyToUseBodyOdm uses delayed imu and wheel encoder timestamps
2020-08-21 13:18:58 +09:00
Randy Mackay
056a2de260
AP_NavEKF3: wheelOdmDataNew member made local
...
this variable is never used outside the writeWheelOdom method
2020-08-21 13:18:58 +09:00
Randy Mackay
3d5161f364
AP_NavEKF3: remove unused usingWheelSensors variable
...
This variable was set but never consumed
2020-08-21 13:18:58 +09:00
Randy Mackay
c4b7a1c41a
AP_NavEKF3: flowDataToFuse moved to local variable
...
This variable is never used outside the SelectFlowFusion() method
This variable is always updated at the top of the function meaning subsequent calls to the function will always overwrite its previous value
2020-08-21 13:12:10 +09:00
chobits
c722367c6c
AP_NavEKF3: move extNavVelNew to local variable
2020-08-12 15:40:38 +09:00
chobits
7ad9e3548f
AP_NavEKF3: make reset source variable local
2020-08-10 09:43:28 +09:00
Peter Barker
6b701ae3b3
AP_NavEKF3: correct includes
2020-08-07 19:20:07 +10:00
Paul Riseborough
c8bbbd2720
AP_NavEKF3: Fix bug preventing setting of mag field states
2020-07-25 20:46:04 +10:00
Paul Riseborough
9a4108f55e
AP_NavEKF3: Simplify setting EK3_MAG_CAL
...
Don't require user to separately set EK3_MAG_CAL to fly without a magnetomer
2020-07-07 15:33:58 +10:00
Paul Riseborough
21ea5d5039
AP_NavEKF3: Require GSF yaw history for reset when not using a yaw sensor
2020-07-07 15:33:58 +10:00
Paul Riseborough
354b551ef0
AP_NavEKF3: Handle repeated FW flight without magnetometer
...
The EKF can build up large yaw errors on ground so it is safer to stop using GPS and re-align after launch as per first launch.
2020-07-07 15:33:58 +10:00
Paul Riseborough
8ff6780323
AP_NavEKF3: Clarify distinct use cases for 'takeoff expected'
2020-07-07 15:33:58 +10:00
Paul Riseborough
d8c2096ad8
AP_NavEKF3: improve angle accuracy during no mag launch
2020-07-07 15:33:58 +10:00
Randy Mackay
ec5f84c926
AP_NavEKF3: remove unused terrainHgtStableSet_ms
2020-06-24 21:16:50 +09:00
Randy Mackay
dccc3e22d9
AP_NavEKF3: minor comment fix re RNG_USE_HGT
2020-06-24 21:16:50 +09:00
Paul Riseborough
ed5b695c94
AP_NavEKF3: Clarify intended use of setTerrainHgtStable accessor
2020-06-24 21:16:50 +09:00
Pierre Kancir
431468452c
AP_NavEKF3: add --debug-ekf to debug the EKF
2020-06-20 19:59:05 +10:00
Randy Mackay
d37eec5fd8
AP_NavEKF3: ext nav vel corrected for sensor position when recalled from buffer
2020-06-02 08:33:42 +09:00
chobits
c7817eaca1
AP_NavEKF3: support VISION_SPEED_ESTIMATE
...
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2020-06-02 08:33:42 +09:00
Paul Riseborough
939331ae8d
AP_NavEKF3: Fix double iteration of axes in SelectMagFusion
2020-05-18 09:38:45 +10:00
Randy Mackay
5ad3611142
AP_NavEKF3: improve ext nav glitch handling
...
replaces extNavTimeout with posTimeout
replaces lastExtNavPassTime_ms with lastPosPassTime_ms
2020-05-15 11:23:07 +09:00
Randy Mackay
ef02942459
AP_NavEKF3: writeBodyFrameOdom accepts delay
2020-05-15 10:07:52 +09:00
Randy Mackay
c28fd27b02
AP_NavEKF3: writeExtNavData accepts delay
2020-05-15 10:07:52 +09:00
Andrew Tridgell
5350ea5c58
AP_NavEKF3: avoid build warnings with g++ 9
2020-05-10 15:11:22 +10:00
Randy Mackay
f79d5d2d2c
AP_NavEKF3: handle external nav position reset
2020-04-30 15:55:59 +09:00
Randy Mackay
d763597065
AP_NavEKF3: compensate for visual odometry sensor position
2020-04-30 15:55:59 +09:00
priseborough
c5e465aec9
AP_NavEKF3: add external nav system support
...
includes decoupling height source from use of external nav data
2020-04-30 15:55:59 +09:00
Andrew Tridgell
080f555b16
AP_NavEKF3: remove unused isDeltaYaw param from resetQuatStateYawOnly
2020-04-24 09:43:23 +10:00
Andrew Tridgell
197d31e9cc
AP_NavEKF3: fixed in-flight yaw reset
2020-04-24 09:43:23 +10:00
Randy Mackay
86d221708c
AP_NavEKF3: more white space fixes
2020-04-24 09:43:23 +10:00