Commit Graph

34 Commits

Author SHA1 Message Date
Paul Riseborough 02055acee2
EKF: Fix non GPS aiding data reset logic (#418)
* EKF: Move optical flow specific state reset to helper functions

* EKF: Ensure loss of optical flow aiding is handled correctly

If data is only source of aiding and has been rejected for too long - reset using flow data as a velocity reference.
If flow data is unavailable for too long - declare optical flow use stopped.
Use consistent time periods for all resets

* EKF: Ensure loss of external vision aiding is handled correctly

If data is only source of aiding and has been rejected for too long - reset using data as a position.
Don't reset velocity if there is another source of aiding constraining it.
If data is unavailable for too long, declare external vision use stopped.
Use consistent time periods for all resets.

* EKF: Update parameter documentation

Make the distinction between the no_gps_timeout_max and no_aid_timeout_max parameters clearer

* EKF: make class variable units consistent with documentation

* EKF: Don't reset states when optical flow use commences if using external vision

* EKF: Stop optical flow fusion when on ground if excessive movement is detected.

* EKF: fix terrain estimator vulnerabilities

Reset estimate to sensor value if rejected for 10 seconds
Protect against user motion when on ground.
Fix unnecessary duplication of terrain validity check and separate validity update and reporting.

* EKF: remove unnecessary Info console prints

Optical flow use information can be obtained from the estimator_status.control_mode_flags message

* EKF: fix inaccurate comment

* EKF: remove duplicate calculation from terrain validity accessor function
2018-04-09 18:35:15 +10:00
Daniel Agar cd12f049fe move geo and geo_lookup from PX4 Firmware to ECL 2018-03-26 21:52:11 -04:00
Carl Olsson f6d23cc621 added rng_stuck to filter control status flags (#392) 2018-03-21 11:46:27 +11:00
Daniel Agar ed9a394029
EKF RingBuffer avoid copying 2017-11-15 18:08:51 -05: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 4db23b7b2e EKF: Don't report terrain estimate invalid immediately when HAGL observations fail checks 2017-10-12 08:26:04 +11:00
CarlOlsson 0a7c3ecbc6 EKF: Parameterize maximum angle for rng fusion 2017-09-26 20:53:48 +02:00
ChristophTobler 8ecec58292 Check for stuck range finder measurements in terrain estimator 2017-07-31 17:59:44 +02:00
ChristophTobler 61a7991693 constrain _terrain_vpos to be a minimum of _params.rng_gnd_clearance larger than _state.pos(2) 2017-07-20 08:29:11 +02:00
Paul Riseborough e1fe5b2229 Revert "Revert "Split get_terrain_vert_pos() into valid and get_vpos"" 2017-07-19 17:52:35 +10:00
Paul Riseborough c887b02f21 Revert "Split get_terrain_vert_pos() into valid and get_vpos" 2017-07-19 17:33:48 +10:00
ChristophTobler eae0522dc2 split into get_terrain_valid and get_terrain_vert_pos 2017-07-17 16:42:42 +02:00
ChristophTobler d2945abd85 return hagl valid false if update was rejected 2017-07-13 14:17:48 +02:00
Roman 7e2597ec28 update range sensor angle parameters in case they have changed
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Roman aa53f45f15 terrain estimator: removed unused hrt dependancy
Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Roman 6480fcc3d5 terrain estimator: fixed computation of filtered time since last range update
- do not use hrt to compute delta time
- limit filter state
- do not use static variables

Signed-off-by: Roman <bapstroman@gmail.com>
2017-02-22 14:12:05 +01:00
Paul Riseborough 6561edb9a5 EKF: Clean up terrain estimation functionality.
This is a functionally equivalent. It moves all of the code for the terrain estimator into a single function call from the main filter update, making it clear that it is independent of the main filter.
2017-02-22 14:12:05 +01:00
devbharat 8004e9fe7e EKF: Make range finder data continuous check more robust
Use a filtered arrival time delta to determine if range data is continuous
2017-02-22 14:12:05 +01:00
Paul Riseborough d94068b88a EKF: Simplify calculation of height above terrain observation variance
The tilt compensation being applied previously was based on a flat earth geometric model assuming perfect tilt knowledge which reduces the effect of range errors on height error as the vehicle tilts. however in the real world, variations in terrain gradient and uncertainty in vehicle tilt and sensor alignment tend to increase height error with tilt, so the adjustment of observation variance with tilt has been removed given we do not have a valid mathematical model on which to base it.
2017-02-22 14:12:05 +01:00
Paul Riseborough 3dadc98b43 EKF: enable scaling of range observation variance with height 2017-02-22 14:12:05 +01:00
Paul Riseborough cf9c8de167 EKF: Add arbitrary pitch offset for range sensor 2017-02-22 14:12:05 +01:00
devbharat d9688fae7d EKF: Simplify terrain position validity check
Remove the relative accuracy check that was false triggering close to ground
2017-02-22 14:12:05 +01:00
Daniel Agar 7883085e4a clang-tidy readability-simplify-boolean-expr (#235) 2017-02-02 00:17:43 -05:00
Paul Riseborough 744b79c1b2 EKF: Publish innovation test ratios 2016-10-06 09:02:29 +02:00
Roman c6e1d97176 terrain estimator: initialise with projection
Signed-off-by: Roman <bapstroman@gmail.com>
2016-09-20 14:09:42 +02: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 d80e71a499 EKF: capture HAGL innovation test failures 2016-06-01 17:13:00 +10:00
Paul Riseborough 172f4be594 EKF: Fix bug in calculation of terrain observation variance 2016-05-14 21:17:29 +10:00
Paul Riseborough 481c624975 EKF: Remove use of vehicle arm status
Use single externally set in-air status for all decisions
2016-05-10 10:23:08 +10:00
Paul Riseborough 5bf02517a7 EKF: Rationalise use of rotation matrices and improve efficiency 2016-04-12 11:14:31 +10:00
Paul Riseborough d2407c3463 EKF: code style updates 2016-03-13 21:17:51 +11:00
Paul Riseborough 962fd0aaf2 EKF: Adjust terrain process noise for gradient effect 2016-03-11 11:03:43 +11:00
Paul Riseborough 1a2da887ab EKF: Fix bug in calculation of terrain estimator Kalman gain 2016-03-11 11:03:43 +11:00
Paul Riseborough 82cbfafb34 EKF: Add source file for terrain vertical position estimator
Implements a single state Kalman filter to estimate terrain vertical position relative to the NED origin.
2016-03-11 11:03:43 +11:00