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

/Proj4/PJ_denoy.c

http://github.com/route-me/route-me
C | 21 lines | 21 code | 0 blank | 0 comment | 1 complexity | 32da94a01d246974ff8fd3de73e68119 MD5 | raw file
 1#ifndef lint
 2static const char SCCSID[]="@(#)PJ_denoy.c	4.1 94/02/15     GIE     REL";
 3#endif
 4#define PJ_LIB__
 5#include	"projects.h"
 6PROJ_HEAD(denoy, "Denoyer Semi-Elliptical") "\n\tPCyl., no inv., Sph.";
 7#define C0	0.95
 8#define C1	-.08333333333333333333
 9#define C3	.00166666666666666666
10#define D1	0.9
11#define D5	0.03
12FORWARD(s_forward); /* spheroid */
13	xy.y = lp.phi;
14	xy.x = lp.lam;
15	lp.lam = fabs(lp.lam);
16	xy.x *= cos((C0 + lp.lam * (C1 + lp.lam * lp.lam * C3)) *
17		(lp.phi * (D1 + D5 * lp.phi * lp.phi * lp.phi * lp.phi)));
18	return (xy);
19}
20FREEUP; if (P) pj_dalloc(P); }
21ENTRY0(denoy) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)