/Proj4/PJ_wink1.c

http://github.com/route-me/route-me · C · 23 lines · 23 code · 0 blank · 0 comment · 1 complexity · 290475cb9080cfd31552807cf1fd0a67 MD5 · raw file

  1. #ifndef lint
  2. static const char SCCSID[]="@(#)PJ_wink1.c 4.1 94/02/15 GIE REL";
  3. #endif
  4. #define PROJ_PARMS__ \
  5. double cosphi1;
  6. #define PJ_LIB__
  7. # include "projects.h"
  8. PROJ_HEAD(wink1, "Winkel I") "\n\tPCyl., Sph.\n\tlat_ts=";
  9. FORWARD(s_forward); /* spheroid */
  10. xy.x = .5 * lp.lam * (P->cosphi1 + cos(lp.phi));
  11. xy.y = lp.phi;
  12. return (xy);
  13. }
  14. INVERSE(s_inverse); /* spheroid */
  15. lp.phi = xy.y;
  16. lp.lam = 2. * xy.x / (P->cosphi1 + cos(lp.phi));
  17. return (lp);
  18. }
  19. FREEUP; if (P) pj_dalloc(P); }
  20. ENTRY0(wink1)
  21. P->cosphi1 = cos(pj_param(P->params, "rlat_ts").f);
  22. P->es = 0.; P->inv = s_inverse; P->fwd = s_forward;
  23. ENDENTRY(P)