Author: desruisseaux
Date: Thu May 29 23:21:44 2025
New Revision: 1925964
URL: http://svn.apache.org/viewvc?rev=1925964&view=rev
Log:
Add the tools that were used for deriving the formulas of the Jacobian of the
"Geographic to spherical" conversion.
https://issues.apache.org/jira/browse/SIS-302
Added:
sis/analysis/Geographic to spherical/
sis/analysis/Geographic to spherical/Derivatives.txt
sis/analysis/Geographic to spherical/Derivatives.wxmx (with props)
sis/analysis/Geographic to spherical/Simplify.xml
Added: sis/analysis/Geographic to spherical/Derivatives.txt
URL:
http://svn.apache.org/viewvc/sis/analysis/Geographic%20to%20spherical/Derivatives.txt?rev=1925964&view=auto
==============================================================================
--- sis/analysis/Geographic to spherical/Derivatives.txt (added)
+++ sis/analysis/Geographic to spherical/Derivatives.txt Thu May 29 23:21:44
2025
@@ -0,0 +1,20 @@
+#
+# Results copied from "Derivatives.wxmx" as plain text.
+# For each derivative, the first line is copied verbatim.
+# The second line is the result of `ant -f Simplify.xml`
+# together with manual editions.
+#
+
+âΩ/âÏ: diff(L, Ï);
+((e^2*(1-e^2)*sin(Ï)^2)/((1-e^2*sin(Ï)^2)^(3/2)*(1/sqrt(1-e^2*sin(Ï)^2)+h))+(sin(Ï)^2*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h))/(cos(Ï)^2*(1/sqrt(1-e^2*sin(Ï)^2)+h))+((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h)/(1/sqrt(1-e^2*sin(Ï)^2)+h)-(e^2*sin(Ï)^2*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h))/((1-e^2*sin(Ï)^2)^(3/2)*(1/sqrt(1-e^2*sin(Ï)^2)+h)^2))/((sin(Ï)^2*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h)^2)/(cos(Ï)^2*(1/sqrt(1-e^2*sin(Ï)^2)+h)^2)+1)
+
+âΩ/âh: diff(L, h);
+(sin(Ï)/(cos(Ï)*(1/sqrt(1-e^2*sin(Ï)^2)+h))-(sin(Ï)*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h))/(cos(Ï)*(1/sqrt(1-e^2*sin(Ï)^2)+h)^2))/((sin(Ï)^2*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h)^2)/(cos(Ï)^2*(1/sqrt(1-e^2*sin(Ï)^2)+h)^2)+1)
+After simplification: cosÏ*(sinÏ*r - Z) / (R*R)
+
+âR/âÏ: diff(R, Ï);
+(2*cos(Ï)*sin(Ï)*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h)^2-2*cos(Ï)*sin(Ï)*(1/sqrt(1-e^2*sin(Ï)^2)+h)^2+(2*e^2*(1-e^2)*cos(Ï)*sin(Ï)^3*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h))/(1-e^2*sin(Ï)^2)^(3/2)+(2*e^2*cos(Ï)^3*sin(Ï)*(1/sqrt(1-e^2*sin(Ï)^2)+h))/(1-e^2*sin(Ï)^2)^(3/2))/(2*sqrt(sin(Ï)^2*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h)^2+cos(Ï)^2*(1/sqrt(1-e^2*sin(Ï)^2)+h)^2))
+
+âR/âh: diff(R, h);
+(2*sin(Ï)^2*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h)+2*cos(Ï)^2*(1/sqrt(1-e^2*sin(Ï)^2)+h))/(2*sqrt(sin(Ï)^2*((1-e^2)/sqrt(1-e^2*sin(Ï)^2)+h)^2+cos(Ï)^2*(1/sqrt(1-e^2*sin(Ï)^2)+h)^2))
+After simplification: (Z*sinÏ + r*cosÏ*cosÏ) / R
Added: sis/analysis/Geographic to spherical/Derivatives.wxmx
URL:
http://svn.apache.org/viewvc/sis/analysis/Geographic%20to%20spherical/Derivatives.wxmx?rev=1925964&view=auto
==============================================================================
Binary file - no diff available.
Propchange: sis/analysis/Geographic to spherical/Derivatives.wxmx
------------------------------------------------------------------------------
svn:mime-type = application/zip
Added: sis/analysis/Geographic to spherical/Simplify.xml
URL:
http://svn.apache.org/viewvc/sis/analysis/Geographic%20to%20spherical/Simplify.xml?rev=1925964&view=auto
==============================================================================
--- sis/analysis/Geographic to spherical/Simplify.xml (added)
+++ sis/analysis/Geographic to spherical/Simplify.xml Thu May 29 23:21:44 2025
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Simplification of the derivatives. The target values are names of variables
+ used in the `EllipsoidToCentricTransform` Java class. For running, copy the
+ formula to simplify in a temporary file named "formula.txt" then execute on
+ the command line: `ant -f Simplify.xml`.
+
+ Note that this file alone is not sufficient. Manual editions are needed.
+ It can be done by adding parenthesis and executing the Ant script again.
+ For example, if `1*ν` has not been simplified, replace by `(1*ν)`, then
+ re-execute Ant. `1*ν` is a trivial example, but with larger expressions,
+ adding the missing parenthesis is safer than manual simplifications.
+-->
+<project name="Replace" default="replace">
+ <target name="replace">
+ <replace dir="." summary="yes">
+ <include name="formula.txt"/>
+ <replacefilter token="cos(Ï)" value="cosÏ"/>
+ <replacefilter token="sin(Ï)" value="sinÏ"/>
+ <replacefilter token="sinÏ^2" value="(sinÏ*sinÏ)"/>
+ <replacefilter token="cosÏ^2" value="(cosÏ*cosÏ)"/>
+ <replacefilter token="sinÏ^3" value="(sinÏ*sinÏ*sinÏ)"/>
+ <replacefilter token="cosÏ^3" value="(cosÏ*cosÏ*cosÏ)"/>
+
+ <replacefilter token= "(1/(1-e^2*(sinÏ*sinÏ)))" value= "ν2"/>
+ <replacefilter token= "/(1-e^2*(sinÏ*sinÏ))" value="*ν2"/>
+ <replacefilter token= "*(1-e^2*(sinÏ*sinÏ))" value="/ν2"/>
+ <replacefilter token="*sqrt(1-e^2*(sinÏ*sinÏ))" value= "/ν"/>
+ <replacefilter token="/sqrt(1-e^2*(sinÏ*sinÏ))" value= "*ν"/>
+ <replacefilter token= "(1-e^2*(sinÏ*sinÏ))" value= "(1/ν2)"/>
+ <replacefilter token="sqrt(ν2)" value= "ν"/>
+ <replacefilter token="ν2^(3/2)" value="(ν2*ν)"/>
+ <replacefilter token="(1/ν2)^(3/2)" value="(1/(ν2*ν))"/>
+ <replacefilter token="(ν*(1-e^2))" value= "νâ¯"/>
+ <replacefilter token="((1-e^2)*ν)" value= "νâ¯"/>
+ <replacefilter token="((1-e^2)*ν+h)" value= "(νâ¯+h)"/>
+ <replacefilter token="(1*ν+h)" value= "(ν+h)"/>
+ <replacefilter token="(1*ν)" value= "ν"/>
+
+ <replacefilter token="(ν+h)" value= "r"/>
+ <replacefilter token="((νâ¯+h)*sinÏ)" value= "Z"/>
+ <replacefilter token="(sinÏ*(νâ¯+h))" value= "Z"/>
+ <replacefilter token="((νâ¯+h)^2*(sinÏ*sinÏ))" value="(Z*Z)"/>
+ <replacefilter token="((sinÏ*sinÏ)*(νâ¯+h)^2)" value="(Z*Z)"/>
+ <replacefilter token="((sinÏ*sinÏ)*(νâ¯+h))" value="(sinÏ*Z)"/>
+ <replacefilter token="(sinÏ^3*(νâ¯+h))"
value="(sinÏ*sinÏ*Z)"/>
+ <replacefilter token="(sinÏ*(νâ¯+h)^2)" value="(Z*Z/sinÏ)"/>
+ <replacefilter token="Z^2" value="(Z*Z)"/>
+
+ <replacefilter token="(r*cosÏ)" value="rcosÏ"/>
+ <replacefilter token="((cosÏ*cosÏ)*r^2)" value="(rcosÏ*rcosÏ)"/>
+ <replacefilter token="(r^2*(cosÏ*cosÏ))" value="(rcosÏ*rcosÏ)"/>
+ <replacefilter token="(r^2*cosÏ*cosÏ)" value="(rcosÏ*rcosÏ)"/>
+ <replacefilter token="((cosÏ*cosÏ)*r)" value="(cosÏ*rcosÏ)"/>
+
+ <replacefilter token="((Z*Z)/(rcosÏ*rcosÏ)+1)"
value="(((Z*Z)+(rcosÏ*rcosÏ))/(rcosÏ*rcosÏ))"/>
+ <replacefilter token="sqrt((Z*Z)+rcosÏ*rcosÏ)" value="R"/>
+ <replacefilter token="((Z*Z)+(rcosÏ*rcosÏ))" value="(R*R)"/>
+ </replace>
+ </target>
+</project>