ROSaic
|
Defines a class that can deal with a buffer of size bytes_transferred that is handed over from async_read_some. More...
#include <cstddef>
#include <sstream>
#include <map>
#include <cmath>
#include <vector>
#include <boost/tokenizer.hpp>
#include <boost/call_traits.hpp>
#include <boost/format.hpp>
#include <boost/math/constants/constants.hpp>
#include <ros/ros.h>
#include <rosaic/Gpgga.h>
#include <rosaic/Gprmc.h>
#include <rosaic/Gpgsa.h>
#include <rosaic/Gpgsv.h>
#include <sensor_msgs/NavSatFix.h>
#include <sensor_msgs/TimeReference.h>
#include <geometry_msgs/PoseWithCovarianceStamped.h>
#include <gps_common/GPSFix.h>
#include <rosaic/parsers/nmea_parsers/gpgga.hpp>
#include <rosaic/parsers/nmea_parsers/gprmc.hpp>
#include <rosaic/parsers/nmea_parsers/gpgsa.hpp>
#include <rosaic/parsers/nmea_parsers/gpgsv.hpp>
#include <rosaic/crc/crc.h>
#include <rosaic/parsers/string_utilities.h>
#include <rosaic/parsers/nmea_sentence.hpp>
#include <rosaic/PVTCartesian.h>
#include <rosaic/PVTGeodetic.h>
#include <rosaic/PosCovCartesian.h>
#include <rosaic/PosCovGeodetic.h>
#include <rosaic/AttEuler.h>
#include <rosaic/AttCovEuler.h>
#include <rosaic/packed_structs/sbf_structs.hpp>
Go to the source code of this file.
Data Structures | |
class | io_comm_mosaic::mosaicMessage |
Can search buffer for messages, read/parse them, and so on. More... | |
Namespaces | |
io_comm_mosaic | |
Macros | |
#define | SBF_SYNC_BYTE_1 0x24 |
0x24 is ASCII for $ - 1st byte in each message More... | |
#define | SBF_SYNC_BYTE_2 0x40 |
0x40 is ASCII for @ - 2nd byte to indicate SBF block More... | |
#define | NMEA_SYNC_BYTE_1 0x24 |
0x24 is ASCII for $ - 1st byte in each message More... | |
#define | NMEA_SYNC_BYTE_2_1 0x47 |
0x47 is ASCII for G - 2nd byte to indicate NMEA-type ASCII message More... | |
#define | NMEA_SYNC_BYTE_2_2 0x50 |
0x50 is ASCII for P - 2nd byte to indicate proprietary ASCII message More... | |
#define | RESPONSE_SYNC_BYTE_1 0x24 |
0x24 is ASCII for $ - 1st byte in each response from mosaic More... | |
#define | RESPONSE_SYNC_BYTE_2 0x52 |
0x52 is ASCII for R (for "Response") - 2nd byte in each response from mosaic More... | |
#define | CARRIAGE_RETURN 0x0D |
0x0D is ASCII for "Carriage Return", i.e. "Enter" More... | |
#define | LINE_FEED 0x0A |
0x0A is ASCII for "Line Feed", i.e. "New Line" More... | |
#define | RESPONSE_SYNC_BYTE_3 0x3F |
0x3F is ASCII for ? - 3rd byte in the response message from mosaic in case the command was invalid More... | |
#define | CONNECTION_DESCRIPTOR_BYTE_1 0x49 |
0x49 is ASCII for I - 1st character of connection descriptor sent by mosaic after initiating TCP connection More... | |
#define | CONNECTION_DESCRIPTOR_BYTE_2 0x50 |
0x50 is ASCII for P - 2nd character of connection descriptor sent by mosaic after initiating TCP connection More... | |
#define | MOSAIC_MESSAGE_HPP |
Enumerations | |
enum | NMEA_ID_Enum { evNavSatFix, evGPSFix, evPoseWithCovarianceStamped, evGPGGA, evGPRMC, evGPGSA, evGPGSV, evGLGSV, evGAGSV, evPVTCartesian, evPVTGeodetic, evPosCovCartesian, evPosCovGeodetic, evAttEuler, evAttCovEuler, evGPST, evChannelStatus, evMeasEpoch, evDOP, evVelCovGeodetic } |
Functions | |
static void | StringValues_Initialize () |
ros::Time | io_comm_mosaic::TimestampSBF (uint32_t TOW, bool use_GNSS) |
Calculates the timestamp, in the Unix Epoch time format, either using the TOW as transmitted with the SBF block, or using the current time. More... | |
Variables | |
bool | use_GNSS_time |
bool | read_cd |
Whether or not we still want to read the connection descriptor, which we only want in the very beginning to know whether it is IP10, IP11 etc. More... | |
uint32_t | cd_count |
Since after SSSSSSSSSSS we need to wait for second connection descriptor, we have to count the connection descriptors. More... | |
uint32_t | leap_seconds |
The number of leap seconds that have been inserted into the UTC time. More... | |
std::vector< int32_t > | svid_pvt |
static std::map< std::string, NMEA_ID_Enum > | StringValues |
Defines a class that can deal with a buffer of size bytes_transferred that is handed over from async_read_some.
Definition in file mosaicMessage.hpp.
#define CARRIAGE_RETURN 0x0D |
0x0D is ASCII for "Carriage Return", i.e. "Enter"
Definition at line 89 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::SegmentEnd().
#define CONNECTION_DESCRIPTOR_BYTE_1 0x49 |
0x49 is ASCII for I - 1st character of connection descriptor sent by mosaic after initiating TCP connection
Definition at line 101 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsConnectionDescriptor().
#define CONNECTION_DESCRIPTOR_BYTE_2 0x50 |
0x50 is ASCII for P - 2nd character of connection descriptor sent by mosaic after initiating TCP connection
Definition at line 105 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsConnectionDescriptor().
#define LINE_FEED 0x0A |
0x0A is ASCII for "Line Feed", i.e. "New Line"
Definition at line 93 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::SegmentEnd().
#define MOSAIC_MESSAGE_HPP |
Definition at line 148 of file mosaicMessage.hpp.
#define NMEA_SYNC_BYTE_1 0x24 |
0x24 is ASCII for $ - 1st byte in each message
Definition at line 69 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsNMEA().
#define NMEA_SYNC_BYTE_2_1 0x47 |
0x47 is ASCII for G - 2nd byte to indicate NMEA-type ASCII message
Definition at line 73 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsNMEA().
#define NMEA_SYNC_BYTE_2_2 0x50 |
0x50 is ASCII for P - 2nd byte to indicate proprietary ASCII message
Definition at line 77 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsNMEA().
#define RESPONSE_SYNC_BYTE_1 0x24 |
0x24 is ASCII for $ - 1st byte in each response from mosaic
Definition at line 81 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsErrorMessage(), and io_comm_mosaic::mosaicMessage::IsResponse().
#define RESPONSE_SYNC_BYTE_2 0x52 |
0x52 is ASCII for R (for "Response") - 2nd byte in each response from mosaic
Definition at line 85 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsErrorMessage(), and io_comm_mosaic::mosaicMessage::IsResponse().
#define RESPONSE_SYNC_BYTE_3 0x3F |
0x3F is ASCII for ? - 3rd byte in the response message from mosaic in case the command was invalid
Definition at line 97 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsErrorMessage().
#define SBF_SYNC_BYTE_1 0x24 |
0x24 is ASCII for $ - 1st byte in each message
Definition at line 61 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsSBF().
#define SBF_SYNC_BYTE_2 0x40 |
0x40 is ASCII for @ - 2nd byte to indicate SBF block
Definition at line 65 of file mosaicMessage.hpp.
Referenced by io_comm_mosaic::mosaicMessage::IsSBF().
enum NMEA_ID_Enum |
Since switch only works with int (yet NMEA message IDs are strings), we need enum. Note drawbacks: No variable can have a name which is already in some enumeration, enums are not type safe etc..
Definition at line 163 of file mosaicMessage.hpp.
|
static |
Definition at line 167 of file mosaicMessage.hpp.
References evAttCovEuler, evAttEuler, evChannelStatus, evDOP, evGAGSV, evGLGSV, evGPGGA, evGPGSA, evGPGSV, evGPRMC, evGPSFix, evGPST, evMeasEpoch, evNavSatFix, evPosCovCartesian, evPosCovGeodetic, evPoseWithCovarianceStamped, evPVTCartesian, evPVTGeodetic, evVelCovGeodetic, and io_comm_mosaic::TimestampSBF().
Referenced by rosaic_node::ROSaicNode::ROSaicNode().
uint32_t cd_count |
Since after SSSSSSSSSSS we need to wait for second connection descriptor, we have to count the connection descriptors.
Definition at line 640 of file rosaic_node.cpp.
Referenced by main(), and io_comm_mosaic::mosaicMessage::Next().
uint32_t leap_seconds |
The number of leap seconds that have been inserted into the UTC time.
Definition at line 619 of file rosaic_node.cpp.
Referenced by main(), and io_comm_mosaic::TimestampSBF().
bool read_cd |
Whether or not we still want to read the connection descriptor, which we only want in the very beginning to know whether it is IP10, IP11 etc.
Definition at line 636 of file rosaic_node.cpp.
Referenced by io_comm_mosaic::mosaicMessage::Found(), main(), io_comm_mosaic::mosaicMessage::Next(), and io_comm_mosaic::mosaicMessage::Search().
|
static |
Static keyword makes them visible only to the code of this particular .cpp file (and those that import it), which helps to avoid global namespace pollution. One also receives "multiple definition of 'StringValues'" error without the static keyword.
Definition at line 166 of file mosaicMessage.hpp.
std::vector<int32_t> svid_pvt |
Referenced by io_comm_mosaic::mosaicMessage::GPSFixCallback().
bool use_GNSS_time |
If true, the ROS message headers' unix time field is constructed from the TOW (in the SBF case) and UTC (in the NMEA case) data. If false, times are constructed within the driver via time(NULL) of the <ctime> library.
Definition at line 607 of file rosaic_node.cpp.
Referenced by io_comm_mosaic::mosaicMessage::Read().