Go to the documentation of this file.
30 static double r_major;
31 static double r_minor;
32 static double lon_center;
33 static double lat_center;
34 static double false_easting;
35 static double false_northing;
36 static double acoef[7];
37 static double bcoef[7];
38 static double sin_p26;
39 static double cos_p26;
61 false_easting = false_east;
62 false_northing = false_north;
63 lon_center = -152.0 *
D2R;
64 lat_center = 64.0 *
D2R;
67 es = .006768657997291094;
82 esphi = e * sin(lat_center);
83 chi = 2.0 * atan(tan((
HALF_PI + lat_center)/2.0) *
84 pow(((1.0 - esphi)/(1.0 + esphi)),(e/2.0))) -
HALF_PI;
85 sincos(chi,&sin_p26,&cos_p26);
145 x = (
x - false_easting) / r_major;
146 y = (
y - false_northing) / r_major;
157 s = xp * xp + yp * yp;
164 dr = (
double) (n -1) * br;
165 di = (
double) (n -1) * bi;
167 for (
j = 2;
j <= n;
j++)
173 br = acoef[n -
j] -
s * ar;
174 bi = bcoef[n -
j] -
s * ai;
179 dr = (
double) (n -
j) * acoef[n -
j] -
s * cr;
180 di = (
double) (n -
j) * bcoef[n -
j] -
s * ci;
189 fxyr = xp * ar - yp * ai + br -
x;
190 fxyi = yp * ar + xp * ai + bi -
y;
191 fpxyr = xp * cr - yp * ci + dr;
192 fpxyi = yp * cr + xp * ci + ci;
193 den = fpxyr * fpxyr + fpxyi * fpxyi;
194 dxp = -(fxyr * fpxyr + fxyi * fpxyi) /
den;
195 dyp = -(fxyi * fpxyr - fxyr * fpxyi) /
den;
210 rh = sqrt(xp * xp + yp * yp);
211 z = 2.0 * atan(rh / 2.0);
219 chi =
asinz(cosz * sin_p26 + (yp * sinz * cos_p26) / rh);
224 esphi = e * sin(phi);
225 dphi = 2.0 * atan(tan((
HALF_PI + chi) / 2.0) *
226 pow(((1.0 + esphi) / (1.0 - esphi)),(e / 2.0))) -
HALF_PI - phi;
238 *
lon =
adjust_lon (lon_center + atan2((xp * sinz), (rh * cos_p26 * cosz - yp *
void gctp_print_title(const char *proj_name)
long alconinvint(double r_maj, double r_min, double false_east, double false_north)
void gctp_print_cenlon(double A)
#define GCTP_PRINT_ERROR(format,...)
double adjust_lon(double x)
long alconinv(double x, double y, double *lon, double *lat)
void gctp_print_offsetp(double A, double B)
integer, parameter double
void gctp_print_radius2(double radius1, double radius2)
void gctp_print_cenlat(double A)