#include <gls_map_util.h>
|
void | SetGeodetic (const Vector &lonLatAlt, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) |
|
void | SetGeodetic (double longitude, double latitude, double altitude, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) |
|
void | GetGeodetic (Vector *lonLatAlt, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) const |
|
void | GetGeodetic (double *longitude, double *latitude, double *altitude, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) const |
|
void | SetGeocentric (const Vector &value) |
|
void | SetGeocentric (double x, double y, double z) |
|
void | GetGeocentric (Vector *value) const |
|
void | GetGeocentric (double *x, double *y, double *z) const |
|
bool | operator== (const GeoCoord &other) const |
|
bool | operator!= (const GeoCoord &other) const |
|
|
static void | GeocentricToGeodetic (double xp, double yp, double zp, double *lon, double *lat, double *alt, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) |
|
static void | GeodeticToGeocentric (double lon, double lat, double alt, double *xp, double *yp, double *zp, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) |
|
static void | UTMToGeodetic (const double northing, const double easting, double &lat_degrees, double &lon_degrees) |
|
static void | UTMToGeodetic (const double northing, const double easting, const int zone, const int latZoneIndex, double &lat_degrees, double &lon_degrees) |
|
static void | GeodeticToUTM (const double lat_degrees, const double lon_degrees, double &northing, double &easting) |
|
static int | CalcZone (double lon_radians) |
|
static int | CalcZoneDeg (double longitude_degrees) |
|
static char | CalcLatZoneDeg (double lat_degrees) |
|
static int | CalcLatZoneDegIndex (double lat_degrees) |
|
static void | GetSphericalDistanceAndBearing (const GeoCoord &coord1, const GeoCoord &coord2, double *distance, double *bearing, const double radius=6372795.477598) |
|
static void | GetPointAtDistanceAndBearingSpherical (const GeoCoord &origin, double distance, double bearing, GeoCoord *destination, const double radius=6372795.477598) |
|
|
enum | ValueFlags { VAL_GEODETIC_WGS84 = 1,
VAL_GEOCENTRIC = 2
} |
|
|
void | GetGeodeticNonWGS84 (double *longitude, double *latitude, double *altitude, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) const |
|
void | SetGeodeticNonWGS84 (double longitude, double latitude, double altitude, const EllipsoidParams &ellipsoid=GeoCoord::WGS84) |
|
void | UpdateGeodeticWGS84Value () const |
|
void | UpdateGeocentricValue () const |
|
|
static bool | closeValues (double lv, double rv) |
|
static void | CalcFalseNorthEast (double lat_radians) |
|
static void | CalcLambda0 () |
|
|
unsigned char | _validValues |
|
double | _lon |
|
double | _lat |
|
double | _alt |
|
double | _x |
|
double | _y |
|
double | _z |
|
|
static double | _False_Northing = 0.0 |
|
static double | _False_Easting = 0.0 |
|
static double | _Zone = 0.0 |
|
static double | _Lambda0 = 0.0 |
|
static const char | _LatZone [20] = { 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X'} |
|
The GeoCoord class encapsulates a location relative to the earth. It is possible to get and set the value in a number of different coordinate systems.
void disti::GeoCoord::GeocentricToGeodetic |
( |
double |
xp, |
|
|
double |
yp, |
|
|
double |
zp, |
|
|
double * |
lon, |
|
|
double * |
lat, |
|
|
double * |
alt, |
|
|
const EllipsoidParams & |
ellipsoid = GeoCoord::WGS84 |
|
) |
| |
|
static |
Utility method to convert from geocentric to geodetic coordinates
void disti::GeoCoord::GeodeticToGeocentric |
( |
double |
lon, |
|
|
double |
lat, |
|
|
double |
alt, |
|
|
double * |
xp, |
|
|
double * |
yp, |
|
|
double * |
zp, |
|
|
const EllipsoidParams & |
ellipsoid = GeoCoord::WGS84 |
|
) |
| |
|
static |
Utility method to convert from geodetic to geocentric coordinates
void disti::GeoCoord::GeodeticToUTM |
( |
const double |
lat_degrees, |
|
|
const double |
lon_degrees, |
|
|
double & |
northing, |
|
|
double & |
easting |
|
) |
| |
|
static |
(RAT)************************************************************* poly1 = 1.0 - (e_sq/4.0) - (3.0*e_sq*e_sq)/64.0 - 5.0*pow(e_sq,3.0)/256.0; poly2 = 3.0*e_sq/8.0 + (3.0*e_sq*e_sq)/32.0 + 45.0*pow(e_sq, 3.0)/1024.0; poly3 = 15.0*e_sq*e_sq/256.0 + 45.0*pow(e_sq, 3.0)/1024.0; poly4 = 35.0*pow(e_sq, 3.0)/3072.0;
void disti::GeoCoord::GetGeocentric |
( |
Vector * |
value | ) |
const |
|
inline |
Get GeoCoord value in geocentric coordinates
- Parameters
-
value | pointer to a vector to receive the value |
void disti::GeoCoord::GetGeocentric |
( |
double * |
x, |
|
|
double * |
y, |
|
|
double * |
z |
|
) |
| const |
|
inline |
Get GeoCoord value in geocentric coordinates
- Parameters
-
x | pointer to a double to receive the x coordinate value |
y | pointer to a double to receive the y coordinate value |
z | pointer to a double to receive the z coordinate value |
void disti::GeoCoord::GetGeodetic |
( |
Vector * |
lonLatAlt, |
|
|
const EllipsoidParams & |
ellipsoid = GeoCoord::WGS84 |
|
) |
| const |
|
inline |
Get GeoCoord value in geodetic coordinates
- Parameters
-
lonLatAlt | pointer to a vector to receive the value ( x = longitude, y = latitude, z = altitude ) |
ellipsoid | Ellipsoid type |
void disti::GeoCoord::GetGeodetic |
( |
double * |
longitude, |
|
|
double * |
latitude, |
|
|
double * |
altitude, |
|
|
const EllipsoidParams & |
ellipsoid = GeoCoord::WGS84 |
|
) |
| const |
|
inline |
Get GeoCoord value in geodetic coordinates
- Parameters
-
longitude | pointer to a double to receive the longitude in degrees |
latitude | pointer to a double to receive the latitude in degrees |
altitude | pointer to a double to receive the altitude in meters |
ellipsoid | Ellipsoid type |
void disti::GeoCoord::GetPointAtDistanceAndBearingSpherical |
( |
const GeoCoord & |
origin, |
|
|
double |
distance, |
|
|
double |
bearing, |
|
|
GeoCoord * |
destination, |
|
|
const double |
radius = 6372795.477598 |
|
) |
| |
|
static |
Calculate a new point given the distance and initial bearing from a known origin. The new point is located on the 'great circle' arc defined by the parameters.
- Parameters
-
origin | The starting point |
distance | Distance to the destination in meters |
bearing | Initial bearing from the origin in degrees from true north |
destination | Pointer to a GeoCoord to receive the destination point |
radius | (optional) Radius of the sphere. Default value is the average radius of the earth (6372795.477598 meters) |
void disti::GeoCoord::GetSphericalDistanceAndBearing |
( |
const GeoCoord & |
coord1, |
|
|
const GeoCoord & |
coord2, |
|
|
double * |
distance, |
|
|
double * |
bearing, |
|
|
const double |
radius = 6372795.477598 |
|
) |
| |
|
static |
Calculate the 'great circle' distance and initial bearing between two points along the surface of a sphere using the Haversine formula.
- Parameters
-
coord1 | First point |
coord2 | Second point |
distance | Pointer to a double to receive the distance in meters |
bearing | Pointer to a double to receive the initial bearing from coord1 to coord2 in degrees from true north |
radius | (optional) Radius of the sphere. Default value is the average radius of the earth (6372795.477598 meters) |
bool disti::GeoCoord::operator!= |
( |
const GeoCoord & |
other | ) |
const |
|
inline |
Determine if two GeoCoords do not have equivalent values
- Parameters
-
bool disti::GeoCoord::operator== |
( |
const GeoCoord & |
other | ) |
const |
|
inline |
Determine if two GeoCoords have equivalent values
- Parameters
-
void disti::GeoCoord::SetGeocentric |
( |
const Vector & |
value | ) |
|
|
inline |
Set GeoCoord value in geocentric coordinates
- Parameters
-
value | Vector containing new geocentric coordinate in meters |
void disti::GeoCoord::SetGeocentric |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
|
inline |
Set GeoCoord value in geocentric coordinates
- Parameters
-
x | New x coordinate value in meters |
y | New y coordinate value in meters |
z | New z coordinate value in meters |
void disti::GeoCoord::SetGeodetic |
( |
const Vector & |
lonLatAlt, |
|
|
const EllipsoidParams & |
ellipsoid = GeoCoord::WGS84 |
|
) |
| |
|
inline |
Set GeoCoord value in geodetic coordinates
- Parameters
-
lonLatAlt | Vector where x = longitude, y = latitude, z = altitude |
ellipsoid | Ellipsoid type |
void disti::GeoCoord::SetGeodetic |
( |
double |
longitude, |
|
|
double |
latitude, |
|
|
double |
altitude, |
|
|
const EllipsoidParams & |
ellipsoid = GeoCoord::WGS84 |
|
) |
| |
|
inline |
Set GeoCoord value in geodetic coordinates
- Parameters
-
longitude | Longitude in degrees |
latitude | Latitude in degrees |
altitude | Altitude in meters |
ellipsoid | Ellipsoid type |
The documentation for this class was generated from the following files:
- gls_map_util.h
- gls_map_util.cpp