svn-gvsig-desktop / tags / v1_10_0_Build_1258 / libraries / libjni-proj4 / src / PJ_tcc.c
History | View | Annotate | Download (544 Bytes)
1 |
#ifndef lint
|
---|---|
2 |
static const char SCCSID[]="@(#)PJ_tcc.c 4.1 94/02/15 GIE REL"; |
3 |
#endif
|
4 |
#define PROJ_PARMS__ \
|
5 |
double ap;
|
6 |
#define EPS10 1.e-10 |
7 |
#define PJ_LIB__
|
8 |
#include <projects.h> |
9 |
PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv."; |
10 |
FORWARD(s_forward); /* spheroid */
|
11 |
double b, bt;
|
12 |
|
13 |
b = cos(lp.phi) * sin(lp.lam); |
14 |
if ((bt = 1. - b * b) < EPS10) F_ERROR; |
15 |
xy.x = b / sqrt(bt); |
16 |
xy.y = atan2(tan(lp.phi) , cos(lp.lam)); |
17 |
return (xy);
|
18 |
} |
19 |
FREEUP; if (P) pj_dalloc(P); }
|
20 |
ENTRY0(tcc) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)
|