PageRenderTime 48ms CodeModel.GetById 41ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Proj4/PJ_lask.c

http://github.com/route-me/route-me
C | 29 lines | 28 code | 1 blank | 0 comment | 1 complexity | 2a77bc2bc29e9b72414876ec09b185d9 MD5 | raw file
 1#ifndef lint
 2static const char SCCSID[]="@(#)PJ_lask.c	4.1	94/02/15	GIE	REL";
 3#endif
 4#define PROJ_PARMS__
 5#define PJ_LIB__
 6#include	"projects.h"
 7PROJ_HEAD(lask, "Laskowski") "\n\tMisc Sph, no inv.";
 8#define	a10	 0.975534
 9#define	a12	-0.119161
10#define	a32	-0.0143059
11#define	a14	-0.0547009
12#define	b01	 1.00384
13#define	b21	 0.0802894
14#define	b03	 0.0998909
15#define	b41	 0.000199025
16#define	b23	-0.0285500
17#define	b05	-0.0491032
18FORWARD(s_forward); /* sphere */
19	double l2, p2;
20
21	l2 = lp.lam * lp.lam;
22	p2 = lp.phi * lp.phi;
23	xy.x = lp.lam * (a10 + p2 * (a12 + l2 * a32 + p2 * a14));
24	xy.y = lp.phi * (b01 + l2 * (b21 + p2 * b23 + l2 * b41) +
25		p2 * (b03 + p2 * b05));
26	return (xy);
27}
28FREEUP; if (P) pj_dalloc(P); }
29ENTRY0(lask) P->fwd = s_forward; P->inv = 0; P->es = 0.; ENDENTRY(P)