]> Pileus Git - grits/blobdiff - src/gis-world.h
Remove redundant LIBADD from plugins makefiles
[grits] / src / gis-world.h
index 78ca130463ff8b4a09f7bba4bc0d9c9d61ed98e6..3a347808e109c3ba50a9c311f6752382c726c753 100644 (file)
@@ -1,16 +1,16 @@
 /*
  * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #define EARTH_R (6371000)
 #define EARTH_C (2*M_PI*EARTH_R)
+#define NORTH  90
+#define SOUTH -90
+#define EAST  180
+#define WEST -180
 
 /**
  * Terms
@@ -36,7 +40,7 @@
  * px     - Pixels, for screen-based distances
  *
  * height - Height, the distance above the geoid (ground)
- * elev   - Elevation, the distance above the spheroid 
+ * elev   - Elevation, the distance above the spheroid
  * rad    - Radius, the distance from the center of the earth
  *
  * lat    - Latitude, amount north-south, -90 (S) .. 90 (N)
@@ -60,8 +64,8 @@
  * lle2xyz:    0.0,   0.0,   0.0 ->    0.0,   0.0,  10.0
  * lle2xyz:   90.0,   0.0,   0.0 ->    0.0,  10.0,   0.0
  * lle2xyz:    0.0,  90.0,   0.0 ->   10.0,   0.0,   0.0
- * 
- *               x      y      z ->    lat    lon   elev 
+ *
+ *               x      y      z ->    lat    lon   elev
  * xyz2lle:   10.0,   0.0,   0.0 ->    0.0,  90.0,   0.0
  * xyz2lle:    0.0,  10.0,   0.0 ->   90.0,   0.0,   0.0
  * xyz2lle:    0.0,   0.0,  10.0 ->    0.0,   0.0,   0.0
@@ -86,6 +90,9 @@ void lle2xyz(gdouble lat, gdouble lon, gdouble elev,
 void xyz2lle(gdouble x, gdouble y, gdouble z,
                gdouble *lat, gdouble *lon, gdouble *elev);
 
+void xyz2ll(gdouble x, gdouble y, gdouble z,
+               gdouble *lat, gdouble *lon);
+
 gdouble ll2m(gdouble lon_dist, gdouble lat);
 
 gdouble distd(gdouble *a, gdouble *b);