Class CGPS_NTRIP

Inheritance Relationships

Base Type

Class Documentation

class CGPS_NTRIP : public mrpt::hwdrivers::CGenericSensor

A combination of GPS receiver + NTRIP receiver capable of submitting GGA frames to enable RTCM 3.0. This class holds instances of two classes, publicly exposed as member variables:

and acts as a “joint sensor”, calling both objects’ doProcess() inside the doProcess() loop, etc.

The goal of this class is automatically gather GGA frames from the gps sensor and upload them to the NTRIP server.

Configuration file format is a combination of the original parameters for both classes, each with a prefix: "gps_ for CGPSInterface params and ntrip_ for CNTRIPEmitter.

 PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
-------------------------------------------------------
  [supplied_section_name]
   gps_COM_port_WIN = COM3
   gps_COM_port_LIN = ttyS0
   gps_baudRate     = 4800   // The baudrate of the communications (typ.
4800 bauds)
   gps_pose_x       = 0      // 3D position of the sensed point relative to
the robot (meters)
   gps_pose_y       = 0
   gps_pose_z       = 0
   # Other params (see CGPSInterface)

   ntrip_COM_port_WIN = COM1         // Serial port where the NTRIP stream
will be dumped to.
   ntrip_COM_port_LIN = ttyUSB0
   ntrip_baudRate     = 38400

   ntrip_server   = 143.123.9.129    // NTRIP caster IP
   ntrip_port     = 2101
   ntrip_mountpoint = MYPOINT23
   #ntrip_user = pepe            // User & password optional.
   #ntrip_password = loco

The next picture summarizes existing MRPT classes related to GPS / GNSS devices (CGPSInterface, CNTRIPEmitter, CGPS_NTRIP):

../../output_staging/generated/doxygen/xml/mrpt_gps_classes_usage.png

Note

Verbose debug info will be dumped to cout if the environment variable “MRPT_HWDRIVERS_VERBOSE” is set to “1”, or if you call CGenericSensor::enableVerbose(true)

Public Functions

CGPS_NTRIP()

Constructor

~CGPS_NTRIP() override

Destructor

virtual void doProcess() override

This method will be invoked at a minimum rate of “process_rate” (Hz)

Throws:

This – method must throw an exception with a descriptive message if some critical error is found.

virtual void initialize() override

This method can or cannot be implemented in the derived class, depending on the need for it.

Throws:

This – method must throw an exception with a descriptive message if some critical error is found.

Public Members

mrpt::hwdrivers::CGPSInterface gps
mrpt::hwdrivers::CNTRIPEmitter ntrip

Protected Functions

virtual void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection) override

See the class documentation at the top for expected parameters