PageRenderTime 99ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/Proj4/PJ_tcc.c

http://github.com/route-me/route-me
C | 20 lines | 19 code | 1 blank | 0 comment | 2 complexity | 7df9428b3c2ef92adecc286d71b80bc8 MD5 | raw file
  1. #ifndef lint
  2. static const char SCCSID[]="@(#)PJ_tcc.c 4.1 94/02/15 GIE REL";
  3. #endif
  4. #define PROJ_PARMS__ \
  5. double ap;
  6. #define EPS10 1.e-10
  7. #define PJ_LIB__
  8. #include "projects.h"
  9. PROJ_HEAD(tcc, "Transverse Central Cylindrical") "\n\tCyl, Sph, no inv.";
  10. FORWARD(s_forward); /* spheroid */
  11. double b, bt;
  12. b = cos(lp.phi) * sin(lp.lam);
  13. if ((bt = 1. - b * b) < EPS10) F_ERROR;
  14. xy.x = b / sqrt(bt);
  15. xy.y = atan2(tan(lp.phi) , cos(lp.lam));
  16. return (xy);
  17. }
  18. FREEUP; if (P) pj_dalloc(P); }
  19. ENTRY0(tcc) P->es = 0.; P->fwd = s_forward; ENDENTRY(P)