Flair
Framework Libre Air
flair::sensor::Gps Class Reference

Base class for GPS. More...

#include <Gps.h>

+ Inheritance diagram for flair::sensor::Gps:

Public Types

enum  NMEAFlags_t { GGA = 0x01, VTG = 0x02, GST = 0x04 }
 NMEA flags. More...
 
- Public Types inherited from flair::core::Object
enum  color_t { Auto = 0, Red = 31, Green = 32, Orange = 33 }
 

Public Member Functions

 Gps (const core::FrameworkManager *parent, std::string name, NMEAFlags_t NMEAFlags)
 Constructor. More...
 
 ~Gps ()
 Destructor. More...
 
const core::GpsDataGetDatas (void) const
 Get GPS datas. More...
 
void UseDefaultPlot (void)
 Use default plot. More...
 
gui::DataPlot1DEPlot (void) const
 East plot. More...
 
gui::DataPlot1DNPlot (void) const
 North plot. More...
 
gui::DataPlot1DUPlot (void) const
 Up plot. More...
 
gui::DataPlot1DVEPlot (void) const
 East velocity plot. More...
 
gui::DataPlot1DVNPlot (void) const
 North velocity plot. More...
 
gui::TabWidgetGetTab (void) const
 Main tab. More...
 
gui::LayoutGetLayout (void) const
 Setup Layout. More...
 
gui::TabGetPlotTab (void) const
 Plot tab. More...
 
void SetRef (void)
 Set reference for ENU coordinates. More...
 
void GetENUPosition (core::Vector3D *point)
 Get ENU position. More...
 
- Public Member Functions inherited from flair::core::IODevice
 IODevice (const Object *parent, std::string name)
 Constructor. More...
 
virtual ~IODevice ()
 Destructor. More...
 
void AddDeviceToLog (const IODevice *device)
 Add an IODevice to the logs. More...
 
void AddDataToLog (const io_data *data)
 Add an io_data to the log. More...
 
void OutputToShMem (bool enabled)
 Send the output to a shared memory. More...
 
virtual DataType const & GetInputDataType () const
 
virtual DataType const & GetOutputDataType () const
 
- 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...
 

Protected Member Functions

void parseFrame (const char *frame, int frame_size)
 Parse a NMEA frame. More...
 
void GetDatas (core::GpsData **gpsData) const
 Get GPS datas. More...
 
- Protected Member Functions inherited from flair::core::IODevice
void ProcessUpdate (io_data *data)
 Process the childs of type IODevice, and log if needed. More...
 

Protected Attributes

NMEAFlags_t NMEAFlags
 
core::GeoCoordinateposition
 

Additional Inherited Members

- Public Attributes inherited from flair::core::IODevice
Time lastUpdate
 

Detailed Description

Base class for GPS.

Member Enumeration Documentation

NMEA flags.

Enumerator
GGA 

GGA

VTG 

VTG

GST 

GST

Constructor & Destructor Documentation

flair::sensor::Gps::Gps ( const core::FrameworkManager parent,
std::string  name,
NMEAFlags_t  NMEAFlags 
)

Constructor.

Construct a Gps.

Parameters
parentparent
namename
NMEAFlagsNMEA sentances to enable
flair::sensor::Gps::~Gps ( )

Destructor.

Member Function Documentation

const core::GpsData* flair::sensor::Gps::GetDatas ( void  ) const

Get GPS datas.

Returns
GpsData
void flair::sensor::Gps::UseDefaultPlot ( void  )

Use default plot.

gui::DataPlot1D* flair::sensor::Gps::EPlot ( void  ) const

East plot.

Returns
east plot
gui::DataPlot1D* flair::sensor::Gps::NPlot ( void  ) const

North plot.

Returns
north plot
gui::DataPlot1D* flair::sensor::Gps::UPlot ( void  ) const

Up plot.

Returns
up plot
gui::DataPlot1D* flair::sensor::Gps::VEPlot ( void  ) const

East velocity plot.

Returns
east velocity plot
gui::DataPlot1D* flair::sensor::Gps::VNPlot ( void  ) const

North velocity plot.

Returns
north velocity plot
gui::TabWidget* flair::sensor::Gps::GetTab ( void  ) const

Main tab.

Returns
main tab
gui::Layout* flair::sensor::Gps::GetLayout ( void  ) const

Setup Layout.

Returns
setup Layout
gui::Tab* flair::sensor::Gps::GetPlotTab ( void  ) const

Plot tab.

Returns
plot Tab
void flair::sensor::Gps::SetRef ( void  )

Set reference for ENU coordinates.

The actual position is used as reference to calculate ENU coordinates.

Returns
fix quality
void flair::sensor::Gps::GetENUPosition ( core::Vector3D point)

Get ENU position.

Parameters
pointto store position
void flair::sensor::Gps::parseFrame ( const char *  frame,
int  frame_size 
)
protected

Parse a NMEA frame.

This function must be called by the reimplemented class.
When a frame is parsed, GPS datas are filled.

Parameters
frameNMEA frame
frame_sizeframe size
void flair::sensor::Gps::GetDatas ( core::GpsData **  gpsData) const
protected

Get GPS datas.

Parameters
gpsDataGPS datas