swift
|
Plane of same elevation, can be a single point or larger area (e.g. airport) More...
Public Types | |
enum | ColumnIndex { IndexRadius = CPropertyIndexRef::GlobalIndexCElevationPlane } |
Properties by index. | |
using | base_type = CCoordinateGeodetic |
Base type. | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
![]() | |
enum | ColumnIndex { IndexLatitude = CPropertyIndexRef::GlobalIndexICoordinateGeodetic , IndexLongitude , IndexLatitudeAsString , IndexLongitudeAsString , IndexGeodeticHeight , IndexGeodeticHeightAsString , IndexNormalVector } |
Properties by index. | |
Public Member Functions | |
CElevationPlane () | |
Default constructor. | |
CElevationPlane (const ICoordinateGeodetic &coordinate, const ICoordinateGeodetic &rangeCoordinate) | |
Plane at given coordinates with range to 2nd coordinate. | |
CElevationPlane (const ICoordinateGeodetic &coordinate, const physical_quantities::CLength &radius) | |
Plane at given coordinates with radius. | |
CElevationPlane (const ICoordinateGeodetic &coordinate, const aviation::CAltitude &altitude, const physical_quantities::CLength &radius) | |
Plane at given coordinates with radius and altitude. | |
CElevationPlane (const ICoordinateGeodetic &coordinate, double altitudeMSLft, const physical_quantities::CLength &radius) | |
Plane at given coordinates with radius and altitude. | |
CElevationPlane (double latDeg, double lngDeg, double altitudeMSLft, const physical_quantities::CLength &radius) | |
Plane at given coordinates with radius and altitude. | |
CElevationPlane (const CLatitude &lat, const CLongitude &lng, const aviation::CAltitude &altitude, const physical_quantities::CLength &radius) | |
Plane at given coordinates with radius and altitude. | |
const physical_quantities::CLength & | getRadius () const |
Radius. | |
const physical_quantities::CLength & | getRadiusOrMinimumRadius () const |
Radius or minimum radius. | |
void | setRadius (const physical_quantities::CLength &radius) |
Radius. | |
void | setRadiusOrMinimumRadius (const physical_quantities::CLength &radius) |
Radius or minimum CElevationPlane::singlePointRadius. | |
void | fixRadius () |
Set minimum radius if not having radius. | |
void | addAltitudeOffset (const physical_quantities::CLength &offset) |
Add offset to altitude. | |
void | switchAltitudeUnit (const physical_quantities::CLengthUnit &unit) |
Switch altitude unit. | |
const aviation::CAltitude & | getAltitudeIfWithinRadius (const ICoordinateGeodetic &coordinate) const |
Altitude when within radius, else null. | |
const aviation::CAltitude & | getAltitude () const |
Altitude (synonym for geodetic height) | |
const physical_quantities::CLengthUnit & | getAltitudeUnit () const |
Altitude (synonym for geodetic height) unit. | |
aviation::CAltitude | getAltitudeInUnit (const physical_quantities::CLengthUnit &unit) const |
Altitude (synonym for geodetic height) | |
double | getAltitudeValue (const physical_quantities::CLengthUnit &unit) const |
Altitude (synonym for geodetic height) | |
virtual bool | isNull () const |
Existing value? | |
bool | isWithinRange (const ICoordinateGeodetic &coordinate) const |
Check if elevation is within radius and can be used. More... | |
bool | isWithinRange (const ICoordinateGeodetic &coordinate, const physical_quantities::CLength &radius) const |
Check if elevation is within radius and can be used. | |
void | setSinglePointRadius () |
Treat as single point as obtained from simulator. | |
void | setMinorAirportRadius () |
Treat as elevation of a small airport. | |
void | setMajorAirportRadius () |
Treat as elevation of a small airport. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const CElevationPlane &elevationPlane) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
CCoordinateGeodetic () | |
Constructors from CCoordinateGeodetic. | |
CCoordinateGeodetic (const QVector3D &normal) | |
Constructors from CCoordinateGeodetic. | |
CCoordinateGeodetic (const std::array< double, 3 > &normalVector) | |
Constructors from CCoordinateGeodetic. | |
CCoordinateGeodetic (const CLatitude &latitude, const CLongitude &longitude) | |
Constructors from CCoordinateGeodetic. | |
CCoordinateGeodetic (const CLatitude &latitude, const CLongitude &longitude, const aviation::CAltitude &geodeticHeight) | |
Constructors from CCoordinateGeodetic. | |
CCoordinateGeodetic (double latitudeDegrees, double longitudeDegrees) | |
Constructors from CCoordinateGeodetic. | |
CCoordinateGeodetic (double latitudeDegrees, double longitudeDegrees, double heightFeet) | |
Constructors from CCoordinateGeodetic. | |
CCoordinateGeodetic (const ICoordinateGeodetic &coordinate) | |
Constructors from CCoordinateGeodetic. | |
![]() | |
CCoordinateGeodetic () | |
Default constructor (null coordinate) | |
CCoordinateGeodetic (const QVector3D &normal) | |
Constructor by normal vector. | |
CCoordinateGeodetic (const std::array< double, 3 > &normalVector) | |
Constructor by normal vector. | |
CCoordinateGeodetic (const CLatitude &latitude, const CLongitude &longitude) | |
Constructor by latitude/longitude, height is null. | |
CCoordinateGeodetic (const CLatitude &latitude, const CLongitude &longitude, const aviation::CAltitude &geodeticHeight) | |
Constructor by latitude/longitude/height (or altitude) | |
CCoordinateGeodetic (double latitudeDegrees, double longitudeDegrees) | |
Constructor by double values, but no geodetic height. | |
CCoordinateGeodetic (double latitudeDegrees, double longitudeDegrees, double heightFeet) | |
Constructor by values. | |
CCoordinateGeodetic (const ICoordinateGeodetic &coordinate) | |
Constructor by interface. | |
CCoordinateGeodetic | calculatePosition (const physical_quantities::CLength &distance, const physical_quantities::CAngle &relBearing) const |
Calculate a position in distance/bearing. | |
virtual CLatitude | latitude () const |
Latitude. More... | |
virtual CLongitude | longitude () const |
Longitude. More... | |
virtual const aviation::CAltitude & | geodeticHeight () const |
Height, ellipsoidal or geodetic height (used in GPS) More... | |
virtual QVector3D | normalVector () const |
Normal vector. More... | |
virtual std::array< double, 3 > | normalVectorDouble () const |
Normal vector with double precision. More... | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const CCoordinateGeodetic &compareValue) const |
Set property by index. More... | |
CCoordinateGeodetic & | switchUnit (const physical_quantities::CLengthUnit &unit) |
Switch unit of height. | |
void | setLatitude (const CLatitude &latitude) |
Set latitude. | |
void | setLatitudeFromWgs84 (const QString &wgs) |
Set latitude. | |
void | setLongitude (const CLongitude &longitude) |
Set longitude. | |
void | setLongitudeFromWgs84 (const QString &wgs) |
Set longitude. | |
void | setLatLong (const CLatitude &latitude, const CLongitude &longitude) |
Set latitude and longitude. | |
void | setLatLongFromWgs84 (const QString &latitude, const QString &longitude) |
Set latitude and longitude. | |
void | setGeodeticHeight (const aviation::CAltitude &height) |
Set height (ellipsoidal or geodetic height) | |
void | setGeodeticHeightToNull () |
Set height to NULL. | |
void | setNormalVector (const QVector3D &normal) |
Set normal vector. | |
void | setNormalVector (double x, double y, double z) |
Set normal vector. | |
void | setNormalVector (const std::array< double, 3 > &normalVector) |
Set normal vector. | |
int | clampVector () |
Clamp vector values if out [-1, 1]. | |
void | setNull () |
Set to null. | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
![]() | |
void | marshallToDbus (QDBusArgument &arg, Tags...) const |
Marshall without begin/endStructure, for when composed within another object. | |
void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
Unmarshall without begin/endStructure, for when composed within another object. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
QJsonObject | toJson () const |
Cast to JSON object. | |
QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
Convenience function JSON as string. | |
void | convertFromJson (const QJsonObject &json) |
Assign from JSON object. | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
![]() | |
QString | toQString (bool i18n=false) const |
Cast as QString. | |
std::string | toStdString (bool i18n=false) const |
To std string. | |
QString | stringForStreaming () const |
String for streaming operators. | |
![]() | |
CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
Update by variant map. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
Compare for index. | |
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
Is given variant equal to value of property index? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
![]() | |
ICoordinateGeodetic ()=default | |
Ctor. | |
virtual | ~ICoordinateGeodetic () |
Destructor. | |
ICoordinateGeodetic (const ICoordinateGeodetic &)=default | |
Copy constructor. | |
ICoordinateGeodetic & | operator= (const ICoordinateGeodetic &)=default |
Copy assignment operator. | |
bool | equalNormalVectorDouble (const std::array< double, 3 > &otherVector) const |
Is equal? Epsilon considered. | |
bool | equalNormalVectorDouble (const ICoordinateGeodetic &otherCoordinate) const |
Is equal, epsilon considered? | |
QString | latitudeAsString () const |
Latitude as string. | |
QString | longitudeAsString () const |
Longitude as string. | |
QString | geodeticHeightAsString () const |
Height as string. | |
bool | isGeodeticHeightNull () const |
Geodetic height null? | |
bool | hasMSLGeodeticHeight () const |
Geodetic height not null and aviation::CAltitude::MeanSeaLevel. | |
physical_quantities::CLength | calculateGreatCircleDistance (const ICoordinateGeodetic &otherCoordinate) const |
Great circle distance. | |
bool | isWithinRange (const ICoordinateGeodetic &otherCoordinate, const physical_quantities::CLength &range) const |
Object within range? | |
physical_quantities::CAngle | calculateBearing (const ICoordinateGeodetic &otherCoordinate) const |
Initial bearing. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateGeodetic &compareValue) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
bool | isNaNVector () const |
Check values. | |
bool | isNaNVectorDouble () const |
Check values. | |
bool | isInfVector () const |
Check values. | |
bool | isInfVectorDouble () const |
Check values. | |
bool | isValidVectorRange () const |
Check values. | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
![]() | |
QString | toQString (bool i18n=false) const |
Cast as QString. | |
std::string | toStdString (bool i18n=false) const |
To std string. | |
QString | stringForStreaming () const |
String for streaming operators. | |
Static Public Member Functions | |
static const physical_quantities::CLength & | singlePointRadius () |
Radius for single point. | |
static const physical_quantities::CLength & | minorAirportRadius () |
Radius for minor airport. | |
static const physical_quantities::CLength & | majorAirportRadius () |
Radius for major airport. | |
static const CElevationPlane & | null () |
NULL plane. | |
![]() | |
static CCoordinateGeodetic | fromWgs84 (const QString &latitudeWgs84, const QString &longitudeWgs84, const aviation::CAltitude &geodeticHeight={}) |
Coordinate by WGS84 position data. | |
static const CCoordinateGeodetic & | null () |
null coordinate | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
![]() | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QJsonObject &json) |
Get object from QJsonObject. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Get object from JSON string. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
Get object from JSON string. | |
![]() | |
static bool | isValidVector (const std::array< double, 3 > &v) |
Check values. | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
Additional Inherited Members | |
![]() | |
CValueObject ()=default | |
Default constructor. | |
CValueObject (const CValueObject &)=default | |
Copy constructor. | |
CValueObject & | operator= (const CValueObject &)=default |
Copy assignment operator. | |
~CValueObject ()=default | |
Destructor. | |
CEmpty ()=default | |
Inheriting constructors. | |
CEmpty (const CEmpty &)=default | |
Inheriting constructors. | |
![]() | |
CEmpty ()=default | |
Protected default constructor. | |
CEmpty (const CEmpty &)=default | |
Protected copy constructor. | |
CEmpty & | operator= (const CEmpty &)=default |
Protected copy assignment operator. | |
~CEmpty ()=default | |
Non-virtual protected destructor. | |
![]() | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled? | |
Plane of same elevation, can be a single point or larger area (e.g. airport)
Definition at line 17 of file elevationplane.h.
int swift::misc::geo::CElevationPlane::comparePropertyByIndex | ( | CPropertyIndexRef | index, |
const CElevationPlane & | elevationPlane | ||
) | const |
Compare for index.
Definition at line 163 of file elevationplane.cpp.
QString swift::misc::geo::CElevationPlane::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 15 of file elevationplane.cpp.
bool swift::misc::geo::CElevationPlane::isWithinRange | ( | const ICoordinateGeodetic & | coordinate | ) | const |
Check if elevation is within radius and can be used.
Definition at line 111 of file elevationplane.cpp.
QVariant swift::misc::geo::CElevationPlane::propertyByIndex | ( | CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 136 of file elevationplane.cpp.
void swift::misc::geo::CElevationPlane::setPropertyByIndex | ( | CPropertyIndexRef | index, |
const QVariant & | variant | ||
) |
Set property by index.
Definition at line 148 of file elevationplane.cpp.