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

geofence: fix altitude change fence check #21806

Merged
merged 1 commit into from
Jul 7, 2023
Merged

Conversation

bresch
Copy link
Member

@bresch bresch commented Jul 5, 2023

Solved Problem

When asking for an altitude change only, the lat/lon is NAN and that makes the geofence check pass regardless of the change in altitude, allowing the drone to climb above the fence.

Solution

Set the lat/lon to the current position if NAN

Changelog Entry

For release notes:

Fix geofence when changing altitude through reposition.

Alternatives

Test coverage

SITL tests

When asking for an altitude change only, the current position needs to
be used, otherwise the geofence check is be skipped
@bresch bresch requested a review from dagar July 5, 2023 14:11
@bresch bresch self-assigned this Jul 5, 2023
@dagar dagar merged commit afa085d into main Jul 7, 2023
82 of 85 checks passed
@dagar dagar deleted the pr-geofence-alt-change branch July 7, 2023 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants