INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydrodrivers/hydroinsgpsnovatelgbx/driver.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 Matthew Ridley, Ben Upcroft, Michael Moser
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef HYDRO_INSGPS_NOVATELSPAN_H
00012 #define HYDRO_INSGPS_NOVATELSPAN_H
00013 
00014 #include <memory>
00015 
00016 #include <hydroutil/context.h>
00017 #include <hydrointerfaces/insgps.h>
00018 
00019 //#include <gbxnovatelacfr/driver.h>
00020 
00021 // forward declarations
00022 //
00023 namespace gbxnovatelacfr{
00024     class BestGpsPosData;
00025     class BestGpsVelData;
00026     class Driver;
00027 }
00028 
00029 namespace insgpsnovatelgbx{
00030 
00031 /*
00032 @brief wrapper class for the GearBox Novatel Span InsGps navigation sensors
00033 
00034 @author Michael Moser
00035  */
00036 class Driver : public hydrointerfaces::InsGps
00037 {
00038 public:
00039 
00040     Driver( const Config &cfg, const hydroutil::Context &context );
00041 
00042     // from InsGps
00043     virtual std::auto_ptr<hydrointerfaces::InsGps::GenericData> read();
00044 
00045 private:
00046 
00047     double undulation_; //aka goidal separation
00048     bool haveUndulation_;
00049 
00050     // temporary storage to assemble GpsData from velocity and position
00051     std::auto_ptr<gbxnovatelacfr::BestGpsPosData> bestGpsPosTmp_;
00052     std::auto_ptr<gbxnovatelacfr::BestGpsVelData> bestGpsVelTmp_;
00053     bool haveGpsPos_;
00054     bool haveGpsVel_;
00055     struct timeval timeOfGpsPos_;
00056     struct timeval timeOfGpsVel_;
00057 
00058     std::auto_ptr<gbxnovatelacfr::Driver > device_;
00059     hydroutil::Context context_;
00060 };
00061 
00062 
00063 // Used for dynamically loading driver
00064 class Factory : public hydrointerfaces::InsGpsFactory
00065 {
00066 public:
00067     hydrointerfaces::InsGps *createDriver( 
00068                 const hydrointerfaces::InsGps::Config &config,
00069                 const hydroutil::Context &context ) const
00070     {
00071         return new Driver( config, context );
00072     }
00073 };
00074 
00075 } // namespace
00076 
00077 // Used for dynamically loading driver
00078 extern "C" {
00079     hydrointerfaces::InsGpsFactory *createInsGpsDriverFactory();
00080 }
00081 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5