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

Go to the source code of this file.

Macros

#define PI   3.14159265358979323e0 /* PI */
 
#define PI_OVER   (PI/2.0e0) /* PI over 2 */
 
#define MAX_LAT   ((PI * 90)/180.0) /* 90 degrees in radians */
 
#define MAX_ORIGIN_LAT   ((81.114528 * PI) / 180.0)
 
#define MIN_NORTH_LAT   (83.5*PI/180.0)
 
#define MIN_SOUTH_LAT   (-79.5*PI/180.0)
 
#define MIN_EAST_NORTH   0
 
#define MAX_EAST_NORTH   4000000
 

Functions

int Set_UPS_Parameters (double a, double f)
 
void Get_UPS_Parameters (double *a, double *f)
 
int Convert_Geodetic_To_UPS (double Latitude, double longitude, char *Hemisphere, double *Easting, double *Northing)
 
int Convert_UPS_To_Geodetic (char Hemisphere, double Easting, double Northing, double *Latitude, double *longitude)
 

Variables

static double UPS_a = 6378137.0
 
static double UPS_f = 1 / 298.257223563
 
const double UPS_False_Easting = 2000000
 
const double UPS_False_Northing = 2000000
 
static double UPS_Origin_Latitude = MAX_ORIGIN_LAT
 
static double UPS_Origin_longitude = 0.0
 

Macro Definition Documentation

#define MAX_EAST_NORTH   4000000

Definition at line 108 of file ups.c.

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

Definition at line 103 of file ups.c.

#define MAX_ORIGIN_LAT   ((81.114528 * PI) / 180.0)

Definition at line 104 of file ups.c.

#define MIN_EAST_NORTH   0

Definition at line 107 of file ups.c.

#define MIN_NORTH_LAT   (83.5*PI/180.0)

Definition at line 105 of file ups.c.

#define MIN_SOUTH_LAT   (-79.5*PI/180.0)

Definition at line 106 of file ups.c.

#define PI   3.14159265358979323e0 /* PI */

Definition at line 101 of file ups.c.

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

Definition at line 102 of file ups.c.

Function Documentation

int Convert_Geodetic_To_UPS ( double  Latitude,
double  longitude,
char *  Hemisphere,
double *  Easting,
double *  Northing 
)

Definition at line 174 of file ups.c.

int Convert_UPS_To_Geodetic ( char  Hemisphere,
double  Easting,
double  Northing,
double *  Latitude,
double *  longitude 
)

Definition at line 244 of file ups.c.

void Get_UPS_Parameters ( double *  a,
double *  f 
)

Definition at line 158 of file ups.c.

int Set_UPS_Parameters ( double  a,
double  f 
)

Definition at line 125 of file ups.c.

Variable Documentation

double UPS_a = 6378137.0
static

Definition at line 111 of file ups.c.

double UPS_f = 1 / 298.257223563
static

Definition at line 112 of file ups.c.

const double UPS_False_Easting = 2000000

Definition at line 113 of file ups.c.

const double UPS_False_Northing = 2000000

Definition at line 114 of file ups.c.

double UPS_Origin_Latitude = MAX_ORIGIN_LAT
static

Definition at line 115 of file ups.c.

double UPS_Origin_longitude = 0.0
static

Definition at line 116 of file ups.c.