Skip to content

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

@rishabsingh3003 rishabsingh3003 changed the title AP_Baro: Check if origin alt is zero before using it as field elevation AP_Baro: Prevent using zero altitude origin as field elevation Dec 7, 2025
@tridge tridge merged commit 3d70d55 into ArduPilot:master Dec 8, 2025
107 checks passed
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