Skip to content

Conversation

n-snyder
Copy link
Contributor

Solved Problem

When sending CRSF telemetry, the GPS message provided an incorrect value for altitude [m]. This is because the existing PX4 code assumed the altitude_msl_m in the SensorGPS uORB message was in units of mm, instead of m.

Solution

Removed scaling of the altitude in the uORB message by 1000.

Changelog Entry

Bugfix for CRSF GPS telemetry

Test coverage

Tested with ELRS transmitter in the loop to confirm correct values.

Bug fix to correct returning mm units of altitude to m.
bresch
bresch approved these changes Jun 24, 2024
@bresch
Copy link
Member

bresch commented Jun 24, 2024

Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

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

I think the reported altitude should be in mm, not meters. Did you test the changes? Setting the altitude in meters + 1000 doesn't make sense, the +1000 are in millimeters

Looks like you were right!

@bresch bresch merged commit 6fd0e98 into PX4:main Jun 24, 2024
@n-snyder
Copy link
Contributor Author

Cool! Thanks @bresch for looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants