From 1d54ce2b6f47b9d60bfd28ad0d33a883be3d510a Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Sun, 12 Nov 2017 14:27:26 +0100 Subject: Poder autochecking again (WIP) (#652) * Poder dual autochecking implementation * Debugging aid: Improvements in PJ_vgridshift.c and gie.c * Most likely, the bugbeing tripped is in the gridshift code, so. uncomment suspicious lines in deformation.gie and merge this to support the debugging effort --- src/PJ_cart.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/PJ_cart.c') diff --git a/src/PJ_cart.c b/src/PJ_cart.c index 52237f24..e2768c55 100644 --- a/src/PJ_cart.c +++ b/src/PJ_cart.c @@ -318,8 +318,8 @@ int pj_cart_selftest (void) { b = proj_trans (P, PJ_FWD, a); /* Check roundtrip precision for 10000 iterations each way */ - dist = proj_roundtrip (P, PJ_FWD, 10000, a); - dist = proj_roundtrip (P, PJ_INV, 10000, b); + dist = proj_roundtrip (P, PJ_FWD, 10000, &a); + dist = proj_roundtrip (P, PJ_INV, 10000, &b); if (dist > 2e-9) return 7; @@ -331,7 +331,7 @@ int pj_cart_selftest (void) { a.lpz.z = 100; /* Forward projection: Ellipsoidal-to-3D-Cartesian */ - dist = proj_roundtrip (P, PJ_FWD, 1, a); + dist = proj_roundtrip (P, PJ_FWD, 1, &a); if (dist > 1e-12) return 8; @@ -340,12 +340,14 @@ int pj_cart_selftest (void) { a.lpz.lam = PJ_TORAD(0); a.lpz.phi = PJ_TORAD(-90); a.lpz.z = 100; + b = a; /* Forward projection: Ellipsoidal-to-3D-Cartesian */ - dist = proj_roundtrip (P, PJ_FWD, 1, a); + dist = proj_roundtrip (P, PJ_FWD, 1, &a); if (dist > 1e-12) return 9; + /* Inverse projection: 3D-Cartesian-to-Ellipsoidal */ b = proj_trans (P, PJ_INV, b); -- cgit v1.2.3