-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Fence margin direction #31009
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
base: master
Are you sure you want to change the base?
Fence margin direction #31009
Conversation
4ee5ef8
to
a228884
Compare
a228884
to
abea932
Compare
this feature looks like a good step towards resolving the long-term issue of RTL not working if the vehicle starts outside the fence. The only concern is around the Polygon_closest_distance_point() method and whether it requires more CPU especially on fences with lots of points |
It's not a breach is it? This seems to be calculating the distance to the nearest fence from the current location. There is no breach. I think it needs a different name maybe get_nearest_direction_NED()? |
Yes this method is probably O(n^2), it's polynomial for sure, which means it won't scale. This is why the OA library does these calculations in a kind of background thread. The code is also fundamentally the same as the code in the OA library. Should this not be a call into the existing OA library code? |
fd1c1f0
to
07f9e78
Compare
needs to pass CI :-) |
07f9e78
to
c1ef3ce
Compare
c1ef3ce
to
826b609
Compare
… Polygon_closest_distance_point()
add get_breach_direction_NED() to return direction to closest breach
329041d
to
88d7048
Compare
optionally return last breach position
9807390
to
ef0431e
Compare
This provides a new function get_breach_direction_NED() which gives the direction of the closest fence matching the provided bitmask, akin to what get_breach_distance() does.