144 Commits

Author SHA1 Message Date
Paul Riseborough
01d68ef67c EKF: Enable use of rotated external nav estimates 2017-11-01 08:33:57 +11:00
Paul Riseborough
59f1c3e19e EKF: Update dead-reckoning definition
Use of air data to navigate should be classified as dead-reckoning because neither ground relative velocity or position is observed directly and errors grow faster.
2017-10-20 14:44:37 +11:00
Paul Riseborough
a2dcd5b9b6 EKF: Consolidate no aiding reset logic 2017-10-20 14:44:37 +11:00
Paul Riseborough
929c5c2b37 EKF: enable gps fusion flag to be false while fusing air data 2017-10-20 14:44:37 +11:00
Paul Riseborough
204a218ee6 EKF: Allow dead-reckoning using air data 2017-10-20 14:22:06 +11:00
ChristophTobler
f5fd90533a fix gps and flow flag handling
gps flag was not turning false if there was flow

only reset states if we were relying on that sensor only
2017-10-20 14:22:06 +11:00
CarlOlsson
c81cdfa1ce EKF: Fix bug when resetting position and velocities for fw due to something else than bad yaw estimate
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-10-17 15:08:09 +02:00
Paul Riseborough
6f7f05fdc0 EKF: Move MAG_FUSE_TYPE_AUTOFW control to the expected place 2017-10-12 14:50:23 +11:00
Paul Riseborough
7b4c957ad4 ekf2: Add new mag fusion mode
Adds a mode where mag fusion is only used update the field estimates
2017-10-12 14:50:23 +11:00
Paul Riseborough
1119a9b0ac EKF: Enable optical flow reversion to work if flow data is lost
Also improve reporting.
2017-10-12 08:02:54 +11:00
ChristophTobler
b7e589b98a EKF: only fuse optical flow if terrain is valid 2017-10-10 17:51:56 +02:00
CarlOlsson
0a7c3ecbc6 EKF: Parameterize maximum angle for rng fusion 2017-09-26 20:53:48 +02:00
Paul Riseborough
160e4d69c1 Merge pull request #323 from PX4/pr-ekfQuatMultOrder
EKF: use hamiltonian convention for quaternion multiplication order
2017-09-21 07:49:35 +10:00
Paul Riseborough
1d3e8edc46 EKF: Fix bug in accumulation of IMU data for flow sensor gyro bias calculation 2017-09-14 18:34:11 +10:00
Paul Riseborough
dd5b8525c3 EKF: Use hamiltonian convention for quaternion product order 2017-08-31 11:14:02 +02:00
Daniel Agar
99ba1c3745
EKF trivial code style cleanup 2017-08-25 10:09:11 -04:00
ChristophTobler
89236ef275 Merge pull request #314 from PX4/pr-check_stuck_rng
Pr check stuck rng
2017-08-21 07:54:06 +02:00
ChristophTobler
7252284628 Add check for stuck range finder measurements 2017-07-31 17:59:16 +02:00
Paul Riseborough
ce806768b7 EKF: Improve in-flight mag error detection, recovery and isolation for fixed wing 2017-07-31 19:39:07 +10:00
Paul Riseborough
e08da1c599 EKF: Add ability to use EV and GPS data together
Fuse external vision data using a relative position odometry method when GPS data is also being used and enable both GPOS and EV data to be fused on the same time step.
2017-07-26 18:06:18 +10: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
e429ecab17 check if terrain valid instead of initialized 2017-07-17 16:43:23 +02:00
ChristophTobler
517fe8a71f rng aid: use hysteresis with lower hagl check 2017-07-17 13:36:51 +02:00
ChristophTobler
8ed61ac052 init rng offset with ground clearance param when on ground to avoid noisy init 2017-07-13 17:43:19 +02:00
Paul Riseborough
9ee35e38df EKF: Don't fallback when optical flow is lost if external vision data is being used 2017-07-13 20:21:41 +09:00
Paul Riseborough
1bb576c197 EKF: Allow fallback to non-aiding mode if external vision is lost. 2017-07-13 20:21:41 +09:00
Isaac
f96685267e Fixed vision position fusion bug 2017-07-10 13:44:51 +10:00
Paul Riseborough
ec2b54fde7 EKF: Ensure normal yaw alignment using mag is performed if GPS method is not 2017-07-08 11:13:40 +02:00
Paul Riseborough
d446f66105 EKF: Add a fixed wing mode with setter function 2017-07-08 11:13:40 +02:00
Paul Riseborough
f064915889 EKF: Enable planes to recover from bad mag data at start of flight
Adjusts yaw by the amount of the error between GPS and EKF course if innovations are large.
2017-07-08 11:13:40 +02:00
Paul Riseborough
eb1e73ec81 Merge pull request #283 from PX4/ekf_matrix_cleanup
EKF matrix typedef cleanup
2017-07-03 21:02:24 +10:00
Paul Riseborough
dfbc9de48e Merge pull request #291 from PX4/pr-ekfWindEstBugFix
EKF: Fix bug affecting wind estimation for planes
2017-07-01 11:06:58 +10:00
Paul Riseborough
59edccca4a EKF: Fix bug in wind estimation for fixed wing 2017-06-30 10:32:54 +10:00
Paul Riseborough
ba4a311771 EKF: Update comments for wind estimation logic 2017-06-30 10:32:23 +10:00
ChristophTobler
e1274ad28a move faultiness check above pop_first_older_than() and check independent of range aid to switch back to original sensor if available 2017-06-29 17:07:58 +02:00
ChristophTobler
0d9e535acb Use baro if reset to baro from gps and vice versa 2017-06-29 17:07:42 +02:00
ChristophTobler
4a4b0fa604 remove setting rng faulty in ev mode because not checked 2017-06-29 10:01:16 +02:00
ChristophTobler
066c641d61 range aid: switch to baro/gps even if rng aid conditions met and rng faulty 2017-06-29 09:47:02 +02:00
ChristophTobler
2f382c8e0e if hgt mode is range, switch to baro if range is faulty 2017-06-29 09:47:02 +02:00
ChristophTobler
e4f36215cb if in range aid mode, check faultiness that otherwise would never change back 2017-06-29 09:47:02 +02:00
ChristophTobler
e800de88b6 remove duplicate 2017-06-29 09:47:02 +02:00
Daniel Agar
c44488fdb8
EKF matrix typedef cleanup 2017-06-19 11:10:01 -04:00
ChristophTobler
1fed209804 fix formatting 2017-06-15 09:10:43 +02:00
Roman
5036967343 barometer does not special height sensor offset because a barometer
offset from the local origin is calculated if the primary source for
height is not baro

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman
c5d464b821 make range sensor height offset computation more robust
- when switching to range finder use the current terrain estimate as
height sensor offset, otherwise spikes in the range measurements could lead
to a wrong offset

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman
182ea43445 fixed baro offset calculation
- do not subtract the height sensor offset variable when computing the
baro offset from the local origin. The baro height offset is calculated
when baro is not fused and so the height sensor offset used in that case
is associated to another sensor and has nothing to do with the baro.

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman
39983a7d55 range aid: added hysteresis for switching in and out of range aid
- prevents rapid switching
- added innovation consistency check for using range aid

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman
3778f0921a ekf: enable range finder to be used for estimating height even if it's not
the primary height source

- moved height control into single function in order to decide which sensor
should be used for estimating height
- under certain conditions allow to use the range finder to estimate height
even if it's not the primary height source
- fixed a bug where the delta time for the baro offset calculation was always
zero
- use methods to set height control flags to reduce code duplication and
to prevent bugs

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00
Roman
36bffd2571 ekf: calculate the delta time between consecutive baro measurments
(used for calculating filtered baro offset when primary height source
is not baro)

Signed-off-by: Roman <bapstroman@gmail.com>
2017-06-15 09:10:43 +02:00