Ref T180, isNull for CCoordinateGeodetic / situation

This commit is contained in:
Klaus Basan
2017-11-04 03:58:16 +01:00
parent e5261c3e99
commit 656d86a4ef
2 changed files with 10 additions and 1 deletions

View File

@@ -112,6 +112,9 @@ namespace BlackMisc
//! Get position
const Geo::CCoordinateGeodetic &getPosition() const { return m_position; }
//! Position null?
bool isPositionNull() const { return m_position.isNull(); }
//! Set position
void setPosition(const Geo::CCoordinateGeodetic &position) { m_position = position; }

View File

@@ -93,7 +93,7 @@ namespace BlackMisc
QString geodeticHeightAsString() const { return this->geodeticHeight().toQString(true); }
//! Geodetic height null?
bool isGeodeticHeightNull() { return this->geodeticHeight().isNull(); }
bool isGeodeticHeightNull() const { return this->geodeticHeight().isNull(); }
//! Great circle distance
PhysicalQuantities::CLength calculateGreatCircleDistance(const ICoordinateGeodetic &otherCoordinate) const;
@@ -249,6 +249,12 @@ namespace BlackMisc
//! Set normal vector
void setNormalVector(double x, double y, double z) { m_x = x; m_y = y; m_z = z; }
//! Set to null
void setNull() { this->setNormalVector(0, 0, 0); }
//! Is null?
bool isNull() const { return m_x == 0 && m_y == 0 && m_z == 0; }
//! Coordinate by WGS84 position data
static CCoordinateGeodetic fromWgs84(const QString &latitudeWgs84, const QString &longitudeWgs84, const Aviation::CAltitude &geodeticHeight = {});