PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/Proj4/PJ_urm5.c

http://github.com/route-me/route-me
C | 31 lines | 29 code | 2 blank | 0 comment | 1 complexity | bc928ab213913a0f846947812305ddaa MD5 | raw file
 1#ifndef lint
 2static const char SCCSID[]="@(#)PJ_urm5.c	4.1	94/02/15	GIE	REL";
 3#endif
 4#define PROJ_PARMS__ \
 5	double m, rmn, q3, n;
 6#define PJ_LIB__
 7# include	"projects.h"
 8PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph.\n\tn= q= alphi=";
 9FORWARD(s_forward); /* spheroid */
10	double t;
11
12	t = lp.phi = aasin(P->n * sin(lp.phi));
13	xy.x = P->m * lp.lam * cos(lp.phi);
14	t *= t;
15	xy.y = lp.phi * (1. + t * P->q3) * P->rmn;
16	return xy;
17}
18FREEUP; if (P) pj_dalloc(P); }
19ENTRY0(urm5)
20	double alpha, t;
21
22	P->n = pj_param(P->params, "dn").f;
23	P->q3 = pj_param(P->params, "dq").f / 3.;
24	alpha = pj_param(P->params, "ralpha").f;
25	t = P->n * sin(alpha);
26	P->m = cos(alpha) / sqrt(1. - t * t);
27	P->rmn = 1. / (P->m * P->n);
28	P->es = 0.;
29	P->inv = 0;
30	P->fwd = s_forward;
31ENDENTRY(P)