Skip to content

Conversation

@Williangalvani
Copy link
Contributor

@Williangalvani Williangalvani commented Aug 12, 2025

When automatically set, home is now Always at the surface. (this was already assumed in copter anyway, and waypoints above home are currently invalid).
get_alt_rel() also got updated to use ahrs.get_relative_position_D_home(posD);, which uses the home instead of ekf origin, and already falls back to baro, which made the baro code redundant.

This fixes my issues with running missions with depth measured from the water surface. specially when using a GPS, which has very bad accuracy on vertical position

}
#endif

// get the altitude relative to the home position or the ekf origin
Copy link
Contributor

Choose a reason for hiding this comment

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

No longer correct

@peterbarker
Copy link
Contributor

When automatically set, home is now Always at the surface. (this was already assumed in copter anyway, and waypoints above home are currently invalid). get_alt_rel() also got updated to use ahrs.get_relative_position_D_home(posD);, which uses the home instead of ekf origin, and already falls back to baro, which made the baro code redundant.

This fixes my issues with running missions with depth measured from the water surface. specially when using a GPS, which has very bad accuracy on vertical position

I think what you're saying is that after this we no longer project the location onto the water surface when you are armed and get home. So if you're scooting along in depth-hold and suddenly get home then it's exactly where your vehicle is, not where you are but at the surface.

@peterbarker
Copy link
Contributor

@Williangalvani this is approved, you can merge it at will :-)

@Williangalvani Williangalvani merged commit 0de7a33 into ArduPilot:master Jan 26, 2026
69 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.

2 participants