Public Member Functions | Static Public Attributes | Private Attributes | List of all members
GpggaParser Class Reference

Derived class for parsing GGA messages. More...

#include <gpgga.hpp>

Inheritance diagram for GpggaParser:
Inheritance graph

Public Member Functions

const std::string getMessageID () const override
 Returns the ASCII message ID, here "$GPGGA". More...
 GpggaParser ()
 Constructor of the class GpggaParser. More...
GpggaMsg parseASCII (const NMEASentence &sentence, const std::string &frame_id, bool use_gnss_time, Timestamp time_obj) noexcept(false) override
 Parses one GGA message. More...
bool wasLastGPGGAValid () const
 Tells us whether the last GGA message was valid or not. More...
- Public Member Functions inherited from BaseParser< GpggaMsg >
 BaseParser ()=default
 Default constructor of the class BaseParser. More...
virtual const std::string getMessageID () const=0
 Returns the ASCII message name. More...
GpggaMsg parseBinary (const SBFStructT &bin_msg) noexcept(false)
 Converts bin_msg into a ROS message pointer (e.g. nmea_msgs::GpggaPtr) and returns it. More...
virtual ~BaseParser ()=default
 Default destructor of the class BaseParser. More...

Static Public Attributes

static const std::string MESSAGE_ID = "$GPGGA"
 Declares the string MESSAGE_ID. More...

Private Attributes

bool was_last_gpgga_valid_
 Declares a boolean representing whether or not the last GPGGA message was valid. More...

Detailed Description

Derived class for parsing GGA messages.


Definition at line 79 of file gpgga.hpp.

Constructor & Destructor Documentation

◆ GpggaParser()

GpggaParser::GpggaParser ( )

Constructor of the class GpggaParser.

Definition at line 85 of file gpgga.hpp.

Member Function Documentation

◆ getMessageID()

const std::string GpggaParser::getMessageID ( ) const

Returns the ASCII message ID, here "$GPGGA".

The message ID

Definition at line 41 of file gpgga.cpp.

◆ parseASCII()

GpggaMsg GpggaParser::parseASCII ( const NMEASentence sentence,
const std::string &  frame_id,
bool  use_gnss_time,
Timestamp  time_obj 

Parses one GGA message.

[in]sentenceThe GGA message to be parsed
A ROS message pointer of ROS type GpggaMsg

Caution: Due to the occurrence of the throw keyword, this method parseASCII should be called within a try / catch framework... Note: This method is called from within the read() method of the RxMessage class by including the checksum part in the argument "sentence" here, though the checksum is never parsed: It would be sentence.get_body()[15] if anybody ever needs it.

Reimplemented from BaseParser< GpggaMsg >.

Definition at line 53 of file gpgga.cpp.

◆ wasLastGPGGAValid()

bool GpggaParser::wasLastGPGGAValid ( ) const

Tells us whether the last GGA message was valid or not.

True if last GGA message was valid, false if not

Definition at line 156 of file gpgga.cpp.

Member Data Documentation


const std::string GpggaParser::MESSAGE_ID = "$GPGGA"

Declares the string MESSAGE_ID.

Definition at line 111 of file gpgga.hpp.

◆ was_last_gpgga_valid_

bool GpggaParser::was_last_gpgga_valid_

Declares a boolean representing whether or not the last GPGGA message was valid.

Definition at line 118 of file gpgga.hpp.

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

Author(s): Tibor Dome
autogenerated on Fri Mar 10 2023 04:02:30