Skip to content

Commit

Permalink
AP_Common: allow guided altitude in terrain frame
Browse files Browse the repository at this point in the history
  • Loading branch information
timtuxworth committed Aug 24, 2024
1 parent 126467a commit 75493e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Common/Location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ bool Location::get_alt_cm(AltFrame desired_frame, int32_t &ret_alt_cm) const
#if AP_TERRAIN_AVAILABLE
AP_Terrain *terrain = AP::terrain();
if (terrain == nullptr) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Location:get_alt_cm terrain == nullptr");
return false;
}
if (!terrain->height_amsl(*this, alt_terr_cm)) {
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "Location:get_alt_cm height_amsl false");
return false;
}
// convert terrain alt to cm
Expand Down

0 comments on commit 75493e2

Please sign in to comment.