242 Commits

Author SHA1 Message Date
Paul Riseborough
54e713969d EKF: Fix rebase error 2016-05-05 21:23:03 +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
Beat Küng
f2dda3c183 ekf: initialize _terrain_var, fixes access to uninitialized value
in PX4 Firmware, Ekf::get_terrain_vert_pos depends on it. This is the
valgrind output:
==15439== Thread 14 ekf2:
==15439== Conditional jump or move depends on uninitialised value(s)
==15439==    at 0x5610087: sqrtf (in /usr/lib64/libm-2.22.so)
==15439==    by 0x4D1AF0: Ekf::get_terrain_vert_pos(float*) (terrain_estimator.cpp:135)
==15439==    by 0x46641F: Ekf2::task_main() (ekf2_main.cpp:655)
==15439==    by 0x42BF3D: entry_adapter(void*) (px4_posix_tasks.cpp:103)
==15439==    by 0x4E3C609: start_thread (in /usr/lib64/libpthread-2.22.so)
==15439==    by 0x5BF7A4C: clone (in /usr/lib64/libc-2.22.so)
2016-05-02 17:35:42 +02:00
Paul Riseborough
6c57bea1c3 EKF: fix bug in IMU error application timing patch 2016-04-30 15:11:12 +10:00
Paul Riseborough
15df20831a EKF: improve output complementary filter tracking
Optimise for height tracking and adjust gains automatically with changes in time delay.
2016-04-30 11:03:45 +10:00
Paul Riseborough
4fa1e9c651 EKF: Fix timing errors in state prediction
IMU corrections were being applied at the wrong time horizon to the EKF states
IMU downsampling rotates the delta velocities into the orientation produced by the last delta angle, but this wasn't consistent with the way the state prediction was using the delta velocity data.
2016-04-30 11:02:19 +10:00
Julian Oes
f8a48f9cc5 ekf: now it should even compile for NuttX 2016-04-28 16:30:49 +02:00
Julian Oes
12f4d6f703 ekf: another stab at fixing isfinite for all
The previous solution did not work for Snapdragon, so I needed to copy
what is used in px4_defines.h.
2016-04-28 16:09:12 +02:00
Paul Riseborough
22ad87599c Merge pull request #112 from PX4/fix_ubuntu1604_2
ekf: compile fix for Ubuntu 16.04
2016-04-27 21:21:04 +10:00
Julian Oes
46e207106b ekf: use std::isfinite instead of isnan 2016-04-27 12:58:22 +02:00
Paul Riseborough
874558d194 EKF: improve detection of bad vert accel data
Improve ability to detect if bad vertical accel data has caused loss of height accuracy by using historical data.
2016-04-22 09:24:04 +10:00
Paul Riseborough
421703c267 EKF: rework initialisation of height state and offsets 2016-04-22 08:38:41 +10:00
Paul Riseborough
a7417657c3 EKF: ensure fusion timeout counters are reset when required 2016-04-22 08:33:11 +10:00
Paul Riseborough
0de15b1b20 EKF: Add variables to monitor vertical position and height offset 2016-04-22 08:28:56 +10:00
Paul Riseborough
b295f9050c EKF: ensure GPS check status is correctly initialised 2016-04-20 21:53:15 +10:00
Roman Bapst
00c8821006 disable airspeed fusion for now. Needs more testing and implementation of side slip fusion 2016-04-19 11:18:45 +02:00
Roman Bapst
99fc61c27c ekf2 airspeed fusion:
- finished logic for fusion
- fixed bug where previous control status was set in the wrong location
2016-04-19 09:53:31 +02:00
Paul Riseborough
8c55e36ca9 EKF: use common value for gravity 2016-04-12 11:14:31 +10:00
Paul Riseborough
163c08a3ac EKF: Improve output observer documentation 2016-04-12 11:14:31 +10:00
Paul Riseborough
2dcc6e2053 EKF: Improve accuracy of state prediction
Use an a common estimator value for gravity
Use average orientation across update interval when rotating delta velocities
2016-04-12 11:14:31 +10:00
Paul Riseborough
5bf02517a7 EKF: Rationalise use of rotation matrices and improve efficiency 2016-04-12 11:14:31 +10:00
Paul Riseborough
e10093854a EKF: correct outputs for IMU offset 2016-04-12 11:14:31 +10:00
Paul Riseborough
b46053415f EKF: Compensate optical flow data for sensor position offset 2016-04-12 11:14:31 +10:00
Paul Riseborough
48b105b748 EKF: correct range finder data for sensor position offset 2016-04-12 11:14:31 +10:00
Paul Riseborough
e89dbb9f63 EKF: correct GPS data for antenna position offset 2016-04-12 11:14:31 +10:00
Paul Riseborough
eaf94935f0 EKF: Fix bug in initialisation of height and magnetic field
This prevents zero data being used to form the initial height and magnetic field.
Do not start sampling initial values until non-zero time values are retrieved from the buffer.
2016-04-05 22:23:37 +02:00
Roman Bapst
27b894540e put airspeed fusion logic but don't actually call it yet 2016-03-30 17:01:03 +02:00
CarlOlsson
f5a9afd278 moved init 2016-03-30 17:01:03 +02:00
CarlOlsson
4301e1105b added commas 2016-03-30 17:01:03 +02:00
CarlOlsson
0918fa04c7 adopted ekf.cpp 2016-03-30 17:01:03 +02:00
CarlOlsson
0fb1e0578b added function for fusing airspeed 2016-03-30 17:01:03 +02:00
Paul Riseborough
c23d72ba29 EKF: Ensure filter control modes are correctly initialised 2016-03-16 17:22:27 +11:00
Paul Riseborough
9f3b1351f7 EKF: Don't initialise velocity to GPS on initial alignment
For initial alignment the velocity and position should start at zero
2016-03-16 17:20:57 +11:00
Paul Riseborough
e334a5dc57 EKF: Add check for NaN's on attitude states 2016-03-16 13:43:21 +11:00
Paul Riseborough
6b2e2dba90 EKF: Add GPS height option and improve height recovery 2016-03-16 10:40:51 +11:00
Paul Riseborough
63b0cf4360 EKF: Fix baro height offset bug 2016-03-14 15:51:15 +11:00
Paul Riseborough
49023f3d7e EKF: fix travis build error 2016-03-13 21:56:28 +11:00
Paul Riseborough
7677a162aa EKF: Don't start the output observer before the main filter has initialised
This prevents the possibility of output transients if alignment is delayed.
2016-03-13 21:17: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
cc5512905a EKF: prevent optical flow, GPS and baro fusion from blocking each other 2016-03-11 11:03:43 +11:00
Paul Riseborough
ffebaf384f EKF: Set initial optical flow fusion monitor outputs to zero 2016-03-11 11:03:43 +11:00
Paul Riseborough
d97d308ca7 EKF: Add control of optical flow and range finder fusion 2016-03-11 11:03:43 +11:00
Paul Riseborough
d5e47d21db EKF: miscellaneous comment and format changes 2016-03-01 15:35:45 +11:00
mcsauder
5fb48a2e7b Merge remote-tracking branch 'upstream/master' 2016-02-25 22:51:58 -07:00
mcsauder
5fec0df70d Additional initializations required to reset complimentary filter values if the state estimate ever diverges and requires re-initiailization. 2016-02-25 22:51:14 -07:00
Paul Riseborough
36affe3cd8 EKF: Fix bug causing incorrect initial roll when inverted 2016-02-24 11:56:12 +11:00
mcsauder
342010c113 Update c style array initialization to attempt to pass Travic CI build tests. 2016-02-23 15:52:02 -07:00
mcsauder
48e80e9e3e Correct C style array initialization. 2016-02-23 15:16:40 -07:00
mcsauder
ccb5736353 Spaces to tab. 2016-02-23 19:58:30 -07:00