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

sonar_base.h

Go to the documentation of this file.
00001 /*
00002 Object Oriented Mobile Robot Model (OOMRM) C++  Library Copyright (C) 2002-2006  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 
00019  * $Id: sonar_base.h,v 1.2 2006/06/07 00:58:41 derek Exp $
00020 */
00021 #ifndef SONAR_BASE_H
00022 #define SONAR_BASE_H
00023 #include <hardware/osonar.h>
00024 #include <sensor_base.h>
00025 #include <hardware/osonar.h>
00026 #ifdef DOS
00027 #include <sonar_base.h>
00028 #endif
00029 
00030 /*  The sonar base class is derived from the sensor_base class and allows for registering of sensors on the robot (Ref. sensor_base for details).
00031 
00032 \par
00033     To locate the sensor, fix the center of the robot somehow.  calculate how many millimeters sensor
00034     is from center.  Most robots have a "forward" (0 degrees), and lastly how many degrees are needed to 
00035     rotate around the robot to locate it (Ref. oSonarDV for sonar details)
00036 
00037 */
00038 class sonar_base : public sensor_base, public oSonarDV
00039 {
00040 public:
00050   sonar_base(short dfc, DEGREE forward, DEGREE rotate, IOLINE c, PORT p, IOLINE tpu, uint8 subclass=0);
00051   #ifdef DOS
00052 
00053   short value(void); 
00055   void WSwrite(void);
00056   #endif
00057 protected:
00058 };
00059 #ifdef DOS
00060 
00061 short emulated_value(sonar_base* const ir);
00062 #endif
00063 
00064 #endif

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