Commit 654593df authored by Bryan Cazabonne's avatar Bryan Cazabonne

Merge branch 'issue-751' into 'develop'

Added new method signature in IodGibbs using Position measurement.

Closes #751

See merge request !128
parents ad3ab37d 10a87345
Pipeline #890 passed with stages
in 31 minutes and 56 seconds
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="11.0" date="TBD" description="TBD">
<action dev="bryan" type="add" issue="751">
Added new method signature in IodGibbs using Position measurement.
</action>
<action dev="luc" type="fix" issue="749">
Allow building PVCoordinates and AngularCoordinates (as well as their Field,
Absolute and TimeStamped variations) to be build from UnivariateDerivative1
......
......@@ -21,6 +21,7 @@ import org.hipparchus.util.FastMath;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitMessages;
import org.orekit.estimation.measurements.PV;
import org.orekit.estimation.measurements.Position;
import org.orekit.frames.Frame;
import org.orekit.orbits.KeplerianOrbit;
import org.orekit.time.AbsoluteDate;
......@@ -53,6 +54,23 @@ public class IodGibbs {
this.mu = mu;
}
/** Give an initial orbit estimation, assuming Keplerian motion.
* All observations should be from the same location.
*
* @param frame measurements frame
* @param p1 First position measurement
* @param p2 Second position measurement
* @param p3 Third position measurement
* @return an initial orbit estimation
* @since 11.0
*/
public KeplerianOrbit estimate(final Frame frame, final Position p1, final Position p2, final Position p3) {
return estimate(frame,
p1.getPosition(), p1.getDate(),
p2.getPosition(), p2.getDate(),
p3.getPosition(), p3.getDate());
}
/** Give an initial orbit estimation, assuming Keplerian motion.
* All observations should be from the same location.
*
......@@ -63,7 +81,6 @@ public class IodGibbs {
* @return an initial orbit estimation
*/
public KeplerianOrbit estimate(final Frame frame, final PV pv1, final PV pv2, final PV pv3) {
return estimate(frame,
pv1.getPosition(), pv1.getDate(),
pv2.getPosition(), pv2.getDate(),
......
......@@ -31,6 +31,7 @@ import org.orekit.estimation.measurements.ObservableSatellite;
import org.orekit.estimation.measurements.ObservedMeasurement;
import org.orekit.estimation.measurements.PV;
import org.orekit.estimation.measurements.PVMeasurementCreator;
import org.orekit.estimation.measurements.Position;
import org.orekit.frames.Frame;
import org.orekit.frames.FramesFactory;
import org.orekit.orbits.KeplerianOrbit;
......@@ -164,6 +165,44 @@ public class IodGibbsTest {
}
@Test
public void testIssue751() {
// test extracted from "Fundamentals of astrodynamics & applications", D. Vallado, 3rd ed, chap Initial Orbit Determination, Exple 7-4, p463
// Remark: the test value in Vallado is performed with an Herrick-Gibbs methods but results are very close with Gibbs method.
Utils.setDataRoot("regular-data");
// Initialisation
final IodGibbs gibbs = new IodGibbs(Constants.WGS84_EARTH_MU);
// Observable satellite to initialize measurements
final ObservableSatellite satellite = new ObservableSatellite(0);
// Observations vector (EME2000)
final Vector3D posR1 = new Vector3D(3419855.64, 6019826.02, 2784600.22);
final Vector3D posR2 = new Vector3D(2935911.95, 6326183.24, 2660595.84);
final Vector3D posR3 = new Vector3D(2434952.02, 6597386.74, 2521523.11);
// Epoch corresponding to the observation vector
AbsoluteDate dateRef = new AbsoluteDate(2000, 01, 01, 0, 0, 0, TimeScalesFactory.getUTC());
AbsoluteDate date2 = dateRef.shiftedBy(76.48);
AbsoluteDate date3 = dateRef.shiftedBy(153.04);
// Reference result
final Vector3D velR2 = new Vector3D(-6441.632, 3777.625, -1720.582);
// Gibbs IOD
final KeplerianOrbit orbit = gibbs.estimate(FramesFactory.getEME2000(),
new Position(dateRef, posR1, 1.0, 1.0, satellite),
new Position(date2, posR2, 1.0, 1.0, satellite),
new Position(date3, posR3, 1.0, 1.0, satellite));
// Test for the norm of the velocity
Assert.assertEquals(0.0, orbit.getPVCoordinates().getVelocity().getNorm() - velR2.getNorm(), 1e-3);
}
@Test
public void testNonDifferentDatesForObservations() {
Utils.setDataRoot("regular-data:potential:tides");
......
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