Commit 735d5e4b authored by Luc Maisonobe's avatar Luc Maisonobe

Replaced integer propagator index by an ObservableSatellite class.

At first, the class only contains the propagator index, but it will soon
also contain satellite-related data like satellite clock offset
parameter driver, which is needed for one-way GNSS measurements.
parent 0a816714
......@@ -90,8 +90,7 @@ class MeasurementHandler implements MultiSatStepHandler {
final ObservedMeasurement<?> observed = next.getMeasurement();
// estimate the theoretical measurement
final List<Integer> indices = observed.getPropagatorsIndices();
final SpacecraftState[] states = new SpacecraftState[indices.size()];
final SpacecraftState[] states = new SpacecraftState[observed.getSatellites().size()];
for (int i = 0; i < states.length; ++i) {
states[i] = interpolators.get(i).getInterpolatedState(next.getDate());
}
......
......@@ -422,7 +422,7 @@ class Model implements MultivariateJacobianFunction {
for (int k = 0; k < evaluationStates.length; ++k) {
final int p = observedMeasurement.getPropagatorsIndices().get(k);
final int p = observedMeasurement.getSatellites().get(k).getPropagatorIndex();
// partial derivatives of the current Cartesian coordinates with respect to current orbital state
final double[][] aCY = new double[6][6];
......
......@@ -19,6 +19,7 @@ package org.orekit.estimation.measurements;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.hipparchus.RealFieldElement;
import org.hipparchus.analysis.differentiation.DSFactory;
......@@ -45,10 +46,10 @@ public abstract class AbstractMeasurement<T extends ObservedMeasurement<T>>
/** List of the supported parameters. */
private final List<ParameterDriver> supportedParameters;
/** Indices of the propagators related to this measurement.
* @since 9.0
/** Satellites related to this measurement.
* @since 9.3
*/
private final List<Integer> propagatorsIndices;
private final List<ObservableSatellite> satellites;
/** Date of the measurement. */
private final AbsoluteDate date;
......@@ -78,13 +79,37 @@ public abstract class AbstractMeasurement<T extends ObservedMeasurement<T>>
* @param baseWeight base weight
* @param propagatorsIndices indices of the propagators related to this measurement
* @param supportedParameters supported parameters
* @deprecated since 9.3, replaced bew {@link #AbstractMeasurement(AbsoluteDate,
* double, double, double, List)} followed by {@link #addParameterDriver(ParameterDriver)}
*/
@Deprecated
protected AbstractMeasurement(final AbsoluteDate date, final double observed,
final double sigma, final double baseWeight,
final List<Integer> propagatorsIndices,
final ParameterDriver... supportedParameters) {
this(date, observed, sigma, baseWeight,
propagatorsIndices.stream().map(i -> new ObservableSatellite(i)).collect(Collectors.toList()));
for (final ParameterDriver parameterDriver : supportedParameters) {
this.supportedParameters.add(parameterDriver);
}
}
/** Simple constructor for mono-dimensional measurements.
* <p>
* At construction, a measurement is enabled.
* </p>
* @param date date of the measurement
* @param observed observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param satellites satellites related to this measurement
* @since 9.3
*/
protected AbstractMeasurement(final AbsoluteDate date, final double observed,
final double sigma, final double baseWeight,
final List<ObservableSatellite> satellites) {
this.supportedParameters = new ArrayList<ParameterDriver>(supportedParameters.length);
this.supportedParameters = new ArrayList<ParameterDriver>();
for (final ParameterDriver parameterDriver : supportedParameters) {
this.supportedParameters.add(parameterDriver);
}
......@@ -100,7 +125,7 @@ public abstract class AbstractMeasurement<T extends ObservedMeasurement<T>>
baseWeight
};
this.propagatorsIndices = propagatorsIndices;
this.satellites = satellites;
this.modifiers = new ArrayList<EstimationModifier<T>>();
setEnabled(true);
......@@ -117,28 +142,57 @@ public abstract class AbstractMeasurement<T extends ObservedMeasurement<T>>
* @param baseWeight base weight
* @param propagatorsIndices indices of the propagators related to this measurement
* @param supportedParameters supported parameters
* @deprecated since 9.3, replaced bew {@link #AbstractMeasurement(AbsoluteDate,
* double[], double[], double[], List)} followed by {@link #addParameterDriver(ParameterDriver)}
*/
@Deprecated
protected AbstractMeasurement(final AbsoluteDate date, final double[] observed,
final double[] sigma, final double[] baseWeight,
final List<Integer> propagatorsIndices,
final ParameterDriver... supportedParameters) {
this.supportedParameters = new ArrayList<ParameterDriver>(supportedParameters.length);
this(date, observed, sigma, baseWeight,
propagatorsIndices.stream().map(i -> new ObservableSatellite(i)).collect(Collectors.toList()));
for (final ParameterDriver parameterDriver : supportedParameters) {
this.supportedParameters.add(parameterDriver);
}
}
/** Simple constructor, for multi-dimensional measurements.
* <p>
* At construction, a measurement is enabled.
* </p>
* @param date date of the measurement
* @param observed observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param satellites satellites related to this measurement
* @since 9.3
*/
protected AbstractMeasurement(final AbsoluteDate date, final double[] observed,
final double[] sigma, final double[] baseWeight,
final List<ObservableSatellite> satellites) {
this.supportedParameters = new ArrayList<ParameterDriver>();
this.date = date;
this.observed = observed.clone();
this.sigma = sigma.clone();
this.baseWeight = baseWeight.clone();
this.propagatorsIndices = propagatorsIndices;
this.satellites = satellites;
this.modifiers = new ArrayList<EstimationModifier<T>>();
setEnabled(true);
}
/** Add a parameter driver.
* @param driver parameter driver to add
* @since 9.3
*/
protected void addParameterDriver(final ParameterDriver driver) {
supportedParameters.add(driver);
}
/** {@inheritDoc} */
@Override
public List<ParameterDriver> getParametersDrivers() {
......@@ -178,7 +232,13 @@ public abstract class AbstractMeasurement<T extends ObservedMeasurement<T>>
/** {@inheritDoc} */
@Override
public List<Integer> getPropagatorsIndices() {
return propagatorsIndices;
return satellites.stream().map(s -> s.getPropagatorIndex()).collect(Collectors.toList());
}
/** {@inheritDoc} */
@Override
public List<ObservableSatellite> getSatellites() {
return satellites;
}
/** Estimate the theoretical value.
......
......@@ -57,10 +57,13 @@ public class AngularAzEl extends AbstractMeasurement<AngularAzEl> {
* @param angular observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @deprecated since 9.3, replaced by {@#AngularAzEl(GroundStation, AbsoluteDate,
* double[], double[], double[], ObservableSatellite)}
*/
@Deprecated
public AngularAzEl(final GroundStation station, final AbsoluteDate date,
final double[] angular, final double[] sigma, final double[] baseWeight) {
this(station, date, angular, sigma, baseWeight, 0);
this(station, date, angular, sigma, baseWeight, new ObservableSatellite(0));
}
/** Simple constructor.
......@@ -71,21 +74,39 @@ public class AngularAzEl extends AbstractMeasurement<AngularAzEl> {
* @param baseWeight base weight
* @param propagatorIndex index of the propagator related to this measurement
* @since 9.0
* @deprecated since 9.3, replaced by {@#AngularAzEl(GroundStation, AbsoluteDate,
* double[], double[], double[], ObservableSatellite)}
*/
@Deprecated
public AngularAzEl(final GroundStation station, final AbsoluteDate date,
final double[] angular, final double[] sigma, final double[] baseWeight,
final int propagatorIndex) {
super(date, angular, sigma, baseWeight, Arrays.asList(propagatorIndex),
station.getClockOffsetDriver(),
station.getEastOffsetDriver(),
station.getNorthOffsetDriver(),
station.getZenithOffsetDriver(),
station.getPrimeMeridianOffsetDriver(),
station.getPrimeMeridianDriftDriver(),
station.getPolarOffsetXDriver(),
station.getPolarDriftXDriver(),
station.getPolarOffsetYDriver(),
station.getPolarDriftYDriver());
this(station, date, angular, sigma, baseWeight, new ObservableSatellite(propagatorIndex));
}
/** Simple constructor.
* @param station ground station from which measurement is performed
* @param date date of the measurement
* @param angular observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param satellite satellite related to this measurement
* @since 9.3
*/
public AngularAzEl(final GroundStation station, final AbsoluteDate date,
final double[] angular, final double[] sigma, final double[] baseWeight,
final ObservableSatellite satellite) {
super(date, angular, sigma, baseWeight, Arrays.asList(satellite));
addParameterDriver(station.getClockOffsetDriver());
addParameterDriver(station.getEastOffsetDriver());
addParameterDriver(station.getNorthOffsetDriver());
addParameterDriver(station.getZenithOffsetDriver());
addParameterDriver(station.getPrimeMeridianOffsetDriver());
addParameterDriver(station.getPrimeMeridianDriftDriver());
addParameterDriver(station.getPolarOffsetXDriver());
addParameterDriver(station.getPolarDriftXDriver());
addParameterDriver(station.getPolarOffsetYDriver());
addParameterDriver(station.getPolarDriftYDriver());
this.station = station;
}
......
......@@ -64,10 +64,13 @@ public class AngularRaDec extends AbstractMeasurement<AngularRaDec> {
* @param angular observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @deprecated since 9.3, replaced by {@#AngularRaDec(GroundStation, AbsoluteDate,
* double[], double[], double[], ObservableSatellite)}
*/
@Deprecated
public AngularRaDec(final GroundStation station, final Frame referenceFrame, final AbsoluteDate date,
final double[] angular, final double[] sigma, final double[] baseWeight) {
this(station, referenceFrame, date, angular, sigma, baseWeight, 0);
final double[] angular, final double[] sigma, final double[] baseWeight) {
this(station, referenceFrame, date, angular, sigma, baseWeight, new ObservableSatellite(0));
}
/** Simple constructor.
......@@ -78,21 +81,41 @@ public class AngularRaDec extends AbstractMeasurement<AngularRaDec> {
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param propagatorIndex index of the propagator related to this measurement
* @since 9.0
* @deprecated since 9.3, replaced by {@#AngularRaDec(GroundStation, AbsoluteDate,
* double[], double[], double[], ObservableSatellite)}
*/
@Deprecated
public AngularRaDec(final GroundStation station, final Frame referenceFrame, final AbsoluteDate date,
final double[] angular, final double[] sigma, final double[] baseWeight,
final int propagatorIndex) {
super(date, angular, sigma, baseWeight, Arrays.asList(propagatorIndex),
station.getClockOffsetDriver(),
station.getEastOffsetDriver(),
station.getNorthOffsetDriver(),
station.getZenithOffsetDriver(),
station.getPrimeMeridianOffsetDriver(),
station.getPrimeMeridianDriftDriver(),
station.getPolarOffsetXDriver(),
station.getPolarDriftXDriver(),
station.getPolarOffsetYDriver(),
station.getPolarDriftYDriver());
this(station, referenceFrame, date, angular, sigma, baseWeight, new ObservableSatellite(propagatorIndex));
}
/** Simple constructor.
* @param station ground station from which measurement is performed
* @param referenceFrame Reference frame in which the right ascension - declination angles are given
* @param date date of the measurement
* @param angular observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param satellite satellite related to this measurement
* @since 9.3
*/
public AngularRaDec(final GroundStation station, final Frame referenceFrame, final AbsoluteDate date,
final double[] angular, final double[] sigma, final double[] baseWeight,
final ObservableSatellite satellite) {
super(date, angular, sigma, baseWeight, Arrays.asList(satellite));
addParameterDriver(station.getClockOffsetDriver());
addParameterDriver(station.getEastOffsetDriver());
addParameterDriver(station.getNorthOffsetDriver());
addParameterDriver(station.getZenithOffsetDriver());
addParameterDriver(station.getPrimeMeridianOffsetDriver());
addParameterDriver(station.getPrimeMeridianDriftDriver());
addParameterDriver(station.getPolarOffsetXDriver());
addParameterDriver(station.getPolarDriftXDriver());
addParameterDriver(station.getPolarOffsetYDriver());
addParameterDriver(station.getPolarDriftYDriver());
this.station = station;
this.referenceFrame = referenceFrame;
}
......
......@@ -36,12 +36,12 @@ import org.orekit.utils.TimeStampedPVCoordinates;
* <p>
* For one-way measurements, a signal is emitted by satellite 2 and received
* by satellite 1. The measurement value is the elapsed time between emission
* and reception divided by c were c is the speed of light.
* and reception multiplied by c were c is the speed of light.
* </p>
* <p>
* For two-way measurements, a signal is emitted by satellite 1, reflected on
* satellite 2, and received back by satellite 1 again. The measurement value
* is the elapsed time between emission and reception divided by 2c were c is
* is the elapsed time between emission and reception multiplied by c/2 were c is
* the speed of light.
* </p>
* <p>
......@@ -69,12 +69,35 @@ public class InterSatellitesRange extends AbstractMeasurement<InterSatellitesRan
* @param range observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @deprecated as of 9.3, replaced by {@link #InterSatellitesRange(ObservableSatellite, ObservableSatellite,
* boolean, AbsoluteDate, double, double, double)}
*/
@Deprecated
public InterSatellitesRange(final int satellite1Index, final int satellite2Index,
final boolean twoWay,
final AbsoluteDate date, final double range,
final double sigma, final double baseWeight) {
super(date, range, sigma, baseWeight, Arrays.asList(satellite1Index, satellite2Index));
this(new ObservableSatellite(satellite1Index), new ObservableSatellite(satellite2Index),
twoWay, date, range, sigma, baseWeight);
}
/** Simple constructor.
* @param receiver satellite which receives the signal and performs the measurement
* @param remote satellite which simply emits the signal in the one-way case,
* or reflects the signal in the two-way case
* @param twoWay flag indicating whether it is a two-way measurement
* @param date date of the measurement
* @param range observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @since 9.3
*/
public InterSatellitesRange(final ObservableSatellite receiver,
final ObservableSatellite remote,
final boolean twoWay,
final AbsoluteDate date, final double range,
final double sigma, final double baseWeight) {
super(date, range, sigma, baseWeight, Arrays.asList(receiver, remote));
this.twoway = twoWay;
}
......@@ -100,8 +123,8 @@ public class InterSatellitesRange extends AbstractMeasurement<InterSatellitesRan
// - 6..8 - Position of the satellite 2 in inertial frame
// - 9..11 - Velocity of the satellite 2 in inertial frame
final int nbParams = 12;
final DSFactory factory = new DSFactory(nbParams, 1);
final Field<DerivativeStructure> field = factory.getDerivativeField();
final DSFactory factory = new DSFactory(nbParams, 1);
final Field<DerivativeStructure> field = factory.getDerivativeField();
// coordinates of both satellites
final SpacecraftState state1 = states[getPropagatorsIndices().get(0)];
......
/* Copyright 2002-2019 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.estimation.measurements;
/** Class modeling a satellite that can be observed.
*
* @author Luc Maisonobe
* @since 9.3
*/
public class ObservableSatellite {
/** Index of the propagator related to this satellite. */
private final int propagatorIndex;
/** Simple constructor.
* @param propagatorIndex index of the propagator related to this satellite
*/
public ObservableSatellite(final int propagatorIndex) {
this.propagatorIndex = propagatorIndex;
}
/** Get the index of the propagator related to this satellite.
* @return index of the propagator related to this satellite
*/
public int getPropagatorIndex() {
return propagatorIndex;
}
}
......@@ -17,6 +17,7 @@
package org.orekit.estimation.measurements;
import java.util.List;
import java.util.stream.Collectors;
import org.orekit.propagation.SpacecraftState;
import org.orekit.utils.ParameterDriver;
......@@ -129,9 +130,21 @@ public interface ObservedMeasurement<T extends ObservedMeasurement<T>> extends C
* @return indices of the {@link org.orekit.propagation.Propagator propagators}
* related to this measurement
* @since 9.0
* @deprecated as of 9.3, replaced by {@link #getSatellites()}
*/
@Deprecated
List<Integer> getPropagatorsIndices();
/** Get the satellites related to this measurement.
* @return satellites related to this measurement
* @since 9.3
*/
default List<ObservableSatellite> getSatellites() {
// this default implementation is temporary for the 9.3 release,
// it will be removed when getPropagatorsIndices() is removed at 10.0
return getPropagatorsIndices().stream().map(i -> new ObservableSatellite(i)).collect(Collectors.toList());
}
/** Estimate the theoretical value of the measurement.
* <p>
* The estimated value is the <em>combination</em> of the raw estimated
......
......@@ -68,11 +68,14 @@ public class Phase extends AbstractMeasurement<Phase> {
* @param wavelength phase observed value wavelength
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @deprecated since 9.3 raplced by {@link #Phase(GroundStation, AbsoluteDate,
* double, double, double, double, ObservableSatellite)}
*/
@Deprecated
public Phase(final GroundStation station, final AbsoluteDate date,
final double phase, final double wavelength, final double sigma,
final double baseWeight) {
this(station, date, phase, wavelength, sigma, baseWeight, 0);
this(station, date, phase, wavelength, sigma, baseWeight, new ObservableSatellite(0));
}
/** Simple constructor.
......@@ -83,21 +86,40 @@ public class Phase extends AbstractMeasurement<Phase> {
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param propagatorIndex index of the propagator related to this measurement
* @deprecated since 9.3 raplced by {@link #Phase(GroundStation, AbsoluteDate,
* double, double, double, double, ObservableSatellite)}
*/
@Deprecated
public Phase(final GroundStation station, final AbsoluteDate date,
final double phase, final double wavelength, final double sigma,
final double baseWeight, final int propagatorIndex) {
super(date, phase, sigma, baseWeight, Arrays.asList(propagatorIndex),
station.getClockOffsetDriver(),
station.getEastOffsetDriver(),
station.getNorthOffsetDriver(),
station.getZenithOffsetDriver(),
station.getPrimeMeridianOffsetDriver(),
station.getPrimeMeridianDriftDriver(),
station.getPolarOffsetXDriver(),
station.getPolarDriftXDriver(),
station.getPolarOffsetYDriver(),
station.getPolarDriftYDriver());
this(station, date, phase, wavelength, sigma, baseWeight, new ObservableSatellite(propagatorIndex));
}
/** Simple constructor.
* @param station ground station from which measurement is performed
* @param date date of the measurement
* @param phase observed value
* @param wavelength phase observed value wavelength
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @param satellite satellite related to this measurement
* @since 9.3
*/
public Phase(final GroundStation station, final AbsoluteDate date,
final double phase, final double wavelength, final double sigma,
final double baseWeight, final ObservableSatellite satellite) {
super(date, phase, sigma, baseWeight, Arrays.asList(satellite));
addParameterDriver(station.getClockOffsetDriver());
addParameterDriver(station.getEastOffsetDriver());
addParameterDriver(station.getNorthOffsetDriver());
addParameterDriver(station.getZenithOffsetDriver());
addParameterDriver(station.getPrimeMeridianOffsetDriver());
addParameterDriver(station.getPrimeMeridianDriftDriver());
addParameterDriver(station.getPolarOffsetXDriver());
addParameterDriver(station.getPolarDriftXDriver());
addParameterDriver(station.getPolarOffsetYDriver());
addParameterDriver(station.getPolarDriftYDriver());
this.station = station;
this.wavelength = wavelength;
}
......
......@@ -62,10 +62,13 @@ public class Position extends AbstractMeasurement<Position> {
* @param position position
* @param sigmaPosition theoretical standard deviation on position components
* @param baseWeight base weight
* @deprecated as of 9.3, replaced by {@link #Position(AbsoluteDate, Vector3D,
* double, double, ObservableSatellite)}
*/
@Deprecated
public Position(final AbsoluteDate date, final Vector3D position,
final double sigmaPosition, final double baseWeight) {
this(date, position, sigmaPosition, baseWeight, 0);
this(date, position, sigmaPosition, baseWeight, new ObservableSatellite(0));
}
/** Constructor with one double for the standard deviation.
......@@ -78,16 +81,37 @@ public class Position extends AbstractMeasurement<Position> {
* @param sigmaPosition theoretical standard deviation on position components
* @param baseWeight base weight
* @param propagatorIndex index of the propagator related to this measurement
* @deprecated as of 9.3, replaced by {@link #Position(AbsoluteDate, Vector3D,
* double, double, ObservableSatellite)}
*/
@Deprecated
public Position(final AbsoluteDate date, final Vector3D position,
final double sigmaPosition, final double baseWeight,
final int propagatorIndex) {
this(date, position, sigmaPosition, baseWeight, new ObservableSatellite(propagatorIndex));
}
/** Constructor with one double for the standard deviation.
* <p>The double is the position's standard deviation, common to the 3 position's components.</p>
* <p>
* The measurement must be in the orbit propagation frame.
* </p>
* @param date date of the measurement
* @param position position
* @param sigmaPosition theoretical standard deviation on position components
* @param baseWeight base weight
* @param satellite satellite related to this measurement
* @since 9.3
*/
public Position(final AbsoluteDate date, final Vector3D position,
final double sigmaPosition, final double baseWeight,
final ObservableSatellite satellite) {
this(date, position,
new double[] {
sigmaPosition,
sigmaPosition,
sigmaPosition
}, baseWeight, propagatorIndex);
}, baseWeight, satellite);
}
/** Constructor with one vector for the standard deviation and default value for propagator index..
......@@ -100,10 +124,13 @@ public class Position extends AbstractMeasurement<Position> {
* @param position position
* @param sigmaPosition 3-sized vector of the standard deviations of the position
* @param baseWeight base weight
* @deprecated as of 9.3, replaced by {@link #Position(AbsoluteDate, Vector3D,
* double[], double, ObservableSatellite)}
*/
@Deprecated
public Position(final AbsoluteDate date, final Vector3D position,
final double[] sigmaPosition, final double baseWeight) {
this(date, position, sigmaPosition, baseWeight, 0);
this(date, position, sigmaPosition, baseWeight, new ObservableSatellite(0));
}
/** Constructor with one vector for the standard deviation.
......@@ -114,10 +141,28 @@ public class Position extends AbstractMeasurement<Position> {
* @param sigmaPosition 3-sized vector of the standard deviations of the position
* @param baseWeight base weight
* @param propagatorIndex index of the propagator related to this measurement
* @deprecated as of 9.3, replaced by {@link #Position(AbsoluteDate, Vector3D,
* double[], double, ObservableSatellite)}
*/
@Deprecated
public Position(final AbsoluteDate date, final Vector3D position,
final double[] sigmaPosition, final double baseWeight, final int propagatorIndex) {
this(date, position, buildPvCovarianceMatrix(sigmaPosition), baseWeight, propagatorIndex);
this(date, position, sigmaPosition, baseWeight, new ObservableSatellite(propagatorIndex));
}
/** Constructor with one vector for the standard deviation.
* <p>The 3-sized vector represents the square root of the diagonal elements of the covariance matrix.</p>
* <p>The measurement must be in the orbit propagation frame.</p>
* @param date date of the measurement
* @param position position
* @param sigmaPosition 3-sized vector of the standard deviations of the position
* @param baseWeight base weight
* @param satellite satellite related to this measurement
* @since 9.3
*/
public Position(final AbsoluteDate date, final Vector3D position,
final double[] sigmaPosition, final double baseWeight, final ObservableSatellite satellite) {
this(date, position, buildPvCovarianceMatrix(sigmaPosition), baseWeight, satellite);
}
/**
......@@ -131,10 +176,13 @@ public class Position extends AbstractMeasurement<Position> {
* @param position position
* @param positionCovarianceMatrix 3x3 covariance matrix of the position
* @param baseWeight base weight
* @deprecated as of 9.3, replaced by {@link #Position(AbsoluteDate, Vector3D,
* double[][], double, ObservableSatellite)}
*/
@Deprecated
public Position(final AbsoluteDate date, final Vector3D position,
final double[][] positionCovarianceMatrix, final double baseWeight) {
this(date, position, positionCovarianceMatrix, baseWeight, 0);
this(date, position, positionCovarianceMatrix, baseWeight, new ObservableSatellite(0));
}
/** Constructor with full covariance matrix and all inputs.
......@@ -145,17 +193,36 @@ public class Position extends AbstractMeasurement<Position> {
* @param covarianceMatrix 6x6 covariance matrix of the PV measurement
* @param baseWeight base weight
* @param propagatorIndex index of the propagator related to this measurement
* @deprecated as of 9.3, replaced by {@link #Position(AbsoluteDate, Vector3D,
* double[][], double, ObservableSatellite)}
*/
@Deprecated
public Position(final AbsoluteDate date, final Vector3D position,
final double[][] covarianceMatrix, final double baseWeight,
final int propagatorIndex) {
this(date, position, covarianceMatrix, baseWeight, new ObservableSatellite(propagatorIndex));
}
/** Constructor with full covariance matrix and all inputs.
* <p>The fact that the covariance matrix is symmetric and positive definite is not checked.</p>
* <p>The measurement must be in the orbit propagation frame.</p>
* @param date date of the measurement
* @param position position
* @param covarianceMatrix 6x6 covariance matrix of the PV measurement
* @param baseWeight base weight
* @param satellite satellite related to this measurement
* @since 9.3
*/
public Position(final AbsoluteDate date, final Vector3D position,
final double[][] covarianceMatrix, final double baseWeight,
final ObservableSatellite satellite) {
super(date,
new double[] {
position.getX(), position.getY(), position.getZ()
}, extractSigmas(covarianceMatrix),
new double[] {
baseWeight, baseWeight, baseWeight
}, Arrays.asList(propagatorIndex));
}, Arrays.asList(satellite));
this.covarianceMatrix = covarianceMatrix;
}
......
......@@ -78,10 +78,13 @@ public class Range extends AbstractMeasurement<Range> {
* @param range observed value
* @param sigma theoretical standard deviation
* @param baseWeight base weight
* @deprecated as of 9.3, replaced by {@link #Range(GroundStation, boolean, AbsoluteDate,
* double, double, double, ObservableSatellite)}
*/