101 #define PI 3.14159265358979323e0
102 #define PI_OVER (PI/2.0e0)
103 #define MAX_LAT ((PI * 90)/180.0)
104 #define MAX_ORIGIN_LAT ((81.114528 * PI) / 180.0)
105 #define MIN_NORTH_LAT (83.5*PI/180.0)
106 #define MIN_SOUTH_LAT (-79.5*PI/180.0)
107 #define MIN_EAST_NORTH 0
108 #define MAX_EAST_NORTH 4000000
112 static double UPS_f = 1 / 298.257223563;
137 double inv_f = 1 /
f;
144 if ((inv_f < 250) || (inv_f > 350))
194 double tempEasting, tempNorthing;
205 if ((longitude < -
PI) || (longitude > (2 *
PI)))
236 *Easting = tempEasting;
237 *Northing = tempNorthing;
266 if ((Hemisphere !=
'N') && (Hemisphere !=
'S'))
273 if (Hemisphere ==
'N')
275 if (Hemisphere ==
'S')
int Convert_Geodetic_To_Polar_Stereographic(double Latitude, double longitude, double *Easting, double *Northing)
int Set_Polar_Stereographic_Parameters(double a, double f, double Latitude_of_True_Scale, double longitude_Down_from_Pole, double False_Easting, double False_Northing)
void Get_UPS_Parameters(double *a, double *f)
#define UPS_NORTHING_ERROR
const double UPS_False_Easting
int Convert_Polar_Stereographic_To_Geodetic(double Easting, double Northing, double *Latitude, double *longitude)
int Convert_Geodetic_To_UPS(double Latitude, double longitude, char *Hemisphere, double *Easting, double *Northing)
int Set_UPS_Parameters(double a, double f)
#define UPS_EASTING_ERROR
int Convert_UPS_To_Geodetic(char Hemisphere, double Easting, double Northing, double *Latitude, double *longitude)
#define UPS_HEMISPHERE_ERROR
const double UPS_False_Northing
static double UPS_Origin_Latitude
static double UPS_Origin_longitude