Defines | Functions
core/vpgl/vpgl_datum_conversion.cxx File Reference

This file is a subset of routines that will be used to create and list the datum coordinate shift formulas. More...

#include "vpgl_datum_conversion.h"
#include <vcl_cmath.h>
#include <vnl/vnl_math.h>

Go to the source code of this file.

Defines

#define degree_to_rad   (vnl_math::pi_over_180)
#define dcos(x)   vcl_cos((x)*vnl_math::pi_over_180)
#define dsin(x)   vcl_sin((x)*vnl_math::pi_over_180)
#define EPSILON   1.0e-12

Functions

double ipow (double x, int i)
void wgs72_to_wgs84_deltas (double phi, double *delta_phi, double *delta_lamda, double *delta_hgt)
void wgs72_to_wgs84 (double phi, double lamda, double height, double *wgs84_phi, double *wgs84_lamda, double *wgs84_hgt)
 elev new (meters)
void wgs84_to_wgs72 (double phi, double lamda, double height, double *wgs72_phi, double *wgs72_lamda, double *wgs72_hgt)
 elev new (meters)
void nad27m_to_wgs84_deltas (double phi, double lamda, double, double *delta_phi, double *delta_lamda, double *delta_hgt)
void nad27m_to_wgs84 (double phi, double lamda, double height, double *wgs84_phi, double *wgs84_lamda, double *wgs84_hgt)
 elev new (meters)
void wgs84_to_nad27m (double phi, double lamda, double height, double *nad27m_phi, double *nad27m_lamda, double *nad27m_hgt)
 elev new (meters)
void nad27n_to_wgs84_deltas (double phi, double lamda, double, double *delta_phi, double *delta_lamda, double *delta_hgt)
void nad27n_to_wgs84 (double phi, double lamda, double height, double *wgs84_phi, double *wgs84_lamda, double *wgs84_hgt)
 elev new (meters)
void wgs84_to_nad27n (double phi, double lamda, double height, double *nad27n_phi, double *nad27n_lamda, double *nad27n_hgt)
 elev new (meters)
void nad27n_to_wgs84_alternate (double nad27_lat, double nad27_lon, double nad27_el, double *wgs84_lat, double *wgs84_lon, double *wgs84_el)
void wgs84_to_nad27n_alternate (double wgs84_lat, double wgs84_lon, double wgs84_el, double *nad27n_lat, double *nad27n_lon, double *nad27n_el)
double geo_detic2centric (double geodetic_lat, double A, double B)
 Major and minor axes of earth.
double geo_centric2detic (double geocentric_lat, double A, double B)
void GRS_to_latlong (double x, double y, double z, double *geodetic_lat, double *lon, double *el, double A, double B)
 Major and minor axes of earth.
void latlong_to_GRS (double geodetic_lat, double lon, double el, double *x, double *y, double *z, double A, double B)
 Major and minor axes of earth.
void nad27n_to_wgs72 (double phi, double lamda, double height, double *wgs72_phi, double *wgs72_lamda, double *wgs72_hgt)
 elev in wgs72 (meters)
void wgs72_to_nad27n (double phi, double lamda, double height, double *nad27n_phi, double *nad27n_lamda, double *nad27n_hgt)
 elev in nad27n (meters)

Detailed Description

This file is a subset of routines that will be used to create and list the datum coordinate shift formulas.

Included are the following examples of datum shifts, demonstrating the functionality of these routines.

These datum shifts have the following interesting property:

TO GET: WGS84 from NAD27 -> compute d_lat, d_lon, d_H using NAD27 lat/lon, THEN lat(WGS84) = lat(NAD27)+d_lat lon(WGS84) = lon(NAD27)+d_lon elev(WGS84) = elev(NAD27)+d_H

TO GET: NAD27 from WGS84 -> compute d_lat, d_lon, d_H using WGS84 lat/lon, THEN lat(NAD27) = lat(WGS84)-d_lat lon(NAD27) = lon(WGS84)-d_lon <- note "-" signs elev(NAD27) = elev(WGS84)-d_H

Definition in file vpgl_datum_conversion.cxx.


Define Documentation

#define dcos (   x)    vcl_cos((x)*vnl_math::pi_over_180)

Definition at line 31 of file vpgl_datum_conversion.cxx.

#define degree_to_rad   (vnl_math::pi_over_180)

Definition at line 30 of file vpgl_datum_conversion.cxx.

#define dsin (   x)    vcl_sin((x)*vnl_math::pi_over_180)

Definition at line 32 of file vpgl_datum_conversion.cxx.

#define EPSILON   1.0e-12

Definition at line 33 of file vpgl_datum_conversion.cxx.


Function Documentation

double geo_centric2detic ( double  geocentric_lat,
double  A,
double  B 
)
Parameters:
geocentric_latgeocentric latitude of input point
BMajor and minor axes of earth

Definition at line 864 of file vpgl_datum_conversion.cxx.

double geo_detic2centric ( double  geodetic_lat,
double  A,
double  B 
)

Major and minor axes of earth.

Parameters:
geodetic_latgeodetic latitude of input point
BMajor and minor axes of earth

Definition at line 853 of file vpgl_datum_conversion.cxx.

void GRS_to_latlong ( double  x,
double  y,
double  z,
double *  geodetic_lat,
double *  lon,
double *  el,
double  A,
double  B 
)

Major and minor axes of earth.

< used in iteration

< Local distance to earth center

< dist in x-y plane

< eccentricity square

Parameters:
zInput GRS coords
eloutput coordinates of point
BMajor and minor axes of earth

Definition at line 891 of file vpgl_datum_conversion.cxx.

double ipow ( double  x,
int  i 
)

Definition at line 36 of file vpgl_datum_conversion.cxx.

void latlong_to_GRS ( double  geodetic_lat,
double  lon,
double  el,
double *  x,
double *  y,
double *  z,
double  A,
double  B 
)

Major and minor axes of earth.

< Local distance to earth center

Parameters:
elInput coordinates of point
zOutput GRS coords
BMajor and minor axes of earth

Definition at line 956 of file vpgl_datum_conversion.cxx.

void nad27m_to_wgs84 ( double  phi,
double  lamda,
double  height,
double *  wgs84_phi,
double *  wgs84_lamda,
double *  wgs84_hgt 
)

elev new (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
wgs84_philat shift (degrees)
wgs84_lamdalon shift (degrees)
wgs84_hgtelev shift (meters)

Definition at line 193 of file vpgl_datum_conversion.cxx.

void nad27m_to_wgs84_deltas ( double  phi,
double  lamda,
double  ,
double *  delta_phi,
double *  delta_lamda,
double *  delta_hgt 
)
Parameters:
phiinput lat (degrees)
lamdainput lon (degrees)
delta_philat shift (arc sec)
delta_lamdalon shift (arc sec)
delta_hgtelev shift (meters)

Definition at line 143 of file vpgl_datum_conversion.cxx.

void nad27n_to_wgs72 ( double  phi,
double  lamda,
double  height,
double *  wgs72_phi,
double *  wgs72_lamda,
double *  wgs72_hgt 
)

elev in wgs72 (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
wgs72_philat in wgs72 (degrees)
wgs72_lamdalon in wgs72 (degrees)
wgs72_hgtelev in wgs72 (meters)

Definition at line 995 of file vpgl_datum_conversion.cxx.

void nad27n_to_wgs84 ( double  phi,
double  lamda,
double  height,
double *  wgs84_phi,
double *  wgs84_lamda,
double *  wgs84_hgt 
)

elev new (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
wgs84_philat shift (degrees)
wgs84_lamdalon shift (degrees)
wgs84_hgtelev shift (meters)

Definition at line 287 of file vpgl_datum_conversion.cxx.

void nad27n_to_wgs84_alternate ( double  nad27_lat,
double  nad27_lon,
double  nad27_el,
double *  wgs84_lat,
double *  wgs84_lon,
double *  wgs84_el 
)

Definition at line 344 of file vpgl_datum_conversion.cxx.

void nad27n_to_wgs84_deltas ( double  phi,
double  lamda,
double  ,
double *  delta_phi,
double *  delta_lamda,
double *  delta_hgt 
)
Parameters:
phiinput lat (degrees)
lamdainput lon (degrees)
delta_philat shift (arc sec)
delta_lamdalon shift (arc sec)
delta_hgtelev shift (meters)

Definition at line 239 of file vpgl_datum_conversion.cxx.

void wgs72_to_nad27n ( double  phi,
double  lamda,
double  height,
double *  nad27n_phi,
double *  nad27n_lamda,
double *  nad27n_hgt 
)

elev in nad27n (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
nad27n_philat in nad27n (degrees)
nad27n_lamdalon in nad27n (degrees)
nad27n_hgtelev in nad27n (meters)

Definition at line 1018 of file vpgl_datum_conversion.cxx.

void wgs72_to_wgs84 ( double  phi,
double  lamda,
double  height,
double *  wgs84_phi,
double *  wgs84_lamda,
double *  wgs84_hgt 
)

elev new (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
wgs84_philat shift (degrees)
wgs84_lamdalon shift (degrees)
wgs84_hgtelev shift (meters)

Definition at line 98 of file vpgl_datum_conversion.cxx.

void wgs72_to_wgs84_deltas ( double  phi,
double *  delta_phi,
double *  delta_lamda,
double *  delta_hgt 
)
Parameters:
phiinput lat (degrees)
delta_philat shift (degrees)
delta_lamdalon shift (degrees)
delta_hgtelev shift (meters)

Definition at line 52 of file vpgl_datum_conversion.cxx.

void wgs84_to_nad27m ( double  phi,
double  lamda,
double  height,
double *  nad27m_phi,
double *  nad27m_lamda,
double *  nad27m_hgt 
)

elev new (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
nad27m_philat shift (degrees)
nad27m_lamdalon shift (degrees)
nad27m_hgtelev shift (meters)

Definition at line 216 of file vpgl_datum_conversion.cxx.

void wgs84_to_nad27n ( double  phi,
double  lamda,
double  height,
double *  nad27n_phi,
double *  nad27n_lamda,
double *  nad27n_hgt 
)

elev new (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
nad27n_philat shift (degrees)
nad27n_lamdalon shift (degrees)
nad27n_hgtelev shift (meters)

Definition at line 309 of file vpgl_datum_conversion.cxx.

void wgs84_to_nad27n_alternate ( double  wgs84_lat,
double  wgs84_lon,
double  wgs84_el,
double *  nad27n_lat,
double *  nad27n_lon,
double *  nad27n_el 
)

Definition at line 600 of file vpgl_datum_conversion.cxx.

void wgs84_to_wgs72 ( double  phi,
double  lamda,
double  height,
double *  wgs72_phi,
double *  wgs72_lamda,
double *  wgs72_hgt 
)

elev new (meters)

Parameters:
phiinput lat, lon, elev coord (degrees)
wgs72_philat shift (degrees)
wgs72_lamdalon shift (degrees)
wgs72_hgtelev shift (meters)

Definition at line 120 of file vpgl_datum_conversion.cxx.