2 #include <marnav/nmea/io.hpp>
8 MARNAV_NMEA_DEFINE_SENTENCE_PARSE_FUNC(mss
)
10 constexpr const char * mss::TAG
;
13 : sentence(ID
, TAG
, talker_id::global_positioning_system
)
17 mss::mss(talker talk
, fields::const_iterator first
, fields::const_iterator last
)
18 : sentence(ID
, TAG
, talk
)
20 if (std::distance(first
, last
) != 5)
21 throw std::invalid_argument
{"invalid number of fields in mss"};
23 read(*(first
+ 0), signal_strength
);
24 read(*(first
+ 1), signal_to_noise_ratio
);
25 read(*(first
+ 2), beacon_frequency
);
26 read(*(first
+ 3), beacon_datarate
);
27 read(*(first
+ 4), unknown
);
30 std::vector
<std::string
> mss::get_data() const
32 return {format(signal_strength
, 2), format(signal_to_noise_ratio
, 2),
33 format(beacon_frequency
, 3), format(beacon_datarate
, 3), to_string(unknown
)};