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

ardupilotwaf: properly configure double precision tasks #28965

Merged
merged 2 commits into from
Dec 30, 2024

Conversation

tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Dec 30, 2024

There might be multiple copies of the flags, so remove all of them. Also pull the setup into a helper function to avoid duplicating the logic. On ChibiOS boards, this fixes SITL (which had issues with position quantization) and affects the SBF GPS driver (which was probably fine before but does change slightly).

Sim on hardware now flies smoothly instead of jittering about all over the place. SBF requires a handful more bytes but I don't think this meaningfully affects the function based on a brief read-through; the important lat/lon casts were already done manually.

Many thanks to tridge for working with me to debug this. Assuming it should be backported so that SBF works as written even if the change in behavior is negligible.

There might be multiple copies of the flags, so remove all of them. Also
pull the setup into a helper function to avoid duplicating the logic.

On ChibiOS boards, this fixes SITL (which had issues with position
quantization) and affects the SBF GPS driver (which was probably fine
before but does change slightly).
Use new setup function. Unsure if this affects anything.
Copy link
Collaborator

@andyp1per andyp1per left a comment

Choose a reason for hiding this comment

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

Nice! Having worked through a couple of these I know how dark the magic is.

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.

LGTM, python code is correct.

can probably squash the commit in one.

For testing, you can probably look at target with double enabled and compare if both version produce the same binaries. The second test should be to look at a lib that got double enable and both version produce the same compiled code

@tridge tridge merged commit 05f024a into ArduPilot:master Dec 30, 2024
99 checks passed
@tpwrules tpwrules deleted the pr/double-properly branch December 30, 2024 21:22
@rmackay9
Copy link
Contributor

this is included in ArduPilot-4.6.0-beta3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 4.6.0-beta3
Development

Successfully merging this pull request may close these issues.

5 participants