Commit Graph

332 Commits

Author SHA1 Message Date
Randy Mackay 886a7d44a7 AP_NavEKF3: allow switch to ExtNav from optflow 2020-08-24 16:52:34 +09:00
Randy Mackay 6bf2057712 AP_NavEKF3: minor formatting fixes 2020-08-21 13:18:58 +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
Randy Mackay 41acf555bf AP_NavEKF3: fix skipping of optflow fusion if mag fusion performed 2020-08-21 13:12:10 +09:00
Andrew Tridgell 44d5a923cc AP_NavEKF3: apply min GPS accuracy at measurement point
this fixes an issue a RTK GPS gives 1cm horizontal and vertical
accuracy and that causes the variances to get too small
2020-08-21 07:40:13 +10: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
chobits 4b8be2e535 AP_NavEKF3: fix comments 2020-08-04 18:16:18 +10:00
Paul Riseborough c8bbbd2720 AP_NavEKF3: Fix bug preventing setting of mag field states 2020-07-25 20:46:04 +10:00
Randy Mackay d8f2d0cf8d AP_NavEKF3: max delay includes visual odometry 2020-07-21 09:31:52 +10:00
chobits 564244ce9a AP_NavEKF3: fix extnav vel reset 2020-07-17 14:13:06 +09:00
Andy Piper e35458cedf AP_NavEKF3: INS get_sample_rate() renamed to get_loop_rate_hz() 2020-07-10 16:45:29 +10:00
Paul Riseborough 24fccd5d87 AP_NavEKF3: Don't delay GPS use unnecessarily
Fixed wing should not wait for bias state convergence after in-flight yaw alignment
2020-07-07 15:33:58 +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 0dc598a6e1 AP_NavEKF3: Fix param description and comment 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 f86c2e1db6 AP_NavEKF3: Don't fuse EKF-GSF yaw for FW flight 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 d1a0c2eb30 AP_NavEKF3: Start EKF-GSF yaw estimator before fixed wing takeoff 2020-07-07 15:33:58 +10:00
Paul Riseborough b469a80633 AP_NavEKF3: Reset all co-variances when performing a yaw reset 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
Paul Riseborough f7c8ee807c AP_NavEKF3: Reset yaw estimator bias states at start of flight
Enables yaw bias to be learned when sitting stationary on ground.
2020-07-07 15:33:58 +10:00
Paul Riseborough bcd23e1063 AP_NavEKF3: Fix one frame delay in processing yaw estimator velocity data 2020-07-07 15:33:58 +10:00
Peter Barker 2e55584417 AP_NavEKF3: correct comments on getFilterFaults and getFilterTimeouts methods 2020-07-07 10:50:41 +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
Dr.-Ing. Amilcar do Carmo Lucas fca8d33c50 AP_NavEKF3: fix vertical flyaways when rangefinder stops providing data 2020-06-24 21:16:50 +09:00
Dr.-Ing. Amilcar do Carmo Lucas a3d140b949 AP_NavEKF3: reduce duplicated code. 2020-06-24 21:16:50 +09:00
Paul Riseborough 344d621a08 AP_NavEKF3: Add missing fallback to baro for range beacon use case 2020-06-24 21:16:50 +09:00
Paul Riseborough 906731222d AP_NavEKF3: Fix range aid switching logic
Clarifies use of EK3_RANGE_USE_HGT and EK3_ALT_SOURCE parameters to control range finder use.
Setting EK3_RNG_USE_HGT to a positive number to enable automatic switching between the primary height source (baro or GPS) and range finder should be disabled if any primary height source other than Baro or GPS is selected via the EK3_ALT_SOURCE parameter.
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 ca0ae57b56 AP_NavEKF3: protect against position-delta sensor data being NaN 2020-06-19 13:46:52 +09:00
Randy Mackay 331f2f5fe7 AP_NavEKF3: writeExtNavData stores pos to buffer first
This is a non-functional change
2020-06-19 13:46:52 +09:00
Randy Mackay 578800dfbb AP_NavEKF3: protect against ExtNav being NaN 2020-06-19 13:46:52 +09:00
chobits 9b448b83c0 AP_NavEKF3: use err info from ext nav interface 2020-06-09 13:31:21 +09:00
Randy Mackay 345029ec67 AP_NavEKF3: print extNav buff size 2020-06-09 09:42:14 +10:00
Randy Mackay 0f212ca727 AP_NavEKF3: accept extnav at up to 50hz 2020-06-09 09:42:14 +10:00
Peter Barker 86687d240d AP_NavEKF3: avoid compiler warnings from -Wclass-memaccess
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp: In member function ‘void NavEKF2_core::InitialiseVariables()’:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:343:50: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
  343 |     memset(&extNavVelNew, 0, sizeof(extNavVelNew));
      |                                                  ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
  518 |     struct ext_nav_vel_elements {
      |            ^~~~~~~~~~~~~~~~~~~~
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:344:58: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
  344 |     memset(&extNavVelDelayed, 0, sizeof(extNavVelDelayed));
      |                                                          ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
  518 |     struct ext_nav_vel_elements {
      |            ^~~~~~~~~~~~~~~~~~~~
2020-06-05 08:42:45 +10:00
Randy Mackay 93d8458d2a AP_NavEKF3: FuseVelPosNED uses ext nav vel err in obs data check 2020-06-02 08:33:42 +09: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
Peter Barker bf3cb977fd AP_NavEKF3: clarify yaw reset error message
The current wording can be taken to indicate that the mag sensors
stopped, causing this issue.
2020-05-26 10:05:35 +10:00
Paul Riseborough 939331ae8d AP_NavEKF3: Fix double iteration of axes in SelectMagFusion 2020-05-18 09:38:45 +10:00
Randy Mackay 6c20264d9c AP_NavEKF3: minor comment fix 2020-05-15 11:23:07 +09:00