2 #include <marnav/nmea/io.hpp>
8 MARNAV_NMEA_DEFINE_SENTENCE_PARSE_FUNC(pgrmm
)
10 constexpr const char * pgrmm::TAG
;
13 : sentence(ID
, TAG
, talker_id::none
)
17 pgrmm::pgrmm(talker talk
, fields::const_iterator first
, fields::const_iterator last
)
18 : sentence(ID
, TAG
, talk
)
20 if (std::distance(first
, last
) != 1)
21 throw std::invalid_argument
{"invalid number of fields in pgrmm"};
23 read(*(first
+ 0), map_datum
);
26 std::vector
<std::string
> pgrmm::get_data() const
28 return {to_string(map_datum
)};
31 void pgrmm::set_map_datum(const std::string
& t
) noexcept
33 // in a regular NMEA sentence, there is only 72 characters for the map datum
37 map_datum
= t
.substr(0, 72);