ChrisOlson
(Chris Olson)
October 29, 2017, 5:46pm
14
Anubis:
Here, when the drone is resting on the ground, the EKF altitude decreases, even though this disagrees with the baro. Log 38 has this also, but in the opposite sense: a positive climb rate while the drone is resting on the ground.
Guys, this issue has been fixed by Paul with this PR with a total of 38 commits:
ArduPilot:master
← priseborough:pr-ekfUpdates
opened 12:26PM - 21 May 17 UTC
1) Improves the internal use of GPS reference height and add parameter control o… ver behaviour and reporting. This enables the GPS reference height to be updated in-flight to for drift in the EKF's pressure height datum if using Baro or changes in the terrain height datum if using the range finder as a primary height sensor. The change in GPS reference height can also be reported externally as a change in EKF origin height if desired.
2) The time required to pass tilt alignment checks on startup has been reduced by inhibiting the gyro bias learning until the initial tilt alignment is completed.
3) More reliable inhibiting of unwanted states
4) Efficiency improvements in the covariance prediction by significantly reducing the number of copy operations.
5) Prevents the accel bias states becoming badly conditioned during long periods without movement which can cause loss of height estimation during preflight. This is achieved by slightly increasing the target covariance prediction dt and raising the lower limit on the delta velocity bias state variances.
6) Adds low rate logging of covariance matrix diagonals to assist with debugging filter tuning problems.
7) Reverts micro-optimisations in the covariance prediction auto-code that should be left to the compiler.
8) Adds protection against the delta velocity bias state variances collapsing, which can happen if there are extended periods without movement and the process noise parameter is small. If variances fall below an equivalent of 1 cm/s/s of bias uncertainty, then the process noise is increased up to a maximum of 10x when variance has fallen to an equivalent of 1 mm/s/s of bias uncertainty. If this level is reached, the covariance (off diagonal) terms are zeroed.
**TESTING**
Has been bench tested for extended (>1hr) periods without stability issues.
Has been SITL tested for Copter.
Has been flight tested for Copter.
The PR has been merged into master, but is not yet in the current stable release. Hopefully when Randy gets a chance to get it into 3.5-Backports the fix will come out in Copter 3.5.4. There is a new param, EK2_OGN_HGT_MASK, set to zero will force use of the baro for the height origin.
I fly helicopters and am currently flying the patched code built on Copter 3.5.3. Information on the issue is in this thread in the Trad Heli section of the forum:
This is not a problem unique to helicopter. Multi-rotor pilots have noted this as well but it’s usually blamed on the aircraft not being able to maintain altitude due to running out of power and dismissed. With helicopters we don’t have that problem so I can more accurately illustrate what is going on. I noted this during testing and tuning the WPNAV_ACCEL on this heli and dismissed it at the time as a one-time anomoly. But it turns out it’s not.
This is a screenshot summary of the flight plan …
The patched code for Copter 3.5.3 is in my ArduHeli master branch on GitHub, but unfortunately I have only done builds for helicopters at this point.
https://github.com/ChristopherOlson/ArduHeli