13 explicit NotVWRException(
const std::string& context,
const std::string& details =
"") :
14 NmeaException(context,
"The sentence is not a VWR sentence", details) {}
49 VWR(std::string talkerId,
60 VWR& operator=(
VWR&&) noexcept = default;
62 ~
VWR() override = default;
123 bool operator==(const
VWR& other) const noexcept;
128 double speedKnots_{};
129 char speedKnotsUnit_{};
131 char speedMpsUnit_{};
133 char speedKphUnit_{};
137 VWR(Message0183 baseMessage,
148 static std::unique_ptr<VWR> create(std::unique_ptr<Message0183> baseMessage);
149 static std::string composeRaw(
const std::string& talkerId,
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 that is not a VWR sentence is processed as one.
NotVWRException(const std::string &context, const std::string &details="")
Represents a parsed NMEA 0183 VWR sentence (Relative Wind Speed and Angle).
VWR & operator=(const VWR &)=default
double getSpeedKph() const noexcept
Returns the wind speed in kilometers per hour.
double getWindAngle() const noexcept
Returns the wind direction magnitude in degrees (0–180).
char getSpeedKnotsUnit() const noexcept
Returns the knots unit indicator character.
VWR(std::string talkerId, double windAngle, char windSide, double speedKnots, double speedMps, double speedKph)
Construct a VWR sentence from individual field values.
char getSpeedMpsUnit() const noexcept
Returns the meters-per-second unit indicator character.
char getWindSide() const noexcept
Returns the wind direction side relative to the vessel.
std::string getStringContent(bool verbose) const noexcept override
Returns a human-readable string representation of the message content.
double getSpeedKnots() const noexcept
Returns the wind speed in knots.
std::unique_ptr< nmealib::Message > clone() const override
Creates a polymorphic deep copy of this Message0183.
double getSpeedMps() const noexcept
Returns the wind speed in meters per second.
char getSpeedKphUnit() const noexcept
Returns the kilometers-per-hour unit indicator character.
VWR(VWR &&) noexcept=default