INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         
imudecoder.h
1 /*
2  * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
3  * http://gearbox.sf.net/
4  * Copyright (c) 2004-2010 Michael Moser
5  *
6  * This distribution is licensed to you under the terms described in
7  * the LICENSE file included in this distribution.
8  *
9  */
10 #ifndef GBX_NOVATEL_IMUDECODER_H
11 #define GBX_NOVATEL_IMUDECODER_H
12 
13 #include <stdint.h>
14 #include <string>
15 namespace gbxnovatelutilacfr{
16 //the novatel span system supports different IMUs, with different status bit-fields and different conversion factors
17 
18 //yield [rad]
19 const double GyroConstantHg1700Ag11Ag58 = 1.16415321826934814453e-10;
20 const double GyroConstantHg1700Ag17Ag62 = 1.16415321826934814453e-10; //verified on Hw
21 const double GyroConstantImarFsas = 4.8481368110953599359e-7;
22 const double GyroConstantLn200 = 1.9073486328125e-6;
23 
24 //yield [m/s]
25 const double AccelConstantHg1700Ag11Ag58 = 2.27094150781631469727e-9;
26 const double AccelConstantHg1700Ag17Ag62 = 4.54188301563262939453e-9; //verified on Hw
27 const double AccelConstantImarFsas = 1.52587890625e-6;
28 const double AccelConstantLn200 = 6.103515625e-5;
29 
30 class ImuDecoder {
31 public:
32  virtual ~ImuDecoder(){}
33  inline double gyroCnt2Rad(const int32_t cnt){ return cnt*gyroConstant_; }
34  inline double accelCnt2MperSec(const int32_t cnt){ return cnt*accelConstant_; }
35  virtual inline bool statusIsGood(const uint32_t imuStatus){return true;} // possibly we need isWarning(), isError() as well. Currently anything not good is treated as error.
36  virtual std::string statusToString(const uint32_t imuStatus)=0;
37 
38 protected:
39  double gyroConstant_;
40  double accelConstant_;
41 };
42 
43 extern "C"{
44  ImuDecoder *createImuDecoder(std::string type);
45 }
46 
47 }//namespace
48 
49 #endif
Definition: gbxnovatelacfr/driver.h:27
 

Generated for GearBox by  doxygen 1.4.5