diff --git a/libraries/AC_Fence/AC_Fence.cpp b/libraries/AC_Fence/AC_Fence.cpp index cf555877f7..f2f7bb6d9e 100644 --- a/libraries/AC_Fence/AC_Fence.cpp +++ b/libraries/AC_Fence/AC_Fence.cpp @@ -379,7 +379,7 @@ bool AC_Fence::check_destination_within_fence(const Location& loc) // Circular fence check if ((get_enabled_fences() & AC_FENCE_TYPE_CIRCLE)) { - if ((get_distance_cm(AP::ahrs().get_home(), loc) * 0.01f) > _circle_radius) { + if (AP::ahrs().get_home().get_distance(loc) > _circle_radius) { return false; } }