Commit 951a150d authored by Bryan Cazabonne's avatar Bryan Cazabonne

Improved test coverage and notify issue as fixed.

parent 3d7811a6
Pipeline #867 passed with stage
in 24 minutes and 5 seconds
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="11.0" date="TBD" description="TBD">
<action dev="bryan" type="fix" issue="736">
Fixed NullPointerException in DSSTTesseral Hansen object.
</action>
<action dev="bryan" type="update" issue="601">
Changed getPVInPZ90() method to private.
</action>
......
......@@ -17,6 +17,8 @@
package org.orekit.propagation.semianalytical.dsst;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -277,6 +279,24 @@ public class DSSTTesseralTest {
}
}
@Test
public void testGetMaxEccPow()
throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
final UnnormalizedSphericalHarmonicsProvider provider =
GravityFieldFactory.getUnnormalizedProvider(4, 4);;
final Frame earthFrame = CelestialBodyFactory.getEarth().getBodyOrientedFrame();
final DSSTTesseral force = new DSSTTesseral(earthFrame, Constants.WGS84_EARTH_ANGULAR_VELOCITY, provider);
Method getMaxEccPow = DSSTTesseral.class.getDeclaredMethod("getMaxEccPow", Double.TYPE);
getMaxEccPow.setAccessible(true);
Assert.assertEquals(3, getMaxEccPow.invoke(force, 0.0));
Assert.assertEquals(4, getMaxEccPow.invoke(force, 0.01));
Assert.assertEquals(7, getMaxEccPow.invoke(force, 0.08));
Assert.assertEquals(10, getMaxEccPow.invoke(force, 0.15));
Assert.assertEquals(12, getMaxEccPow.invoke(force, 0.25));
Assert.assertEquals(15, getMaxEccPow.invoke(force, 0.35));
Assert.assertEquals(20, getMaxEccPow.invoke(force, 1.0));
}
@Before
public void setUp() throws IOException, ParseException {
Utils.setDataRoot("regular-data:potential/shm-format");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment