svn-gvsig-desktop / tags / v1_9_Build_1222 / libraries / libjni-proj4 / src / PJ_fahey.c @ 41849
History | View | Annotate | Download (625 Bytes)
1 |
#ifndef lint
|
---|---|
2 |
static const char SCCSID[]="@(#)PJ_fahey.c 4.1 94/02/15 GIE REL"; |
3 |
#endif
|
4 |
#define PJ_LIB__
|
5 |
# include <projects.h> |
6 |
PROJ_HEAD(fahey, "Fahey") "\n\tPcyl, Sph."; |
7 |
#define TOL 1e-6 |
8 |
FORWARD(s_forward); /* spheroid */
|
9 |
xy.y = 1.819152 * ( xy.x = tan(0.5 * lp.phi) ); |
10 |
xy.x = 0.819152 * lp.lam * asqrt(1 - xy.x * xy.x); |
11 |
return (xy);
|
12 |
} |
13 |
INVERSE(s_inverse); /* spheroid */
|
14 |
lp.phi = 2. * atan(xy.y /= 1.819152); |
15 |
lp.lam = fabs(xy.y = 1. - xy.y * xy.y) < TOL ? 0. : |
16 |
xy.x / (0.819152 * sqrt(xy.y)); |
17 |
return (lp);
|
18 |
} |
19 |
FREEUP; if (P) pj_dalloc(P); }
|
20 |
ENTRY0(fahey) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)
|