89 Commits

Author SHA1 Message Date
Paul Riseborough
8e30c2666d EKF: Add support auxiliary velocity observation
This enables the EKF to use an additional NE velocity measurement. This can be used to improve position hold stability when landing using a beacon system for positioning by fusing the beacon velocity estimates.
2017-11-21 11:18:09 +11:00
Daniel Agar
d9c8af54bd
EKF add print_status() with memory usage 2017-11-16 14:11:34 -05:00
Daniel Agar
75d1ed894c
EKF simplify RingBuffer allocation check 2017-11-16 13:09:17 -05:00
Paul Riseborough
af7004ef01 EKF: report observation buffer allocation errors 2017-11-16 20:04:46 +11:00
Paul Riseborough
d785a19c0a EKF: delay final allocation of observation buffers until required 2017-11-16 19:47:04 +11:00
Daniel Agar
ed9a394029
EKF RingBuffer avoid copying 2017-11-15 18:08:51 -05:00
Paul Riseborough
e10ec59058 EKF: Use consistent test for navigation validity reporting
This will enable controller to take advantage of non-inertial dead reckoning.
2017-10-20 14:44:38 +11:00
ChristophTobler
cdf6e6cd36 EKF: use delta_time to avoid division by zero 2017-10-11 15:15:06 +02:00
Paul Riseborough
d293c4231d EKF: Protect against divide by zero caused by invalid optical flow 2017-10-11 21:54:47 +11:00
Paul Riseborough
ab9b8e1964 EKF: Prevent bad optical flow quality causing loss of aiding when on ground 2017-10-11 21:22:33 +11:00
ChristophTobler
81a64c0479 ekf: fix flow direction when on ground 2017-10-10 14:39:44 +02:00
Paul Riseborough
d6decb3c84 Merge pull request #277 from PX4/pr-ekfBufferParam
EKF: Add a parameter to enable setting of a minimum buffer length
2017-06-15 07:34:21 +10:00
Paul Riseborough
fed4a9bc5a EKF: add vertical position derivative output
Add calculation of a vertical position derivative to the output predictor. This will have degraded tracking relative to the EKF states, but the velocity will be closer to the first derivative of the position and reduce the effect inertial prediction errors on control loops that are operating in a pure velocity feedback mode.
Move calculation of IMU offset angular rate correction out of velocity accessor and into output predictor.
Provide separate accessor for vertical position derivative.
2017-06-12 10:45:46 +10:00
Paul Riseborough
16c7041f4a EKF: Add a parameter to enable setting of a minimum buffer length to handle large sensor timing jitter 2017-06-12 09:33:34 +10:00
Daniel Agar
87fdee440b EKF estimator_interface coverity fix 139419 2017-04-29 11:48:15 +02:00
Daniel Agar
b3f8fd19e0 EKF estimator_interface coverity fix 140490, 140491 2017-04-29 11:48:15 +02:00
Daniel Agar
3919d60f66
ekf2 initialization fixes 2017-04-24 18:56:50 -04:00
Paul Riseborough
c3f966f53e EKF: remove clang build error message 2017-04-18 19:22:59 +10:00
Paul Riseborough
c607941e2f EKF: Allow external setting of air density for multi-rotor drag fusion 2017-04-16 13:07:12 +02:00
Paul Riseborough
3758c5a09d EKF: down-sample drag specific force data 2017-04-16 13:07:12 +02:00
Paul Riseborough
465b145929 EKF: Add multi-rotor drag model for wind estimation 2017-04-16 13:07:12 +02: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
2426f1dd3a EKF: remove use of memset to initialise variable
When using a union of flags and integer value it is safer to initialise the value to 0 rather than memset the flags because the flags may not define all bits in the integer.
2017-03-21 07:57:23 +11:00
Paul Riseborough
040639837e EKF: Use common timeout test for reporting deadreckoning
Use a parameter to set the time-out threshold
Use a class variable for the time-out flag
Clean up comments
2017-03-15 07:57:38 +01:00
Paul Riseborough
9bb54ccc08 EKF: don't accept GPS data without a 3D lock 2017-03-10 10:15:53 +01:00
Paul Riseborough
af26ade1ce EKF: Use norm for vector length everywhere 2017-02-22 14:12:05 +01:00
Paul Riseborough
6e5a9aabe1 Merge pull request #234 from PX4/pr-optFlowUpdates
EKF: optical flow improvements
2017-02-22 09:00:48 +11:00
Daniel Agar
2750961be6 c++11 initialization cleanup (#237) 2017-02-05 13:05:10 -05:00
Daniel Agar
47b8ef258b clang-tidy performance-type-promotion-in-math-fn (#236) 2017-02-02 00:17:08 -05:00
Paul Riseborough
bcf7cac5d9 EKF: remove hardcoded limit on optical flow time delta
Allow for up to 50% lost data.
2017-01-18 06:06:45 +11:00
Paul Riseborough
3fb7effb0c EKF: Allow optical flow use when on-ground with poor data quality 2017-01-18 06:06:45 +11:00
Lorenz Meier
453bde73f8 ECL: Simplify / correct estimator interface 2017-01-15 10:17:41 +01:00
Roman
c5a55d97aa initialise data members properly
- dot not use memset for struct with non POD types

Signed-off-by: Roman <bapstroman@gmail.com>
2017-01-15 10:02:31 +01:00
Paul Riseborough
1465adca2f EKF: Improve use of memcpy
Changes made to remove Coverity scan errors
2017-01-15 10:02:31 +01:00
Paul Riseborough
26a06567bb EKF: add missing initialisation for class variables 2017-01-15 10:02:31 +01:00
Paul Riseborough
f999729d70 EKF: fix incorrect use of memcpy 2017-01-15 10:02:31 +01: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
Paul Riseborough
5ad329b641 EKF: Fix variable names to match convention 2016-11-07 22:23:12 +11:00
Paul Riseborough
afd6e54b2a EKF: Allow for worst case timing jitter when setting observation buffer length 2016-11-07 11:50:16 +11:00
Paul Riseborough
d5b398ddb1 EKF: Minimise data buffer lengths
Saves RAM and reduces output predictor errors by using the smallest data buffer length that meets time delay and update rate requirements.
2016-11-07 09:06:45 +11:00
Paul Riseborough
b10b0184c5 EKF: Add IMU vibration calculation and reporting
Add calculation and reporting of IMU delta angle and velocity coning and high frequency vibration
2016-10-19 21:46:55 +11:00
Paul Riseborough
744b79c1b2 EKF: Publish innovation test ratios 2016-10-06 09:02:29 +02:00
Roman
d53f532079 fixed computation of range measurement timestamp
Signed-off-by: Roman <bapstroman@gmail.com>
2016-09-17 11:41:12 +02:00
Lucas De Marchi
2240eb6b4f Move __STDC_FORMAT_MACROS to build system (#174)
__STDC_FORMAT_MACROS changes the behavior of inttypes.h to allow
defining format macros for printf-like functions. It needs to be defined
before any include is done, otherwise due to include chains and header
guards it may not take effect.

Instead of defining it everywhere it is used, let the PX4 build system
to deal with it.
2016-07-10 16:29:51 +02:00
Paul Riseborough
3c84d37175 Merge pull request #156 from PX4/fix_printfs
EKF: use ECL printfs everywhere
2016-06-07 09:45:00 +10: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
733862f649 EKF: move the reset status struct to the Ekf class
This protects it from being modified externally
2016-06-01 17:13:00 +10:00
Paul Riseborough
4237269fab EKF: add struct to capture state reset events 2016-06-01 17:13:00 +10:00
Paul Riseborough
8125717bf5 EKF: remove un-used airspeed health class variable
Airspeed rejection now is captured in _sensor_fault_status
2016-06-01 17:13:00 +10:00