orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
scanutil.h00001 #ifndef SCANUTIL_H 00002 #define SCANUTIL_H 00003 00004 #include <string> 00005 00006 namespace hydrolfextract { 00007 00008 struct ScannerConfig { 00009 ScannerConfig( double scannerMaxRange, 00010 double scannerStartAngle, 00011 double scannerAngleIncrement ) 00012 : maxRange(scannerMaxRange), 00013 startAngle(scannerStartAngle), 00014 angleIncrement(scannerAngleIncrement) 00015 {} 00016 double maxRange; 00017 double startAngle; 00018 double angleIncrement; 00019 00020 bool isSane() const; 00021 }; 00022 std::string toString( const ScannerConfig &c ); 00023 00024 inline double calcAngleIncrement( double fieldOfView, 00025 int numReturns ) 00026 { return fieldOfView / double(numReturns-1); } 00027 00028 inline double scanBearing( double startAngle, 00029 double angleIncrement, 00030 int i ) 00031 { return (startAngle + angleIncrement*i); } 00032 00033 inline double scanBearing( const ScannerConfig &cfg, 00034 int i ) 00035 { return scanBearing( cfg.startAngle, cfg.angleIncrement, i ); } 00036 00037 } 00038 00039 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)