GPS4Palm

Source Code Documentation


tranmerc.c File Reference

#include <PalmOS.h>
#include <PalmCompatibility.h>
#include "MathLib.h"
#include "tranmerc.h"

Include dependency graph for tranmerc.c:

Go to the source code of this file.

Defines

#define PI   3.14159265358979323e0
#define PI_OVER   (PI/2.0e0)
#define MAX_LAT   ((PI * 89.99)/180.0)
#define MAX_DELTA_LONG   ((PI * 90)/180.0)
#define MIN_SCALE_FACTOR   0.3
#define MAX_SCALE_FACTOR   3.0
#define SPHTMD(Latitude)
#define SPHSN(Latitude)
#define SPHSR(Latitude)
#define DENOM(Latitude)   ((double) (sqrt(1.e0 - TranMerc_es * pow(sin(Latitude),2))))

Functions

long Set_Transverse_Mercator_Parameters (double a, double f, double Origin_Latitude, double Central_Meridian, double False_Easting, double False_Northing, double Scale_Factor)
void Get_Transverse_Mercator_Parameters (double *a, double *f, double *Origin_Latitude, double *Central_Meridian, double *False_Easting, double *False_Northing, double *Scale_Factor)
long Convert_Geodetic_To_Transverse_Mercator (double Latitude, double Longitude, double *Easting, double *Northing)
long Convert_Transverse_Mercator_To_Geodetic (double Easting, double Northing, double *Latitude, double *Longitude)


Define Documentation

#define DENOM Latitude   )     ((double) (sqrt(1.e0 - TranMerc_es * pow(sin(Latitude),2))))
 

Definition at line 123 of file tranmerc.c.

#define MAX_DELTA_LONG   ((PI * 90)/180.0)
 

Definition at line 109 of file tranmerc.c.

Referenced by Convert_Geodetic_To_Transverse_Mercator(), and Set_Transverse_Mercator_Parameters().

#define MAX_LAT   ((PI * 89.99)/180.0)
 

Definition at line 108 of file tranmerc.c.

Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Geodetic_To_UTM(), Convert_UTM_To_Geodetic(), and Set_Transverse_Mercator_Parameters().

#define MAX_SCALE_FACTOR   3.0
 

Definition at line 111 of file tranmerc.c.

Referenced by Set_Transverse_Mercator_Parameters().

#define MIN_SCALE_FACTOR   0.3
 

Definition at line 110 of file tranmerc.c.

Referenced by Set_Transverse_Mercator_Parameters().

#define PI   3.14159265358979323e0
 

Definition at line 106 of file tranmerc.c.

Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Geodetic_To_UTM(), Convert_Transverse_Mercator_To_Geodetic(), Convert_UTM_To_Geodetic(), and Set_Transverse_Mercator_Parameters().

#define PI_OVER   (PI/2.0e0)
 

Definition at line 107 of file tranmerc.c.

#define SPHSN Latitude   ) 
 

Value:

((double) (TranMerc_a / sqrt( 1.e0 - TranMerc_es * \
      pow(sin(Latitude), 2))))

Definition at line 117 of file tranmerc.c.

Referenced by Convert_Geodetic_To_Transverse_Mercator(), and Convert_Transverse_Mercator_To_Geodetic().

#define SPHSR Latitude   ) 
 

Value:

((double) (TranMerc_a * (1.e0 - TranMerc_es) / \
    pow(DENOM(Latitude), 3)))

Definition at line 120 of file tranmerc.c.

Referenced by Convert_Transverse_Mercator_To_Geodetic().

#define SPHTMD Latitude   ) 
 

Value:

((double) (TranMerc_ap * Latitude \
      - TranMerc_bp * sin(2.e0 * Latitude) + TranMerc_cp * sin(4.e0 * Latitude) \
      - TranMerc_dp * sin(6.e0 * Latitude) + TranMerc_ep * sin(8.e0 * Latitude) ) )

Definition at line 113 of file tranmerc.c.

Referenced by Convert_Geodetic_To_Transverse_Mercator(), and Convert_Transverse_Mercator_To_Geodetic().


Function Documentation

long Convert_Geodetic_To_Transverse_Mercator double  Latitude,
double  Longitude,
double *  Easting,
double *  Northing
 

Definition at line 308 of file tranmerc.c.

References cos(), fabs(), MAX_DELTA_LONG, MAX_LAT, PI, pow(), sin(), SPHSN, SPHTMD, tan(), TRANMERC_LAT_ERROR, TRANMERC_LON_ERROR, TRANMERC_LON_WARNING, and TRANMERC_NO_ERROR.

Referenced by Convert_Geodetic_To_UTM(), and Set_Transverse_Mercator_Parameters().

long Convert_Transverse_Mercator_To_Geodetic double  Easting,
double  Northing,
double *  Latitude,
double *  Longitude
 

Definition at line 463 of file tranmerc.c.

References cos(), fabs(), PI, pow(), sin(), SPHSN, SPHSR, SPHTMD, tan(), TRANMERC_EASTING_ERROR, TRANMERC_LON_WARNING, TRANMERC_NO_ERROR, and TRANMERC_NORTHING_ERROR.

Referenced by Convert_UTM_To_Geodetic().

void Get_Transverse_Mercator_Parameters double *  a,
double *  f,
double *  Origin_Latitude,
double *  Central_Meridian,
double *  False_Easting,
double *  False_Northing,
double *  Scale_Factor
 

Definition at line 272 of file tranmerc.c.

long Set_Transverse_Mercator_Parameters double  a,
double  f,
double  Origin_Latitude,
double  Central_Meridian,
double  False_Easting,
double  False_Northing,
double  Scale_Factor
 

Definition at line 165 of file tranmerc.c.

References Convert_Geodetic_To_Transverse_Mercator(), MAX_DELTA_LONG, MAX_LAT, MAX_SCALE_FACTOR, MIN_SCALE_FACTOR, PI, TRANMERC_A_ERROR, TRANMERC_CENT_MER_ERROR, TRANMERC_INV_F_ERROR, TRANMERC_NO_ERROR, TRANMERC_ORIGIN_LAT_ERROR, and TRANMERC_SCALE_FACTOR_ERROR.

Referenced by Convert_Geodetic_To_UTM(), and Convert_UTM_To_Geodetic().


Created: Mon, 08 Oct 2007 22:33:16 +0200
Copyright ©2004 M. Prinke