Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::sense::IPosition Class Referenceabstract

Definition of Position interface. More...

Inheritance diagram for gem::sense::IPosition:
Collaboration diagram for gem::sense::IPosition:

Public Types

enum class  EProvider {
  Unknown , GPS , Network , SensorFusion ,
  MapMatching , Simulation
}
 Values that represent the type of position provider. More...
enum class  EFixQuality { Invalid , Inertial , Low , High }
 Values that represent position data quality. More...

Public Member Functions

EDataType getType () const override
 Get data type.
virtual LargeInteger getSatelliteTime () const =0
 Satellite timestamp, milliseconds since 1970.
LargeInteger getSatelliteTimestamp () const
 Satellite timestamp, milliseconds since 1970.
virtual EProvider getProvider () const =0
 Provider type: GPS, Network, Unknown.
virtual double getLatitude () const =0
 Geographical latitude.
virtual double getLongitude () const =0
 Geographical longitude.
Coordinates getCoordinates () const
 Latitude and longitude.
virtual double getAltitude () const =0
 Altitude above main sea level.
virtual double getSpeed () const =0
 Travel speed.
virtual double getSpeedAccuracy () const =0
 Travel speed accuracy.
virtual double getCourse () const =0
 The course of the movement.
virtual double getCourseAccuracy () const =0
 Course accuracy.
virtual double getHorizontalAccuracy () const =0
 Horizontal accuracy of position.
virtual double getVerticalAccuracy () const =0
 Vertical accuracy of position.
virtual EFixQuality getFixQuality () const =0
 Fix quality (whether this position is trustworthy); see the explanations at EFixQuality.
bool isValid () const
virtual bool hasCoordinates () const =0
 Query if this object has valid coordinates.
virtual bool hasAltitude () const =0
 Query if this object has altitude.
virtual bool hasSpeed () const =0
 Query if this object has speed.
virtual bool hasSpeedAccuracy () const =0
 Query if this object has speed accuracy.
virtual bool hasCourse () const =0
 Query if this object has course.
virtual bool hasCourseAccuracy () const =0
 Query if this object has course accuracy.
virtual bool hasHorizontalAccuracy () const =0
 Query if this object has horizontal accuracy.
virtual bool hasVerticalAccuracy () const =0
 Query if this object has vertical accuracy.
virtual LargeInteger getAcquisitionTimestamp () const =0
Time getTime () const
template<typename TDerivedType>
StrongPointer< TDerivedType > cast ()
 Cast to a derived type.

Static Public Member Functions

static bool isSameType (const IData *ptr)
 Check if a certain data element is of Position type.

Detailed Description

Definition of Position interface.

Member Enumeration Documentation

◆ EFixQuality

Values that represent position data quality.

Invalid means the position can not or should not be processed (for instance, invalid coordinates)

Inertial means position has resulted from inertial extrapolation; there is a GPS outage (e.g. tunnel)

Low means the position is valid but cannot be trusted because of bad GPS accuracy (e.g. urban canyon)

High means the position is valid and can be trusted (is recent and has a good accuracy)

Enumerator
Invalid 

The position data is invalid and should not be processed.

Inertial 

The position data is inertial.

Low 

The position is valid but has low accuracy and cannot be fully trusted.

High 

The position is valid and can be trusted due to good accuracy and recency.

◆ EProvider

Values that represent the type of position provider.

GPS means that the position comes from a GPS sensor.

Network means that the position comes from a network source, but not GPS.

Enumerator
Unknown 

The position provider is unknown.

GPS 

The position is obtained from a GPS sensor.

Network 

The position is obtained from a network-based source.

SensorFusion 

The position is improved using inertial sensors for better accuracy.

MapMatching 

The position is matched with a map for better accuracy.

Simulation 

The position data comes from a simulation environment.

Member Function Documentation

◆ cast()

template<typename TDerivedType>
StrongPointer< TDerivedType > gem::sense::IData::cast ( )
inlineinherited

Cast to a derived type.

Returns
The requested derived type as a shared pointer.

◆ getAcquisitionTimestamp()

virtual LargeInteger gem::sense::IData::getAcquisitionTimestamp ( ) const
pure virtualinherited
Returns
Acquisition timestamp in milliseconds since 1970 ( epoch )

Implemented in gem::sense::MockPosition.

◆ getAltitude()

virtual double gem::sense::IPosition::getAltitude ( ) const
pure virtual

Altitude above main sea level.

Returns
The altitude in meters.

Implemented in gem::sense::MockPosition.

◆ getCoordinates()

Coordinates gem::sense::IPosition::getCoordinates ( ) const
inline

Latitude and longitude.

If both values are equal to 0, the position is considered invalid

Returns
Coordinate pair, both latitude and longitude in degrees

◆ getCourse()

virtual double gem::sense::IPosition::getCourse ( ) const
pure virtual

The course of the movement.

Represents true heading, not magnetic heading.

0 means true north, 90 east, 180 south, 270 west.

A negative value (-1 by default) means the position has no course information.

Returns
The course in degrees.

Implemented in gem::sense::MockPosition.

◆ getCourseAccuracy()

virtual double gem::sense::IPosition::getCourseAccuracy ( ) const
pure virtual

Course accuracy.

Typical accuracy for consumer GPS is 25 degrees at high speeds.

Valid course accuracy should always be positive.

Returns
The course accuracy in degrees.

Implemented in gem::sense::MockPosition.

◆ getFixQuality()

virtual EFixQuality gem::sense::IPosition::getFixQuality ( ) const
pure virtual

Fix quality (whether this position is trustworthy); see the explanations at EFixQuality.

Returns
The fix quality.

Implemented in gem::sense::MockPosition.

◆ getHorizontalAccuracy()

virtual double gem::sense::IPosition::getHorizontalAccuracy ( ) const
pure virtual

Horizontal accuracy of position.

Typical accuracy for consumer GPS is 5-20 meters.

Valid position accuracy should always be positive.

Returns
The horizontal position accuracy in meters.

Implemented in gem::sense::MockPosition.

◆ getLatitude()

virtual double gem::sense::IPosition::getLatitude ( ) const
pure virtual

Geographical latitude.

From -90 to +90; positive on northern hemisphere

If value is out of the -90...90 range, the position is considered invalid.

Returns
The latitude in degrees

Implemented in gem::sense::MockPosition.

◆ getLongitude()

virtual double gem::sense::IPosition::getLongitude ( ) const
pure virtual

Geographical longitude.

From -180 to +180; positive on eastern hemisphere

If value is out of the -180...180 range, the position is considered invalid.

Returns
The longitude in degrees

Implemented in gem::sense::MockPosition.

◆ getProvider()

virtual EProvider gem::sense::IPosition::getProvider ( ) const
pure virtual

Provider type: GPS, Network, Unknown.

Returns
The provider type.

Implemented in gem::sense::MockPosition.

◆ getSatelliteTime()

virtual LargeInteger gem::sense::IPosition::getSatelliteTime ( ) const
pure virtual

Satellite timestamp, milliseconds since 1970.

Deprecated
Use instead getSatelliteTimestamp().

Timestamps are expected to increase monotonously for subsequent positions; data with timestamp from the past will be discarded.

Returns
The satellite time in milliseconds

Implemented in gem::sense::MockPosition.

◆ getSatelliteTimestamp()

LargeInteger gem::sense::IPosition::getSatelliteTimestamp ( ) const
inline

Satellite timestamp, milliseconds since 1970.

Timestamps are expected to increase monotonously for subsequent positions; data with timestamp from the past will be discarded.

Returns
The satellite time in milliseconds

◆ getSpeed()

virtual double gem::sense::IPosition::getSpeed ( ) const
pure virtual

Travel speed.

Valid speed information should always be non-negative.

A negative value (-1 by default) means the position has no speed information.

If car is going backwards, the course should change by 180, but the speed should still be non-negative.

Returns
The speed, in m/s.

Implemented in gem::sense::MockPosition.

◆ getSpeedAccuracy()

virtual double gem::sense::IPosition::getSpeedAccuracy ( ) const
pure virtual

Travel speed accuracy.

Typical accuracy for consumer GPS is 2 m/s at steady speed and high position accuracy.

Valid speed accuracy should always be positive.

Returns
The speed accuracy in m/s.

Implemented in gem::sense::MockPosition.

◆ getTime()

Time gem::sense::IData::getTime ( ) const
inlineinherited
Returns
System acquisition time

◆ getType()

EDataType gem::sense::IPosition::getType ( ) const
inlineoverridevirtual

Get data type.

Returns
The type.

Implements gem::sense::IData.

◆ getVerticalAccuracy()

virtual double gem::sense::IPosition::getVerticalAccuracy ( ) const
pure virtual

Vertical accuracy of position.

Valid position accuracy should always be positive.

Returns
The vertical position accuracy in meters.

Implemented in gem::sense::MockPosition.

◆ hasAltitude()

virtual bool gem::sense::IPosition::hasAltitude ( ) const
pure virtual

Query if this object has altitude.

Returns
True if altitude is available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ hasCoordinates()

virtual bool gem::sense::IPosition::hasCoordinates ( ) const
pure virtual

Query if this object has valid coordinates.

Returns
True if latitude and longitude are available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ hasCourse()

virtual bool gem::sense::IPosition::hasCourse ( ) const
pure virtual

Query if this object has course.

Returns
True if course is available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ hasCourseAccuracy()

virtual bool gem::sense::IPosition::hasCourseAccuracy ( ) const
pure virtual

Query if this object has course accuracy.

Returns
True if course accuracy is available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ hasHorizontalAccuracy()

virtual bool gem::sense::IPosition::hasHorizontalAccuracy ( ) const
pure virtual

Query if this object has horizontal accuracy.

Returns
True if horizontal accuracy is available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ hasSpeed()

virtual bool gem::sense::IPosition::hasSpeed ( ) const
pure virtual

Query if this object has speed.

Returns
True if speed is available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ hasSpeedAccuracy()

virtual bool gem::sense::IPosition::hasSpeedAccuracy ( ) const
pure virtual

Query if this object has speed accuracy.

Returns
True if speed accuracy is available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ hasVerticalAccuracy()

virtual bool gem::sense::IPosition::hasVerticalAccuracy ( ) const
pure virtual

Query if this object has vertical accuracy.

Returns
True if vertical accuracy is available and valid, false if not.

Implemented in gem::sense::MockPosition.

◆ isSameType()

bool gem::sense::IPosition::isSameType ( const IData * ptr)
inlinestatic

Check if a certain data element is of Position type.

Parameters
ptrThe other IData pointer to check against.
Returns
True if the examined data is of type Position or ImprovedPosition

◆ isValid()

bool gem::sense::IPosition::isValid ( ) const
inline
Returns
Whether this position is valid.