32 bool is_initialized =
false;
34 std::map<std::string, int> oem7_msg_id_map;
35 std::map<int, std::string> oem7_msg_name_map;
53 nh.
getParam(ns +
"/oem7_msgs", oem7_msg_id_map);
54 for(
const auto& msg_itr : oem7_msg_id_map)
56 ROS_DEBUG_STREAM(
"Oem7 Message: " << msg_itr.first <<
":" << msg_itr.second);
57 oem7_msg_name_map[msg_itr.second] = msg_itr.first;
60 is_initialized =
true;
65 return oem7_msg_id_map[msg_name];
70 return oem7_msg_name_map[msg_id];
79 const Oem7RawMessageIf::ConstPtr& raw_msg,
80 novatel_oem7_msgs::Oem7Header::Type& hdr
83 const Oem7MessageHeaderMem* hdr_mem =
reinterpret_cast<const Oem7MessageHeaderMem*
>(raw_msg->getMessageData(0));
85 hdr.message_id = hdr_mem->message_id;
86 hdr.message_type = hdr_mem->message_type;
87 hdr.sequence_number = hdr_mem->sequence;
88 hdr.time_status = hdr_mem->time_status;
89 hdr.gps_week_number = hdr_mem->gps_week;
90 hdr.gps_week_milliseconds = hdr_mem->gps_milliseconds;
94 const Oem7RawMessageIf::ConstPtr& raw_msg,
95 novatel_oem7_msgs::Oem7Header::Type& hdr
98 const Oem7MessgeShortHeaderMem* hdr_mem =
reinterpret_cast<const Oem7MessgeShortHeaderMem*
>(raw_msg->getMessageData(0));
100 hdr.message_id = hdr_mem->message_id;
101 hdr.message_type = novatel_oem7_msgs::Oem7Header::OEM7MSGTYPE_LOG;
102 hdr.sequence_number = 0;
104 hdr.gps_week_number = hdr_mem->gps_week;
105 hdr.gps_week_milliseconds = hdr_mem->gps_milliseconds;
121 const uint8_t* mem =
reinterpret_cast<const uint8_t*
>(insconfig) +
sizeof(INSCONFIG_FixedMem);
122 return *
reinterpret_cast<const uint32_t*
>(mem);
127 const uint8_t* mem =
reinterpret_cast<const uint8_t*
>(insconfig) +
128 sizeof(INSCONFIG_FixedMem) +
130 sizeof(INSCONFIG_TranslationMem) * idx;
132 return reinterpret_cast<const INSCONFIG_TranslationMem*
>(mem);
137 const uint8_t* mem =
reinterpret_cast<const uint8_t*
>(insconfig) +
138 sizeof(INSCONFIG_FixedMem) +
142 return *
reinterpret_cast<const uint32_t*
>(mem);
148 const uint8_t* mem =
reinterpret_cast<const uint8_t*
>(insconfig) +
149 sizeof(INSCONFIG_FixedMem) +
153 sizeof(INSCONFIG_RotationMem) * idx;
155 return reinterpret_cast<const INSCONFIG_RotationMem*
>(mem);
161 const uint8_t* mem =
reinterpret_cast<const uint8_t*
>(psrdop2) +
sizeof(PSRDOP2_FixedMem);
162 return *
reinterpret_cast<const uint32_t*
>(mem);
167 const uint8_t* mem =
reinterpret_cast<const uint8_t*
>(psrdop2) +
168 sizeof(PSRDOP2_FixedMem) +
170 sizeof(PSRDOP2_SystemMem) * idx;
172 return reinterpret_cast<const PSRDOP2_SystemMem*
>(mem);
static const std::vector< int > OEM7_NMEA_MSGIDS({GLMLA_OEM7_MSGID, GPALM_OEM7_MSGID, GPGGA_OEM7_MSGID, GPGGALONG_OEM7_MSGID, GPGLL_OEM7_MSGID, GPGRS_OEM7_MSGID, GPGSA_OEM7_MSGID, GPGST_OEM7_MSGID, GPGSV_OEM7_MSGID, GPHDT_OEM7_MSGID, GPHDTDUALANTENNA_MSGID, GPRMB_OEM7_MSGID, GPRMC_OEM7_MSGID, GPVTG_OEM7_MSGID, GPZDA_OEM7_MSGID})
const PSRDOP2_SystemMem * Get_PSRDOP2_System(const PSRDOP2_FixedMem *psrdop2, size_t idx)
bool isNMEAMessage(const Oem7RawMessageIf::ConstPtr &raw_msg)
size_t Get_INSCONFIG_NumTranslations(const INSCONFIG_FixedMem *insconfig)
const INSCONFIG_TranslationMem * Get_INSCONFIG_Translation(const INSCONFIG_FixedMem *insconfig, size_t idx)
int getOem7MessageId(const std::string &msg_name)
ROSCPP_DECL const std::string & getNamespace()
size_t Get_PSRDOP2_NumSystems(const PSRDOP2_FixedMem *psrdop2)
#define ROS_DEBUG_STREAM(args)
void getOem7ShortHeader(const Oem7RawMessageIf::ConstPtr &raw_msg, novatel_oem7_msgs::Oem7Header::Type &hdr)
size_t Get_INSCONFIG_NumRotations(const INSCONFIG_FixedMem *insconfig)
void getOem7Header(const Oem7RawMessageIf::ConstPtr &raw_msg, novatel_oem7_msgs::Oem7Header::Type &hdr)
void initializeOem7MessageUtil(ros::NodeHandle &nh)
bool getParam(const std::string &key, std::string &s) const
const std::string & getOem7MessageName(int msg_id)
const INSCONFIG_RotationMem * Get_INSCONFIG_Rotation(const INSCONFIG_FixedMem *insconfig, size_t idx)