59 Commits

Author SHA1 Message Date
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
Paul Riseborough
3cdf56e57c Merge pull request #122 from CarlOlsson/airspeed_fix
fixed_airspeed_healthy_bug
2016-05-09 10:24:22 +10:00
CarlOlsson
ee7d7aeb8a fixed_airspeed_healthy_bug 2016-05-08 18:30:37 +02:00
Paul Riseborough
020b87933e EKF: replace fault status struct with a union to facilitate logging 2016-05-07 21:11:16 +10:00
Paul Riseborough
7f5669fb2d EKF: consolidate covariance corrections
Combines the forced symmetry, variance limiting and zeroing of covariances for unwanted states in the one function.
This ensures a consistent correction is applied after every covariance prediction or correction.
2016-05-07 20:29:50 +10:00
Paul Riseborough
1126048a93 EKF: Improve protection against bad airspeed fusion 2016-05-07 14:23:38 +10:00
Paul Riseborough
82da832816 EKF: tidy up Kalman gain calculations
Inhibiting of states is controlled via zeroing rows and columns in the covariance prediction so conditional logic in gain calculations is unnecessary.
2016-05-05 21:23:03 +10:00
Paul Riseborough
fe9f88a8b4 EKF: test new derivation
Use direct attitude parameterisation
Discard scale factors
Add accel bias
2016-05-05 21:23:03 +10:00
Daniel Agar
22d18d638c enable Wshadow 2016-05-04 19:45:40 -04:00
Roman Bapst
99fc61c27c ekf2 airspeed fusion:
- finished logic for fusion
- fixed bug where previous control status was set in the wrong location
2016-04-19 09:53:31 +02:00