From 1948d067e485de5f9006c9d1017b86613533f6bd Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 18 Jan 2018 14:37:52 +0100 Subject: [PATCH] Ref T225, set height to NULL --- src/blackmisc/geo/coordinategeodetic.cpp | 6 ++++++ src/blackmisc/geo/coordinategeodetic.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/blackmisc/geo/coordinategeodetic.cpp b/src/blackmisc/geo/coordinategeodetic.cpp index 7b71d2b3c..0d35fd7a9 100644 --- a/src/blackmisc/geo/coordinategeodetic.cpp +++ b/src/blackmisc/geo/coordinategeodetic.cpp @@ -247,6 +247,12 @@ namespace BlackMisc m_z = latitude.sin(); } + void CCoordinateGeodetic::setGeodeticHeightToNull() + { + static const CAltitude na = CAltitude(0, CAltitude::MeanSeaLevel, CLengthUnit::nullUnit()); + this->setGeodeticHeight(na); + } + CCoordinateGeodetic &CCoordinateGeodetic::switchUnit(const CLengthUnit &unit) { m_geodeticHeight.switchUnit(unit); diff --git a/src/blackmisc/geo/coordinategeodetic.h b/src/blackmisc/geo/coordinategeodetic.h index a8872e74e..e73e17215 100644 --- a/src/blackmisc/geo/coordinategeodetic.h +++ b/src/blackmisc/geo/coordinategeodetic.h @@ -243,6 +243,9 @@ namespace BlackMisc //! Set height (ellipsoidal or geodetic height) void setGeodeticHeight(const Aviation::CAltitude &height) { m_geodeticHeight = height; } + //! Set height to NULL + void setGeodeticHeightToNull(); + //! Set normal vector void setNormalVector(const QVector3D &normal) { m_x = normal.x(); m_y = normal.y(); m_z = normal.z(); }