Flair
Framework Libre Air
flair::core::GpsData Class Reference

Class defining gps datas. More...

#include <GpsData.h>

+ Inheritance diagram for flair::core::GpsData:

Classes

class  Type
 

Public Types

enum  PlotableData_t {
  Latitude, Longitude, Altitude, NumberOfSatellites,
  FixQuality, East, North, Up,
  EastVelocity, NorthVelocity, Pdop, Hdop,
  Vdop
}
 Datas wich can be plotted in a DataPlot1D. More...
 
enum  FixQuality_t : uint8_t {
  FixQuality_t::Invalid = 0, FixQuality_t::Gps = 1, FixQuality_t::DGps = 2, FixQuality_t::Pps = 3,
  FixQuality_t::Rtk = 4, FixQuality_t::RtkFloat = 5, FixQuality_t::Estimated = 6, FixQuality_t::Manual = 7,
  FixQuality_t::Simulation = 8
}
 Fix qualty indicators. More...
 
- Public Types inherited from flair::core::Object
enum  color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 }
 

Public Member Functions

 GpsData (const Object *parent, std::string name="", int n=1)
 Constructor. More...
 
 ~GpsData ()
 Destructor. More...
 
IODataElementElement (PlotableData_t data_type) const
 Element. More...
 
void GetLla (double &latitude, double &longitude, float &altitude) const
 Get latitude, longitude and altitude. More...
 
void SetLla (double latitude, double longitude, float altitude)
 Set latitude, longitude and altitude. More...
 
void GetEnu (float &east, float &north, float &up) const
 Get east, north and up. More...
 
void SetEnu (float east, float north, float up)
 Set east, north and up. More...
 
void GetVelocity (float &eastVelocity, float &northVelocity) const
 Get east and north velocities. More...
 
void SetVelocity (float eastVelocity, float northVelocity)
 Set east and north velocities. More...
 
uint8_t GetNumberOfSatellites (void) const
 Get number of satellites. More...
 
void SetNumberOfSatellites (uint8_t numberOfSatellites)
 Set number of satellites. More...
 
FixQuality_t GetFixQuality (void) const
 Get fix quality. More...
 
void SetFixQuality (FixQuality_t fixQuality)
 Set fix quality. More...
 
void GetDop (float &pDop, float &hDop, float &vDop) const
 Get dilution of precision. More...
 
void SetDop (float pDop, float hDop, float vDop)
 Set dilution of precision. More...
 
Type const & GetDataType () const
 
- Public Member Functions inherited from flair::core::io_data
 io_data (const Object *parent, std::string name, int n)
 Constructor. More...
 
virtual ~io_data ()
 Destructor. More...
 
void SetDataTime (Time time)
 Set data time. More...
 
Time DataTime (void) const
 Data time. More...
 
const io_dataPrev (int n) const
 Previous data. More...
 
- Public Member Functions inherited from flair::core::Mutex
 Mutex (const Object *parent, std::string name="")
 Constructor. More...
 
 ~Mutex ()
 Destructor. More...
 
void GetMutex (void) const
 GetMutex. More...
 
void ReleaseMutex (void) const
 ReleaseMutex. More...
 
- Public Member Functions inherited from flair::core::Object
 Object (const Object *parent=NULL, std::string name="", std::string type="")
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
std::string ObjectName (void) const
 Name. More...
 
std::string ObjectType (void) const
 Type. More...
 
const ObjectParent (void) const
 Parent. More...
 
std::vector< const Object * > * TypeChilds (void) const
 Childs of the same type. More...
 
std::vector< const Object * > * Childs (void) const
 Childs. More...
 
void Information (const char *function, int line, const char *format,...) const
 Formatted information. More...
 
void Warning (const char *function, const char *format,...) const
 Formatted warning. More...
 
void Error (const char *function, const char *format,...) const
 Formatted error. More...
 
bool ErrorOccured (bool recursive=true) const
 Has an errror occured? More...
 

Additional Inherited Members

- Protected Member Functions inherited from flair::core::io_data
void AppendLogDescription (std::string description, DataType const &datatype)
 Specify the description of the reimplemented class data's. More...
 
void SetPtrToCircle (void **ptr)
 Set the datas to circle. More...
 
- Protected Attributes inherited from flair::core::io_data
io_dataprev
 Pointer to previous data. More...
 

Detailed Description

Class defining gps datas.

GPS datas consist of

Member Enumeration Documentation

Datas wich can be plotted in a DataPlot1D.

Enumerator
Latitude 

latitude in degrees

Longitude 

longitude in degrees

Altitude 

altitude

NumberOfSatellites 

number of satellites

FixQuality 

fix quality

East 

east

North 

north

Up 

up

EastVelocity 

east velocity

NorthVelocity 

north velocity

enum flair::core::GpsData::FixQuality_t : uint8_t
strong

Fix qualty indicators.

Enumerator
Invalid 

invalid

Gps 

Gps

DGps 

Differential Gps

Pps 

Pps

Rtk 

RTK

RtkFloat 

RTK float

Estimated 

Estimated

Manual 

Manual

Simulation 

Simulation

Constructor & Destructor Documentation

flair::core::GpsData::GpsData ( const Object parent,
std::string  name = "",
int  n = 1 
)

Constructor.

Construct an io_data representing GPS datas.

Parameters
parentparent
namename
nnumber of samples
flair::core::GpsData::~GpsData ( )

Destructor.

Member Function Documentation

IODataElement* flair::core::GpsData::Element ( PlotableData_t  data_type) const

Element.

Get a pointer to a specific element. This pointer can be used for plotting.

Parameters
data_typedata type
Returns
pointer to the element
void flair::core::GpsData::GetLla ( double &  latitude,
double &  longitude,
float &  altitude 
) const

Get latitude, longitude and altitude.

This method is mutex protected.

Parameters
latitudelatitude
longitudelongitude
altitudealtitude
void flair::core::GpsData::SetLla ( double  latitude,
double  longitude,
float  altitude 
)

Set latitude, longitude and altitude.

This method is mutex protected.

Parameters
latitudelatitude
longitudelongitude
altitudealtitude
void flair::core::GpsData::GetEnu ( float &  east,
float &  north,
float &  up 
) const

Get east, north and up.

This method is mutex protected.

Parameters
easteast
northnorth
upup
void flair::core::GpsData::SetEnu ( float  east,
float  north,
float  up 
)

Set east, north and up.

This method is mutex protected.

Parameters
easteast
northnorth
upup
void flair::core::GpsData::GetVelocity ( float &  eastVelocity,
float &  northVelocity 
) const

Get east and north velocities.

This method is mutex protected.

Parameters
eastVelocityeast velocity
northVelocitynorth velocity
void flair::core::GpsData::SetVelocity ( float  eastVelocity,
float  northVelocity 
)

Set east and north velocities.

This method is mutex protected.

Parameters
eastVelocityeast velocity
northVelocitynorth velocity
uint8_t flair::core::GpsData::GetNumberOfSatellites ( void  ) const

Get number of satellites.

Returns
number of satellites
void flair::core::GpsData::SetNumberOfSatellites ( uint8_t  numberOfSatellites)

Set number of satellites.

Parameters
numberOfSatellitesnumber of satellites
FixQuality_t flair::core::GpsData::GetFixQuality ( void  ) const

Get fix quality.

Returns
fix quality
void flair::core::GpsData::SetFixQuality ( FixQuality_t  fixQuality)

Set fix quality.

Parameters
fixQualityfix quality
void flair::core::GpsData::GetDop ( float &  pDop,
float &  hDop,
float &  vDop 
) const

Get dilution of precision.

This method is mutex protected.

Parameters
pDopdilution of precision
hDophorizontal dilution of precision
vDopvertical dilution of precision
void flair::core::GpsData::SetDop ( float  pDop,
float  hDop,
float  vDop 
)

Set dilution of precision.

This method is mutex protected.

Parameters
pDopdilution of precision
hDophorizontal dilution of precision
vDopvertical dilution of precision