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

Update vehicle_local_position.ref_alt comment to reflect how ref_alt … #12658

Merged
merged 5 commits into from Oct 14, 2019
Merged

Update vehicle_local_position.ref_alt comment to reflect how ref_alt … #12658

merged 5 commits into from Oct 14, 2019

Conversation

nsteele
Copy link
Contributor

@nsteele nsteele commented Aug 7, 2019

…is being used in PX4

(from my original post in slack)
[The comment currently] indicates to me that ref_alt is meant to be the altitude AMSL of the ground immediately below the current position of the vehicle, but when I look at all the uses of ref_alt in PX4, it is never used in this way. ref_alt tends to be set once in an estimator module on the first gps fix, and then is treated as the global reference altitude of the local frame origin by said estimator module. Further, in the mavlink module, the ref_alt value is used to determine current altitude AMSL by adding it to vehicle_local_position.z, but z is relative to the local frame origin, so ref_alt must be altitude AMSL of local frame origin, else such calculations for current altitude AMSL are wrong. All of this to say: I think the comment is wrong...

@nsteele nsteele marked this pull request as ready for review August 8, 2019 13:51
Copy link
Contributor

@julianoes julianoes 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 your change is correct.

@julianoes julianoes requested a review from dagar August 12, 2019 14:52
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.

3 participants