From c085b713acd1f36526a95bc6fa8fae666767c225 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 4 Feb 2022 13:45:50 +1100 Subject: [PATCH] AP_Common: correct comments on get_alt_cm and change_alt_frame --- libraries/AP_Common/Location.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Common/Location.h b/libraries/AP_Common/Location.h index 3b61215ac3..f3eb1b9a3c 100644 --- a/libraries/AP_Common/Location.h +++ b/libraries/AP_Common/Location.h @@ -37,16 +37,20 @@ public: void set_alt_cm(int32_t alt_cm, AltFrame frame); // get altitude (in cm) in the desired frame - // returns false on failure to get altitude in the desired frame which - // can only happen if the original frame or desired frame is above-terrain + // returns false on failure to get altitude in the desired frame which can only happen if the original frame or desired frame is: + // - above-terrain and the terrain database can't supply terrain height amsl + // - above-home and home is not set + // - above-origin and origin is not set bool get_alt_cm(AltFrame desired_frame, int32_t &ret_alt_cm) const WARN_IF_UNUSED; // get altitude frame AltFrame get_alt_frame() const; // converts altitude to new frame - // returns false on failure to convert which can only happen if - // the original frame or desired frame is above-terrain + // returns false on failure to convert which can only happen if the original frame or desired frame is: + // - above-terrain and the terrain database can't supply terrain height amsl + // - above-home and home is not set + // - above-origin and origin is not set bool change_alt_frame(AltFrame desired_frame); // get position as a vector (in cm) from origin (x,y only or x,y,z)