PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Proj4/PJ_eck5.c

http://github.com/route-me/route-me
C | 21 lines | 21 code | 0 blank | 0 comment | 1 complexity | acb10b11f42b198522a862d9e3f5ee03 MD5 | raw file
 1#ifndef lint
 2static const char SCCSID[]="@(#)PJ_eck5.c	4.1 94/02/15     GIE     REL";
 3#endif
 4#define PJ_LIB__
 5# include	"projects.h"
 6PROJ_HEAD(eck5, "Eckert V") "\n\tPCyl, Sph.";
 7#define XF	0.44101277172455148219
 8#define RXF	2.26750802723822639137
 9#define YF	0.88202554344910296438
10#define RYF	1.13375401361911319568
11FORWARD(s_forward); /* spheroid */
12	xy.x = XF * (1. + cos(lp.phi)) * lp.lam;
13	xy.y = YF * lp.phi;
14	return (xy);
15}
16INVERSE(s_inverse); /* spheroid */
17	lp.lam = RXF * xy.x / (1. + cos( lp.phi = RYF * xy.y));
18	return (lp);
19}
20FREEUP; if (P) pj_dalloc(P); }
21ENTRY0(eck5); P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)