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_Baro: Check if origin alt is zero before using it as field elevation #25114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rishabsingh3003
Copy link
Contributor

If origin is set with height 0, then field elevation keeps getting set at 1hz. This is easily reproducible in SITL by switching off the GPS (or any other pos source) and setting the origin (without height).
Screenshot from 2023-09-26 23-19-26
I am not sure if this is the correct solution though

@tridge
Copy link
Contributor

tridge commented Oct 16, 2023

@rishabsingh3003 i think better to make _field_elevation_active equal to 0.001 if it is exactly zero when set

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.

4 participants