Geo Stars Library
0.9.3
Geodetic and Astrometry library
|
This file contains the geo library routines for conversion between Geocentric and Geodetic coordinates. More...
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "geoStars.h"
Go to the source code of this file.
Macros | |
#define | aDc 1.0026000 |
toms Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
Functions | |
int | geoEfg2LlhGetIts (void) |
int | geoSetAccuracy (double acc) |
This routine will set the accuracy of the iterative Efg2Llh routines (geoEfg2Llh_hm, geoEfg2Llh_torge, geoEfg2Llh_bowring, geoEfg2Llh_aa) More... | |
void | geoEfg2Llh (int datum, double efg[], double *lat, double *lon, double *hgt) |
This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat (int datum, double e, double f, double g) |
double | geoEfg2Lon (int datum, double e, double f, double g) |
double | geoEfg2Hgt (int datum, double e, double f, double g) |
void | geoEfg2Llh_hm (int datum, double efg[], double *lat, double *lon, double *hgt) |
Hirvonen & Moritz Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat_hm (int datum, double e, double f, double g) |
double | geoEfg2Lon_hm (int datum, double e, double f, double g) |
double | geoEfg2Hgt_hm (int datum, double e, double f, double g) |
double | geoEfg2Hgt_hm_its (int datum, double e, double f, double g) |
void | geoEfg2Llh_torge (int datum, double efg[], double *lat, double *lon, double *hgt) |
Torge Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat_torge (int datum, double e, double f, double g) |
double | geoEfg2Lon_torge (int datum, double e, double f, double g) |
double | geoEfg2Hgt_torge (int datum, double e, double f, double g) |
double | geoEfg2Hgt_torge_its (int datum, double e, double f, double g) |
void | geoEfg2Llh_bowring (int datum, double efg[], double *lat, double *lon, double *hgt) |
Bowring Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat_bowring (int datum, double e, double f, double g) |
double | geoEfg2Lon_bowring (int datum, double e, double f, double g) |
double | geoEfg2Hgt_bowring (int datum, double e, double f, double g) |
double | geoEfg2Hgt_bowring_its (int datum, double e, double f, double g) |
void | geoEfg2Llh_aa (int datum, double efg[], double *lat, double *lon, double *hgt) |
Astronomical Almanac 2002 Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat_aa (int datum, double e, double f, double g) |
double | geoEfg2Lon_aa (int datum, double e, double f, double g) |
double | geoEfg2Hgt_aa (int datum, double e, double f, double g) |
double | geoEfg2Hgt_aa_its (int datum, double e, double f, double g) |
void | geoEfg2Llh_borkowski (int datum, double efg[], double *lat, double *lon, double *hgt) |
Borkowski Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat_borkowski (int datum, double e, double f, double g) |
double | geoEfg2Lon_borkowski (int datum, double e, double f, double g) |
double | geoEfg2Hgt_borkowski (int datum, double e, double f, double g) |
void | geoEfg2Llh_vermeille (int datum, double efg[], double *lat, double *lon, double *hgt) |
Vermeille Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat_vermeille (int datum, double e, double f, double g) |
double | geoEfg2Lon_vermeille (int datum, double e, double f, double g) |
double | geoEfg2Hgt_vermeille (int datum, double e, double f, double g) |
void | geoEfg2Llh_heikkinen (int datum, double efg[], double *lat, double *lon, double *hgt) |
heikkinen Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ). More... | |
double | geoEfg2Lat_heikkinen (int datum, double e, double f, double g) |
double | geoEfg2Lon_heikkinen (int datum, double e, double f, double g) |
double | geoEfg2Hgt_heikkinen (int datum, double e, double f, double g) |
void | geoEfg2Llh_toms (int datum, double efg[], double *lat, double *lon, double *hgt) |
double | geoEfg2Lat_toms (int datum, double e, double f, double g) |
double | geoEfg2Lon_toms (int datum, double e, double f, double g) |
double | geoEfg2Hgt_toms (int datum, double e, double f, double g) |
Variables | |
double | geoAccuracy = 0.00000001 |
static int | its |
This file contains the geo library routines for conversion between Geocentric and Geodetic coordinates.
Methods avalailable:
Definition in file geoEfg2Llh.c.
#define aDc 1.0026000 |
toms Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 858 of file geoEfg2Llh.c.
Referenced by geoEfg2Llh_toms().
double geoEfg2Hgt | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 125 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh().
double geoEfg2Hgt_aa | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 531 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_aa().
double geoEfg2Hgt_aa_its | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 543 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_aa(), and geoEfg2LlhGetIts().
double geoEfg2Hgt_borkowski | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 638 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_borkowski().
double geoEfg2Hgt_bowring | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 429 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_bowring().
double geoEfg2Hgt_bowring_its | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 441 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_bowring(), and geoEfg2LlhGetIts().
double geoEfg2Hgt_heikkinen | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 831 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_heikkinen().
double geoEfg2Hgt_hm | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 213 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_hm().
double geoEfg2Hgt_hm_its | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 225 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_hm(), and geoEfg2LlhGetIts().
double geoEfg2Hgt_toms | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 930 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_toms().
double geoEfg2Hgt_torge | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 322 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_torge().
double geoEfg2Hgt_torge_its | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 334 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_torge(), and geoEfg2LlhGetIts().
double geoEfg2Hgt_vermeille | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 730 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, and geoEfg2Llh_vermeille().
double geoEfg2Lat | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 102 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh(), and RAD_TO_DEG.
double geoEfg2Lat_aa | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 508 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_aa(), and RAD_TO_DEG.
double geoEfg2Lat_borkowski | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 615 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_borkowski(), and RAD_TO_DEG.
double geoEfg2Lat_bowring | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 406 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_bowring(), and RAD_TO_DEG.
double geoEfg2Lat_heikkinen | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 808 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_heikkinen(), and RAD_TO_DEG.
double geoEfg2Lat_hm | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 190 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_hm(), and RAD_TO_DEG.
double geoEfg2Lat_toms | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 907 of file geoEfg2Llh.c.
References geoEfg2Llh_toms(), and RAD_TO_DEG.
double geoEfg2Lat_torge | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 299 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_torge(), and RAD_TO_DEG.
double geoEfg2Lat_vermeille | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 707 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_vermeille(), and RAD_TO_DEG.
void geoEfg2Llh | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 72 of file geoEfg2Llh.c.
References cube, GEO_E, GEO_F, GEO_G, geoGetEllipsoid(), its, p, and sqr.
Referenced by geoEfg2Hgt(), geoEfg2Lat(), and geoEfg2Lon().
void geoEfg2Llh_aa | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
Astronomical Almanac 2002 Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 468 of file geoEfg2Llh.c.
References GEO_E, GEO_EFG2LLH_MAX_ITS, GEO_F, GEO_G, geoAccuracy, geoGetEllipsoid(), its, n(), p, and sqr.
Referenced by geoEfg2Hgt_aa(), geoEfg2Hgt_aa_its(), geoEfg2Lat_aa(), and geoEfg2Lon_aa().
void geoEfg2Llh_borkowski | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
Borkowski Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 571 of file geoEfg2Llh.c.
References cube, GEO_E, GEO_F, GEO_G, geoGetEllipsoid(), its, p, and sqr.
Referenced by geoEfg2Hgt_borkowski(), geoEfg2Lat_borkowski(), and geoEfg2Lon_borkowski().
void geoEfg2Llh_bowring | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
Bowring Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 362 of file geoEfg2Llh.c.
References cube, GEO_E, GEO_EFG2LLH_MAX_ITS, GEO_F, GEO_G, geoAccuracy, geoGetEllipsoid(), its, n(), p, and sqr.
Referenced by geoEfg2Hgt_bowring(), geoEfg2Hgt_bowring_its(), geoEfg2Lat_bowring(), and geoEfg2Lon_bowring().
void geoEfg2Llh_heikkinen | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
heikkinen Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 758 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoGetEllipsoid(), its, p, sp, and sqr.
Referenced by geoEfg2Hgt_heikkinen(), geoEfg2Lat_heikkinen(), and geoEfg2Lon_heikkinen().
void geoEfg2Llh_hm | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
Hirvonen & Moritz Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 153 of file geoEfg2Llh.c.
References GEO_E, GEO_EFG2LLH_MAX_ITS, GEO_F, GEO_G, geoAccuracy, geoGetEllipsoid(), its, n(), p, and sqr.
Referenced by geoEfg2Hgt_hm(), geoEfg2Hgt_hm_its(), geoEfg2Lat_hm(), and geoEfg2Lon_hm().
void geoEfg2Llh_toms | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
Definition at line 860 of file geoEfg2Llh.c.
References aDc, cube, GEO_E, GEO_F, GEO_G, geoGetEllipsoid(), its, n(), and sqr.
Referenced by geoEfg2Hgt_toms(), geoEfg2Lat_toms(), and geoEfg2Lon_toms().
void geoEfg2Llh_torge | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
Torge Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 253 of file geoEfg2Llh.c.
References GEO_E, GEO_EFG2LLH_MAX_ITS, GEO_F, GEO_G, geoAccuracy, geoGetEllipsoid(), its, n(), p, and sqr.
Referenced by geoEfg2Hgt_torge(), geoEfg2Hgt_torge_its(), geoEfg2Lat_torge(), and geoEfg2Lon_torge().
void geoEfg2Llh_vermeille | ( | int | datum, |
double | efg[], | ||
double * | lat, | ||
double * | lon, | ||
double * | hgt | ||
) |
Vermeille Method - This routine will convert earth centered Cartesian coordinates (E,F,G), into geodetic coordinates (latitude , longitude , and ellipsoid height ).
int | datum |
double | efg[] : EFG(xyz) in METERS |
double | *lat : Latitude in RADIANS |
double | *lon : Longitude in RADIANS |
double | *hgt : Height in METERS |
Definition at line 666 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoGetEllipsoid(), its, k, p, and sqr.
Referenced by geoEfg2Hgt_vermeille(), geoEfg2Lat_vermeille(), and geoEfg2Lon_vermeille().
int geoEfg2LlhGetIts | ( | void | ) |
Definition at line 25 of file geoEfg2Llh.c.
References its.
Referenced by geoEfg2Hgt_aa_its(), geoEfg2Hgt_bowring_its(), geoEfg2Hgt_hm_its(), and geoEfg2Hgt_torge_its().
double geoEfg2Lon | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 114 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh(), and RAD_TO_DEG.
double geoEfg2Lon_aa | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 520 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_aa(), and RAD_TO_DEG.
double geoEfg2Lon_borkowski | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 627 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_borkowski(), and RAD_TO_DEG.
double geoEfg2Lon_bowring | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 418 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_bowring(), and RAD_TO_DEG.
double geoEfg2Lon_heikkinen | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 820 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_heikkinen(), and RAD_TO_DEG.
double geoEfg2Lon_hm | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 202 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_hm(), and RAD_TO_DEG.
double geoEfg2Lon_toms | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 919 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_toms(), and RAD_TO_DEG.
double geoEfg2Lon_torge | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 311 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_torge(), and RAD_TO_DEG.
double geoEfg2Lon_vermeille | ( | int | datum, |
double | e, | ||
double | f, | ||
double | g | ||
) |
Definition at line 719 of file geoEfg2Llh.c.
References GEO_E, GEO_F, GEO_G, geoEfg2Llh_vermeille(), and RAD_TO_DEG.
int geoSetAccuracy | ( | double | acc) |
This routine will set the accuracy of the iterative Efg2Llh routines (geoEfg2Llh_hm, geoEfg2Llh_torge, geoEfg2Llh_bowring, geoEfg2Llh_aa)
double | acc : Accuracy in degrees |
GEO_OK | on success |
GEO_ERROR | on error |
Several definitions may be used with this function: GEO_EFG2LLH_ACCURACY_METER = 0.00001 degrees GEO_EFG2LLH_ACCURACY_CM = 0.0000001 degrees GEO_EFG2LLH_ACCURACY_MM = 0.00000001 degrees
Definition at line 45 of file geoEfg2Llh.c.
References GEO_ERROR, GEO_OK, and geoAccuracy.
double geoAccuracy = 0.00000001 |
Definition at line 21 of file geoEfg2Llh.c.
Referenced by geoEfg2Llh_aa(), geoEfg2Llh_bowring(), geoEfg2Llh_hm(), geoEfg2Llh_torge(), and geoSetAccuracy().
|
static |
Definition at line 23 of file geoEfg2Llh.c.
Referenced by geoEfg2Llh(), geoEfg2Llh_aa(), geoEfg2Llh_borkowski(), geoEfg2Llh_bowring(), geoEfg2Llh_heikkinen(), geoEfg2Llh_hm(), geoEfg2Llh_toms(), geoEfg2Llh_torge(), geoEfg2Llh_vermeille(), and geoEfg2LlhGetIts().