Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:b4feb3f54fa3, committed 2011-09-27
- 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