INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
GbxNovatelAcfrACFR driver for a Novatel(SPAN) system.
More...
|
NovatelSPAN is a proprietary Novatel navigation system. It minimally consists out of a Novatel OEMV GPS receiver (OEM4 receivers should be compatible). If combined with an IMU, a SPAN system can provide an INS navigation solution at high rate (up to 100Hz). The driver initializes the hardware and reports navigation data continuously.
for a full list of functions see gbxnovatelacfr
#include <gbxnovatelacfr/driver.h>
To run the test program (defaults: /dev/ttyS0, 115200 bps, ...) call it without parameters.
$ gbxnovatelacfrtest
If you want to change things, get a short usage description:
$ gbxnovatelacfrtest -h
The test program reports back all messages received from the driver and prints out the data fields for each message (in verbose mode).
#include <gbxnovatelacfr/driver.h> #include <cstdlib> #include <iostream> #include <memory> #include <vector> namespace gna = gbxnovatelacfr; int main(void){ // create a valid configuration std::vector<double> imuToGpsOffset(3,0.0); // made up; this MUST be correct for real work (see gbxnovatelacfr::Config::imuToGpsOffset_) gna::SimpleConfig sCfg(std::string("/dev/ttyS0"), 115200, std::string("IMU_HG1700_AG11"), imuToGpsOffset); gna::Config cfg(sCfg); // create the driver gna::Driver driver(cfg); while(0){ // read from the driver std::auto_ptr<gna::GenericData > generic = driver.read(); // figure out what type of data we got switch(generic->type()){ case gna::InsPva: { // process data gna::InsPvaData *data = dynamic_cast<gna::InsPvaData *>(generic.get()); std::cout << data->toString() << "\n"; } break; case gna::BestGpsPos: { // process data gna::BestGpsPosData *data = dynamic_cast<gna::BestGpsPosData *>(generic.get()); std::cout << data->toString() << "\n"; } break; case gna::BestGpsVel: { // process data gna::BestGpsVelData *data = dynamic_cast<gna::BestGpsVelData *>(generic.get()); std::cout << data->toString() << "\n"; } break; case gna::RawImu: { // process data gna::RawImuData *data = dynamic_cast<gna::RawImuData *>(generic.get()); std::cout << data->toString() << "\n"; } break; default: if(0 == generic.get()){ std::cout << "Got NULL message!\n"; } else{ std::cout << "Got unknown message!\n"; std::cout << generic->toString() << "\n"; // yes this works, since toString() is a member of the base class } break; } } return EXIT_SUCCESS; }
The following sources have also been helpful: