ITS
GPSProvider Class Reference

#include <GPSProvider.h>

Inheritance diagram for GPSProvider:
[legend]
Collaboration diagram for GPSProvider:
[legend]

Public Slots

void execute ()
 execute Execute the GPS client. I.e. wait for GPS signal and feed GPS attributes. If no GPS signal or if GPS data are wrong, default position, speed and heading are feed. More...
 

Public Member Functions

 GPSProvider ()
 GPSProvider GPSProvider constructor. More...
 
 ~GPSProvider ()
 
void getPosition ()
 getPosition Get the position from GPSProvider signal. (c.f. execute()). More...
 
- Public Member Functions inherited from FakeGPSProvider
 FakeGPSProvider (QMutex *mutex=nullptr)
 FakeGPSProvider FakeGPSProvider constructor. More...
 
 ~FakeGPSProvider ()
 
ParameterGPSdata ()
 data GPS data getter. More...
 
quint64 timestamp ()
 timestamp Timestamp getter. More...
 
FakeGPSProvideroperator= (const FakeGPSProvider &other)
 operator= Affectation operator. More...
 
void changePosition (qint32 deltaLatitude, qint32 deltaLongitude, qint8 deltaAltitude)
 changePosition Change the GPS position. More...
 
void changeHeading (quint16 heading)
 changeHeading Change the heading. More...
 
void changeSpeed (quint16 speed)
 changeSpeed Change the speed. More...
 

Private Member Functions

AltitudeConfidence_t getAltitudeConfidence (int epv)
 getAltitudeConfidence Translate altitude uncertainty from GPS signal to ETSI's altitude confidence. More...
 
void checkConstraints ()
 checkConstraints Check the constraints and change to correct values. More...
 

Additional Inherited Members

- Signals inherited from FakeGPSProvider
void positionChanged ()
 positionChanged Signal used when GPS position change. More...
 
- Protected Member Functions inherited from FakeGPSProvider
quint64 getTimestamp ()
 getTimestamp Get ITS timestamp from system timestamp. More...
 
- Protected Attributes inherited from FakeGPSProvider
QMutex * m_mutex
 
ParameterGPS m_data
 
QDateTime startIts
 

Detailed Description

Definition at line 14 of file GPSProvider.h.

Constructor & Destructor Documentation

◆ GPSProvider()

GPSProvider::GPSProvider ( )

GPSProvider GPSProvider constructor.

Definition at line 9 of file GPSProvider.cpp.

◆ ~GPSProvider()

GPSProvider::~GPSProvider ( )

~GPSProvider GPSProvider destructor.

Definition at line 13 of file GPSProvider.cpp.

Member Function Documentation

◆ checkConstraints()

void GPSProvider::checkConstraints ( )
private

checkConstraints Check the constraints and change to correct values.

Definition at line 148 of file GPSProvider.cpp.

References constr_Heading(), constr_ReferencePosition(), constr_Speed(), and FakeGPSProvider::data().

Referenced by getPosition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute

void GPSProvider::execute ( )
slot

execute Execute the GPS client. I.e. wait for GPS signal and feed GPS attributes. If no GPS signal or if GPS data are wrong, default position, speed and heading are feed.

Definition at line 143 of file GPSProvider.cpp.

References getPosition().

Here is the call graph for this function:

◆ getAltitudeConfidence()

AltitudeConfidence_t GPSProvider::getAltitudeConfidence ( int  epv)
private

getAltitudeConfidence Translate altitude uncertainty from GPS signal to ETSI's altitude confidence.

Parameters
epvVertical position uncertainty.
Returns
The corresponding altitude confidence.

Definition at line 108 of file GPSProvider.cpp.

References AltitudeConfidence_alt_000_01, AltitudeConfidence_alt_000_02, AltitudeConfidence_alt_000_05, AltitudeConfidence_alt_000_10, AltitudeConfidence_alt_000_20, AltitudeConfidence_alt_000_50, AltitudeConfidence_alt_001_00, AltitudeConfidence_alt_002_00, AltitudeConfidence_alt_005_00, AltitudeConfidence_alt_010_00, AltitudeConfidence_alt_020_00, AltitudeConfidence_alt_050_00, AltitudeConfidence_alt_100_00, AltitudeConfidence_alt_200_00, AltitudeConfidence_outOfRange, and AltitudeConfidence_unavailable.

Referenced by getPosition().

Here is the caller graph for this function:

◆ getPosition()

void GPSProvider::getPosition ( )

getPosition Get the position from GPSProvider signal. (c.f. execute()).

Definition at line 17 of file GPSProvider.cpp.

References ReferencePosition::altitude, Altitude::altitudeConfidence, Altitude::altitudeValue, checkConstraints(), getAltitudeConfidence(), FakeGPSProvider::getTimestamp(), Heading::headingConfidence, HeadingConfidence_outOfRange, HeadingConfidence_unavailable, Heading::headingValue, ReferencePosition::latitude, ReferencePosition::longitude, ParameterGPS::m_address, FakeGPSProvider::m_data, ParameterGPS::m_heading, ParameterGPS::m_port, ParameterGPS::m_referencePosition, ParameterGPS::m_speed, make_Heading(), make_ReferencePosition(), make_Speed(), FakeGPSProvider::positionChanged(), Speed::speedConfidence, SpeedConfidence_outOfRange, SpeedConfidence_unavailable, and Speed::speedValue.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: