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

Canged code to convert compass readings into a bearing #6568

Merged
merged 1 commit into from
Jun 30, 2024

Conversation

AntaresMKII
Copy link
Contributor

Changed example code to convert compass readings into a bearing since it produced an angle using the x-axis as north rather than the y-axis as explained in the description above it.

Description
The example code in the compass page of the documentation for computing the bearing in degrees from compass readings produces the incorrect output or it is misleading given the description above it. This is caused by the function adjusting the produced angle to consider the positive x-axis as the north direction rather than the positive y-axis as described in the description above the example code in the documentation.

Related Issues
None.

Tasks
No tasks.

Documentation
Original documentation: https://cyberbotics.com/doc/reference/compass?version=R2023b
Also present in the main branch documentation: https://cyberbotics.com/doc/reference/compass?version=master

Screenshots
None.

Additional context
I noticed this after using this function in a project and later having issues understanding why my headings where wrong.

Changed example code to convert compass readings into a bearing since it produced an angle using the x-axis as north rather than the y-axis as explained in the description above it.
@AntaresMKII AntaresMKII requested a review from a team as a code owner June 30, 2024 16:14
Copy link
Member

@omichel omichel left a comment

Choose a reason for hiding this comment

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

Thank you!

@omichel omichel merged commit 0c0e31c into cyberbotics:released Jun 30, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants