diff --git a/libraries/AC_WPNav/AC_WPNav.cpp b/libraries/AC_WPNav/AC_WPNav.cpp index 3a2313fffe..e277b0dc31 100644 --- a/libraries/AC_WPNav/AC_WPNav.cpp +++ b/libraries/AC_WPNav/AC_WPNav.cpp @@ -173,7 +173,8 @@ bool AC_WPNav::set_wp_destination(const Location& destination) return set_wp_destination(dest_neu, terr_alt); } -bool AC_WPNav::get_wp_destination(Location& destination) { +bool AC_WPNav::get_wp_destination(Location& destination) const +{ Vector3f dest = get_wp_destination(); if (!AP::ahrs().get_origin(destination)) { return false; diff --git a/libraries/AC_WPNav/AC_WPNav.h b/libraries/AC_WPNav/AC_WPNav.h index ddbcbdeaad..be9ee8193c 100644 --- a/libraries/AC_WPNav/AC_WPNav.h +++ b/libraries/AC_WPNav/AC_WPNav.h @@ -104,7 +104,7 @@ public: // returns wp location using location class. // returns false if unable to convert from target vector to global // coordinates - bool get_wp_destination(Location& destination); + bool get_wp_destination(Location& destination) const; /// set_wp_destination waypoint using position vector (distance from ekf origin in cm) /// terrain_alt should be true if destination.z is a desired altitude above terrain