PageRenderTime 50ms CodeModel.GetById 43ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Proj4/PJ_wag3.c

http://github.com/route-me/route-me
C | 27 lines | 26 code | 1 blank | 0 comment | 1 complexity | 10c3870c9cbcfa60e7d8b463ecb755ec MD5 | raw file
 1#ifndef lint
 2static const char SCCSID[]="@(#)PJ_wag3.c	4.1	94/02/15	GIE	REL";
 3#endif
 4#define PROJ_PARMS__ \
 5	double	C_x;
 6#define PJ_LIB__
 7# include	"projects.h"
 8PROJ_HEAD(wag3, "Wagner III") "\n\tPCyl., Sph.\n\tlat_ts=";
 9#define TWOTHIRD 0.6666666666666666666667
10FORWARD(s_forward); /* spheroid */
11	xy.x = P->C_x * lp.lam * cos(TWOTHIRD * lp.phi);
12	xy.y = lp.phi;
13	return (xy);
14}
15INVERSE(s_inverse); /* spheroid */
16	lp.phi = xy.y;
17	lp.lam = xy.x / (P->C_x * cos(TWOTHIRD * lp.phi));
18	return (lp);
19}
20FREEUP; if (P) pj_dalloc(P); }
21ENTRY0(wag3)
22	double ts;
23
24	ts = pj_param(P->params, "rlat_ts").f;
25	P->C_x = cos(ts) / cos(2.*ts/3.);
26	P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
27ENDENTRY(P)