ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

AHRS: added common origin between backends

Open tridge opened this issue 1 year ago • 4 comments

This ensures that EKF2, EKF3 and ExternalAHRS all have a common origin

Note that the origin will come from the first running backend that gets an origin, even if it is not the active backend. This is needed because EKF2 and EKF3 refuse to change origin once it is set. The placement of this code in the update function for each backend is done as two backends may get an origin on the same loop, so we must check for an origin as soon as we call the backends update

tridge avatar Aug 15 '24 21:08 tridge

.. also should have an autotest

peterbarker avatar Aug 18 '24 21:08 peterbarker

this was flight tested on a 5" quad, switching between EK2 and EK3 did not change position

tridge avatar Aug 19 '24 22:08 tridge

.. also should have an autotest

not really sure how to do that ... the obvious method of not setting EK2_ENABLE=1 until after EK3 has set origin won't work, as this PR only does the origin set once

tridge avatar Aug 19 '24 22:08 tridge

i'll try to do an autotest

tridge avatar Aug 20 '24 00:08 tridge

back for dev call this week. I think we should merge this now, but separately see if we can stop the EKFs from changing the origin height on baro reset, but as a separate PR

tridge avatar Sep 09 '24 03:09 tridge