51 Commits

Author SHA1 Message Date
kamilritz
1bf09fd370 Remove EKF prefix from logged messages 2019-12-12 08:48:10 +01:00
kamilritz
88c4929c96 Use helper function to switch to gps height 2019-12-11 17:23:45 +02:00
kamilritz
042d9b6615 Remove dangerous _primary_hgt_source variable 2019-12-11 17:23:45 +02:00
bresch
6b5f011bc2 ekf: use PDOP instead of GDOP as the TDOP (part of GDOP) is usually not available
PDOP is the position dillution of precision and is given by sqrt(VDOP^2+HDOP^2)
2019-11-25 17:18:40 -05: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
kamilritz
1e57c4bbec Fix white space 2019-09-24 07:48:46 +10:00
kamilritz
4511b9ff5e Add missing checks for flags.ev_vel 2019-09-24 07:48:46 +10:00
Paul Riseborough
7612fa40ed EKF: Don't start using GPS for height until all validity checks have passed
Consolidate intermittent data checks, improve variable and clarify usage.
2019-06-13 19:36:37 +10:00
Beat Küng
54ac147ae8 Ekf: add set_min_required_gps_health_time() to allow configure minimum GPS health time
This does not change the default of 10 seconds.
2019-05-15 09:00:24 +01: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
c66f7f4a09 EKF drop unused timestamp from collect_gps() and pass data by const reference 2019-03-05 17:26:19 -05:00
Paul Riseborough
3accab1ac5 EKF: protect declination fusion from badly conditioned earth field estimates
Fusion with large initial magnetometer biases errors can result in the the NE earth field states reducing in magnitude and effectively flipping sign.

EKF: Move declination state limiting into a separate function

EKF: Limit NE mag states after each 3-axis mag fusion

EKF: Fix bug in mag field strength look-up scale factor
2019-01-31 09:53:57 -05:00
Paul Riseborough
4657a9cd21 EKF: Ensure yaw gets reset when declination is set 2018-11-15 07:16:31 +11:00
Paul Riseborough
35f628e68f
EKF: Add interface to enable logging of GPS drift metrics (#490)
* EKF: Add interface to enable logging of GPS drift metrics

* EKF: Fix bug affecting rate of GPS drift publication

Also fix variable name.
2018-08-03 13:24:31 +10:00
Paul Riseborough
4d01883f75 EKF: Disable GPS drift checks when the vehicle is moving. 2018-07-24 07:31:45 +02:00
Paul Riseborough
99a80387ed EKF: improve optical flow GPS quality checking 2018-06-09 22:23:55 +02:00
Paul Riseborough
7f36add241 EKF: scale GPS vertical accuracy check when using optical flow 2018-06-09 22:23:55 +02:00
Paul Riseborough
84516760c0 EKF: Use stricter GPS accuracy test when optical flow is being used
This adds some hysteresis to the automated optical flow selection and also reduces likelihood of bad GPS being used when operating indoors,
2018-06-09 22:23:55 +02:00
Paul Riseborough
4ab78230e6 EKF: Add persistence criteria to GPS fail check 2018-05-08 08:41:15 +10:00
Paul Riseborough
bd59e381db EKF: always run GPS checks 2018-05-08 08:40:31 +10:00
Daniel Agar
c5b2f59f57 PX4 style fixes (excluding EKF generated code) 2018-05-03 22:25:36 -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
3ee6898710 EKF: Enable origin to be maintained when starting aiding using EV only
When starting aiding using EV only and commencing GPS aiding later, this change means that the GPS origin is set to the local position 0,0 point rather than the current vehicle position. This avoids large changes in local position when GPs aiding starts.
2017-07-29 15:31:34 +10:00
Paul Riseborough
0d7e7e9d81 EKF: Don't use EKF origin in GPS drift check calculation
The GPS drift calculations need to be able to run independently of the EKF origin.
2017-04-12 13:11:34 +02:00
Paul Riseborough
710b2bcb9f EKF: Do not move EKF origin when performing GPS checks
Doing so can casue large jumps in GPS position and innovation check errors after landing and also reduces the effectiveness of pre-flight innovation consistency checks.
2017-03-31 16:19:30 +11:00
Paul Riseborough
a1ff219380 EKF: Extend range of conditions over which we run GPS quality checks
Previously GPS quality checks were only run until the EKF origin was set. This meant that they could not be used by other pre-flight checks.
This change ensures that checks will always be run when the vehicle on-ground or not using GPS to enable use by external preflight checks.
2017-03-21 07:57:23 +11:00
Daniel Agar
2750961be6 c++11 initialization cleanup (#237) 2017-02-05 13:05:10 -05:00
Daniel Agar
7883085e4a clang-tidy readability-simplify-boolean-expr (#235) 2017-02-02 00:17:43 -05:00
Paul Riseborough
3c4c09593f EKF: Rationalise console messages
Combine the observation action buffer and alignment messages
Ensure all data timeout messages are warnings.
Use consistent terminology.
2016-12-28 10:39:47 +01:00
Julian Oes
b8e2f79005 EKF: correct include paths 2016-06-02 16:29:22 +01:00
Julian Oes
ecfd8c867a EKF: use ECL printfs everywhere
- Changes all printfs to ECL printfs
- Add ECL_ERR.
- Include ecl.h where needed.
- Add forgotten pragma once.
2016-06-02 16:07:26 +01: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
Daniel Agar
22d18d638c enable Wshadow 2016-05-04 19:45:40 -04:00
Paul Riseborough
687fcc70be EKF: Explicitly define type conversion for GPS height 2016-03-16 17:18:20 +11:00
Paul Riseborough
6b2e2dba90 EKF: Add GPS height option and improve height recovery 2016-03-16 10:40:51 +11:00
Paul Riseborough
d2407c3463 EKF: code style updates 2016-03-13 21:17:51 +11:00
Paul Riseborough
26238bc2f5 EKF: Allow for change in position when defining the WGS-84 origin position
This allows GPS aiding to commence later in flight without step changes in local position output
2016-03-11 11:03:43 +11:00
Paul Riseborough
cd0cac066a EKF: Calculate and publish horizontal and vertical position accuracy
This calculation takes into account the uncertainty of the origin.
Dead reckoning status is also published
2016-02-25 10:38:07 +11:00
bugobliterator
263c48d089 EKF: remove dependecies and allow ekf to be built as standalone shared lib 2016-02-17 17:33:18 -08:00
Paul Riseborough
83945581ed EKF: Add function to calculate the magnetic declination to use 2016-02-14 22:01:53 +01:00
Paul Riseborough
40e174b81c EKF: Correct for sensor noise and baro offset during alignment 2016-02-10 10:25:27 +11:00
Paul Riseborough
2b1e8fe910 EKF: Update tuning parameters
Set conservative defaults as a baseline for tuning
Add a missing parameter for magnetometer observation noise.
Correct error in definition of magnetic heading observations noise (previous parameter defined the variance directly, not the noise).
Scale vertical GPS noise to allow for average EPV to EPH ratio.
Update documentation and display names for consistency.
2016-02-03 17:05:45 +11:00
bugobliterator
d79e12dfa1 EKF: fix code style 2016-01-31 00:12:16 -08:00
Paul Riseborough
466a104534 EKF: additional GPS check logic
Improve naming of NED origin initialisation status
Add check for GPS solution type
Use GPS checks when regaining GPs in-flight
2016-01-30 12:21:39 -08:00
bugobliterator
251996d387 ekf: move gps checks to Ekf library from estimator_base 2016-01-29 17:15:18 -08:00
Paul Riseborough
46b0e9654c Add filter control logic 2016-01-30 09:01:48 +11:00
Paul Riseborough
39eef3a2d7 EKF: Remove use of camel case variable names
Also fixes bug in GPS speed accuracy check that was using horizontal position accuracy variable by mistake.
2016-01-28 08:37:45 +11:00
Paul Riseborough
cc50d26601 EKF: Update comments 2016-01-28 08:13:38 +11:00
Paul Riseborough
6326433c47 EKF: Eliminate call to hrt_absolute_time()
This will make the library more portable
2016-01-27 19:04:31 +11:00