/*
* 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
* 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)
* 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
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);