60 #ifndef NMEA_SYNC_BYTE_1 61 #define NMEA_SYNC_BYTE_1 0x24 63 #ifndef NMEA_SYNC_BYTE_2_1 65 #define NMEA_SYNC_BYTE_2_1 0x47 67 #ifndef NMEA_SYNC_BYTE_2_2 69 #define NMEA_SYNC_BYTE_2_2 0x50 71 #ifndef RESPONSE_SYNC_BYTE_1 73 #define RESPONSE_SYNC_BYTE_1 0x24 75 #ifndef RESPONSE_SYNC_BYTE_2 77 #define RESPONSE_SYNC_BYTE_2 0x52 79 #ifndef CARRIAGE_RETURN 81 #define CARRIAGE_RETURN 0x0D 85 #define LINE_FEED 0x0A 87 #ifndef RESPONSE_SYNC_BYTE_3 90 #define RESPONSE_SYNC_BYTE_3 0x3F 92 #ifndef CONNECTION_DESCRIPTOR_BYTE_1 95 #define CONNECTION_DESCRIPTOR_BYTE_1 0x49 97 #ifndef CONNECTION_DESCRIPTOR_BYTE_2 100 #define CONNECTION_DESCRIPTOR_BYTE_2 0x50 109 #include <boost/call_traits.hpp> 110 #include <boost/format.hpp> 111 #include <boost/math/constants/constants.hpp> 112 #include <boost/tokenizer.hpp> 122 #ifndef RX_MESSAGE_HPP 123 #define RX_MESSAGE_HPP 416 std::pair<uint16_t, TypeOfPVT_Enum> type_of_pvt_pairs[] = {
417 std::make_pair(static_cast<uint16_t>(0),
evNoPVT),
419 std::make_pair(static_cast<uint16_t>(2),
evDGPS),
420 std::make_pair(static_cast<uint16_t>(3),
evFixed),
421 std::make_pair(static_cast<uint16_t>(4),
evRTKFixed),
422 std::make_pair(static_cast<uint16_t>(5),
evRTKFloat),
423 std::make_pair(static_cast<uint16_t>(6),
evSBAS),
426 std::make_pair(static_cast<uint16_t>(10),
evPPP)};
428 type_of_pvt_map =
TypeOfPVTMap(type_of_pvt_pairs, type_of_pvt_pairs +
evPPP + 1);
431 std::pair<std::string, RxID_Enum> rx_id_pairs[] = {
438 std::make_pair(
"$GPGGA",
evGPGGA),
439 std::make_pair(
"$GPRMC",
evGPRMC),
440 std::make_pair(
"$GPGSA",
evGPGSA),
441 std::make_pair(
"$GPGSV",
evGPGSV),
442 std::make_pair(
"$GLGSV",
evGLGSV),
443 std::make_pair(
"$GAGSV",
evGAGSV),
450 std::make_pair(
"GPST",
evGPST),
453 std::make_pair(
"4001",
evDOP),
480 recvTimestamp_ = recvTimestamp;
489 bool isMessage(
const uint16_t ID);
492 bool isMessage(std::string ID);
501 bool isConnectionDescriptor();
504 bool isErrorMessage();
507 std::size_t messageSize();
510 std::string messageID();
531 uint16_t getBlockLength();
537 const uint8_t* getPosBuffer();
544 const uint8_t* getEndBuffer();
563 bool read(std::string message_key,
bool search =
false);
573 bool gnss_gpsfix_complete(uint32_t
id);
578 bool ins_gpsfix_complete(uint32_t
id);
583 bool gnss_navsatfix_complete(uint32_t
id);
588 bool ins_navsatfix_complete(uint32_t
id);
593 bool gnss_pose_complete(uint32_t
id);
598 bool ins_pose_complete(uint32_t
id);
603 bool diagnostics_complete(uint32_t
id);
608 bool ins_localization_complete(uint32_t
id);
646 uint32_t count_gpsfix_ = 0;
737 typedef std::unordered_map<std::string, RxID_Enum>
RxIDMap;
755 bool channelstatus_has_arrived_gpsfix_ =
false;
758 bool measepoch_has_arrived_gpsfix_ =
false;
761 bool dop_has_arrived_gpsfix_ =
false;
764 bool pvtgeodetic_has_arrived_gpsfix_ =
false;
768 bool poscovgeodetic_has_arrived_gpsfix_ =
false;
772 bool velcovgeodetic_has_arrived_gpsfix_ =
false;
775 bool atteuler_has_arrived_gpsfix_ =
false;
778 bool attcoveuler_has_arrived_gpsfix_ =
false;
781 bool insnavgeod_has_arrived_gpsfix_ =
false;
785 bool pvtgeodetic_has_arrived_navsatfix_ =
false;
789 bool poscovgeodetic_has_arrived_navsatfix_ =
false;
793 bool insnavgeod_has_arrived_navsatfix_ =
false;
796 bool pvtgeodetic_has_arrived_pose_ =
false;
800 bool poscovgeodetic_has_arrived_pose_ =
false;
804 bool atteuler_has_arrived_pose_ =
false;
808 bool attcoveuler_has_arrived_pose_ =
false;
812 bool insnavgeod_has_arrived_pose_ =
false;
816 bool receiverstatus_has_arrived_diagnostics_ =
false;
820 bool qualityind_has_arrived_diagnostics_ =
false;
824 bool insnavgeod_has_arrived_localization_ =
false;
845 PoseWithCovarianceStampedCallback();
879 bool allTrue(std::vector<bool>& vec, uint32_t
id);
917 #endif // for RX_MESSAGE_HPP
double theta_z
IMU orientation z-angle.
septentrio_gnss_driver::VelCovGeodetic VelCovGeodeticMsg
Derived class for parsing GSA messages.
Timestamp recvTimestamp_
Timestamp of receiving buffer.
uint32_t polling_period_rest
Polling period for all other SBF blocks and NMEA messages.
AttCovEulerMsg last_attcoveuler_
Since GPSFix etc. need AttCovEuler, incoming AttCovEuler blocks need to be stored.
std::string vehicle_frame_id
The frame ID of the vehicle frame.
const uint8_t * data_
Pointer to the buffer of messages.
PosCovGeodeticMsg last_poscovgeodetic_
Since NavSatFix etc. need PosCovGeodetic, incoming PosCovGeodetic blocks need to be stored...
septentrio_gnss_driver::AttCovEuler AttCovEulerMsg
bool publish_insnavcart
Whether or not to publish the INSNavCartMsg message.
bool publish_attcoveuler
Whether or not to publish the AttCovEulerMsg message.
float delta_e
Marker-to-ARP offset in the eastward direction.
bool publish_tf
Whether or not to publish the tf of the localization.
bool read_from_sbf_log
Whether or not we are reading from an SBF file.
std::string hw_flow_control
HW flow control.
uint32_t leap_seconds
The number of leap seconds that have been inserted into the UTC time.
bool publish_poscovgeodetic
PVTGeodeticMsg last_pvtgeodetic_
Since NavSatFix etc. need PVTGeodetic, incoming PVTGeodetic blocks need to be stored.
bool crc_check_
Whether the CRC check as evaluated in the read() method was successful or not is stored here...
double poi_x
INS POI offset in x-dimension.
uint32_t rx_input_corrections_tcp
std::string ntrip_password
Password for NTRIP service.
RxMessage(ROSaicNodeBase *node, Settings *settings)
Constructor of the RxMessage class.
std::string rtcm_version
RTCM version for NTRIP service (if Rx does not have internet)
std::string ant_serial_nr
Serial number of your particular Main antenna.
septentrio_gnss_driver::PVTGeodetic PVTGeodeticMsg
std::string rx_input_corrections_serial
Derived class for parsing GSV messages.
septentrio_gnss_driver::MeasEpoch MeasEpochMsg
bool ins_use_poi
INS solution reference point.
std::string login_user
Username for login.
ReceiverSetup last_receiversetup_
Since DiagnosticArray needs ReceiverSetup, incoming ReceiverSetup blocks need to be stored...
septentrio_gnss_driver::ExtSensorMeas ExtSensorMeasMsg
Declares the functions to compute and validate the CRC of a buffer.
DOP last_dop_
Since GPSFix needs DOP, incoming DOP blocks need to be stored.
Struct for the SBF block "DOP".
double vsm_x
INS velocity sensor lever arm x-offset.
double vsm_y
INS velocity sensor lever arm y-offset.
septentrio_gnss_driver::AttEuler AttEulerMsg
Struct for the SBF block "QualityInd".
std::string rx_serial_port
bool publish_gpst
Whether or not to publish the TimeReferenceMsg message with GPST.
double poi_y
INS POI offset in y-dimension.
bool activate_debug_log
Set logger level to DEBUG.
INSNavGeodMsg last_insnavgeod_
Since NavSatFix, GPSFix, Imu and Pose. need INSNavGeod, incoming INSNavGeod blocks need to be stored...
RxIDMap rx_id_map
All instances of the RxMessage class shall have access to the map without reinitializing it...
Derived class for parsing GGA messages.
double ant_lever_x
INS antenna lever arm x-offset.
void newData(Timestamp recvTimestamp, const uint8_t *data, std::size_t &size)
Put new data.
ChannelStatus last_channelstatus_
Since GPSFix needs ChannelStatus, incoming ChannelStatus blocks need to be stored.
std::string aux1_frame_id
The frame ID of the aux1 antenna.
Settings * settings_
Settings struct.
uint32_t polling_period_pvt
Polling period for PVT-related SBF blocks.
bool publish_insnavgeod
Whether or not to publish the INSNavGeodMsg message.
bool publish_gprmc
Whether or not to publish the RMC message.
bool rx_has_internet
Whether Rx has internet or not.
double poi_z
INS POI offset in z-dimension.
bool publish_gpgsa
Whether or not to publish the GSA message.
std::size_t count_
Number of unread bytes in the buffer.
Declares lower-level string utility functions used when parsing messages.
float delta_n
Marker-to-ARP offset in the northward direction.
std::string login_password
Password for login.
bool publish_poscovcartesian
Derived class for parsing RMC messages.
bool publish_measepoch
Whether or not to publish the MeasEpoch message.
TypeOfPVTMap type_of_pvt_map
All instances of the RxMessage class shall have access to the map without reinitializing it...
ROSaicNodeBase * node_
Pointer to the node.
bool publish_extsensormeas
Whether or not to publish the ExtSensorMeasMsg message.
double heading_offset
Attitude offset determination in longitudinal direction.
std::string poi_frame_id
The frame ID used in the header of published ROS Localization message if poi is used.
bool publish_gpgga
Whether or not to publish the GGA message.
std::string mountpoint
Mountpoint for NTRIP service.
std::size_t getCount()
Returns the count_ variable.
bool publish_localization
Whether or not to publish the LocalizationMsg message.
septentrio_gnss_driver::INSNavGeod INSNavGeodMsg
std::string ant_aux1_serial_nr
Serial number of your particular Aux1 antenna.
std::string septentrio_receiver_type
Septentrio receiver type, either "gnss" or "ins".
Struct for the SBF block "ChannelStatus".
bool publish_pvtcartesian
uint32_t baudrate
Baudrate.
bool read_from_pcap
Whether or not we are reading from a PCAP file.
bool publish_velcovgeodetic
double theta_x
IMU orientation x-angle.
bool publish_velsensorsetup
Whether or not to publish the VelSensorSetupMsg message.
std::string device
Device port.
bool lock_utm_zone
Wether the UTM zone of the localization is locked.
std::string caster
Hostname or IP address of the NTRIP caster to connect to.
VelCovGeodeticMsg last_velcovgeodetic_
Since GPSFix needs VelCovGeodetic, incoming VelCovGeodetic blocks need to be stored.
septentrio_gnss_driver::PosCovGeodetic PosCovGeodeticMsg
bool publish_pvtgeodetic
Whether or not to publish the PVTGeodeticMsg message.
std::size_t message_size_
Helps to determine size of response message / NMEA message / SBF block.
std::string ntrip_mode
Type of NTRIP connection.
std::string imu_frame_id
The frame ID used in the header of published ROS Imu message.
bool publish_exteventinsnavcart
Whether or not to publish the ExtEventINSNavCartMsg message.
bool publish_gpsfix
Whether or not to publish the GPSFixMsg message.
std::string vsm_frame_id
The frame ID of the velocity sensor.
ReceiverStatus last_receiverstatus_
Since DiagnosticArray needs ReceiverStatus, incoming ReceiverStatus blocks need to be stored...
std::string send_gga
Whether (and at which rate) or not to send GGA to the NTRIP caster.
bool publish_imu
Whether or not to publish the ImuMsg message.
bool publish_imusetup
Whether or not to publish the IMUSetupMsg message.
double ant_lever_y
INS antenna lever arm y-offset.
diagnostic_msgs::DiagnosticArray DiagnosticArrayMsg
float att_std_dev
Attitude deviation mask.
float pos_std_dev
Position deviation mask.
std::string ant_aux1_type
bool publish_exteventinsnavgeod
Whether or not to publish the ExtEventINSNavGeodMsg message.
Struct for the SBF block "ReceiverStatus".
nav_msgs::Odometry LocalizationUtmMsg
double vsm_z
INS velocity sensor lever arm z-offset.
MeasEpochMsg last_measepoch_
Since GPSFix needs MeasEpoch (for SNRs), incoming MeasEpoch blocks need to be stored.
double pitch_offset
Attitude offset determination in latitudinal direction.
bool publish_atteuler
Whether or not to publish the AttEulerMsg message.
std::string ntrip_version
NTRIP version for NTRIP service.
std::shared_ptr< std::string > fixedUtmZone_
Fixed UTM zone.
std::string datum
Datum to be used.
This class is the base class for abstraction.
double theta_y
IMU orientation y-angle.
Can search buffer for messages, read/parse them, and so on.
std::unordered_map< std::string, RxID_Enum > RxIDMap
AttEulerMsg last_atteuler_
Since GPSFix etc. need AttEuler, incoming AttEuler blocks need to be stored.
QualityInd last_qualityind_
Since DiagnosticArray needs QualityInd, incoming QualityInd blocks need to be stored.
Struct for the SBF block "ReceiverSetup".
bool publish_gpgsv
Whether or not to publish the GSV message.
uint32_t caster_port
IP port number of NTRIP caster to connect to.
bool publish_diagnostics
Whether or not to publish the DiagnosticArrayMsg message.
bool publish_pose
Whether or not to publish the PoseWithCovarianceStampedMsg message.
std::string ins_initial_heading
For heading computation when unit is powered-cycled.
ROSCPP_DECL bool search(const std::string &ns, const std::string &key, std::string &result)
std::unordered_map< uint16_t, TypeOfPVT_Enum > TypeOfPVTMap
sensor_msgs::NavSatFix NavSatFixMsg
gps_common::GPSFix GPSFixMsg
std::string ntrip_username
Username for NTRIP service.
bool use_ros_axis_orientation
ROS axis orientation, body: front-left-up, geographic: ENU.
geometry_msgs::PoseWithCovarianceStamped PoseWithCovarianceStampedMsg
bool multi_antenna
INS multiantenna.
bool publish_navsatfix
Whether or not to publish the NavSatFixMsg message.
std::string frame_id
The frame ID used in the header of every published ROS message.
ExtSensorMeasMsg last_extsensmeas_
Since Imu needs ExtSensorMeas, incoming ExtSensorMeas blocks need to be stored.
float delta_u
Marker-to-ARP offset in the upward direction.
double ant_lever_z
INS antenna lever arm z-offset.
bool found_
Whether or not a message has been found.