Go to the documentation of this file.
35 cout <<
"GPS test application." << endl << endl;
39 cout <<
"Using configuration from './CONFIG_gps.ini'" << endl;
47 cout <<
"Enter the serial port name (e.g. COM1, ttyS0, ttyUSB0, "
49 getline(cin, serName);
53 cout <<
"Using serial port: " <<
SERIAL_NAME << endl;
73 std::this_thread::sleep_for(500ms);
79 printf(
"[Test_GPS] Waiting for data...\n");
83 for (itObs = lstObs.begin(); itObs != lstObs.end(); itObs++)
86 itObs->second->GetRuntimeClass() ==
90 std::dynamic_pointer_cast<CObservationGPS>(itObs->second);
91 gpsData->dumpToConsole(std::cout);
107 catch (std::exception& e)
109 std::cout <<
"EXCEPCION: " << e.what() << std::endl;
114 printf(
"Another exception!!");
bool kbhit() noexcept
An OS-independent version of kbhit, which returns true if a key has been pushed.
std::multimap< mrpt::system::TTimeStamp, mrpt::serialization::CSerializable::Ptr > TListObservations
int void fclose(FILE *f)
An OS-independent version of fclose.
A class capable of reading GPS/GNSS/GNSS+IMU receiver data, from a serial port or from any input stre...
Contains classes for various device interfaces.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define ASSERT_(f)
Defines an assertion mechanism.
bool fileExists(const std::string &fileName)
Test if a given file (or directory) exists.
This namespace contains representation of robot actions and observations.
void setSerialPortName(const std::string &COM_port)
Set the serial port to use (COM1, ttyUSB0, etc).
string iniFile(myDataDir+string("benchmark-options.ini"))
void getObservations(TListObservations &lstObjects)
Returns a list of enqueued objects, emptying it (thread-safe).
std::shared_ptr< CObservationGPS > Ptr
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
#define CLASS_ID(T)
Access to runtime class ID for a defined class name.
This class stores messages from GNSS or GNSS+IMU devices, from consumer-grade inexpensive GPS receive...
This class allows loading and storing values and vectors of different types from "....
FILE * fopen(const char *fileName, const char *mode) noexcept
An OS-independent version of fopen.
void loadConfig(const mrpt::config::CConfigFileBase &configSource, const std::string §ion)
Loads the generic settings common to any sensor (See CGenericSensor), then call to "loadConfig_sensor...
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
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 | |