diff options
| author | Piyush Agram <piyush.agram@jpl.nasa.gov> | 2015-10-30 17:34:17 -0700 |
|---|---|---|
| committer | Piyush Agram <piyush.agram@jpl.nasa.gov> | 2015-10-30 20:24:29 -0700 |
| commit | 26c94c20dc2a8b78a12c2fae9ce7110fe075ef51 (patch) | |
| tree | 2cd9e47eb1175c13682aaa0914a7db08c091a19e /src/PJ_sch.c | |
| parent | 908aa5d4bb95ab4eecc039e581d64ceca6e8acc3 (diff) | |
| download | PROJ-26c94c20dc2a8b78a12c2fae9ce7110fe075ef51.tar.gz PROJ-26c94c20dc2a8b78a12c2fae9ce7110fe075ef51.zip | |
Order of lat/lon is interpreted correctly for SCH
Diffstat (limited to 'src/PJ_sch.c')
| -rw-r--r-- | src/PJ_sch.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PJ_sch.c b/src/PJ_sch.c index 5571deb3..9a0120fe 100644 --- a/src/PJ_sch.c +++ b/src/PJ_sch.c @@ -79,8 +79,8 @@ INVERSE3D(inverse3d); temp, temp+1, temp+2); - lpz.lam = temp[0] ; - lpz.phi = temp[1] ; + lpz.lam = temp[1] ; + lpz.phi = temp[0] ; lpz.z = temp[2]; // printf("INVERSE: \n"); @@ -93,11 +93,13 @@ FORWARD3D(forward3d); double temp[3]; double pxyz[3]; + //Convert lat lon to geocentric coordinates - if( pj_Convert_Geodetic_To_Geocentric( &(P->elp_0), lpz.lam, lpz.phi, lpz.z, + if( pj_Convert_Geodetic_To_Geocentric( &(P->elp_0), lpz.phi, lpz.lam, lpz.z, temp, temp+1, temp+2 ) != 0 ) F3_ERROR; + //Adjust for offset temp[0] -= P->xyzoff[0]; temp[1] -= P->xyzoff[1]; @@ -113,6 +115,7 @@ FORWARD3D(forward3d); pj_Convert_Geocentric_To_Geodetic( &(P->sph), pxyz[0], pxyz[1], pxyz[2], temp, temp+1, temp+2); + //Scale by radius xyz.x = temp[1] * P->rcurv / P->a; xyz.y = temp[0] * P->rcurv / P->a; |
