~ubuntu-branches/ubuntu/wily/proj/wily

« back to all changes in this revision

Viewing changes to src/PJ_imw_p.c

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2009-10-05 16:28:55 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091005162855-gnsd4jzn7wtw8uwg
Tags: 4.7.0-1
* New upstream release
* Datum grids files updated to version 1.5.
  (closes: #548297)
* Removed manpages.dpatch, applied upstream.
* Generalized libproj0.install file.
* Policy changed to 3.8.3, without futher changes.
* Minor change to nad2bin.1 man page.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef lint
2
 
static const char SCCSID[]="@(#)PJ_imw_p.c      4.1     94/05/22        GIE     REL";
3
 
#endif
4
1
#define PROJ_PARMS__ \
5
2
        double  P, Pp, Q, Qp, R_1, R_2, sphi_1, sphi_2, C2; \
6
3
        double  phi_1, phi_2, lam_1; \
36
33
                xy.x = lp.lam;
37
34
                xy.y = 0.;
38
35
        } else {
39
 
                double xa, ya, xb, yb, xc, yc, D, B, m, sp, t, R, C;
 
36
                double xa, ya, xb, yb, xc, D, B, m, sp, t, R, C;
40
37
 
41
38
                sp = sin(lp.phi);
42
39
                m = pj_mlfn(lp.phi, sp, cos(lp.phi), P->en);
56
53
                }
57
54
                if (P->mode > 0) {
58
55
                        xc = lp.lam;
59
 
                        yc = 0.;
 
56
                        *yc = 0.;
60
57
                } else {
61
58
                        t = lp.lam * P->sphi_1;
62
59
                        xc = P->R_1 * sin(t);
63
 
                        yc = P->R_1 * (1. - cos(t));
 
60
                        *yc = P->R_1 * (1. - cos(t));
64
61
                }
65
 
                D = (xb - xc)/(yb - yc);
66
 
                B = xc + D * (C + R - yc);
 
62
                D = (xb - xc)/(yb - *yc);
 
63
                B = xc + D * (C + R - *yc);
67
64
                xy.x = D * sqrt(R * R * (1 + D * D) - B * B);
68
65
                if (lp.phi > 0)
69
66
                        xy.x = - xy.x;