MRPT  1.9.9
CGPS_NTRIP.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
15 
16 namespace mrpt::hwdrivers
17 {
18 /** A combination of GPS receiver + NTRIP receiver capable of submitting GGA
19  * frames to enable RTCM 3.0.
20  * This class holds instances of two classes, publicly exposed as member
21  * variables:
22  * - mrpt::hwdrivers::CGPSInterface gps;
23  * - mrpt::hwdrivers::CNTRIPEmitter ntrip;
24  *
25  * and acts as a "joint sensor", calling both objects' doProcess() inside the
26  * doProcess() loop, etc.
27  *
28  * The goal of this class is automatically gather GGA frames from the gps
29  * sensor and upload them to the NTRIP server.
30  *
31  * Configuration file format is a combination of the original parameters for
32  * both classes, each with
33  * a prefix: "gps_" for CGPSInterface params and "ntrip_" for CNTRIPEmitter.
34  *
35  * \code
36  * PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
37  * -------------------------------------------------------
38  * [supplied_section_name]
39  * gps_COM_port_WIN = COM3
40  * gps_COM_port_LIN = ttyS0
41  * gps_baudRate = 4800 // The baudrate of the communications (typ.
42  * 4800 bauds)
43  * gps_pose_x = 0 // 3D position of the sensed point relative to
44  * the robot (meters)
45  * gps_pose_y = 0
46  * gps_pose_z = 0
47  * # Other params (see CGPSInterface)
48  *
49  * ntrip_COM_port_WIN = COM1 // Serial port where the NTRIP stream
50  * will be dumped to.
51  * ntrip_COM_port_LIN = ttyUSB0
52  * ntrip_baudRate = 38400
53  *
54  * ntrip_server = 143.123.9.129 // NTRIP caster IP
55  * ntrip_port = 2101
56  * ntrip_mountpoint = MYPOINT23
57  * #ntrip_user = pepe // User & password optional.
58  * #ntrip_password = loco
59  *
60  * \endcode
61  *
62  * The next picture summarizes existing MRPT classes related to GPS / GNSS
63  * devices (CGPSInterface, CNTRIPEmitter, CGPS_NTRIP):
64  *
65  * <div align=center> <img src="mrpt_gps_classes_usage.png"> </div>
66  *
67  * \note Verbose debug info will be dumped to cout if the environment variable
68  * "MRPT_HWDRIVERS_VERBOSE" is set to "1", or if you call
69  * CGenericSensor::enableVerbose(true)
70  *
71  * \ingroup mrpt_hwdrivers_grp
72  * \sa CGPSInterface, CNTRIPEmitter
73  */
74 class CGPS_NTRIP : public CGenericSensor
75 {
77 
78  public:
81 
82  /** Constructor */
83  CGPS_NTRIP();
84  /** Destructor */
85  ~CGPS_NTRIP() override;
86 
87  void doProcess() override; // See docs in parent class
88 
89  void initialize() override;
90 
91  protected:
92  /** See the class documentation at the top for expected parameters */
94  const mrpt::config::CConfigFileBase& configSource,
95  const std::string& iniSection) override;
96 }; // end class
97 
98 } // namespace mrpt::hwdrivers
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
~CGPS_NTRIP() override
Destructor.
A class capable of reading GPS/GNSS/GNSS+IMU receiver data, from a serial port or from any input stre...
void initialize() override
This method can or cannot be implemented in the derived class, depending on the need for it...
Definition: CGPS_NTRIP.cpp:28
void doProcess() override
This method will be invoked at a minimum rate of "process_rate" (Hz)
Definition: CGPS_NTRIP.cpp:35
Contains classes for various device interfaces.
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection) override
See the class documentation at the top for expected parameters.
Definition: CGPS_NTRIP.cpp:67
This class allows loading and storing values and vectors of different types from a configuration text...
mrpt::hwdrivers::CGPSInterface gps
Definition: CGPS_NTRIP.h:79
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
A combination of GPS receiver + NTRIP receiver capable of submitting GGA frames to enable RTCM 3...
Definition: CGPS_NTRIP.h:74
This "virtual driver" encapsulates a NTRIP client (see CNTRIPClient) but adds the functionality of du...
Definition: CNTRIPEmitter.h:61
mrpt::hwdrivers::CNTRIPEmitter ntrip
Definition: CGPS_NTRIP.h:80



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020