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

AP_Terrain: avoid direct use of Location alt field #19922

Merged
merged 2 commits into from
Feb 7, 2022

Conversation

peterbarker
Copy link
Contributor

I'm really not sure about this whole returning of zero for above-home height if we don't know what it is. Perhaps we'd be better off not sending TERRAIN_REPORT in that case - or a nan in the relevant mavlink field? Separate issue.

@peterbarker
Copy link
Contributor Author

Tested in SITL by using the "Terrain Check" option in MAVProxy and checking fields before/after this PR

@peterbarker
Copy link
Contributor Author

So this showed that we were using current_loc fields uninitialised.

We're still using home even if it hasn't been set...

This can happen at boot-time if the vehicle has no idea where it is
@tridge tridge merged commit bb42ab3 into ArduPilot:master Feb 7, 2022
@peterbarker peterbarker deleted the pr/terrain-relative-alt-use branch February 8, 2022 00:17
@IamPete1 IamPete1 removed the DevCallEU label Feb 9, 2022
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.

5 participants