/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
  2. static 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"
  8. PROJ_HEAD(urm5, "Urmaev V") "\n\tPCyl., Sph.\n\tn= q= alphi=";
  9. FORWARD(s_forward); /* spheroid */
  10. double t;
  11. t = lp.phi = aasin(P->n * sin(lp.phi));
  12. xy.x = P->m * lp.lam * cos(lp.phi);
  13. t *= t;
  14. xy.y = lp.phi * (1. + t * P->q3) * P->rmn;
  15. return xy;
  16. }
  17. FREEUP; if (P) pj_dalloc(P); }
  18. ENTRY0(urm5)
  19. double alpha, t;
  20. P->n = pj_param(P->params, "dn").f;
  21. P->q3 = pj_param(P->params, "dq").f / 3.;
  22. alpha = pj_param(P->params, "ralpha").f;
  23. t = P->n * sin(alpha);
  24. P->m = cos(alpha) / sqrt(1. - t * t);
  25. P->rmn = 1. / (P->m * P->n);
  26. P->es = 0.;
  27. P->inv = 0;
  28. P->fwd = s_forward;
  29. ENDENTRY(P)