Geographical position and calculation using latitude/longitude. Most of this comes from http://www.movable-type.co.uk/scripts/latlong.html

Dependents:   Senet NAMote

Files at this revision

API Documentation at this revision

Comitter:
shimniok
Date:
Tue Sep 27 04:00:39 2011 +0000
Parent:
0:8b049ccf57cb
Commit message:
Added duplicate include protection, change macro PI to _PI to avoid conflict

Changed in this revision

GeoPosition.h Show annotated file Show diff for this revision Revisions of this file
diff -r 8b049ccf57cb -r b4feb3f54fa3 GeoPosition.h
--- a/GeoPosition.h	Wed Apr 27 17:58:09 2011 +0000
+++ b/GeoPosition.h	Tue Sep 27 04:00:39 2011 +0000
@@ -1,9 +1,12 @@
-#ifndef PI
-#define PI 3.141592653
+#ifndef __GEOPOSITION_H
+#define __GEOPOSITION_H
+
+#ifndef _PI
+#define _PI 3.141592653
 #endif
 
-#define degrees(x) ((x)*180/PI)
-#define radians(x) ((x)*PI/180)
+#define degrees(x) ((x)*180/_PI)
+#define radians(x) ((x)*_PI/180)
 
 /** Geographical position and calculation. Most of this comes from http://www.movable-type.co.uk/scripts/latlong.html
  *
@@ -90,4 +93,6 @@
     double _northing;   /** The position's UTM northing coordinate */
     double _easting;    /** The position's UTM easting coordinate */
     int _time;          /** Timestamp */
-};
\ No newline at end of file
+};
+
+#endif
\ No newline at end of file