SeaTalk: message 54 added.
[marnav.git] / src / marnav / seatalk / message_10.hpp
blob78e5e12e7c7469c89574a90dc5539993c976498d
1 #ifndef __SEATALK__MESSAGE_10__HPP__
2 #define __SEATALK__MESSAGE_10__HPP__
4 #include <marnav/seatalk/message.hpp>
6 namespace marnav
8 namespace seatalk
11 /// @brief Apparent Wind Angle
12 ///
13 /// @code
14 /// 10 01 XX YY
15 ///
16 /// Apparent Wind Angle: XXYY/2 degrees right of bow Used for autopilots
17 /// Vane Mode (WindTrim)
18 /// @endcode
19 ///
20 /// Corresponding NMEA sentence: MWV
21 ///
22 class message_10 : public message
24 public:
25 constexpr static const message_id ID = message_id::apparent_wind_angle;
27 message_10();
28 message_10(const message_10 &) = default;
29 message_10 & operator=(const message_10 &) = default;
31 virtual raw get_data() const override;
33 static std::unique_ptr<message> parse(const raw & data);
35 private:
36 uint16_t angle; // 1/10th of degrees right of bow
38 public:
39 uint16_t get_angle() const noexcept { return angle; }
41 void set_angle(uint16_t t) noexcept { angle = t; }
46 #endif