Commit Graph

325 Commits

Author SHA1 Message Date
Daniel Agar 33bf4e0303 EKF: set uninitialized vel/pos/hgt test ratios to NAN
- ensure valid min is numerically larger than 0 (float32)
2021-06-30 09:30:44 -04:00
bresch 611ace0ed6 EV_yaw: reset ev_to_ekf to identity when yaw is reset to EV
Otherwise, the old rotation matrix is used and not updated anymore
because the EKF is fusing EV yaw data.
2021-06-22 10:25:55 +02:00
bresch fe943cf104 mag reset: force align in MC custom mode (aka. indoor mode)
Checking the parameter is enough to decide if we want to force the yaw
alignment or not
2021-05-12 08:33:07 +10:00
bresch cadcc58415 mag reset: do not stop the fusion from inside the reset function
The start/stop is already handled in the dedicated mag control logic
The early return is not required as this case is handled just below
2021-05-12 08:33:07 +10:00
bresch 6248646bff EV yaw: move EV yaw reset out of resetMagHeading function
Also remove the unnecessary 2nd "manual reset" done in the start function
2021-05-12 08:33:07 +10:00
bresch 48722a2a92 control: inhibit EV yaw from restarting when GPS aid wants to start 2021-05-12 08:33:07 +10:00
Eike 5d34d7a24e Height source vision: Fallback to rangefinder if available (#994) 2021-03-31 14:24:38 +02:00
Daniel Agar e3d1ade660 EKF: use flow for vel test ratio if only active source of horizontal aiding 2021-03-23 15:56:22 +01:00
Daniel Agar 0f47cae1e1 remove ECL_{INFO,WARN,ERN}_TIMESTAMPED macros
- we already have mechanisms to print these messages timestamped
2021-03-05 19:06:59 -05:00
Paul Riseborough 140ca3f48f EKF: Add external monitoring of warning and information events 2021-03-05 19:06:59 -05:00
Paul Riseborough 90a445ddbc EKF: upgrade some events from into to warning status 2021-03-05 19:06:59 -05:00
Nicolas MARTIN 29943a2c09 EKF test ratio status return current height source test ratio 2021-02-22 09:22:45 -05:00
mcsauder 164e53bad3 Add unit tests and update ekf_helper setEkfGlobalOrigin() method to allow for condition when current position is unitialized. 2021-02-19 08:59:47 -05:00
Daniel Agar 63f64b57c1 EKF: set global origin method
EKF: add convergence after global origin reset test
2021-02-19 08:59:47 -05:00
bresch 5aaa6c6dde lpos accuracy: bump variance if deadreckon time exceeded 2021-02-08 09:01:51 -05:00
Daniel Agar 398fe159ce EKF: allow initialising without mag depending on configuration
- reduce initial number of required mag and baro samples before init
2020-12-17 19:55:51 +11:00
bresch 9d22f140dd gps_alt: constrain var using 1.5 as a typical ratio of vacc/hacc 2020-12-13 14:39:50 +11:00
bresch b0cf45e2d2 gps_alt: rename getGpsAltVar -> getGpsHeightVariance 2020-12-13 14:39:50 +11:00
bresch f7bddda3d5 gps_alt: do not scale up reported gps vertical accuracy
The comment said that the horizontal accuracy needs to be scaled up
using the typical epv/eph ratio but the epv (vacc) is already available,
so no scaling is required.
2020-12-13 14:39:50 +11:00
bresch 02369cd415 gps_alt: extract measurement variance computation and saturation 2020-12-13 14:39:50 +11:00
zhaoxiaowei fbf67bdef9 reset gps height use vacc 2020-12-10 10:07:59 +01:00
Mathieu Bresciani 8f3df7a97b flow: restructure optical flow control logic (#928)
- extract motion checks performed on ground
- move all non-timing check to controlOpticalFlowFusion. This simplifies and standardirzes the setOpticalFlowData function. Furthermore, in some cases (SITL, PX4Flow), the dt is forced to 0 when the quality is 0 (which is usual on ground) so the ekf needs to ignore those values on ground to initialize properly the flow fusion.
- add filter convergence test
- move check for dt time max in setOpticalFlowData
- in the simulator, do not update dt as this is the sensor integration
period.
2020-12-09 11:33:00 +01:00
Daniel Agar da7d41e78a EKF: add mag bias reset helper and update IMU bias reset to match (#924) 2020-12-08 12:16:59 -05:00
Daniel Agar 03cfcb903e EKF: RingBuffer minor improvements
- allocate IMU and output buffers on construction according to defaults
 - determine buffer max time delay based on configuration parameters
 - reorder flowSample and extVisionSample to minimize padding
 - adjust parameter defaults to match PX4-Autopilot
2020-12-03 20:48:51 -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
Daniel Agar 5ea8824439 EKF: inline simple getters 2020-10-27 08:53:58 -04:00
Daniel Agar 6e99ebd928 EKF: add fault status bit for bad vertical accel data 2020-10-26 17:37:15 +01:00
Mathieu Bresciani dd3ffc4192 Optical flow: compute velociy from corrected flow data for logging (#920)
This is really useful when debugging optical flow data
2020-10-26 13:27:52 +01:00
Daniel Agar 4c2355a638 EKF: use GPS to lookup declination from WMM before full GPS checks pass 2020-09-28 08:43:32 +02:00
kamilritz 9797e4d28f updateYawInRotMat with hidden rotation sequence handling 2020-08-27 09:51:56 +10:00
kamilritz 4fb4e0ca01 Clean euler321 and euler312 code and comment 2020-08-27 09:51:56 +10:00
Kamil Ritz 2be738e806 Add helper function to alter heading in rotation matrices 2020-08-27 09:51:56 +10: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 15afa8ae17 shouldUse321RotationSequence(const Dcmf& R) 2020-08-27 09:51:56 +10:00
Kamil Ritz 4872f2a545 Remove not used code 2020-08-24 19:24:27 +10:00
Paul Riseborough 1e6c6f2d3c EKF: update all output states when aligning output time horizon filter 2020-08-16 10:00:47 +10:00
kamilritz 3bd9415498 Make delayed output stayed not a member variable 2020-08-16 10:00:47 +10:00
kamilritz 310b989c9a refactor start of gps into separate function 2020-08-07 10:02:47 +02:00
kamilritz 15d360f446 saved_mag_ef_cov to Squarematrix2f 2020-08-04 09:57:00 +02:00
kamilritz 7609bc69b2 drag innov member variables to Vector2f 2020-08-04 09:57:00 +02:00
kritz 88c52aba5e Refactor ev fusion start into helper functions (#872) 2020-07-27 11:42:52 +02:00
kamilritz b5e1397c0f Add const modifier
const modifier


Add missing const modifier
2020-07-16 18:25:06 +02:00
kamilritz 796afd5f98 Rename yaw_use_inhibit -> is_yaw_fusion_inhibited
Temp
2020-07-16 18:25:06 +02:00
kamilritz 3d82d822ae Add const modifier 2020-07-16 18:25:06 +02:00
kamilritz 2af2696b63 Revert if-else condition to get rid of unnecessary indentation 2020-07-02 15:55:24 +02:00
kamilritz fce4958d4f Random cleanup 2020-07-02 15:55:24 +02:00
kritz 9eea44f4ab Return type of resets (#859)
* Reset position/velocity return type is void

* Delete not needed comments
2020-07-02 14:53:59 +02:00
kamilritz 97225fcb74 Use matrix lib inside getState 2020-07-02 09:02:24 +02:00
kamilritz 16a00eae0b Make Kfusion a Vector24f 2020-07-02 09:02:24 +02:00