mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
Ref T180, isNull for CCoordinateGeodetic / situation
This commit is contained in:
@@ -112,6 +112,9 @@ namespace BlackMisc
|
|||||||
//! Get position
|
//! Get position
|
||||||
const Geo::CCoordinateGeodetic &getPosition() const { return m_position; }
|
const Geo::CCoordinateGeodetic &getPosition() const { return m_position; }
|
||||||
|
|
||||||
|
//! Position null?
|
||||||
|
bool isPositionNull() const { return m_position.isNull(); }
|
||||||
|
|
||||||
//! Set position
|
//! Set position
|
||||||
void setPosition(const Geo::CCoordinateGeodetic &position) { m_position = position; }
|
void setPosition(const Geo::CCoordinateGeodetic &position) { m_position = position; }
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ namespace BlackMisc
|
|||||||
QString geodeticHeightAsString() const { return this->geodeticHeight().toQString(true); }
|
QString geodeticHeightAsString() const { return this->geodeticHeight().toQString(true); }
|
||||||
|
|
||||||
//! Geodetic height null?
|
//! Geodetic height null?
|
||||||
bool isGeodeticHeightNull() { return this->geodeticHeight().isNull(); }
|
bool isGeodeticHeightNull() const { return this->geodeticHeight().isNull(); }
|
||||||
|
|
||||||
//! Great circle distance
|
//! Great circle distance
|
||||||
PhysicalQuantities::CLength calculateGreatCircleDistance(const ICoordinateGeodetic &otherCoordinate) const;
|
PhysicalQuantities::CLength calculateGreatCircleDistance(const ICoordinateGeodetic &otherCoordinate) const;
|
||||||
@@ -249,6 +249,12 @@ namespace BlackMisc
|
|||||||
//! Set normal vector
|
//! Set normal vector
|
||||||
void setNormalVector(double x, double y, double z) { m_x = x; m_y = y; m_z = z; }
|
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
|
//! Coordinate by WGS84 position data
|
||||||
static CCoordinateGeodetic fromWgs84(const QString &latitudeWgs84, const QString &longitudeWgs84, const Aviation::CAltitude &geodeticHeight = {});
|
static CCoordinateGeodetic fromWgs84(const QString &latitudeWgs84, const QString &longitudeWgs84, const Aviation::CAltitude &geodeticHeight = {});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user