Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (57 sloc) 5.28 KB
/*******************************************************************************/
/* UTM - Ellipsoid Coordinates transforms */
/* (c) 2006 by Stefanos Kozanis, N.T.U.A. */
/* Distributed freely as a Public Domain software */
/* */
/*******************************************************************************/
/* main_types.cpp: Common storage types and constants
*/
#include "main_types.h"
/* Global constant arrays */
ELLIPSOID_GEOMETRY ellipsoids[] = {{GE_GRS80_Alpha,GE_GRS80_F_INV},
{GE_WGS84_Alpha,GE_WGS84_F_INV},
{GE_HAYFORD_Alpha, GE_HAYFORD_F_INV},
{GE_BESSEL_Alpha, GE_BESSEL_F_INV}};
GSYSTEM geodetic_systems[] = {{GE_GRS80, GS_GR87_DX, GS_GR87_DY, GS_GR87_DZ, GS_GR87_RX, GS_GR87_RY, GS_GR87_RZ, GS_GR87_DS},
{GE_WGS84, GS_WGS84_DX, GS_WGS84_DY, GS_WGS84_DZ, GS_WGS84_RX, GS_WGS84_RY, GS_WGS84_RZ, GS_WGS84_DS},
{GE_HAYFORD, GS_ED50_CYPRUS_DX, GS_ED50_CYPRUS_DY, GS_ED50_CYPRUS_DZ, GS_ED50_CYPRUS_RX, GS_ED50_CYPRUS_RY, GS_ED50_CYPRUS_RZ, GS_ED50_CYPRUS_DS},
{GE_HAYFORD, GS_ED50_GREECE_DX, GS_ED50_GREECE_DY, GS_ED50_GREECE_DZ, GS_ED50_GREECE_RX, GS_ED50_GREECE_RY, GS_ED50_GREECE_RZ, GS_ED50_GREECE_DS},
{GE_HAYFORD, GS_ED50_MEANEUROPE_DX, GS_ED50_MEANEUROPE_DY, GS_ED50_MEANEUROPE_DZ, GS_ED50_MEANEUROPE_RX, GS_ED50_MEANEUROPE_RY, GS_ED50_MEANEUROPE_RZ, GS_ED50_MEANEUROPE_DS},
{GE_BESSEL, GS_GR_BESSEL_DX, GS_GR_BESSEL_DY, GS_GR_BESSEL_DZ, GS_GR_BESSEL_RX, GS_GR_BESSEL_RY, GS_GR_BESSEL_RZ, GS_GR_BESSEL_DS}
};
PCSYSTEM pc_systems[] = {
/* Greek Reference System 1987 */
{GS_GR87, PT_UTM, PC_GR87_PHI0, PC_GR87_LAMBDA0, PC_GR87_XOFFSET, PC_GR87_YOFFSET, PC_GR87_KAPPA},
/* UTM (WGS84) Zones 29 to 37 */
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(29-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(30-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(31-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(32-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(33-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(34-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(35-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(36-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
{GS_WGS84, PT_UTM, PC_UTM_PHI0, PC_UTM_LAMBDA0+(37-1)*6*PI/180.00, PC_UTM_XOFFSET, PC_UTM_YOFFSET, PC_UTM_KAPPA},
/* ED50 */
{GS_ED50_CYPRUS, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+6*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_GREECE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+4*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_GREECE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+5*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_MEANEUROPE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+0*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_MEANEUROPE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+1*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_MEANEUROPE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+2*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_MEANEUROPE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+3*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_MEANEUROPE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+4*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_MEANEUROPE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+5*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
{GS_ED50_MEANEUROPE, PT_UTM, PC_ED50_PHI0, PC_ED50_LAMBDA0+6*6*PI/180.00, PC_ED50_XOFFSET, PC_ED50_YOFFSET, PC_ED50_KAPPA},
/* HATT */
{GS_GR_BESSEL, PT_HATT, 38.25*PI/180, PC_GR_HATT_LAMBDA0-0.25*PI/180.00, PC_GR_HATT_XOFFSET, PC_GR_HATT_YOFFSET, PC_GR_HATT_KAPPA},
{GS_GR_BESSEL, PT_HATT, 37.75*PI/180, PC_GR_HATT_LAMBDA0+0.25*PI/180.00, PC_GR_HATT_XOFFSET, PC_GR_HATT_YOFFSET, PC_GR_HATT_KAPPA},
{GS_GR_BESSEL, PT_HATT, 37.75*PI/180, PC_GR_HATT_LAMBDA0-0.25*PI/180.00, PC_GR_HATT_XOFFSET, PC_GR_HATT_YOFFSET, PC_GR_HATT_KAPPA},
{GS_GR_BESSEL, PT_HATT, 38.25*PI/180, PC_GR_HATT_LAMBDA0+0.25*PI/180.00, PC_GR_HATT_XOFFSET, PC_GR_HATT_YOFFSET, PC_GR_HATT_KAPPA},
{GS_GR_BESSEL, PT_HATT, 40.75*PI/180, PC_GR_HATT_LAMBDA0-0.75*PI/180.00, PC_GR_HATT_XOFFSET, PC_GR_HATT_YOFFSET, PC_GR_HATT_KAPPA},
{GS_GR_BESSEL, PT_HATT, 40.75*PI/180, PC_GR_HATT_LAMBDA0-1.25*PI/180.00, PC_GR_HATT_XOFFSET, PC_GR_HATT_YOFFSET, PC_GR_HATT_KAPPA},
/* GREEK UTM 3 degrees on Bessel */
{GS_GR_BESSEL, PT_UTM, PC_GR_UTM3_PHI0, PC_GR_UTM3_LAMBDA0-3.00*PI/180.00, PC_GR_UTM3_XOFFSET, PC_GR_UTM3_YOFFSET, PC_GR_UTM3_KAPPA},
{GS_GR_BESSEL, PT_UTM, PC_GR_UTM3_PHI0, PC_GR_UTM3_LAMBDA0, PC_GR_UTM3_XOFFSET, PC_GR_UTM3_YOFFSET, PC_GR_UTM3_KAPPA},
{GS_GR_BESSEL, PT_UTM, PC_GR_UTM3_PHI0, PC_GR_UTM3_LAMBDA0+3.00*PI/180.00, PC_GR_UTM3_XOFFSET, PC_GR_UTM3_YOFFSET, PC_GR_UTM3_KAPPA}
};