From b255c7b370b2fcf74e90dc13879efeab885c316c Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 19 Apr 2017 15:29:17 +0900 Subject: [PATCH] AP_NavEKF: add setOrigin --- libraries/AP_NavEKF2/AP_NavEKF2.cpp | 2 +- libraries/AP_NavEKF2/AP_NavEKF2.h | 2 +- libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp | 2 +- libraries/AP_NavEKF2/AP_NavEKF2_core.h | 2 +- libraries/AP_NavEKF3/AP_NavEKF3.cpp | 2 +- libraries/AP_NavEKF3/AP_NavEKF3.h | 2 +- libraries/AP_NavEKF3/AP_NavEKF3_Control.cpp | 2 +- libraries/AP_NavEKF3/AP_NavEKF3_core.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/AP_NavEKF2/AP_NavEKF2.cpp b/libraries/AP_NavEKF2/AP_NavEKF2.cpp index d768c7da69..4afe7308bf 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2.cpp @@ -997,7 +997,7 @@ bool NavEKF2::getOriginLLH(struct Location &loc) const // All NED positions calculated by the filter will be relative to this location // The origin cannot be set if the filter is in a flight mode (eg vehicle armed) // Returns false if the filter has rejected the attempt to set the origin -bool NavEKF2::setOriginLLH(struct Location &loc) +bool NavEKF2::setOriginLLH(const Location &loc) { if (!core) { return false; diff --git a/libraries/AP_NavEKF2/AP_NavEKF2.h b/libraries/AP_NavEKF2/AP_NavEKF2.h index 8175c71a98..d78d0a2489 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2.h +++ b/libraries/AP_NavEKF2/AP_NavEKF2.h @@ -165,7 +165,7 @@ public: // All NED positions calcualted by the filter will be relative to this location // The origin cannot be set if the filter is in a flight mode (eg vehicle armed) // Returns false if the filter has rejected the attempt to set the origin - bool setOriginLLH(struct Location &loc); + bool setOriginLLH(const Location &loc); // return estimated height above ground level // return false if ground height is not being estimated. diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp index 7e4599477b..997c5f94c2 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Control.cpp @@ -403,7 +403,7 @@ bool NavEKF2_core::assume_zero_sideslip(void) const } // set the LLH location of the filters NED origin -bool NavEKF2_core::setOriginLLH(struct Location &loc) +bool NavEKF2_core::setOriginLLH(const Location &loc) { if (PV_AidingMode == AID_ABSOLUTE) { return false; diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_core.h b/libraries/AP_NavEKF2/AP_NavEKF2_core.h index 140039ebef..0dd1af4440 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_core.h +++ b/libraries/AP_NavEKF2/AP_NavEKF2_core.h @@ -159,7 +159,7 @@ public: // All NED positions calcualted by the filter will be relative to this location // The origin cannot be set if the filter is in a flight mode (eg vehicle armed) // Returns false if the filter has rejected the attempt to set the origin - bool setOriginLLH(struct Location &loc); + bool setOriginLLH(const Location &loc); // return estimated height above ground level // return false if ground height is not being estimated. diff --git a/libraries/AP_NavEKF3/AP_NavEKF3.cpp b/libraries/AP_NavEKF3/AP_NavEKF3.cpp index dc67fd8396..0dd2fecbaa 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3.cpp +++ b/libraries/AP_NavEKF3/AP_NavEKF3.cpp @@ -1001,7 +1001,7 @@ bool NavEKF3::getOriginLLH(struct Location &loc) const // All NED positions calculated by the filter will be relative to this location // The origin cannot be set if the filter is in a flight mode (eg vehicle armed) // Returns false if the filter has rejected the attempt to set the origin -bool NavEKF3::setOriginLLH(struct Location &loc) +bool NavEKF3::setOriginLLH(const Location &loc) { if (!core) { return false; diff --git a/libraries/AP_NavEKF3/AP_NavEKF3.h b/libraries/AP_NavEKF3/AP_NavEKF3.h index 3ad2304430..d89ab1fe7a 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3.h +++ b/libraries/AP_NavEKF3/AP_NavEKF3.h @@ -156,7 +156,7 @@ public: // All NED positions calcualted by the filter will be relative to this location // The origin cannot be set if the filter is in a flight mode (eg vehicle armed) // Returns false if the filter has rejected the attempt to set the origin - bool setOriginLLH(struct Location &loc); + bool setOriginLLH(const Location &loc); // return estimated height above ground level // return false if ground height is not being estimated. diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_Control.cpp b/libraries/AP_NavEKF3/AP_NavEKF3_Control.cpp index 941bc49dd6..50247f94f4 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_Control.cpp +++ b/libraries/AP_NavEKF3/AP_NavEKF3_Control.cpp @@ -431,7 +431,7 @@ bool NavEKF3_core::assume_zero_sideslip(void) const } // set the LLH location of the filters NED origin -bool NavEKF3_core::setOriginLLH(struct Location &loc) +bool NavEKF3_core::setOriginLLH(const Location &loc) { if (PV_AidingMode == AID_ABSOLUTE) { return false; diff --git a/libraries/AP_NavEKF3/AP_NavEKF3_core.h b/libraries/AP_NavEKF3/AP_NavEKF3_core.h index ba7572c5f3..9e16e7a966 100644 --- a/libraries/AP_NavEKF3/AP_NavEKF3_core.h +++ b/libraries/AP_NavEKF3/AP_NavEKF3_core.h @@ -165,7 +165,7 @@ public: // All NED positions calcualted by the filter will be relative to this location // The origin cannot be set if the filter is in a flight mode (eg vehicle armed) // Returns false if the filter has rejected the attempt to set the origin - bool setOriginLLH(struct Location &loc); + bool setOriginLLH(const Location &loc); // return estimated height above ground level // return false if ground height is not being estimated.