Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

checkpoint.h

Go to the documentation of this file.
00001 /* 
00002 Object Oriented Mobile Robot Model (OOMRM) C++  Library Copyright (C) 2002-2005  Derek Jones
00003 
00004 This library is free software; you can redistribute it  and/or
00005 modify it under the terms of the GNU Lesser General Public
00006 License  as published by the Free Software Foundation; either
00007 version 2.1 of the  License, or (at your option) any later version.
00008 
00009 This library is  distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY;  without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU
00012 Lesser General Public License for more  details.
00013 
00014 You should have received a copy of the GNU Lesser General  Public
00015 License along with this library; if not, write to the Free  Software
00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   02111-1307  USA
00017 
00018 $Id: checkpoint.h,v 1.1.1.1 2006/05/11 05:22:45 derek Exp $ 
00019 */
00020 
00021 #ifndef CHECKPOINT1_H
00022 #define CHECKPOINT1_H
00023 #include <types.h>
00024 #define CHECKPOINT_MAX 500
00025 
00026 
00029 struct checkpoint
00030 {
00032   word timestamp;
00034   short IRangle; // direction IR is facing.
00036   uint8 x;              // position of robot
00038   uint8 y;
00039 //  uint8 ox;
00040 //  uint8 oy;           // position of obstacle.
00042   short distance; // ??
00044   short angle; // direction of travel--angle robot facing.
00045 };
00047 
00065 class logger // for some reason the new 3.2 GCC did not like "log" as a class name.
00066 {
00067 public:
00068   logger(void);
00070   static void operate(bool);
00072   static bool operate(void);
00074   static void frequency(short);
00076   static short frequency(void);
00078 
00084   static bool write();
00086   static word top(void);
00088 
00095   static void checkpoint(MILLIMETER x, MILLIMETER y, DEGREE angle, CENTIMETER d, DEGREE irangle);
00097   static void upload(void);
00098   #ifdef DOS
00099 
00100 
00108   static void play(unsigned short time,uint8& x, uint8& y, RADIAN& angle, CENTIMETER& d, RADIAN& irangle);
00110 
00113   static short time(unsigned short t);
00115 
00123   static void add_checkpoint(short time, short x, short y, DEGREE angle, CENTIMETER d, DEGREE irangle);
00124   #endif
00125 
00126 private:
00127   static struct checkpoint _checkpoints[CHECKPOINT_MAX];
00128   static word _top;
00129   static bool _operate;
00130   static short _frequency;
00131   static short _counter;
00132 };
00133 #endif
00134 

Generated on Mon Oct 8 19:32:18 2007 for OOMRM Mapping API by doxygen1.3