dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
tranmerc.c File Reference
#include <math.h>
#include "tranmerc.h"

Go to the source code of this file.

Macros

#define PI   3.14159265358979323e0 /* PI */
 
#define PI_OVER_2   (PI/2.0e0) /* PI over 2 */
 
#define MAX_LAT   ((PI * 89.99)/180.0) /* 89.99 degrees in radians */
 
#define MAX_DELTA_int   ((PI * 90)/180.0) /* 90 degrees in radians */
 
#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

int 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)
 
int Convert_Geodetic_To_Transverse_Mercator (double Latitude, double longitude, double *Easting, double *Northing)
 
int Convert_Transverse_Mercator_To_Geodetic (double Easting, double Northing, double *Latitude, double *longitude)
 

Variables

static double TranMerc_a = 6378137.0
 
static double TranMerc_f = 1 / 298.257223563
 
static double TranMerc_es = 0.0066943799901413800
 
static double TranMerc_ebs = 0.0067394967565869
 
static double TranMerc_Origin_Lat = 0.0
 
static double TranMerc_Origin_int = 0.0
 
static double TranMerc_False_Northing = 0.0
 
static double TranMerc_False_Easting = 0.0
 
static double TranMerc_Scale_Factor = 1.0
 
static double TranMerc_ap = 6367449.1458008
 
static double TranMerc_bp = 16038.508696861
 
static double TranMerc_cp = 16.832613334334
 
static double TranMerc_dp = 0.021984404273757
 
static double TranMerc_ep = 3.1148371319283e-005
 
static double TranMerc_Delta_Easting = 40000000.0
 
static double TranMerc_Delta_Northing = 40000000.0
 

Macro Definition Documentation

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

Definition at line 119 of file tranmerc.c.

#define MAX_DELTA_int   ((PI * 90)/180.0) /* 90 degrees in radians */

Definition at line 105 of file tranmerc.c.

#define MAX_LAT   ((PI * 89.99)/180.0) /* 89.99 degrees in radians */

Definition at line 104 of file tranmerc.c.

#define MAX_SCALE_FACTOR   3.0

Definition at line 107 of file tranmerc.c.

#define MIN_SCALE_FACTOR   0.3

Definition at line 106 of file tranmerc.c.

#define PI   3.14159265358979323e0 /* PI */

Definition at line 102 of file tranmerc.c.

#define PI_OVER_2   (PI/2.0e0) /* PI over 2 */

Definition at line 103 of file tranmerc.c.

#define SPHSN (   Latitude)
Value:
((double) (TranMerc_a / sqrt( 1.e0 - TranMerc_es * \
pow(sin(Latitude), 2))))
static double TranMerc_es
Definition: tranmerc.c:130
static double TranMerc_a
Definition: tranmerc.c:128

Definition at line 113 of file tranmerc.c.

#define SPHSR (   Latitude)
Value:
((double) (TranMerc_a * (1.e0 - TranMerc_es) / \
pow(DENOM(Latitude), 3)))
static double TranMerc_es
Definition: tranmerc.c:130
static double TranMerc_a
Definition: tranmerc.c:128
#define DENOM(Latitude)
Definition: tranmerc.c:119

Definition at line 116 of file tranmerc.c.

#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) ) )
static double TranMerc_cp
Definition: tranmerc.c:143
static double TranMerc_ep
Definition: tranmerc.c:145
static double TranMerc_ap
Definition: tranmerc.c:141
static double TranMerc_bp
Definition: tranmerc.c:142
static double TranMerc_dp
Definition: tranmerc.c:144

Definition at line 109 of file tranmerc.c.

Function Documentation

int Convert_Geodetic_To_Transverse_Mercator ( double  Latitude,
double  longitude,
double *  Easting,
double *  Northing 
)

Definition at line 302 of file tranmerc.c.

int Convert_Transverse_Mercator_To_Geodetic ( double  Easting,
double  Northing,
double *  Latitude,
double *  longitude 
)

Definition at line 457 of file tranmerc.c.

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 266 of file tranmerc.c.

int 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 161 of file tranmerc.c.

Variable Documentation

double TranMerc_a = 6378137.0
static

Definition at line 128 of file tranmerc.c.

double TranMerc_ap = 6367449.1458008
static

Definition at line 141 of file tranmerc.c.

double TranMerc_bp = 16038.508696861
static

Definition at line 142 of file tranmerc.c.

double TranMerc_cp = 16.832613334334
static

Definition at line 143 of file tranmerc.c.

double TranMerc_Delta_Easting = 40000000.0
static

Definition at line 148 of file tranmerc.c.

double TranMerc_Delta_Northing = 40000000.0
static

Definition at line 149 of file tranmerc.c.

double TranMerc_dp = 0.021984404273757
static

Definition at line 144 of file tranmerc.c.

double TranMerc_ebs = 0.0067394967565869
static

Definition at line 131 of file tranmerc.c.

double TranMerc_ep = 3.1148371319283e-005
static

Definition at line 145 of file tranmerc.c.

double TranMerc_es = 0.0066943799901413800
static

Definition at line 130 of file tranmerc.c.

double TranMerc_f = 1 / 298.257223563
static

Definition at line 129 of file tranmerc.c.

double TranMerc_False_Easting = 0.0
static

Definition at line 137 of file tranmerc.c.

double TranMerc_False_Northing = 0.0
static

Definition at line 136 of file tranmerc.c.

double TranMerc_Origin_int = 0.0
static

Definition at line 135 of file tranmerc.c.

double TranMerc_Origin_Lat = 0.0
static

Definition at line 134 of file tranmerc.c.

double TranMerc_Scale_Factor = 1.0
static

Definition at line 138 of file tranmerc.c.