Class CNTRIPEmitter
Defined in File CNTRIPEmitter.h
Inheritance Relationships
Base Type
public mrpt::hwdrivers::CGenericSensor(Class CGenericSensor)
Class Documentation
-
class CNTRIPEmitter : public mrpt::hwdrivers::CGenericSensor
This “virtual driver” encapsulates a NTRIP client (see CNTRIPClient) but adds the functionality of dumping the received datastream to a given serial port. Used within rawlog-grabber, along CGPSInterface, this class allows one to build a powerful & simple RTK-capable GPS receiver system.
Therefore, this sensor will never “collect” any observation via the CGenericSensor interface.
See also the example configuration file for rawlog-grabber in “share/mrpt/config_files/rawlog-grabber”.
PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS: ------------------------------------------------------- [supplied_section_name] COM_port_WIN = COM1 // Serial port where the NTRIP stream will be dumped to. COM_port_LIN = ttyUSB0 baudRate = 38400 #transmit_to_server = true // (Default:true) Whether to send back to the TCP/IP caster all data received from the output serial port #raw_output_file_prefix = raw_ntrip_data // If provided, save raw data from the NTRIP to a file, useful for post-processing. In this case, not having a serial port configured (commented out) is a valid configuration. server = 143.123.9.129 // NTRIP caster IP port = 2101 mountpoint = MYPOINT23 //user = pepe // User & password optional. //password = loco
The next picture summarizes existing MRPT classes related to GPS / GNSS devices (CGPSInterface, CNTRIPEmitter, CGPS_NTRIP):

See also
Public Functions
-
CNTRIPEmitter()
Constructor
-
~CNTRIPEmitter() override
Destructor
-
inline void setOutputSerialPort(const std::string &port)
Changes the serial port to connect to (call prior to ‘doProcess’), for example “COM1” or “ttyS0”. This is not needed if the configuration is loaded with “loadConfig”.
-
inline std::string getOutputSerialPort() const
-
inline void setRawOutputFilePrefix(const std::string &outfile)
-
inline std::string getRawOutputFilePrefix() const
-
virtual void initialize() override
Set up the NTRIP communications, raising an exception on fatal errors. Called automatically by rawlog-grabber. If used manually, call after “loadConfig” and before “doProcess”.
-
virtual void doProcess() override
The main loop, which must be called in a timely fashion in order to process the incoming NTRIP data stream and dump it to the serial port. This method is called automatically when used within rawlog-grabber.
-
inline CNTRIPClient &getNTRIPClient()
Exposes the NTRIP client object
-
inline const CNTRIPClient &getNTRIPClient() const
Exposes the NTRIP client object
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
-
CNTRIPEmitter()