Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_NavEKF2/3: constify CorrectGPSForAntennaOffset #14108

Merged
merged 3 commits into from
Apr 21, 2020

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Apr 16, 2020

This PR changes the EKF2/3's CorrectGPSForAntennaOffset to make it const and also slightly reduces the number of times it is called by moving it so that it is run just before its outputs are needed.

I have not specifically tested the change beyond the regular autotests but I think just from inspection we can see that it can't possibly do any harm.

EKF2::CorrectExtNavForSensorOffset is also made const.

also reduce scope of call to slightly reduce CPU load
also reduce scope of call to slightly reduce CPU load
Copy link
Contributor

@khancyr khancyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for the changes. The changes in scope are good and the constifying too.
Those function for offset aren't great as we don't check their return ... but change that belong to another PR

@tridge tridge merged commit 35dcb0d into ArduPilot:master Apr 21, 2020
@rmackay9 rmackay9 deleted the ekf-minor-fixes branch April 21, 2020 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants