Class GprmcParser

Inheritance Relationships

Base Type

Class Documentation

class GprmcParser : public BaseParser<GprmcMsg>

Derived class for parsing RMC messages.

Date

28/09/20

Public Functions

inline GprmcParser()

Constructor of the class GprmcParser.

virtual const std::string getMessageID() const override

Returns the ASCII message ID, here “$GPRMC”.

Returns:

The message ID

virtual GprmcMsg parseASCII(const NMEASentence &sentence, const std::string &frame_id, bool use_gnss_time, Timestamp time_obj) noexcept(false) override

Parses one RMC message.

Parameters:

sentence[in] The RMC message to be parsed

Returns:

A ROS message pointer of ROS type GprmcMsg

bool wasLastGPRMCValid() const

Tells us whether the last RMC message was valid/usable or not.

E.g. if the status is V=Void, then this function will also return false.

Returns:

True if last RMC message was valid, false if not

Public Static Attributes

static const std::string MESSAGE_ID

Declares the string MESSAGE_ID.

static constexpr double KNOTS_TO_MPS = 0.5144444

1 kt = 0.51444444444 mps (meters per second) Note that constexpr is needed for in-class initialization of static data members.