Main MRPT website > C++ reference for MRPT 1.9.9
CGPSInterface.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #ifndef CGPSInterface_H
11 #define CGPSInterface_H
12 
14 #include <mrpt/poses/CPoint3D.h>
15 #include <mrpt/comms/CSerialPort.h>
21 #include <mrpt/obs/obs_frwds.h>
22 
23 namespace mrpt
24 {
25 namespace hwdrivers
26 {
27 /** A class capable of reading GPS/GNSS/GNSS+IMU receiver data, from a serial
28  * port or from any input stream,
29  * and \b parsing the ASCII/binary stream into indivual messages \b stored in
30  * mrpt::obs::CObservationGPS objects.
31  *
32  * Typical input streams are serial ports or raw GPS log files. By default, the
33  * serial port selected by CGPSInterface::setSerialPortName()
34  * or as set in the configuration file will be open upon call to
35  * CGenericSensor::initialize().
36  * Alternatively, an external stream can be bound with
37  * CGPSInterface::bindStream() before calling CGenericSensor::initialize().
38  * This feature can be used to parse commands from a file, a TCP/IP stream, a
39  * memory block, etc.
40  *
41  * The parsers in the enum type CGPSInterface::PARSERS are supported as
42  * parameter `parser` in the
43  * configuration file below or in method CGPSInterface::setParser():
44  * - `NONE`: Do not try to parse the messages into CObservation's. Only useful
45  * if combined with `raw_dump_file_prefix`
46  * - `AUTO`: Try to automatically identify the format of incomming data.
47  * - `NMEA` (NMEA 0183, ASCII messages): Default parser. Supported frames:
48  * GGA, RMC,... See full list of messages in children of
49  * mrpt::obs::gnss::gnss_message
50  * - `NOVATEL_OEM6` (Novatel OEM6, binary frames): Supported frames:
51  * BESTPOS,... Note that receiving a correct IONUTC msg is required for a
52  * correct timestamping of subsequent frames. See full list of messages in
53  * children of mrpt::obs::gnss::gnss_message
54  *
55  * See available parameters below, and an example config file for
56  * rawlog-grabber
57  * [here](https://github.com/MRPT/mrpt/blob/master/share/mrpt/config_files/rawlog-grabber/gps.ini)
58  *
59  * \code
60  * PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
61  * -------------------------------------------------------
62  * [supplied_section_name]
63  *
64  * # Serial port configuration:
65  * COM_port_WIN = COM3
66  * COM_port_LIN = ttyUSB0
67  * baudRate = 4800 // The baudrate of the communications (typ. 4800 or
68  * 9600 bauds)
69  *
70  * # (Default:true) Whether to append the GNNS message type to CObservation
71  * `sensorLabel` field
72  * sensor_label_append_msg_type = true
73  *
74  * # Select a parser for GNSS data:
75  * # Up-to-date list of supported parsers available in
76  * http://reference.mrpt.org/devel/classmrpt_1_1hwdrivers_1_1_c_g_p_s_interface.html
77  * parser = AUTO
78  *
79  * # If uncommented and non-empty, raw binary/ascii data received from the
80  * serial port will be also dumped
81  * # into a file named after this prefix, plus date/time and extension `.gps`.
82  * #raw_dump_file_prefix = RAWGPS
83  *
84  * # 3D position (and orientation, for GNSS+IMUs) of the sensed point (antenna
85  * phase center) relative to the vehicle/robot frame:
86  * pose_x = 0 // (meters)
87  * pose_y = 0
88  * pose_z = 0
89  * pose_yaw = 0 // (deg)
90  * pose_pitch = 0
91  * pose_roll = 0
92  *
93  * # Optional: list of custom commands to be sent to the GNSS receiver to set
94  * it up.
95  * # An arbitrary number of commands can be defined, but their names must be
96  * "setup_cmd%d" starting at "1".
97  * # Commands will be sent by index order. Binary commands instead of ASCII
98  * strings can be set programmatically, not from a config file.
99  * # custom_cmds_delay = 0.1 // (Default=0.1) Delay in seconds between
100  * consecutive set-up commands
101  * # custom_cmds_append_CRLF = true // (Default:true) Append "\r\n" to each
102  * command
103  * # setup_cmd1 = XXXXX
104  * # setup_cmd2 = XXXXX
105  * # setup_cmd3 = XXXXX
106  *
107  * # Optional: list of commands to be sent upon disconnection (e.g. object
108  * destructor)
109  * # shutdown_cmd1 = XXXX
110  * # shutdown_cmd2 = XXXX
111  *
112  * \endcode
113  *
114  * Note that the `customInit` field, supported in MRPT <1.4.0 will be still
115  * parsed and obeyed, but since it has been superseded
116  * by the new mechanism to establish set-up commands, it is no further
117  * documented here.
118  *
119  * The next picture summarizes existing MRPT classes related to GPS / GNSS
120  * devices (CGPSInterface, CNTRIPEmitter, CGPS_NTRIP):
121  *
122  * <div align=center> <img src="mrpt_gps_classes_usage.png"> </div>
123  *
124  * <b>VERSIONS HISTORY:</b>
125  * - 09/JUN/2006: First version (JLBC)
126  * - 04/JUN/2008: Added virtual methods for device-specific initialization
127  * commands.
128  * - 10/JUN/2008: Converted into CGenericSensor class (there are no inhirited
129  * classes anymore).
130  * - 07/DEC/2012: Added public static method to parse NMEA strings.
131  * - 17/JUN/2014: Added GGA feedback.
132  * - 01/FEB/2016: API changed for MTPT 1.4.0
133  *
134  * \note Verbose debug info will be dumped to cout if the environment variable
135  * "MRPT_HWDRIVERS_VERBOSE" is set to "1", or if you call
136  * CGenericSensor::enableVerbose(true)
137  * \note
138  * \note <b>[API changed in MRPT 1.4.0]</b> mrpt::hwdrivers::CGPSInterface API
139  * clean-up and made more generic so any stream can be used to parse GNSS
140  * messages, not only serial ports.
141  *
142  * \sa CGPS_NTRIP, CNTRIPEmitter, mrpt::obs::CObservationGPS
143  * \ingroup mrpt_hwdrivers_grp
144  */
146 {
148 
149  public:
150  /** Read about parser selection in the documentation for CGPSInterface */
151  enum PARSERS
152  {
153  NONE = -2,
154  AUTO = -1,
155  NMEA = 0,
157  };
158 
159  /** Default ctor */
160  CGPSInterface();
161  /** Dtor */
162  virtual ~CGPSInterface();
163 
164  void doProcess(); // See docs in parent class
165 
166  /** Returns true if communications work, i.e. if some message has been
167  * received. */
168  bool isGPS_connected();
169  /** Returns true if the last message from the GPS indicates that the signal
170  * from sats has been acquired. */
171  bool isGPS_signalAcquired();
172 
173  /** \name Set-up and configuration
174  * @{ */
175  /** Set the serial port to use (COM1, ttyUSB0, etc). */
176  void setSerialPortName(const std::string& COM_port);
177  /** Get the serial port to use (COM1, ttyUSB0, etc). */
179 
180  /** Select the parser for incomming data, among the options enumerated in \a
181  * CGPSInterface */
182  void setParser(PARSERS parser);
183  PARSERS getParser() const;
184 
185  // void setExternCOM( CSerialPort *outPort, std::mutex *csOutPort ); //
186  // Replaced by bindStream() in MRPT 1.4.0
187 
188  /** This enforces the use of a given user stream, instead of trying to open
189  * the serial port set in this class parameters.
190  * \param[in] csExternalStream If not NULL, read/write operations to the
191  * stream will be guarded by this critical section.
192  * The stream object is not deleted. It is the user responsibility to keep
193  * that object allocated during the entire life of this object.
194  * \note Call before CGenericSensor::initialize()
195  */
196  void bindStream(
197  mrpt::io::CStream* external_stream,
198  std::mutex* csOptionalExternalStream = nullptr);
199 
200  bool useExternCOM() const { return m_data_stream_is_external; }
202  void setSetupCommandsDelay(const double delay_secs);
203  double getSetupCommandsDelay() const;
204 
205  void setSetupCommands(const std::vector<std::string>& cmds);
206  const std::vector<std::string>& getSetupCommands() const;
207 
208  void setShutdownCommands(const std::vector<std::string>& cmds);
209  const std::vector<std::string>& getShutdownCommands() const;
210 
211  void enableSetupCommandsAppendCRLF(const bool enable);
213 
215  {
217  }
218 
219  /** If set to non-empty, RAW GPS serial data will be also dumped to a
220  * separate file. */
221  void setRawDumpFilePrefix(const std::string& filePrefix)
222  {
223  m_raw_dump_file_prefix = filePrefix;
224  }
226  /** Send a custom data block to the GNSS device right now. Can be used to
227  change its behavior online as needed.
228  \return false on communication error */
229  bool sendCustomCommand(const void* data, const size_t datalen);
230  /** @} */
231 
232  inline bool isAIMConfigured() { return m_topcon_AIMConfigured; }
233  /** Parses one line of NMEA data from a GPS receiver, and writes the
234  * recognized fields (if any) into an observation object.
235  * Recognized frame types are those listed for the `NMEA` parser in the
236  * documentation of CGPSInterface
237  * \return true if some new data field has been correctly parsed and
238  * inserted into out_obs
239  */
240  static bool parse_NMEA(
241  const std::string& cmd_line, mrpt::obs::CObservationGPS& out_obs,
242  const bool verbose = false);
243 
244  /** Gets the latest GGA command or an empty string if no newer GGA command
245  * was received since the last call to this method.
246  * \param[in] reset If set to true, will empty the GGA cache so next calls
247  * will return an empty string if no new frame is received.
248  */
249  std::string getLastGGA(bool reset = true);
250 
251  using ptr_parser_t =
252  bool (CGPSInterface::*)(size_t& out_minimum_rx_buf_to_decide);
253 
254  /** @name Parser implementations: each method must try to parse the first
255  * bytes in the
256  * incoming buffer, and return false if the available data does not match
257  * the expected format, so we must skip 1 byte and try again.
258  * @{ */
259  bool implement_parser_NMEA(size_t& out_minimum_rx_buf_to_decide);
260  bool implement_parser_NOVATEL_OEM6(size_t& out_minimum_rx_buf_to_decide);
261  /** @} */
262 
263  protected:
264  /** Implements custom messages to be sent to the GPS unit just after
265  * connection and before normal use.
266  * Returns false or raise an exception if something goes wrong. */
268  /** Like OnConnectionEstablished() for sending optional shutdown commands */
269  bool OnConnectionShutdown();
270 
272 
273  /** Typically a CSerialPort created by this class, but may be set
274  * externally. */
276  std::mutex* m_data_stream_cs;
279 
282 
283  /** See the class documentation at the top for expected parameters */
285  const mrpt::config::CConfigFileBase& configSource,
286  const std::string& iniSection);
287 
288  /** If not empty, will send a cmd "set,/par/pos/pd/port,...". Example value:
289  * "/dev/ser/b" */
291  {
293  }
294 
295  /** Only used when "m_JAVAD_rtk_src_port" is not empty */
296  void setJAVAD_rtk_src_baud(unsigned int baud)
297  {
298  m_JAVAD_rtk_src_baud = baud;
299  }
300 
301  /** Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK
302  * corrections: "cmr", "rtcm", "rtcm3", etc. */
304  /** Set Advanced Input Mode for the primary port.
305  This can be used to send RTK corrections to the device using the same
306  port that it's used for the commands.
307  The RTK correction stream must be re-packaged into a special frame with
308  prefix ">>" */
309  bool setJAVAD_AIM_mode();
310 
311  /** Unset Advanced Input Mode for the primary port and use it only as a
312  * command port. */
313  bool unsetJAVAD_AIM_mode();
314 
315  private:
316  /** Auxiliary buffer for readings */
328  std::vector<std::string> m_setup_cmds;
329  std::vector<std::string> m_shutdown_cmds;
330 
331  /** \name Legacy support for TopCon RTK configuration
332  * @{ */
333  /** If not empty, will send a cmd "set,/par/pos/pd/port,...". Example value:
334  * "/dev/ser/b" */
336  /** Only used when "m_JAVAD_rtk_src_port" is not empty */
337  unsigned int m_JAVAD_rtk_src_baud;
338  /** Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK
339  * corrections: "cmr", "rtcm", "rtcm3", etc. */
341 
342  /** Use this mode for receive RTK corrections from a external source through
343  * the primary port */
345  /** Indicates if the AIM has been properly set up. */
347  /** The period in seconds which the data should be provided by the GPS */
349  /** Private auxiliary method. Raises exception on error. */
350  void JAVAD_sendMessage(const char* str, bool waitForAnswer = true);
351  /** @} */
352 
353  /** Returns true if the COM port is already open, or try to open it in other
354  * case.
355  * \return true if everything goes OK, or false if there are problems
356  * opening the port. */
357  bool tryToOpenTheCOM();
358 
359  /** Process data in "m_buffer" to extract GPS messages, and remove them from
360  * the buffer. */
361  void parseBuffer();
362 
363  /** Queue out now the messages in \a m_just_parsed_messages, leaving it
364  * empty */
365  void flushParsedMessagesNow();
366  /** A private copy of the last received gps datum */
368  /** Used in getLastGGA() */
370 }; // end class
371 } // namespace hwdrivers
372 } // namespace mrpt
373 
375 using namespace mrpt::hwdrivers;
379 MRPT_FILL_ENUM_MEMBER(CGPSInterface, NOVATEL_OEM6);
381 
382 #endif
mrpt::obs::gnss::nv_oem6_position_type::NONE
@ NONE
Definition: gnss_messages_novatel.h:74
mrpt::hwdrivers::CGPSInterface::m_setup_cmds
std::vector< std::string > m_setup_cmds
Definition: CGPSInterface.h:328
mrpt::hwdrivers::CGPSInterface::bindStream
void bindStream(mrpt::io::CStream *external_stream, std::mutex *csOptionalExternalStream=nullptr)
This enforces the use of a given user stream, instead of trying to open the serial port set in this c...
Definition: CGPSInterface.cpp:173
mrpt::hwdrivers::CGPSInterface::m_data_stream_is_external
bool m_data_stream_is_external
Definition: CGPSInterface.h:278
mrpt::hwdrivers::CGPSInterface::flushParsedMessagesNow
void flushParsedMessagesNow()
Queue out now the messages in m_just_parsed_messages, leaving it empty.
Definition: CGPSInterface.cpp:459
MRPT_ENUM_TYPE_END
#define MRPT_ENUM_TYPE_END()
Definition: TEnumType.h:74
mrpt::hwdrivers::CGPSInterface::isGPS_connected
bool isGPS_connected()
Returns true if communications work, i.e.
Definition: CGPSInterface.cpp:303
mrpt::hwdrivers::CGPSInterface::parse_NMEA
static bool parse_NMEA(const std::string &cmd_line, mrpt::obs::CObservationGPS &out_obs, const bool verbose=false)
Parses one line of NMEA data from a GPS receiver, and writes the recognized fields (if any) into an o...
Definition: CGPSInterface_parser_NMEA.cpp:96
mrpt::hwdrivers::CGPSInterface::getSerialPortName
std::string getSerialPortName() const
Get the serial port to use (COM1, ttyUSB0, etc).
Definition: CGPSInterface.cpp:246
s
GLdouble s
Definition: glext.h:3676
mrpt::hwdrivers::CGPSInterface::m_data_stream_cs
std::mutex * m_data_stream_cs
Definition: CGPSInterface.h:276
mrpt::hwdrivers::CGPSInterface::getSetupCommandsDelay
double getSetupCommandsDelay() const
Definition: CGPSInterface.cpp:190
mrpt::hwdrivers::CGPSInterface
A class capable of reading GPS/GNSS/GNSS+IMU receiver data, from a serial port or from any input stre...
Definition: CGPSInterface.h:145
mrpt::hwdrivers::CGPSInterface::CGPSInterface
CGPSInterface()
Default ctor.
Definition: CGPSInterface.cpp:51
mrpt::hwdrivers::CGPSInterface::setJAVAD_rtk_src_port
void setJAVAD_rtk_src_port(const std::string &s)
If not empty, will send a cmd "set,/par/pos/pd/port,...".
Definition: CGPSInterface.h:290
mrpt::hwdrivers::CGPSInterface::m_topcon_AIMConfigured
bool m_topcon_AIMConfigured
Indicates if the AIM has been properly set up.
Definition: CGPSInterface.h:346
mrpt::hwdrivers::CGPSInterface::m_custom_cmds_append_CRLF
bool m_custom_cmds_append_CRLF
Definition: CGPSInterface.h:327
mrpt::containers::circular_buffer< uint8_t >
CFileOutputStream.h
mrpt::hwdrivers::CGPSInterface::NONE
@ NONE
Definition: CGPSInterface.h:153
mrpt::hwdrivers::CGPSInterface::enableSetupCommandsAppendCRLF
void enableSetupCommandsAppendCRLF(const bool enable)
Definition: CGPSInterface.cpp:210
mrpt::hwdrivers::CGPSInterface::NMEA
@ NMEA
Definition: CGPSInterface.h:155
mrpt::hwdrivers::CGPSInterface::parseBuffer
void parseBuffer()
Process data in "m_buffer" to extract GPS messages, and remove them from the buffer.
Definition: CGPSInterface.cpp:483
CSerialPort.h
mrpt::hwdrivers::CGPSInterface::unsetJAVAD_AIM_mode
bool unsetJAVAD_AIM_mode()
Unset Advanced Input Mode for the primary port and use it only as a command port.
Definition: CGPSInterface.cpp:694
mrpt::hwdrivers::CGPSInterface::setJAVAD_rtk_src_baud
void setJAVAD_rtk_src_baud(unsigned int baud)
Only used when "m_JAVAD_rtk_src_port" is not empty.
Definition: CGPSInterface.h:296
mrpt::hwdrivers::CGPSInterface::m_JAVAD_rtk_src_baud
unsigned int m_JAVAD_rtk_src_baud
Only used when "m_JAVAD_rtk_src_port" is not empty.
Definition: CGPSInterface.h:337
mrpt::hwdrivers::CGPSInterface::m_data_stream
mrpt::io::CStream * m_data_stream
Typically a CSerialPort created by this class, but may be set externally.
Definition: CGPSInterface.h:275
mrpt::hwdrivers::CGPSInterface::setJAVAD_AIM_mode
bool setJAVAD_AIM_mode()
Set Advanced Input Mode for the primary port.
Definition: CGPSInterface.cpp:725
mrpt::hwdrivers
Contains classes for various device interfaces.
Definition: C2DRangeFinderAbstract.h:22
MRPT_FILL_ENUM_MEMBER
MRPT_FILL_ENUM_MEMBER(CGPSInterface, NONE)
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
DEFINE_GENERIC_SENSOR
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
Definition: CGenericSensor.h:314
mrpt::hwdrivers::CGPSInterface::legacy_topcon_setup_commands
bool legacy_topcon_setup_commands()
Definition: CGPSInterface.cpp:812
mrpt::hwdrivers::CGPSInterface::m_topcon_data_period
double m_topcon_data_period
The period in seconds which the data should be provided by the GPS.
Definition: CGPSInterface.h:348
mrpt::hwdrivers::CGPSInterface::tryToOpenTheCOM
bool tryToOpenTheCOM()
Returns true if the COM port is already open, or try to open it in other case.
Definition: CGPSInterface.cpp:250
MRPT_ENUM_TYPE_BEGIN
#define MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS)
Definition: TEnumType.h:58
CObservationGPS.h
mrpt::hwdrivers::CGPSInterface::ptr_parser_t
bool(CGPSInterface::*)(size_t &out_minimum_rx_buf_to_decide) ptr_parser_t
Definition: CGPSInterface.h:252
mrpt::hwdrivers::CGPSInterface::setSerialPortName
void setSerialPortName(const std::string &COM_port)
Set the serial port to use (COM1, ttyUSB0, etc).
Definition: CGPSInterface.cpp:222
mrpt::hwdrivers::CGPSInterface::m_rx_buffer
mrpt::containers::circular_buffer< uint8_t > m_rx_buffer
Auxiliary buffer for readings.
Definition: CGPSInterface.h:317
mrpt::hwdrivers::CGPSInterface::NOVATEL_OEM6
@ NOVATEL_OEM6
Definition: CGPSInterface.h:156
mrpt::hwdrivers::CGPSInterface::setParser
void setParser(PARSERS parser)
Select the parser for incomming data, among the options enumerated in CGPSInterface.
Definition: CGPSInterface.cpp:168
mrpt::hwdrivers::CGPSInterface::getShutdownCommands
const std::vector< std::string > & getShutdownCommands() const
Definition: CGPSInterface.cpp:206
mrpt::hwdrivers::CGPSInterface::m_last_GGA
std::string m_last_GGA
Used in getLastGGA()
Definition: CGPSInterface.h:369
mrpt::system::TTimeStamp
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:31
mrpt::hwdrivers::CGPSInterface::m_GPS_comsWork
bool m_GPS_comsWork
Definition: CGPSInterface.h:323
mrpt::hwdrivers::CGPSInterface::m_shutdown_cmds
std::vector< std::string > m_shutdown_cmds
Definition: CGPSInterface.h:329
mrpt::hwdrivers::CGPSInterface::m_raw_dump_file_prefix
std::string m_raw_dump_file_prefix
Definition: CGPSInterface.h:319
mrpt::hwdrivers::CGPSInterface::getRawDumpFilePrefix
std::string getRawDumpFilePrefix() const
Definition: CGPSInterface.h:225
mrpt::hwdrivers::CGPSInterface::m_COMname
std::string m_COMname
Definition: CGPSInterface.h:320
mrpt::hwdrivers::CGPSInterface::OnConnectionEstablished
bool OnConnectionEstablished()
Implements custom messages to be sent to the GPS unit just after connection and before normal use.
Definition: CGPSInterface.cpp:640
mrpt::hwdrivers::CGPSInterface::m_topcon_useAIMMode
bool m_topcon_useAIMMode
Use this mode for receive RTK corrections from a external source through the primary port.
Definition: CGPSInterface.h:344
reset
GLboolean reset
Definition: glext.h:3582
mrpt::hwdrivers::CGPSInterface::setSetupCommandsDelay
void setSetupCommandsDelay(const double delay_secs)
Definition: CGPSInterface.cpp:186
mrpt::hwdrivers::CGPSInterface::getParser
PARSERS getParser() const
Definition: CGPSInterface.cpp:172
mrpt::hwdrivers::CGPSInterface::setRawDumpFilePrefix
void setRawDumpFilePrefix(const std::string &filePrefix)
If set to non-empty, RAW GPS serial data will be also dumped to a separate file.
Definition: CGPSInterface.h:221
data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:3547
mrpt::hwdrivers::CGPSInterface::useExternalStream
bool useExternalStream() const
Definition: CGPSInterface.h:201
mrpt::hwdrivers::CGPSInterface::AUTO
@ AUTO
Definition: CGPSInterface.h:154
COutputLogger.h
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::hwdrivers::CGPSInterface::setSetupCommands
void setSetupCommands(const std::vector< std::string > &cmds)
Definition: CGPSInterface.cpp:194
circular_buffer.h
mrpt::hwdrivers::CGPSInterface::m_custom_cmds_delay
double m_custom_cmds_delay
Definition: CGPSInterface.h:326
mrpt::hwdrivers::CGPSInterface::JAVAD_sendMessage
void JAVAD_sendMessage(const char *str, bool waitForAnswer=true)
Private auxiliary method.
Definition: CGPSInterface.cpp:552
mrpt::hwdrivers::CGPSInterface::m_raw_output_file
mrpt::io::CFileOutputStream m_raw_output_file
Definition: CGPSInterface.h:325
mrpt::poses::CPose3D
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:88
CGenericSensor.h
TEnumType.h
mrpt::hwdrivers::CGPSInterface::OnConnectionShutdown
bool OnConnectionShutdown()
Like OnConnectionEstablished() for sending optional shutdown commands.
Definition: CGPSInterface.cpp:605
mrpt::hwdrivers::CGPSInterface::m_sensorPose
poses::CPose3D m_sensorPose
Definition: CGPSInterface.h:280
mrpt::hwdrivers::CGPSInterface::doProcess
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
Definition: CGPSInterface.cpp:307
obs_frwds.h
mrpt::hwdrivers::CGPSInterface::m_just_parsed_messages
mrpt::obs::CObservationGPS m_just_parsed_messages
A private copy of the last received gps datum.
Definition: CGPSInterface.h:367
mrpt::hwdrivers::CGenericSensor
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Definition: CGenericSensor.h:70
mrpt::hwdrivers::CGPSInterface::isGPS_signalAcquired
bool isGPS_signalAcquired()
Returns true if the last message from the GPS indicates that the signal from sats has been acquired.
mrpt::hwdrivers::CGPSInterface::implement_parser_NOVATEL_OEM6
bool implement_parser_NOVATEL_OEM6(size_t &out_minimum_rx_buf_to_decide)
Definition: CGPSInterface_parser_NOVATEL_OEM6.cpp:23
mrpt::io::CFileOutputStream
This CStream derived class allow using a file as a write-only, binary stream.
Definition: io/CFileOutputStream.h:24
mrpt::hwdrivers::CGPSInterface::m_parser
PARSERS m_parser
Definition: CGPSInterface.h:318
CPoint3D.h
mrpt::system::COutputLogger
Versatile class for consistent logging and management of output messages.
Definition: system/COutputLogger.h:117
mrpt::hwdrivers::CGPSInterface::getSetupCommands
const std::vector< std::string > & getSetupCommands() const
Definition: CGPSInterface.cpp:198
mrpt::hwdrivers::CGPSInterface::m_sensorLabelAppendMsgType
bool m_sensorLabelAppendMsgType
Definition: CGPSInterface.h:322
mrpt::obs::CObservationGPS
This class stores messages from GNSS or GNSS+IMU devices, from consumer-grade inexpensive GPS receive...
Definition: CObservationGPS.h:70
mrpt::hwdrivers::CGPSInterface::isAIMConfigured
bool isAIMConfigured()
Definition: CGPSInterface.h:232
mrpt::hwdrivers::CGPSInterface::m_customInit
std::string m_customInit
Definition: CGPSInterface.h:281
mrpt::hwdrivers::CGPSInterface::sendCustomCommand
bool sendCustomCommand(const void *data, const size_t datalen)
Send a custom data block to the GNSS device right now.
Definition: CGPSInterface.cpp:926
mrpt::hwdrivers::CGPSInterface::isEnabledSetupCommandsAppendCRLF
bool isEnabledSetupCommandsAppendCRLF() const
Definition: CGPSInterface.cpp:214
mrpt::hwdrivers::CGPSInterface::m_JAVAD_rtk_src_port
std::string m_JAVAD_rtk_src_port
If not empty, will send a cmd "set,/par/pos/pd/port,...".
Definition: CGPSInterface.h:335
mrpt::hwdrivers::CGPSInterface::m_data_stream_mine_cs
std::mutex m_data_stream_mine_cs
Definition: CGPSInterface.h:277
mrpt::hwdrivers::CGPSInterface::getLastGGA
std::string getLastGGA(bool reset=true)
Gets the latest GGA command or an empty string if no newer GGA command was received since the last ca...
Definition: CGPSInterface.cpp:805
string
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::hwdrivers::CGPSInterface::setJAVAD_rtk_format
void setJAVAD_rtk_format(const std::string &s)
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr",...
Definition: CGPSInterface.h:303
mrpt::hwdrivers::CGPSInterface::implement_parser_NMEA
bool implement_parser_NMEA(size_t &out_minimum_rx_buf_to_decide)
Definition: CGPSInterface_parser_NMEA.cpp:24
mrpt::hwdrivers::CGPSInterface::PARSERS
PARSERS
Read about parser selection in the documentation for CGPSInterface.
Definition: CGPSInterface.h:151
mrpt::hwdrivers::CGPSInterface::m_last_timestamp
mrpt::system::TTimeStamp m_last_timestamp
Definition: CGPSInterface.h:324
mrpt::hwdrivers::CGPSInterface::m_JAVAD_rtk_format
std::string m_JAVAD_rtk_format
Only used when "m_JAVAD_rtk_src_port" is not empty: format of RTK corrections: "cmr",...
Definition: CGPSInterface.h:340
mrpt::hwdrivers::CGPSInterface::m_COMbauds
int m_COMbauds
Definition: CGPSInterface.h:321
mrpt::hwdrivers::CGPSInterface::enableAppendMsgTypeToSensorLabel
void enableAppendMsgTypeToSensorLabel(bool enable)
Definition: CGPSInterface.h:214
mrpt::hwdrivers::CGPSInterface::setShutdownCommands
void setShutdownCommands(const std::vector< std::string > &cmds)
Definition: CGPSInterface.cpp:202
mrpt::hwdrivers::CGPSInterface::loadConfig_sensorSpecific
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection)
See the class documentation at the top for expected parameters.
Definition: CGPSInterface.cpp:82
mrpt::hwdrivers::CGPSInterface::~CGPSInterface
virtual ~CGPSInterface()
Dtor.
Definition: CGPSInterface.cpp:157
mrpt::hwdrivers::CGPSInterface::useExternCOM
bool useExternCOM() const
Definition: CGPSInterface.h:200
mrpt::io::CStream
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: io/CStream.h:30



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST