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

double geofence vertices limit to 128 #18870

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ThomasRigi
Copy link
Member

Follow-up of conversation on slack with @dagar on the maximum number of geofence vertices: https://px4.slack.com/archives/C0V533X4N/p1638198388018100

Describe problem solved by this pull request
We have found 64 vertices to be a too restrictive limit for some long-distance missions we fly.

Describe your solution
Increase the limit to 128.

Test data / coverage
On a Pixhawk 4 equipped with a Here2 GPS. I used perf counters to check the elapsed time when checking if inside the polygon. Tested with 8, 63 and 127 vertices.
pixhawk 4 hold disarmed 127 vertices
pixhawk 4 hold disarmed 63 vertices
pixhawk 4 hold disarmed 8 vertices
The average time increases by about 20ms (+50%) for checking 127 vertices compared to 63. I think 60ms is still acceptable given that it's checked once every 200ms, but I'm not an expert on this.

Additional context
The open question is if the processor can handle to check up to 128 vertices. I only have Pixhawk 4 at my hand so I can't check for older processors.

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