orca-robotics


INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

stats.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp, Duncan Mercer
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 SEGWAYRMP_STATS_H
00012 #define SEGWAYRMP_STATS_H
00013 
00014 #include <hydrointerfaces/segwayrmp.h>
00015 
00016 namespace segwayrmp {
00017 
00018 
00024 class Stats
00025 {
00026 
00027 public: 
00028     Stats();
00029 
00030     void addData( const hydrointerfaces::SegwayRmp::Data& data );
00031 
00032     // total distance travelled [m]
00033     double distance() const { return distance_; };
00034     // total time while in motion [m/s]
00035     double timeInMotion() const { return timeInMotion_; };
00036     // maximum (forward) speed [m/s]
00037     double maxSpeed() const { return maxSpeed_; };
00038 
00039 private: 
00040 
00041     hydrointerfaces::SegwayRmp::Data lastData_;
00042     bool haveData_;
00043     
00044     double distance_;
00045     double timeInMotion_;
00046     double maxSpeed_;
00047 };
00048 
00049 } // namespace
00050 
00051 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5