Commit 16d75591 by Luc Maisonobe

### Replaced some simplified equations by more accurate ones.

parent 08fc73c1
 ... ... @@ -131,8 +131,8 @@ class GNSSAttitudeContext implements TimeStamped { this.nominalYawDS = nominalYaw.toDerivativeStructureRotation(ORDER); // TODO: the Kouba model assumes perfectly circular orbit, it should really be: // this.muRate = svPV.getAngularVelocity(); this.muRate = svPV.getVelocity().getNorm() / svPV.getPosition().getNorm(); this.muRate = svPV.getAngularVelocity().getNorm(); //this.muRate = svPV.getVelocity().getNorm() / svPV.getPosition().getNorm(); } ... ... @@ -298,8 +298,8 @@ class GNSSAttitudeContext implements TimeStamped { */ private DerivativeStructure inOrbitPlaneAbsoluteAngle(final DerivativeStructure angle) { // TODO: the Kouba model assumes planar right-angle triangle resolution, it should really be: // return FastMath.acos(FastMath.cos(angle).divide(FastMath.cos(beta))); return angle.multiply(angle).subtract(beta.multiply(beta)).sqrt(); return FastMath.acos(FastMath.cos(angle).divide(FastMath.cos(beta))); //return angle.multiply(angle).subtract(beta.multiply(beta)).sqrt(); } /** Project a spacecraft/Sun angle into orbital plane. ... ... @@ -314,8 +314,8 @@ class GNSSAttitudeContext implements TimeStamped { */ public double inOrbitPlaneAbsoluteAngle(final double angle) { // TODO: the Kouba model assumes planar right-angle triangle resolution, it should really be: // return FastMath.acos(FastMath.cos(angle) / FastMath.cos(beta.getReal())); return FastMath.sqrt(angle * angle - beta.getReal() * beta.getReal()); return FastMath.acos(FastMath.cos(angle) / FastMath.cos(beta.getReal())); //return FastMath.sqrt(angle * angle - beta.getReal() * beta.getReal()); } /** Compute yaw. ... ...
 ... ... @@ -40,7 +40,13 @@ public class GPSBlockIIATest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallNegativeBeta() throws OrekitException { doTestAxes("beta-small-negative-BLOCK-IIA.txt", 2.7e-12, 2.7e-12, 6.2e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-negative-BLOCK-IIA.txt", 8.1e-4, 8.1e-4, 6.2e-16); } @Test ... ... @@ -53,7 +59,13 @@ public class GPSBlockIIATest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallPositiveBeta() throws OrekitException { doTestAxes("beta-small-positive-BLOCK-IIA.txt", 1.6e-12, 1.6e-12, 9.8e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-positive-BLOCK-IIA.txt", 8.2e-4, 8.2e-4, 9.8e-16); } @Test ... ...
 ... ... @@ -40,7 +40,13 @@ public class GPSBlockIIFTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallNegativeBeta() throws OrekitException { doTestAxes("beta-small-negative-BLOCK-IIF.txt", 7.1e-13, 7.1e-13, 9.2e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-negative-BLOCK-IIF.txt", 4.1e-5, 4.1e-5, 9.2e-16); } @Test ... ... @@ -53,7 +59,13 @@ public class GPSBlockIIFTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallPositiveBeta() throws OrekitException { doTestAxes("beta-small-positive-BLOCK-IIF.txt", 1.2e-12, 1.2e-12, 3.7e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-positive-BLOCK-IIF.txt", 4.1e-5, 4.1e-5, 4.8e-16); } @Test ... ...
 ... ... @@ -40,7 +40,13 @@ public class GPSBlockIIRTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallNegativeBeta() throws OrekitException { doTestAxes("beta-small-negative-BLOCK-IIR.txt", 1.3e-12, 1.3e-12, 9.1e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-negative-BLOCK-IIR.txt", 2.0e-4, 2.0e-4, 9.1e-16); } @Test ... ... @@ -53,7 +59,13 @@ public class GPSBlockIIRTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallPositiveBeta() throws OrekitException { doTestAxes("beta-small-positive-BLOCK-IIR.txt", 1.7e-12, 1.7e-12, 7.9e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-positive-BLOCK-IIR.txt", 8.6e-5, 8.6e-5, 7.9e-16); } @Test ... ...
 ... ... @@ -40,7 +40,13 @@ public class GalileoTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallNegativeBeta() throws OrekitException { doTestAxes("beta-small-negative-GALILEO.txt", 2.9e-12, 2.9e-12, 4.0e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-negative-GALILEO.txt", 5.9e-5, 5.9e-5, 4.3e-16); } @Test ... ... @@ -53,7 +59,13 @@ public class GalileoTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallPositiveBeta() throws OrekitException { doTestAxes("beta-small-positive-GALILEO.txt", 3.9e-12, 3.9e-12, 7.8e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-positive-GALILEO.txt", 5.4e-5, 5.4e-5, 7.8e-16); } @Test ... ...
 ... ... @@ -40,7 +40,13 @@ public class GlonassTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallNegativeBeta() throws OrekitException { doTestAxes("beta-small-negative-GLONASS.txt", 4.7e-13, 4.7e-13, 5.7e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-negative-GLONASS.txt", 1.6e-4, 1.6e-4, 8.0e-16); } @Test ... ... @@ -50,7 +56,13 @@ public class GlonassTest extends AbstractGNSSAttitudeProviderTest { @Test public void testSmallPositiveBeta() throws OrekitException { doTestAxes("beta-small-positive-GLONASS.txt", 2.4e-12, 2.4e-12, 3.9e-16); // the differences with the reference Kouba models are due to the following changes: // - Orekit compuptes angular velocity tkaing eccentricity into account // Kouba assumes a perfectly circular orbit // - Orekit uses spherical geometry to solve some triangles (cos μ = cos α / cos β) // Kouba uses projected planar geometry (μ² = α² - β²) // when using the Kouba equations, the order of magnitudes of the differences is about 10⁻¹² doTestAxes("beta-small-positive-GLONASS.txt", 1.6e-4, 1.6e-4, 3.9e-16); } @Test ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!