orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
gps.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 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_INTERFACES_GPS_H 00012 #define HYDRO_INTERFACES_GPS_H 00013 00014 #include <cstdlib> 00015 #include <string> 00016 #include <memory> 00017 #include <vector> 00018 00019 #include <hydroutil/context.h> 00020 00021 00022 namespace hydrointerfaces 00023 { 00024 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 class SOEXPORT Gps 00056 { 00057 00058 public: 00059 00061 class Config 00062 { 00063 public: 00064 Config() {}; 00065 bool isValid() const { return true; }; 00066 std::string toString() const { return std::string(); }; 00067 //bool operator==( const Config & other ); 00068 //bool operator!=( const Config & other ); 00069 }; 00070 00076 enum PositionType { 00078 GpsPositionTypeNotAvailable, 00081 GpsPositionTypeAutonomous, 00083 GpsPositionTypeDifferential, 00084 NovatelNone, 00085 NovatelFixedPos, 00086 NovatelFixedHeigth, 00087 NovatelFloatConv, 00088 NovatelWideLane, 00089 NovatelNarrowLane, 00090 NovatelDopplerVelocity, 00091 NovatelSingle, 00092 NovatelPsrDiff, 00093 NovatelWAAS, 00094 NovatelPropagated, 00095 NovatelOmnistar, 00096 NovatelL1Float, 00097 NovatelIonFreeFloat, 00098 NovatelNarrowFloat, 00099 NovatelL1Int, 00100 NovatelWideInt, 00101 NovatelNarrowInt, 00102 NovatelRTKDirectINS, 00103 NovatelINS, 00104 NovatelINSPSRSP, 00105 NovatelINSPSRFLOAT, 00106 NovatelINSRTKFLOAT, 00107 NovatelINSRTKFIXED, 00108 NovatelOmnistarHP, 00109 NovatelUnknown 00110 }; 00111 00113 struct Data 00114 { 00117 int timeStampSec; 00120 int timeStampUsec; 00123 int utcTimeHrs; 00126 int utcTimeMin; 00129 double utcTimeSec; 00130 00132 double latitude; 00134 double longitude; 00136 double altitude; 00137 00139 double horizontalPositionError; 00141 double verticalPositionError; 00142 00144 double heading; 00146 double speed; 00148 double climbRate; 00149 00151 int satellites; 00152 int observationCountOnL1; 00153 int observationCountOnL2; 00155 PositionType positionType; 00157 double geoidalSeparation; 00158 }; 00159 00162 virtual void read( Data &data )=0; 00163 00164 virtual ~Gps() {}; 00165 00166 private: 00167 00168 }; 00169 00171 class SOEXPORT GpsFactory { 00172 public: 00173 virtual ~GpsFactory() {}; 00175 virtual Gps *createDriver( const Gps::Config &config, 00176 const hydroutil::Context &context ) const=0; 00177 }; 00178 00180 } // namespace 00181 00182 // Function for dynamically instantiating drivers. 00183 // A driver must have a function like so: 00184 // extern "C" { 00185 // hydrointerfaces::GpsFactory *GpsFactory(); 00186 // } 00187 typedef hydrointerfaces::GpsFactory *DriverFactoryMakerFunc(); 00188 00189 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)