Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
I'm happy to add the fix to this PR or open a separate one, whichever the reviewers prefer. |
Global Size Summary (Total Flash delta in bytes)Built from 4ff58a8 rebased onto 6743a33
|
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.
Summary
Fix loss of precision in the latitude/longitude sent to Topotek gimbals and published on the DDS
/ap/goal_llatopic.Same issue as the Xacti fix in #34925.
Classification & Testing (check all that apply and add your own)
Not tested on hardware. Build-tested only:
vdiv.f64).--enable-DDSand confirmed in the disassembly that latitude/longitude are now computed in double precision (cvtsi2sd+divsd).Description
Both places store the result in a
double, but calculate it asloc.lat * 1e-7. With-fsingle-precision-constant,1e-7is a float, so the value is computed in single precision. This rounds the longitude to steps of about 1.5e-5° (~1.4 m).ddmm.mmmm(resolution ~1.9e-6°), so the float rounding is coarser than the output format.geographic_msgs/GeoPointdefines latitude/longitude asfloat64.This PR casts to double before dividing, so the full precision of the int32 location is kept.
This contribution was AI-assisted.