Derived class for parsing RMC messages.
More...
#include <gprmc.hpp>
Derived class for parsing RMC messages.
- Date
- 28/09/20
Definition at line 79 of file gprmc.hpp.
◆ GprmcParser()
GprmcParser::GprmcParser |
( |
| ) |
|
|
inline |
◆ getMessageID()
const std::string GprmcParser::getMessageID |
( |
| ) |
const |
|
overridevirtual |
◆ parseASCII()
Parses one RMC message.
- Parameters
-
[in] | sentence | The RMC message to be parsed |
- Returns
- A ROS message pointer of ROS type GprmcMsg
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()[13] if anybody ever needs it. The status character can be 'A' (for Active) or 'V' (for Void), signaling whether the GPS was active when the positioning was made. If it is void, the GPS could not make a good positioning and you should thus ignore it. This usually occurs when the GPS is still searching for satellites. WasLastGPRMCValid() will return false in this case.
Reimplemented from BaseParser< GprmcMsg >.
Definition at line 57 of file gprmc.cpp.
◆ wasLastGPRMCValid()
bool GprmcParser::wasLastGPRMCValid |
( |
| ) |
const |
Tells us whether the last RMC message was valid/usable or not.
- Returns
- True if last RMC message was valid, false if not
E.g. if the status is V=Void, then this function will also return false.
Definition at line 168 of file gprmc.cpp.
◆ KNOTS_TO_MPS
constexpr double GprmcParser::KNOTS_TO_MPS = 0.5144444 |
|
static |
1 kt = 0.51444444444 mps (meters per second) Note that constexpr is needed for in-class initialization of static data members.
Definition at line 118 of file gprmc.hpp.
◆ MESSAGE_ID
const std::string GprmcParser::MESSAGE_ID = "$GPRMC" |
|
static |
Declares the string MESSAGE_ID.
Definition at line 113 of file gprmc.hpp.
◆ was_last_gprmc_valid_
bool GprmcParser::was_last_gprmc_valid_ |
|
private |
Declares a boolean representing whether or not the last GPRMC message was valid.
Definition at line 125 of file gprmc.hpp.
The documentation for this class was generated from the following files: