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

Base class for GPS using NMEA sentances. More...

#include <NmeaGps.h>

+ Inheritance diagram for flair::sensor::NmeaGps:

Public Types

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

Public Member Functions

 NmeaGps (std::string name, NMEAFlags_t NMEAFlags)
 Constructor. More...
 
 NmeaGps (const core::IODevice *parent, std::string name)
 Constructor. More...
 
 ~NmeaGps ()
 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...
 
- 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...
 
bool IsReady (void) const
 is device ready 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...
 
gui::GroupBoxGetGroupBox (void) const
 Setup GroupBox. 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...
 
void SetIsReady (bool status)
 set is ready More...
 
virtual void UpdateFrom (const io_data *data)=0
 Update using provided datas. More...
 

Protected Attributes

NMEAFlags_t NMEAFlags
 

Detailed Description

Base class for GPS using NMEA sentances.

Member Enumeration Documentation

NMEA flags.

Enumerator
GGA 

GGA

VTG 

VTG

GST 

GST

GSA 

GSA

Constructor & Destructor Documentation

flair::sensor::NmeaGps::NmeaGps ( std::string  name,
NMEAFlags_t  NMEAFlags 
)

Constructor.

Construct a NmeaGps. It will be child of the FrameworkManager.

Parameters
namename
NMEAFlagsNMEA sentances to enable
flair::sensor::NmeaGps::NmeaGps ( const core::IODevice parent,
std::string  name 
)

Constructor.

Construct a NmeaGps.
This contructor must only be called for a simulated device.

Parameters
parentparent
namename
flair::sensor::NmeaGps::~NmeaGps ( )

Destructor.

Member Function Documentation

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

Get GPS datas.

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

Use default plot.

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

East plot.

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

North plot.

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

Up plot.

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

East velocity plot.

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

North velocity plot.

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

Main tab.

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

Setup Layout.

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

Plot tab.

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

Set reference for ENU coordinates.

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

Returns
fix quality
void flair::sensor::NmeaGps::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::NmeaGps::GetDatas ( core::GpsData **  gpsData) const
protected

Get GPS datas.

Parameters
gpsDataGPS datas
gui::GroupBox* flair::sensor::NmeaGps::GetGroupBox ( void  ) const
protected

Setup GroupBox.

Returns
setup GroupBox