#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 | 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) |
|
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.
static void 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
static void 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 GetGeocentric |
( |
Vector * |
value | ) |
const |
|
inline |
Get GeoCoord value in geocentric coordinates
- Parameters
-
value | pointer to a vector to receive the value |
void 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 |
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 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 |
static void 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) |
static void 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 operator!= |
( |
const GeoCoord & |
other | ) |
const |
|
inline |
Determine if two GeoCoords do not have equivalent values
- Parameters
-
bool operator== |
( |
const GeoCoord & |
other | ) |
const |
|
inline |
Determine if two GeoCoords have equivalent values
- Parameters
-
void SetGeocentric |
( |
const Vector & |
value | ) |
|
|
inline |
Set GeoCoord value in geocentric coordinates
- Parameters
-
value | Vector containing new geocentric coordinate in meters |
void 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 |
Set GeoCoord value in geodetic coordinates
- Parameters
-
lonLatAlt | Vector where x = longitude, y = latitude, z = altitude |
ellipsoid | Ellipsoid type |
void 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 file: