This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 47873d482b06c88e11d5d9d48266f84cec48a0f2
Author: Matthieu_Bastianelli <matthieu.bastiane...@geomatys.com>
AuthorDate: Thu Jul 25 10:25:35 2019 +0200

    fix (referencing satellite-tracking projections) : fix the Jacobian matrix 
in both satellite-tracking projections by inverting m01 and m10 in order to 
have the partial derivative of x on the matrix's first line and of y on the 
second line.
---
 .../sis/referencing/operation/projection/ConicSatelliteTracking.java  | 4 ++--
 .../operation/projection/CylindricalSatelliteTracking.java            | 4 ++--
 .../referencing/operation/projection/ConicSatelliteTrackingTest.java  | 4 ++--
 .../operation/projection/CylindricalSatelliteTrackingTest.java        | 3 ++-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java
 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java
index 9b173f1..9b0b0b0 100644
--- 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java
+++ 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTracking.java
@@ -331,8 +331,8 @@ public class ConicSatelliteTracking extends 
NormalizedProjection{
         final double dy_dφ = -cosλ * dρ_dφ;
         
//======================================================================
 
-        return new Matrix2(dx_dλ, dy_dλ,
-                           dx_dφ, dy_dφ);
+        return new Matrix2(dx_dλ, dx_dφ,
+                           dy_dλ, dy_dφ);
 //        throw new UnsupportedOperationException("Not supported yet."); //To 
change body of generated methods, choose Tools | Templates.
 
         /* 
=====================================================================
diff --git 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java
 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java
index d68ec87..9348834 100644
--- 
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java
+++ 
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTracking.java
@@ -166,8 +166,8 @@ public class CylindricalSatelliteTracking extends 
ConicSatelliteTracking {
                 * ( p2_on_p1 - ((1+tan_dλ*tan_dλ)*cos_i/(1+λt*λt) ) );
         
//======================================================================
 
-        return new Matrix2(dx_dλ, dy_dλ,
-                           dx_dφ, dy_dφ);
+        return new Matrix2(dx_dλ, dx_dφ,
+                           dy_dλ, dy_dφ);
 
 //        throw new UnsupportedOperationException("Not supported yet."); //To 
change body of generated methods, choose Tools | Templates.
     }
diff --git 
a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java
 
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java
index 242e024..10ace56 100644
--- 
a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java
+++ 
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ConicSatelliteTrackingTest.java
@@ -267,8 +267,8 @@ public class ConicSatelliteTrackingTest extends 
MapProjectionTestCase {
         );
         final double delta = (1.0 / 60) / 1852;                 // 
Approximately 1 metre.
         derivativeDeltas = new double[] {delta, delta};
-        tolerance = Formulas.LINEAR_TOLERANCE / 10;
-        verifyDerivative(   0, -10);
+        tolerance = Formulas.LINEAR_TOLERANCE/100 ;
+        verifyDerivative( -75, 40);
         verifyDerivative(-100,  3);
         verifyDerivative( -56, 50);
         verifyDerivative( -20, 47);
diff --git 
a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java
 
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java
index 844ba7f..95b6832 100644
--- 
a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java
+++ 
b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/CylindricalSatelliteTrackingTest.java
@@ -226,7 +226,8 @@ public class CylindricalSatelliteTrackingTest extends 
ConicSatelliteTrackingTest
         );
         final double delta = (1.0 / 60) / 1852;                 // 
Approximately 1 metre.
         derivativeDeltas = new double[] {delta, delta};
-        tolerance = Formulas.LINEAR_TOLERANCE / 10;
+        tolerance = Formulas.LINEAR_TOLERANCE / 100;
+        verifyDerivative(-75, 40);
         verifyDerivative(-100,  3);
         verifyDerivative( -56, 50);
         verifyDerivative( -20, 47);

Reply via email to