Commit Graph

68 Commits

Author SHA1 Message Date
Paul Riseborough ee94980a8f EKF: Clean up wind state activation logic
Ensure wind states are deactivated in one place and always when in a non-position mode.
Activate wind states separately for each observation method.
2020-12-08 18:03:04 -05:00
Daniel Agar a21092804a EKF: remove virtual getters from estimator_interface 2020-11-02 09:35:47 -05:00
Daniel Agar 48a8992caf EKF: move small simple getters to header
- return by const reference where possible
2020-10-30 09:48:45 -04:00
Kamil Ritz fdc86c247a add functions to compute yaw (321 and 312 sequence)
from quaternion and rotation matrix
2020-08-27 09:51:56 +10:00
Kamil Ritz 1f637af7de Add const modifier 2020-08-24 19:24:27 +10:00
kamilritz 644e903552 Apply measurementUpdate function 2020-08-24 18:04:57 +10:00
Paul Riseborough 06aa78a291 EKF: Only record airspeed fusion event when states are updated 2020-08-16 08:45:26 +10:00
Paul Riseborough ede6204f85 EKF: airspeed fusion cleanup 2020-08-16 08:45:26 +10:00
Paul Riseborough a5a43dbc6c EKF: Convert airspeed fusion to use SymPy generated auto-code 2020-08-16 08:45:26 +10:00
kamilritz 89bfcc2167 Introduce checkAndFixCovarianceUpdate(KHP) function 2020-07-16 18:25:06 +02:00
kamilritz 5c4a3d4576 Make observation jacobian a Vector24f when possible 2020-07-16 18:25:06 +02:00
kamilritz b5765eb3b4 Move variable declaration to better place &
remove airspeed_innov_var_temp variable. setting to global variable even when fusion is aborted is okay
2020-07-16 18:25:06 +02:00
kamilritz 05855b7fc1 Update time of last fusion event really only if fused
Except for the velpos fusion
2020-07-16 18:25:06 +02:00
kamilritz 16a00eae0b Make Kfusion a Vector24f 2020-07-02 09:02:24 +02:00
kamilritz 356b2f6ffe Stop setting zero to zero 2020-07-02 09:02:24 +02:00
kamilritz 552bf824ea Add typedef for Matrix 24 types 2020-07-02 09:02:24 +02:00
kamilritz 48f0eb16da Remove uninformative comments 2020-06-26 08:26:26 +02:00
kamilritz 4a69b41015 Increase matrix library usage even more 2020-06-26 08:26:26 +02:00
kritz 24f2e60b7e Reduce stored strings, to save flash space (#815) 2020-05-13 08:09:26 +02:00
kamilritz 2fa43419d2 Interface: output vector quantities by "return-by-value" 2020-03-30 13:07:00 +02:00
kamilritz 9e6d27fafb Add missing const qualifier 2020-01-08 09:00:31 +01:00
Paul Riseborough 0d0f46ec1c EKF: Don't run unnecessary makeRowColSymmetric operation
This operation is expensive when done to the whole covariance matrix and unnecessary after covariance prediction because we calculate the upper diagonal and copy across so it is already symmetric.
2020-01-02 19:26:57 +11:00
kamilritz 92ba618f57 Improve on flash memory usage 2020-01-02 19:26:57 +11:00
kamilritz 459b76f9fd Make covariance matrices of type matrix::SquareMatrix
and use functions from Matrix to reset covariances.
2020-01-02 19:26:57 +11:00
kamilritz 1bf09fd370 Remove EKF prefix from logged messages 2019-12-12 08:48:10 +01:00
kritz 4a38f5a2f6 Add timestamp to ECL print statements, (#644)
which is helpful for EKF replay debugging.
2019-09-25 11:24:42 +02:00
Carl Olsson f0889c1760 EKF: fixed some comment typos
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-18 10:20:33 -04:00
Daniel Agar c5b2f59f57 PX4 style fixes (excluding EKF generated code) 2018-05-03 22:25:36 -04:00
Paul Riseborough ae069b12d6 EKF: Fix bug preventing wind relative dead reckoning 2018-04-21 13:04:04 -04:00
Daniel Agar cd12f049fe move geo and geo_lookup from PX4 Firmware to ECL 2018-03-26 21:52:11 -04:00
ChristophTobler e388e59f32 EKF: use uint64_t cast for XeY to avoid float casting of variables
The default type for XeY is float
2017-11-08 11:40:26 +01:00
Paul Riseborough 55a2dc94df EKF: handle air data fusion covariance reset consistently
Both the sideslip and airspeed fusion should not be resetting covariances for states they do not modify.
2017-10-20 14:44:37 +11:00
Paul Riseborough 0d32128701 EKF: Use dead-reckoning status to determine if air data should modify non-wind states 2017-10-20 14:44:37 +11:00
CarlOlsson 8200e4b218 EKF: added get_wind_velocity_var function
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-10-02 14:47:56 +02:00
Daniel Agar 99ba1c3745 EKF trivial code style cleanup 2017-08-25 10:09:11 -04:00
Paul Riseborough cc5db74d1b EKF: Add true airspeed accessor 2017-08-07 09:19:48 +10:00
Daniel Agar c44488fdb8 EKF matrix typedef cleanup 2017-06-19 11:10:01 -04:00
Paul Riseborough 951c8b77af EKF: Improve wind state reset logic
Enables wind estimation without an airspeed sensor and enables synthetic sideslip to be used with an airspeed sensor for improved wind state estimation.
Wind states and covariances are reset differently depending on whether airspeed is available.
2016-11-05 12:19:01 +01:00
Beat Küng 07c6aabd98 EKF: reduce KH to only the elements that are really needed, and merge the loops 2016-11-02 10:26:40 +01:00
Paul Riseborough 1b59a89a18 EKF: save some stack memory 2016-11-02 09:06:06 +01:00
Beat Küng 25cb400da9 EKF: remove Ekf::KHP and move KHP to the methods where it's used
Everywhere where KHP is used, it is first completely reset, thus making
it unnecessary to keep it as a class member.

This saves 2.3KB RAM.

Stack sizes don't need changing, since there is already a function
Ekf::predictCovariance(), which needs around 3KB of stack and is called
close to where the fuse* functions are called.
2016-11-01 22:49:20 +01:00
Paul Riseborough 79df7e8889 EKF: Reduce effect of bad airspeed when other aiding data available 2016-10-25 08:34:41 +02:00
Paul Riseborough 75bec44b94 EKF: add function to initialise wind states 2016-08-11 15:26:21 +02:00
Paul Riseborough a9894d7e8c EKF: improve efficiency of airspeed fusion
Don't compute array entries where the result will be zero
2016-08-11 15:26:21 +02:00
Youssef Demitri 168d9add76 added getter function for wind states 2016-07-22 12:33:41 +02:00
Paul Riseborough 381d99aed6 EKF: Inform console of serious fusion numerical errors 2016-06-08 11:58:33 +10:00
Paul Riseborough 65da9173b9 EKF: capture innovation checks and reset events in separate variables
rename the innovation check status class variable and remove the reset flags from it.
2016-06-01 17:13:00 +10:00
Paul Riseborough 8125717bf5 EKF: remove un-used airspeed health class variable
Airspeed rejection now is captured in _sensor_fault_status
2016-06-01 17:13:00 +10:00
Paul Riseborough cf489f4248 EKF: capture airspeed innovation test failures 2016-06-01 17:13:00 +10:00
Carl Olsson 5217b73df1 added bad_airspeed reporting (#123) 2016-05-12 10:06:04 +02:00