WaypointInterface.h

Go to the documentation of this file.
00001 /***************************************************************
00002  
00003  Mini Grand Challenge 2010
00004  Pennsylvania State University - Robotics Club
00005  Learn more at www.psurobotics.org
00006  Protected by the GNU General Public License
00007  
00008  This source file is developed and maintained by:
00009  + Jeremy Bridon jgb5034@psu.edu
00010  
00011  File: WaypointInterface.cpp/h
00012  Desc: Interfaces with a GPS device as well as manages the
00013  waypoint data loading from a config file. The waypoint configuration
00014  file name should be given as part of this component's configuration
00015  file with the string/data name pair "WaypointFile".
00016  
00017 ***************************************************************/
00018 
00019 // Inclusion guard
00020 #ifndef __WAYPOINTINTERFACE_H_
00021 #define __WAYPOINTINTERFACE_H_
00022 
00023 // Standard includes
00024 #include <queue>
00025 #include "../Shared/Utilities.h"
00026 #include "../Shared/BaseComponent.h"
00027 #include "../Shared/Vector2.h"
00028 
00030 #define EarthRadius 6378100.0
00031 
00033 class WaypointInterface : public BaseComponent
00034 {
00035 public:
00036         
00038         WaypointInterface();
00039         
00041         ~WaypointInterface();
00042         
00044         int Update();
00045         
00046 private:
00047 
00049         Vector2<double> GetLocation();
00050 
00051         // Get target waypoint location
00052         Vector2<double> GetWaypoint();
00053 
00055         double GetWaypointDistance();
00056         
00058         double GetWaypointAngle();
00059         
00061         void ParseWaypointFile(const char* FileName);
00062         
00064         queue< Vector2<double> > Waypoints;
00065         
00067         int WaypointTotal;
00068         
00070         int WaypointIndex;
00071         
00073         int GPSQuality;
00074 };
00075 
00076 // End of inclusion guard
00077 #endif
00078 

Generated on Sun Feb 21 00:00:08 2010 for Penn State Robotics Club: Mini Grand Challenge 2010 by  doxygen 1.5.5