22 explicit NotRMCException(
const std::string& context,
const std::string& details =
"") :
23 NmeaException(context,
"The sentence is not an RMC sentence", details) {}
60 RMC(std::string talkerId,
64 char latitudeDirection,
66 char longitudeDirection,
67 double speedOverGround,
68 double courseOverGround,
70 double magneticVariation,
71 char magneticVariationDirection,
79 RMC& operator=(
RMC&&) noexcept = default;
81 ~
RMC() override = default;
107 unsigned int getDate() const noexcept;
133 bool operator==(const
RMC& other) const noexcept;
136 unsigned int utcFix_{};
139 char latitudeDirection_{};
141 char longitudeDirection_{};
142 double speedOverGround_{};
143 double courseOverGround_{};
144 unsigned int date_{};
145 double magneticVariation_{};
146 char magneticVariationDirection_{};
147 char modeIndicator_{};
148 char navigationStatus_{};
152 RMC(Message0183 baseMessage,
156 char latitudeDirection,
158 char longitudeDirection,
159 double speedOverGround,
160 double courseOverGround,
162 double magneticVariation,
163 char magneticVariationDirection,
165 char navigationStatus
168 static std::unique_ptr<RMC> create(std::unique_ptr<Message0183> baseMessage);
169 static std::string composeRaw(
const std::string& talkerId,
unsigned int utcFix,
172 char latitudeDirection,
174 char longitudeDirection,
175 double speedOverGround,
176 double courseOverGround,
178 double magneticVariation,
179 char magneticVariationDirection,
181 char navigationStatus);
Defines a base class for NMEA messages, encapsulating common properties and behaviors.
Base exception class for all NMEA library errors.
Represents an NMEA 0183 sentence.
Registry for message type creators.
Factory for creating typed NMEA 0183 message objects from raw sentence strings.
Exception thrown when a sentence is not a valid RMC sentence.
NotRMCException(const std::string &context, const std::string &details="")
Construct a NotRMCException with context and optional details.
Represents a parsed NMEA 0183 RMC (Recommended Minimum Navigation Information) sentence.
double getCourseOverGround() const noexcept
Get course over ground in degrees.
char getLatitudeDirection() const noexcept
Get latitude hemisphere indicator ('N' or 'S').
char getMagneticVariationDirection() const noexcept
Get magnetic variation direction ('E' or 'W').
RMC(RMC &&) noexcept=default
double getMagneticVariation() const noexcept
Get magnetic variation in degrees.
double getSpeedOverGround() const noexcept
Get speed over ground in knots.
char getStatus() const noexcept
Get status indicator.
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
double getLatitude() const noexcept
Get latitude in decimal degrees.
char getModeIndicator() const noexcept
Get mode indicator character.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this RMC message.
unsigned int getUtcFix() const noexcept
Get UTC fix time in hhmmss[.ss] numeric form.
RMC(std::string talkerId, unsigned int utcFix, char status, double latitude, char latitudeDirection, double longitude, char longitudeDirection, double speedOverGround, double courseOverGround, unsigned int date, double magneticVariation, char magneticVariationDirection, char modeIndicator, char navigationStatus)
Construct an RMC message from individual field values.
double getLongitude() const noexcept
Get longitude in decimal degrees.
unsigned int getDate() const noexcept
Get date in ddmmyy numeric form.
char getNavigationStatus() const noexcept
Get navigation status character.
RMC & operator=(const RMC &)=default
char getLongitudeDirection() const noexcept
Get longitude hemisphere indicator ('E' or 'W').