~ubuntu-branches/ubuntu/gutsy/proj/gutsy

« back to all changes in this revision

Viewing changes to src/PJ_wag2.c

  • Committer: Bazaar Package Importer
  • Author(s): Peter S Galbraith
  • Date: 2002-01-11 10:27:12 UTC
  • Revision ID: james.westby@ubuntu.com-20020111102712-ayi18r8y2eesv0y9
Tags: upstream-4.4.5
ImportĀ upstreamĀ versionĀ 4.4.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef lint
 
2
static const char SCCSID[]="@(#)PJ_wag2.c       4.1     94/02/15        GIE     REL";
 
3
#endif
 
4
#define PJ_LIB__
 
5
# include       <projects.h>
 
6
PROJ_HEAD(wag2, "Wagner II") "\n\tPCyl., Sph.";
 
7
#define C_x 0.92483
 
8
#define C_y 1.38725
 
9
#define C_p1 0.88022
 
10
#define C_p2 0.88550
 
11
FORWARD(s_forward); /* spheroid */
 
12
        lp.phi = aasin(C_p1 * sin(C_p2 * lp.phi));
 
13
        xy.x = C_x * lp.lam * cos(lp.phi);
 
14
        xy.y = C_y * lp.phi;
 
15
        return (xy);
 
16
}
 
17
INVERSE(s_inverse); /* spheroid */
 
18
        lp.phi = xy.y / C_y;
 
19
        lp.lam = xy.x / (C_x * cos(lp.phi));
 
20
        lp.phi = aasin(sin(lp.phi) / C_p1) / C_p2;
 
21
        return (lp);
 
22
}
 
23
FREEUP; if (P) pj_dalloc(P); }
 
24
ENTRY0(wag2) P->es = 0.; P->inv = s_inverse; P->fwd = s_forward; ENDENTRY(P)