autotest: add Copter EKF Replay wind and airspeed subtest#32063
Merged
tpwrules merged 2 commits intoArduPilot:masterfrom Feb 2, 2026
Merged
autotest: add Copter EKF Replay wind and airspeed subtest#32063tpwrules merged 2 commits intoArduPilot:masterfrom
tpwrules merged 2 commits intoArduPilot:masterfrom
Conversation
Some tests do throttle control and need it zeroed, and some others leave it non-zeroed. Clear all the time for all tests for simplicity.
Tests that fusion of wind estimation and airspeed data is correctly replayed by the EKF. The test that wind estimation is working is already handled by `BaroWindCorrection`. Adding airspeed to Copter is easier than migrating everything to Plane. Technically fusion of airspeed data is not supported on copters and the `ARSPD_USE` parameter explicitly recommends against it. But it exists and works, and this test includes a check that it has continued to work. So if we break that later, the test will start to fail and we can decide what to do.
peterbarker
approved these changes
Feb 1, 2026
| self.arm_vehicle() | ||
| self.takeoffAndMoveAway() | ||
|
|
||
| # make sure airspeed was fused at some point after some flying |
Contributor
There was a problem hiding this comment.
Suggested change
| # make sure airspeed was fused at some point after some flying | |
| # make sure airspeed is being fused |
| # make sure airspeed was fused at some point after some flying | ||
| m = self.assert_receive_message('EKF_STATUS_REPORT') | ||
| if m.airspeed_variance == 0: | ||
| raise NotAchievedException("never fused airspeed") |
Contributor
There was a problem hiding this comment.
Suggested change
| raise NotAchievedException("never fused airspeed") | |
| raise NotAchievedException("not fusing airspeed") |
Contributor
Author
|
I observed that the airspeed_variance field doesn't update when fusion is off, it retains its previous value. So at an instant in time it's not really an indicator that fusion is actively happening. If you have a stanza to make sure it's changing for five seconds or whatever then I could put it in there. Or know what flag to check. But it would be weird since both the functions before and after the check are the ones that fly the drone; if it had no momentum it wouldn't be moving at the time of the check and fusion wouldn't be active. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests that fusion of wind estimation and airspeed data is correctly replayed by the EKF. The test that wind estimation is working is already handled by
BaroWindCorrection.Adding airspeed to Copter is easier than migrating everything to Plane. Technically fusion of airspeed data is not supported on copters and the
ARSPD_USEparameter explicitly recommends against it. But it exists and works, and this test includes a check that it has continued to work. So if we break that later, the test will start to fail and we can decide what to do.Tested that breaking airspeed fusion changes EKF replay.
Note that this still doesn't check sideslip.