Commit 1da8b342 authored by Luc Maisonobe's avatar Luc Maisonobe

Merge branch 'master' into release-candidate

Conflicts:
	src/site/xdoc/changes.xml
parents 65c06fb2 942785a5
......@@ -127,7 +127,7 @@ public class BatchLSEstimator {
* that is already used
*/
public void addMeasurement(final ObservedMeasurement<?> measurement)
throws OrekitException {
throws OrekitException {
measurements.add(measurement);
}
......
......@@ -88,7 +88,7 @@ public class RangeRateTroposphericDelayModifier implements EstimationModifier<Ra
*/
public double rangeRateErrorTroposphericModel(final GroundStation station,
final SpacecraftState state)
throws OrekitException {
throws OrekitException {
// The effect of tropospheric correction on the range rate is
// computed using finite differences.
......@@ -142,7 +142,7 @@ public class RangeRateTroposphericDelayModifier implements EstimationModifier<Ra
private double[][] rangeRateErrorJacobianState(final GroundStation station,
final SpacecraftState refstate,
final double delay)
throws OrekitException {
throws OrekitException {
final double[][] finiteDifferencesJacobian =
EstimationUtils.differentiate(new StateFunction() {
public double[] value(final SpacecraftState state) throws OrekitException {
......
......@@ -727,7 +727,7 @@ public class CircularOrbit
final double[][] jacobian = computeJacobianMeanWrtCartesian();
// Differentiating the Kepler equation aM = aE - ex sin aE + ey cos aE leads to:
// daM = (1 - ex cos aE - ey sin aE) dE - sin aE dex + cos aE dey
// daM = (1 - ex cos aE - ey sin aE) daE - sin aE dex + cos aE dey
// which is inverted and rewritten as:
// daE = a/r daM + sin aE a/r dex - cos aE a/r dey
final double alphaE = getAlphaE();
......
......@@ -24,6 +24,7 @@ import org.hipparchus.linear.MatrixUtils;
import org.hipparchus.linear.QRDecomposition;
import org.hipparchus.linear.RealMatrix;
import org.hipparchus.util.FastMath;
import org.hipparchus.util.MathArrays;
import org.orekit.errors.OrekitIllegalArgumentException;
import org.orekit.errors.OrekitException;
import org.orekit.errors.OrekitInternalError;
......@@ -509,9 +510,9 @@ public abstract class Orbit
*/
protected static void fillHalfRow(final double a1, final Vector3D v1, final double a2, final Vector3D v2,
final double[] row, final int j) {
row[j] = a1 * v1.getX() + a2 * v2.getX();
row[j + 1] = a1 * v1.getY() + a2 * v2.getY();
row[j + 2] = a1 * v1.getZ() + a2 * v2.getZ();
row[j] = MathArrays.linearCombination(a1, v1.getX(), a2, v2.getX());
row[j + 1] = MathArrays.linearCombination(a1, v1.getY(), a2, v2.getY());
row[j + 2] = MathArrays.linearCombination(a1, v1.getZ(), a2, v2.getZ());
}
/** Fill a Jacobian half row with a linear combination of vectors.
......@@ -527,9 +528,9 @@ public abstract class Orbit
protected static void fillHalfRow(final double a1, final Vector3D v1, final double a2, final Vector3D v2,
final double a3, final Vector3D v3,
final double[] row, final int j) {
row[j] = a1 * v1.getX() + a2 * v2.getX() + a3 * v3.getX();
row[j + 1] = a1 * v1.getY() + a2 * v2.getY() + a3 * v3.getY();
row[j + 2] = a1 * v1.getZ() + a2 * v2.getZ() + a3 * v3.getZ();
row[j] = MathArrays.linearCombination(a1, v1.getX(), a2, v2.getX(), a3, v3.getX());
row[j + 1] = MathArrays.linearCombination(a1, v1.getY(), a2, v2.getY(), a3, v3.getY());
row[j + 2] = MathArrays.linearCombination(a1, v1.getZ(), a2, v2.getZ(), a3, v3.getZ());
}
/** Fill a Jacobian half row with a linear combination of vectors.
......@@ -547,9 +548,9 @@ public abstract class Orbit
protected static void fillHalfRow(final double a1, final Vector3D v1, final double a2, final Vector3D v2,
final double a3, final Vector3D v3, final double a4, final Vector3D v4,
final double[] row, final int j) {
row[j] = a1 * v1.getX() + a2 * v2.getX() + a3 * v3.getX() + a4 * v4.getX();
row[j + 1] = a1 * v1.getY() + a2 * v2.getY() + a3 * v3.getY() + a4 * v4.getY();
row[j + 2] = a1 * v1.getZ() + a2 * v2.getZ() + a3 * v3.getZ() + a4 * v4.getZ();
row[j] = MathArrays.linearCombination(a1, v1.getX(), a2, v2.getX(), a3, v3.getX(), a4, v4.getX());
row[j + 1] = MathArrays.linearCombination(a1, v1.getY(), a2, v2.getY(), a3, v3.getY(), a4, v4.getY());
row[j + 2] = MathArrays.linearCombination(a1, v1.getZ(), a2, v2.getZ(), a3, v3.getZ(), a4, v4.getZ());
}
/** Fill a Jacobian half row with a linear combination of vectors.
......@@ -570,9 +571,18 @@ public abstract class Orbit
final double a3, final Vector3D v3, final double a4, final Vector3D v4,
final double a5, final Vector3D v5,
final double[] row, final int j) {
row[j] = a1 * v1.getX() + a2 * v2.getX() + a3 * v3.getX() + a4 * v4.getX() + a5 * v5.getX();
row[j + 1] = a1 * v1.getY() + a2 * v2.getY() + a3 * v3.getY() + a4 * v4.getY() + a5 * v5.getY();
row[j + 2] = a1 * v1.getZ() + a2 * v2.getZ() + a3 * v3.getZ() + a4 * v4.getZ() + a5 * v5.getZ();
final double[] a = new double[] {
a1, a2, a3, a4, a5
};
row[j] = MathArrays.linearCombination(a, new double[] {
v1.getX(), v2.getX(), v3.getX(), v4.getX(), v5.getX()
});
row[j + 1] = MathArrays.linearCombination(a, new double[] {
v1.getY(), v2.getY(), v3.getY(), v4.getY(), v5.getY()
});
row[j + 2] = MathArrays.linearCombination(a, new double[] {
v1.getZ(), v2.getZ(), v3.getZ(), v4.getZ(), v5.getZ()
});
}
/** Fill a Jacobian half row with a linear combination of vectors.
......@@ -595,9 +605,18 @@ public abstract class Orbit
final double a3, final Vector3D v3, final double a4, final Vector3D v4,
final double a5, final Vector3D v5, final double a6, final Vector3D v6,
final double[] row, final int j) {
row[j] = a1 * v1.getX() + a2 * v2.getX() + a3 * v3.getX() + a4 * v4.getX() + a5 * v5.getX() + a6 * v6.getX();
row[j + 1] = a1 * v1.getY() + a2 * v2.getY() + a3 * v3.getY() + a4 * v4.getY() + a5 * v5.getY() + a6 * v6.getY();
row[j + 2] = a1 * v1.getZ() + a2 * v2.getZ() + a3 * v3.getZ() + a4 * v4.getZ() + a5 * v5.getZ() + a6 * v6.getZ();
final double[] a = new double[] {
a1, a2, a3, a4, a5, a6
};
row[j] = MathArrays.linearCombination(a, new double[] {
v1.getX(), v2.getX(), v3.getX(), v4.getX(), v5.getX(), v6.getX()
});
row[j + 1] = MathArrays.linearCombination(a, new double[] {
v1.getY(), v2.getY(), v3.getY(), v4.getY(), v5.getY(), v6.getY()
});
row[j + 2] = MathArrays.linearCombination(a, new double[] {
v1.getZ(), v2.getZ(), v3.getZ(), v4.getZ(), v5.getZ(), v6.getZ()
});
}
}
......@@ -553,7 +553,7 @@ public class DSSTPropagator extends AbstractIntegratedPropagator {
*/
private static EquinoctialOrbit computeOsculatingOrbit(final SpacecraftState meanState,
final List<ShortPeriodTerms> shortPeriodTerms)
throws OrekitException {
throws OrekitException {
final double[] mean = new double[6];
OrbitType.EQUINOCTIAL.mapOrbitToArray(meanState.getOrbit(), PositionAngle.MEAN, mean);
......
......@@ -28,6 +28,10 @@
separation event detector. Several bugs have been fixed. A major change introduced
with version 8.0 is the switch from Apache Commons Math to Hipparchus as the
mathematical library, which also implied switching from Java 6 to Java 8.">
<action dev="luc" type="fix" due-to="Andrea Antolino">
Improved accuracy of orbits Jacobians.
Fixes issue #243.
</action>
<action dev="luc" type="update">
Deprecated PropagationException, replaced by OrekitException.
</action>
......
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