Gazebo logo

GarminGPS.hh

Go to the documentation of this file.
00001 /*
00002  *  Gazebo - Outdoor Multi-Robot Simulator
00003  *  Copyright (C) 2003  
00004  *     Nate Koenig & Andrew Howard
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 /* Desc: A Very Basic Model for a Garmin GPS
00022  * Author: Pranav Srivastava
00023  * Date: 22nd October
00024  * CVS: $Id: GarminGPS.hh,v 1.8 2004/11/14 07:39:04 inspectorg Exp $
00025  */
00026 
00027 #ifndef GARMINGPS_HH
00028 #define GARMINGPS_HH
00029 
00030 #if HAVE_PROJ4
00031 #include <projects.h>
00032 #endif
00033 
00034 #include "Model.hh"
00035 
00036 // Forward declarations
00037 typedef struct gz_gps gz_gps_t;
00038 
00039 
00040 class GarminGPS : public Model
00041 {
00042   // Construct, destructor
00043   public: GarminGPS( World *world );
00044   public: virtual ~GarminGPS();
00045 
00046   // Load the model
00047   public: virtual int Load( WorldFile *file, WorldFileNode *node );
00048 
00049   // Initialize the model
00050   public: virtual int Init( WorldFile *file, WorldFileNode *node );
00051 
00052   // Finalize the model
00053   public: virtual int Fini();
00054 
00055   // Update the model state
00056   public: virtual void Update( double step );
00057  
00058   // Update the data in the external interface
00059   private: void GpsPutData();
00060       
00061   // ODE components
00062   private: Body *body;
00063 
00064   // Time settings
00065   private: double updatePeriod, updateTime;
00066 
00067   // Simulated GPS data
00068   private: GzVector utm;
00069   private: double utc, lat, lon, alt;
00070   private: int sats, qual;
00071   private: double hdop, vdop;
00072 
00073 #if HAVE_PROJ4
00074   // Projection
00075   private: PJ *proj;
00076 #endif
00077 
00078   // External interface
00079   private: gz_gps_t *gps;
00080 };
00081 
00082 #endif

Last updated 12 September 2005 21:38:45