2 #include <boost/make_shared.hpp> 19 const size_t EXPECTED_LEN = 3;
21 if (sentence.body.size() != EXPECTED_LEN)
23 std::stringstream error;
24 error <<
"Expected GPHDT length = " 25 << EXPECTED_LEN <<
", " 26 <<
"actual length = " << sentence.body.size();
30 novatel_gps_msgs::GphdtPtr
msg = boost::make_shared<novatel_gps_msgs::Gphdt>();
31 msg->message_id = sentence.body[0];
36 msg->heading = heading;
43 msg->t = sentence.body[2];
const std::string GetMessageName() const override
static const std::string MESSAGE_NAME
novatel_gps_msgs::GphdtPtr ParseAscii(const NmeaSentence &sentence) noexcept(false) override
Converts sentence into a ROS message pointer and returns it.
bool ToDouble(const std::string &string, double &value)
uint32_t GetMessageId() const override