SeaTalk: message 54 added.
[marnav.git] / src / marnav / seatalk / message_51.hpp
blob5a6724e77cf558015bb88ac1a55179b5717fa101
1 #ifndef __SEATALK__MESSAGE_51__HPP__
2 #define __SEATALK__MESSAGE_51__HPP__
4 #include <marnav/seatalk/message.hpp>
5 #include <marnav/geo/angle.hpp>
7 namespace marnav
9 namespace seatalk
12 /// @brief Position Longitude
13 ///
14 /// @code
15 /// 51 Z2 XX YY YY
16 ///
17 /// LON position:
18 /// XX degrees, (YYYY & 0x7FFF)/100 minutes
19 /// MSB of Y = YYYY & 0x8000 = East if set, West if cleared
20 /// Z = 0xA or 0x0 (reported for Raystar 120 GPS),
21 /// meaning unknown Stable filtered position, for raw data use command 58
22 /// @endcode
23 ///
24 /// Corresponding NMEA sentences: RMC, GAA, GLL
25 ///
26 class message_51 : public message
28 public:
29 constexpr static const message_id ID = message_id::position_longitude;
31 message_51();
32 message_51(const message_51 &) = default;
33 message_51 & operator=(const message_51 &) = default;
35 virtual raw get_data() const override;
37 static std::unique_ptr<message> parse(const raw & data);
39 private:
40 geo::longitude lon;
42 public:
43 const geo::longitude & get_lon() const noexcept { return lon; }
45 void set_lon(const geo::longitude & t) noexcept { lon = t; }
50 #endif