PageRenderTime 24ms CodeModel.GetById 14ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/Proj4/PJ_eck1.c

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