Beat Küng
73b8ac954d
ekf_helper.cpp: remove unused includes
...
This fixes a compile error with GCC 5.2.0 and cross-compilation:
/usr/arm-none-eabi/include/c++/5.2.0/arm-none-eabi/armv7e-m/fpu/bits/error_constants.h:122:27: error: 'ENOTSUP' was not declared in this scope
not_supported = ENOTSUP,
The problem was that the #include <iomanip> was taken from the host system,
which conflicts with includes from NuttX (NuttX has only basic C++ STL
support)
2016-07-15 12:50:11 +02:00
Paul Riseborough
f5e9ea1626
EKF: Prevent potential divide by zero
2016-06-30 17:06:32 +10:00
Paul Riseborough
7bc9217f00
EKF: Clean up control of observation fusion
...
All the decision for a sensor are made within a specific function for that sensor and when there is data to process at the fusion time horizon.
Information and warning messages are improved.
2016-06-30 17:06:32 +10:00
Roman Bapst
bec1a6831e
added method to get gyro bias
...
Signed-off-by: Roman Bapst <roman@px4.io>
2016-06-21 14:13:47 +02:00
Roman
703fb4e31b
do not return early in velocity reset method otherwise
...
some code will not be executed
2016-06-08 07:51:18 +02:00
Paul Riseborough
f26aca55a1
EKF: Fix bug in quaternion covariance initialisation function
...
The covariances between quaternion and non-quaternion states were not being updated
2016-06-08 13:23:30 +10:00
Paul Riseborough
6a55d908c5
EKF: replace reset event times with event counters
...
Using a 64bit integer was unnecessary given it was only being used to detect a new reset event.
2016-06-01 17:13:00 +10:00
Paul Riseborough
9ec09f5f4e
EKF: update output observer and capture reset event for magnetic heading resets
2016-06-01 17:13:00 +10:00
Paul Riseborough
aca0336392
EKF: update vertical position and velocity reset capture
...
Use reset event struct members instead of separate variables
2016-06-01 17:13:00 +10:00
Paul Riseborough
0605c88ecc
EKF: capture horizontal position reset events
2016-06-01 17:13:00 +10:00
Paul Riseborough
e3a1b4a3b3
EKF: capture velocity reset events
2016-06-01 17:13:00 +10:00
Paul Riseborough
79705da7e6
EKF: make output predictor states consistent with position reset
2016-06-01 17:13:00 +10:00
Paul Riseborough
54d90261d5
EKF: make output predictor states consistent with velocity reset
2016-06-01 17:13:00 +10:00
Paul Riseborough
ad02818b3d
EKF: Improve height reset for external vision
...
reset to measurement closest in time to fusion time horizon
2016-05-27 14:00:50 +10:00
Paul Riseborough
1b6c5bbafd
EKF: Enable height source to be selected independent of EV aiding
2016-05-27 13:14:52 +10:00
Paul Riseborough
ae5071f668
EKF: Improve heading reset
...
Improves reset of quaternion covariance matrix after a heading reset by preserving variance in roll and pitch and resetting yaw variance to the measurement variance.
2016-05-21 19:30:15 +10:00
Paul Riseborough
94a63ec9d5
EKF: don't interfere with quaternion covariances during tilt alignment
2016-05-18 19:25:19 +10:00
Paul Riseborough
e4b2e9c93d
EKF: Improve yaw alignment
...
Uses best conditioned of 321 or 312 Euler sequence to calculate initial yaw angle.
Allows alignment of yaw angle using external vision data
2016-05-18 12:16:16 +10:00
Paul Riseborough
57b2a256f7
EKF: Improve initialisation of quaternion covariances
...
Convert uncertainty in initial rotate vector into quaternion covariances using symbolic toolbox derived expressions.
Enable setting of initial angle uncertainty via a parameter
2016-05-17 12:47:20 +10:00
Paul Riseborough
1540e937b1
EKF: Improve tilt alignment monitoring
...
Convert quaternion covariances into an angular alignment variance vector and discard the z component so that yaw uncertainty does not affect the result.
2016-05-17 11:17:24 +10:00
Paul Riseborough
81469d6621
EKF: Add position, height and velocity reset for EV aiding
2016-05-14 21:17:29 +10:00
Paul Riseborough
25682dce91
EKF: Prevent badly conditioned covariance calculation when starting or resetting to optical flow
2016-05-08 10:30:40 +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
da9d894441
EKF: Improvements to covariance reset
2016-05-07 12:57:41 +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
Roman
0c77ebf6bd
EKF: Reduce likelihood of bad covariance values after height resets
...
The cross terms (covariances) are now reset before the variance variance is set.
The vertical velocity state variance following a reset without GPS has been reduced.
2016-05-01 21:39:56 +10:00
Paul Riseborough
469a7d1711
EKF: rework height reset
...
calculate and save the amount that the vertical states have changed and the time of the change
apply the change delta to the output observer states and buffer
2016-04-22 08:43:56 +10:00
Paul Riseborough
2fa8a11a29
EKF: replace unnecessary memcopy
2016-04-19 19:10:41 +10:00
Paul Riseborough
31bf342fc1
EKF: publish GPS check status
2016-04-19 17:38:22 +10:00
Paul Riseborough
e10093854a
EKF: correct outputs for IMU offset
2016-04-12 11:14:31 +10:00
Paul Riseborough
74078cde94
EKF: reset state variance when performing a height reset
...
Set vertical position and velocity variances using known sensor error characteristics if we have reset the states to the sensor readings.
2016-04-11 19:40:27 +10:00
Paul Riseborough
f4f108d57d
EKF: Reset vertical velocity when performing a height reset
2016-04-11 19:25:24 +10:00
CarlOlsson
f8878d41dc
adopted ekf_helper.cpp
2016-03-30 17:01:03 +02:00
Paul Riseborough
6b2e2dba90
EKF: Add GPS height option and improve height recovery
2016-03-16 10:40:51 +11:00
Paul Riseborough
c58ab3e256
EKF: Enable fallback to baro alt when using range finder for height
2016-03-13 21:17:51 +11:00
Paul Riseborough
370f643f42
EKF: Enable use of range finder for primary height source
2016-03-13 18:44:34 +11:00
Paul Riseborough
e0fcce1463
EKF: Make position and velocity reset publish success
...
Some users of the position and velocity reset functions will need to know if the reset has been successful.
2016-03-11 11:03:43 +11:00
Paul Riseborough
32b03819ef
EKF: Add function to calculate global position validity
2016-03-11 11:03:43 +11:00
Paul Riseborough
270451e17b
EKF: Update height reset to support range finder height use
2016-03-11 11:03:43 +11:00
Paul Riseborough
f7a53d69f2
EKF: Improve height reset function
...
Add a method to reset the vertical velocity to enable in-flight resets
Reset to GPS height if baro height is not available.
2016-03-02 08:39:07 +01:00
Paul Riseborough
78d6f6941c
Merge pull request #61 from PX4/pr-ImprovedAccuracyReporting
...
EKF: Improve Position Accuracy Reporting
2016-02-26 22:48:44 +11:00
Roman Bapst
9192ced7bb
do not reset output attitude state after heading reset to avoid jumps in attitude
2016-02-25 18:20:29 +01: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
Paul Riseborough
380db7ebef
EKF: Reset angle error covariance after yaw and mag field reset
...
The yaw angle could have changed by a significant amount making the correlations invalid.
Setting angle variances to zero prevents the initial kick in angles due to 3D fusion starting
2016-02-25 08:16:42 +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
de02aebafd
EKF: Reset covariance matrix when doing a yaw and magnetic field reset
...
The correlation terms in the covariance matrix will be incorrect after a reset, so should be zeroed
2016-02-14 22:01:53 +01:00
Paul Riseborough
83945581ed
EKF: Add function to calculate the magnetic declination to use
2016-02-14 22:01:53 +01:00
Paul Riseborough
6140d4b21f
EKF: Add function to reset yaw and magnetic field states
2016-02-14 22:01:53 +01:00
Roman
ce0ddc0207
-added comments
...
-removed unused print functions
-removed false _imu_time_last variable (correct is _time_last_imu)
2016-02-14 09:49:26 +01:00
Paul Riseborough
9d7340e187
EKF: Fix bugs in position and velocity resets
...
The position reset was not being compensated for velocity and measurement delay
The height was being reset with the position. It has been moved into a separate reset function
The maximum accepted GPS delay of 100msec was inadequate
The states was being incorrectly reset to the GPS position and Baro height on initial alignment.
2016-02-14 09:49:26 +01:00