24 explicit NotRMBException(
const std::string& context,
const std::string& details =
"") :
25 NmeaException(context,
"The sentence is not an RMB sentence", details) {}
65 RMB(std::string talkerId,
67 double crossTrackErrorNm,
68 char directionToSteer,
69 std::string originWaypointId,
70 std::string destinationWaypointId,
71 double destinationLatitude,
72 char destinationLatitudeHemisphere,
73 double destinationLongitude,
74 char destinationLongitudeHemisphere,
75 double rangeToDestinationNm,
76 double bearingToDestinationTrue,
77 double destinationClosingVelocityKnots,
79 std::optional<char> faaModeIndicator = std::nullopt
85 RMB& operator=(
RMB&&) noexcept = default;
87 ~
RMB() override = default;
143 bool operator==(const
RMB& other) const noexcept;
147 double crossTrackErrorNm_{};
148 char directionToSteer_{};
149 std::string originWaypointId_{};
150 std::string destinationWaypointId_{};
151 double destinationLatitude_{};
152 char destinationLatitudeHemisphere_{};
153 double destinationLongitude_{};
154 char destinationLongitudeHemisphere_{};
155 double rangeToDestinationNm_{};
156 double bearingToDestinationTrue_{};
157 double destinationClosingVelocityKnots_{};
158 char arrivalStatus_{};
159 std::optional<char> faaModeIndicator_{};
163 RMB(Message0183 baseMessage,
165 double crossTrackErrorNm,
166 char directionToSteer,
167 std::string originWaypointId,
168 std::string destinationWaypointId,
169 double destinationLatitude,
170 char destinationLatitudeHemisphere,
171 double destinationLongitude,
172 char destinationLongitudeHemisphere,
173 double rangeToDestinationNm,
174 double bearingToDestinationTrue,
175 double destinationClosingVelocityKnots,
177 std::optional<char> faaModeIndicator
180 static std::unique_ptr<RMB> create(std::unique_ptr<Message0183> baseMessage);
181 static std::string composeRaw(
const std::string& talkerId,
183 double crossTrackErrorNm,
184 char directionToSteer,
185 const std::string& originWaypointId,
186 const std::string& destinationWaypointId,
187 double destinationLatitude,
188 char destinationLatitudeHemisphere,
189 double destinationLongitude,
190 char destinationLongitudeHemisphere,
191 double rangeToDestinationNm,
192 double bearingToDestinationTrue,
193 double destinationClosingVelocityKnots,
195 std::optional<char> faaModeIndicator);
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 RMB sentence.
NotRMBException(const std::string &context, const std::string &details="")
Construct a NotRMBException with context and optional details.
Represents a parsed NMEA 0183 RMB (Recommended Minimum Navigation Information) sentence.
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
double getBearingToDestinationTrue() const noexcept
Get bearing to destination in true degrees.
char getArrivalStatus() const noexcept
Get arrival status ('A' arrived, 'V' not arrived).
RMB(std::string talkerId, char status, double crossTrackErrorNm, char directionToSteer, std::string originWaypointId, std::string destinationWaypointId, double destinationLatitude, char destinationLatitudeHemisphere, double destinationLongitude, char destinationLongitudeHemisphere, double rangeToDestinationNm, double bearingToDestinationTrue, double destinationClosingVelocityKnots, char arrivalStatus, std::optional< char > faaModeIndicator=std::nullopt)
Construct an RMB message from individual field values.
RMB & operator=(const RMB &)=default
char getDestinationLatitudeHemisphere() const noexcept
Get destination latitude hemisphere indicator ('N' or 'S').
std::string getDestinationWaypointId() const noexcept
Get destination waypoint identifier.
char getDestinationLongitudeHemisphere() const noexcept
Get destination longitude hemisphere indicator ('E' or 'W').
std::string getOriginWaypointId() const noexcept
Get origin waypoint identifier.
char getDirectionToSteer() const noexcept
Get direction to steer ('L' or 'R').
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this RMB message.
std::optional< char > getFaaModeIndicator() const noexcept
Get optional FAA mode indicator (NMEA 2.3+).
bool hasFaaModeIndicator() const noexcept
Return whether FAA mode indicator is present.
double getCrossTrackErrorNm() const noexcept
Get cross track error in nautical miles.
double getDestinationLongitude() const noexcept
Get destination waypoint longitude in decimal degrees.
double getDestinationClosingVelocityKnots() const noexcept
Get destination closing velocity in knots.
double getDestinationLatitude() const noexcept
Get destination waypoint latitude in decimal degrees.
RMB(RMB &&) noexcept=default
double getRangeToDestinationNm() const noexcept
Get range to destination in nautical miles.
char getStatus() const noexcept
Get status indicator ('A' active, 'V' invalid).