Paul Riseborough
5f9752cac8
EKF: Improve function names
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
Paul Riseborough
928a7dd059
Merge pull request #157 from PX4/pr-ekf2ResetInterface
...
Change state reset information interface
2016-06-08 14:18:31 +10:00
Paul Riseborough
99b34f0df4
EKF: Only reset necessary terms when mag fusion covariance reset required
...
Only the quaternion and mag fusion state covariances are used in the mag fusion calculations.
2016-06-08 11:58:33 +10:00
Paul Riseborough
081e17729c
EKF: delay commencement of 3D mag fusion until clear of ground
...
Wait until enough height has been gained to be clear of ground based magnetic anomalies. Failure to do so can result in incorrect earth field initialisation.
2016-06-06 21:59:46 +10:00
Roman Bapst
670c6ca019
change state reset information interface for more convenient handling
...
on firmware side
2016-06-06 13:22:20 +02: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
e371a303a9
EKF: publish the quaternion reset event
2016-06-01 17:13:00 +10:00
Paul Riseborough
2b0d5c28f0
EKF: capture full quaternion change for reset events
2016-06-01 17:13:00 +10:00
Paul Riseborough
b2e432e211
EKF: publish position and velocity reset data
2016-06-01 17:13:00 +10: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
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
Carl Olsson
0fafc49a49
fixed typos ( #147 )
2016-05-22 17:40:43 +02:00
waltjohnson
7c158aa59b
Addressed C99 compiler issues of initializing variables in header and unused included statements.
2016-05-19 09:58:18 -06:00
Paul Riseborough
22fba0fc6e
EKF: don't initialise filter without EV data if we are relying on it
2016-05-18 19:25:19 +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
b985e58333
EKF: clean up control function
...
With the addition of new observation types, the control function has become too large and needed be broken up into separate functions
2016-05-14 21:17:29 +10:00
Paul Riseborough
c7e225124c
EKF: Improve output observer position and velocity tracking
...
Replace the delayed time feedback mechanism used by the translational states with a direct feedback method.
Time constants for velocity and position convergence can be separately adjusted with tunable parameters
The method is more computationally more expensive because it requires modification of the output buffer history but is acceptable because it only requires 6 FLOP per buffer index for a total of 30*6 = 180 FLOP
The method was not applied to the attitude states because the quaternion operations required at each buffer index would have been computationally prohibitive.
2016-05-14 12:45:29 +09:30
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
Paul Riseborough
724280fd1f
EKF: move calculation of optical flow observation variance into a function
...
Allows it to be used when calculating initial state variance
2016-05-08 15:40:06 +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
f1b7e7714e
EKF: Make average update rate of EKF closer to target
...
With the EKF, the average update rate is more important than the instantaneous value as it affects tuning. This patch ensures that the EKF prediction cycle will be performed early if the previous one was late in an attempt to maintain the target update rate.
2016-05-05 21:23:03 +10:00
Paul Riseborough
727a43764f
EKF: update initial angle alignment check
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
Paul Riseborough
4fcbfb5d42
EKF: correct error in comment
2016-04-23 07:55:25 +10: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
10bf05e9a6
EKF: publish the vertical position offset
2016-04-22 08:30:46 +10:00
Paul Riseborough
0de15b1b20
EKF: Add variables to monitor vertical position and height offset
2016-04-22 08:28:56 +10:00
Lorenz Meier
9487eac505
Merge pull request #98 from priseborough/pr-ekf2StatusReporting
...
EKF: improve reporting of filter status
2016-04-20 11:44:02 +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
31bf342fc1
EKF: publish GPS check status
2016-04-19 17:38:22 +10:00
Roman Bapst
60abf07bee
added function to return accelerometer bias
2016-04-18 17:52:16 +02: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
CarlOlsson
6bb2f7638c
adopted ekf.h
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
dca186c6e8
EKF: Add required declarations for optical flow
2016-03-11 11:03:43 +11:00
Paul Riseborough
5242af84af
EKF: Standardise covariance update and use static arrays for large matrices
2016-03-05 08:58:19 +11:00
Paul Riseborough
d5e47d21db
EKF: miscellaneous comment and format changes
2016-03-01 15:35:45 +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
mcsauder
6613335937
Added constexpr back from const var type.
2016-02-23 16:15:52 -07:00