Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Guilhem Bonnefille
Orekit
Commits
46cc7802
Commit
46cc7802
authored
Nov 24, 2020
by
Bryan Cazabonne
Browse files
Revert "Revert "Merge branch 'develop' into rferme/orekit-issue-705""
This reverts commit
7e4ced0c
.
parent
54f5f2eb
Changes
72
Hide whitespace changes
Inline
Side-by-side
src/changes/changes.xml
View file @
46cc7802
...
...
@@ -21,6 +21,52 @@
</properties>
<body>
<release
version=
"10.3"
date=
"TBD"
description=
"TBD"
>
<action
dev=
"raphael"
type=
"add"
issue=
"686"
>
Allowed user-defined format for ephemeris data lines in
StreamingAemWriter, AEMWriter, StreamingOemWriter and OEMWriter.
</action>
<action
dev=
"bryan"
type=
"fix"
issue=
"683"
>
Updated building instructions.
</action>
<action
dev=
"bryan"
type=
"add"
issue=
"734"
>
Added getters for phase measurement ambiguity driver.
</action>
<action
dev=
"bryan"
type=
"fix"
issue=
"696"
>
Allowed to configure initial covariance for measurements in Kalman Filter.
</action>
<action
dev=
"thomas, bryan"
type=
"add"
issue=
"709"
>
Added clock drift contribution to range rate measurements.
</action>
<action
dev=
"bryan"
type=
"fix"
issue=
"687"
>
Fixed Javadoc of ElevationMask.
</action>
<action
dev=
"raphael"
type=
"fix"
issue=
"711"
>
Allowed definition of a default interpolation degree in both AEMParser and OEMParser.
</action>
<action
dev=
"bryan"
type=
"add"
issue=
"733"
>
Added Lense-Thirring and De Sitter relativistic effects.
</action>
<action
dev=
"melanisti"
type=
"fix"
issue=
"725"
>
Fixed missing measurement parameter in InterSatellitesRange measurement.
</action>
<action
dev=
"bryan"
type=
"add"
issue=
"732"
>
Added documentation for checkstyle configuration.
</action>
<action
dev=
"thomas"
type=
"fix"
issue=
"730"
>
Removed useless loop over an empty list
</action>
<action
dev=
"luc"
type=
"fix"
issue=
"731"
>
Fixed parsing of some ICGEM gravity fields files.
</action>
<action
dev=
"raphael"
type=
"fix"
issue=
"720"
>
Added support for measurements parameters in UnivariateProcessNoise
</action>
<action
dev=
"luc"
type=
"fix"
issue=
"729"
>
Fixed wrong handling of RESET-STATE in analytical propagators.
</action>
<action
dev=
"luc"
type=
"add"
issue=
"728"
>
Allow creating a node detector without an orbit.
</action>
<action
dev=
"bryan"
type=
"add"
issue=
"671"
>
Added support for laser ranging file formats.
</action>
...
...
src/main/java/org/orekit/estimation/measurements/AbstractMeasurement.java
View file @
46cc7802
...
...
@@ -85,9 +85,6 @@ public abstract class AbstractMeasurement<T extends ObservedMeasurement<T>>
final
List
<
ObservableSatellite
>
satellites
)
{
this
.
supportedParameters
=
new
ArrayList
<
ParameterDriver
>();
for
(
final
ParameterDriver
parameterDriver
:
supportedParameters
)
{
this
.
supportedParameters
.
add
(
parameterDriver
);
}
this
.
date
=
date
;
this
.
observed
=
new
double
[]
{
...
...
src/main/java/org/orekit/estimation/measurements/GroundStation.java
View file @
46cc7802
...
...
@@ -89,6 +89,9 @@ public class GroundStation {
/** Suffix for ground station position and clock offset parameters names. */
public
static
final
String
OFFSET_SUFFIX
=
"-offset"
;
/** Suffix for ground clock drift parameters name. */
public
static
final
String
DRIFT_SUFFIX
=
"-drift-clock"
;
/** Suffix for ground station intermediate frame name. */
public
static
final
String
INTERMEDIATE_SUFFIX
=
"-intermediate"
;
...
...
@@ -126,6 +129,9 @@ public class GroundStation {
/** Driver for clock offset. */
private
final
ParameterDriver
clockOffsetDriver
;
/** Driver for clock drift. */
private
final
ParameterDriver
clockDriftDriver
;
/** Driver for position offset along the East axis. */
private
final
ParameterDriver
eastOffsetDriver
;
...
...
@@ -205,6 +211,10 @@ public class GroundStation {
0.0
,
CLOCK_OFFSET_SCALE
,
Double
.
NEGATIVE_INFINITY
,
Double
.
POSITIVE_INFINITY
);
this
.
clockDriftDriver
=
new
ParameterDriver
(
baseFrame
.
getName
()
+
DRIFT_SUFFIX
,
0.0
,
CLOCK_OFFSET_SCALE
,
Double
.
NEGATIVE_INFINITY
,
Double
.
POSITIVE_INFINITY
);
this
.
eastOffsetDriver
=
new
ParameterDriver
(
baseFrame
.
getName
()
+
OFFSET_SUFFIX
+
"-East"
,
0.0
,
POSITION_OFFSET_SCALE
,
Double
.
NEGATIVE_INFINITY
,
Double
.
POSITIVE_INFINITY
);
...
...
@@ -235,6 +245,14 @@ public class GroundStation {
return
clockOffsetDriver
;
}
/** Get a driver allowing to change station clock drift (which is related to measurement date).
* @return driver for station clock drift
* @since 10.3
*/
public
ParameterDriver
getClockDriftDriver
()
{
return
clockDriftDriver
;
}
/** Get a driver allowing to change station position along East axis.
* @return driver for station position offset along East axis
*/
...
...
src/main/java/org/orekit/estimation/measurements/InterSatellitesRange.java
View file @
46cc7802
...
...
@@ -200,6 +200,14 @@ public class InterSatellitesRange extends AbstractMeasurement<InterSatellitesRan
estimated
.
setStateDerivatives
(
0
,
Arrays
.
copyOfRange
(
derivatives
,
0
,
6
));
estimated
.
setStateDerivatives
(
1
,
Arrays
.
copyOfRange
(
derivatives
,
6
,
12
));
// Set partial derivatives with respect to parameters
for
(
final
ParameterDriver
driver
:
getParametersDrivers
())
{
final
Integer
index
=
indices
.
get
(
driver
.
getName
());
if
(
index
!=
null
)
{
estimated
.
setParameterDerivatives
(
driver
,
derivatives
[
index
]);
}
}
return
estimated
;
}
...
...
src/main/java/org/orekit/estimation/measurements/ObservableSatellite.java
View file @
46cc7802
...
...
@@ -29,6 +29,9 @@ public class ObservableSatellite {
/** Prefix for clock offset parameter driver, the propagator index will be appended to it. */
public
static
final
String
CLOCK_OFFSET_PREFIX
=
"clock-offset-satellite-"
;
/** Prefix for clock drift parameter driver, the propagator index will be appended to it. */
public
static
final
String
CLOCK_DRIFT_PREFIX
=
"clock-drift-satellite-"
;
/** Clock offset scaling factor.
* <p>
* We use a power of 2 to avoid numeric noise introduction
...
...
@@ -43,6 +46,9 @@ public class ObservableSatellite {
/** Parameter driver for satellite clock offset. */
private
final
ParameterDriver
clockOffsetDriver
;
/** Parameter driver for satellite clock drift. */
private
final
ParameterDriver
clockDriftDriver
;
/** Simple constructor.
* @param propagatorIndex index of the propagator related to this satellite
*/
...
...
@@ -51,6 +57,9 @@ public class ObservableSatellite {
this
.
clockOffsetDriver
=
new
ParameterDriver
(
CLOCK_OFFSET_PREFIX
+
propagatorIndex
,
0.0
,
CLOCK_OFFSET_SCALE
,
Double
.
NEGATIVE_INFINITY
,
Double
.
POSITIVE_INFINITY
);
this
.
clockDriftDriver
=
new
ParameterDriver
(
CLOCK_DRIFT_PREFIX
+
propagatorIndex
,
0.0
,
CLOCK_OFFSET_SCALE
,
Double
.
NEGATIVE_INFINITY
,
Double
.
POSITIVE_INFINITY
);
}
/** Get the index of the propagator related to this satellite.
...
...
@@ -72,4 +81,15 @@ public class ObservableSatellite {
return
clockOffsetDriver
;
}
/** Get the clock drift parameter driver.
* <p>
* The drift is negative if the satellite clock is slowing down and positive if it is speeding up.
* </p>
* @return clock offset parameter driver
* @since 10.3
*/
public
ParameterDriver
getClockDriftDriver
()
{
return
clockDriftDriver
;
}
}
src/main/java/org/orekit/estimation/measurements/RangeRate.java
View file @
46cc7802
...
...
@@ -27,6 +27,7 @@ import org.orekit.frames.FieldTransform;
import
org.orekit.propagation.SpacecraftState
;
import
org.orekit.time.AbsoluteDate
;
import
org.orekit.time.FieldAbsoluteDate
;
import
org.orekit.utils.Constants
;
import
org.orekit.utils.ParameterDriver
;
import
org.orekit.utils.TimeStampedFieldPVCoordinates
;
import
org.orekit.utils.TimeStampedPVCoordinates
;
...
...
@@ -68,6 +69,8 @@ public class RangeRate extends AbstractMeasurement<RangeRate> {
final
boolean
twoway
,
final
ObservableSatellite
satellite
)
{
super
(
date
,
rangeRate
,
sigma
,
baseWeight
,
Arrays
.
asList
(
satellite
));
addParameterDriver
(
station
.
getClockOffsetDriver
());
addParameterDriver
(
station
.
getClockDriftDriver
());
addParameterDriver
(
satellite
.
getClockDriftDriver
());
addParameterDriver
(
station
.
getEastOffsetDriver
());
addParameterDriver
(
station
.
getNorthOffsetDriver
());
addParameterDriver
(
station
.
getZenithOffsetDriver
());
...
...
@@ -109,7 +112,7 @@ public class RangeRate extends AbstractMeasurement<RangeRate> {
// Parameters:
// - 0..2 - Position of the spacecraft in inertial frame
// - 3..5 - Velocity of the spacecraft in inertial frame
// - 6..n - station parameters (clock offset, station offsets, pole, prime meridian...)
// - 6..n - station parameters (clock offset,
clock drift,
station offsets, pole, prime meridian...)
int
nbParams
=
6
;
final
Map
<
String
,
Integer
>
indices
=
new
HashMap
<>();
for
(
ParameterDriver
driver
:
getParametersDrivers
())
{
...
...
@@ -152,7 +155,7 @@ public class RangeRate extends AbstractMeasurement<RangeRate> {
// one-way (downlink) range-rate
final
EstimatedMeasurement
<
RangeRate
>
evalOneWay1
=
oneWayTheoreticalEvaluation
(
iteration
,
evaluation
,
true
,
stationDownlink
,
transitPV
,
transitState
,
indices
);
stationDownlink
,
transitPV
,
transitState
,
indices
,
nbParams
);
final
EstimatedMeasurement
<
RangeRate
>
estimated
;
if
(
twoway
)
{
// one-way (uplink) light time correction
...
...
@@ -173,7 +176,7 @@ public class RangeRate extends AbstractMeasurement<RangeRate> {
final
EstimatedMeasurement
<
RangeRate
>
evalOneWay2
=
oneWayTheoreticalEvaluation
(
iteration
,
evaluation
,
false
,
stationUplink
,
transitPV
,
transitState
,
indices
);
stationUplink
,
transitPV
,
transitState
,
indices
,
nbParams
);
// combine uplink and downlink values
estimated
=
new
EstimatedMeasurement
<>(
this
,
iteration
,
evaluation
,
...
...
@@ -223,6 +226,7 @@ public class RangeRate extends AbstractMeasurement<RangeRate> {
* @param transitPV spacecraft coordinates at onboard signal transit
* @param transitState orbital state at onboard signal transit
* @param indices indices of the estimated parameters in derivatives computations
* @param nbParams the number of estimated parameters in derivative computations
* @return theoretical value
* @see #evaluate(SpacecraftStatet)
*/
...
...
@@ -230,7 +234,8 @@ public class RangeRate extends AbstractMeasurement<RangeRate> {
final
TimeStampedFieldPVCoordinates
<
Gradient
>
stationPV
,
final
TimeStampedFieldPVCoordinates
<
Gradient
>
transitPV
,
final
SpacecraftState
transitState
,
final
Map
<
String
,
Integer
>
indices
)
{
final
Map
<
String
,
Integer
>
indices
,
final
int
nbParams
)
{
// prepare the evaluation
final
EstimatedMeasurement
<
RangeRate
>
estimated
=
...
...
@@ -252,8 +257,22 @@ public class RangeRate extends AbstractMeasurement<RangeRate> {
// radial direction
final
FieldVector3D
<
Gradient
>
lineOfSight
=
relativePosition
.
normalize
();
// line of sight velocity
final
Gradient
lineOfSightVelocity
=
FieldVector3D
.
dotProduct
(
relativeVelocity
,
lineOfSight
);
// range rate
final
Gradient
rangeRate
=
FieldVector3D
.
dotProduct
(
relativeVelocity
,
lineOfSight
);
Gradient
rangeRate
=
lineOfSightVelocity
;
if
(!
twoway
)
{
// clock drifts, taken in account only in case of one way
final
ObservableSatellite
satellite
=
getSatellites
().
get
(
0
);
final
Gradient
dtsDot
=
satellite
.
getClockDriftDriver
().
getValue
(
nbParams
,
indices
);
final
Gradient
dtgDot
=
station
.
getClockDriftDriver
().
getValue
(
nbParams
,
indices
);
final
Gradient
clockDriftBiais
=
dtgDot
.
subtract
(
dtsDot
).
multiply
(
Constants
.
SPEED_OF_LIGHT
);
rangeRate
=
rangeRate
.
add
(
clockDriftBiais
);
}
estimated
.
setEstimatedValue
(
rangeRate
.
getValue
());
...
...
src/main/java/org/orekit/estimation/measurements/gnss/InterSatellitesPhase.java
View file @
46cc7802
...
...
@@ -92,6 +92,13 @@ public class InterSatellitesPhase extends AbstractMeasurement<InterSatellitesPha
return
wavelength
;
}
/** Get the driver for phase ambiguity.
* @return the driver for phase ambiguity
*/
public
ParameterDriver
getAmbiguityDriver
()
{
return
ambiguityDriver
;
}
/** {@inheritDoc} */
@Override
protected
EstimatedMeasurement
<
InterSatellitesPhase
>
theoreticalEvaluation
(
final
int
iteration
,
...
...
src/main/java/org/orekit/estimation/measurements/gnss/OneWayGNSSPhase.java
View file @
46cc7802
...
...
@@ -108,6 +108,13 @@ public class OneWayGNSSPhase extends AbstractMeasurement<OneWayGNSSPhase> {
return
wavelength
;
}
/** Get the driver for phase ambiguity.
* @return the driver for phase ambiguity
*/
public
ParameterDriver
getAmbiguityDriver
()
{
return
ambiguityDriver
;
}
/** {@inheritDoc} */
@Override
protected
EstimatedMeasurement
<
OneWayGNSSPhase
>
theoreticalEvaluation
(
final
int
iteration
,
...
...
src/main/java/org/orekit/estimation/measurements/gnss/Phase.java
View file @
46cc7802
...
...
@@ -112,6 +112,14 @@ public class Phase extends AbstractMeasurement<Phase> {
return
wavelength
;
}
/** Get the driver for phase ambiguity.
* @return the driver for phase ambiguity
* @since 10.3
*/
public
ParameterDriver
getAmbiguityDriver
()
{
return
ambiguityDriver
;
}
/** {@inheritDoc} */
@Override
protected
EstimatedMeasurement
<
Phase
>
theoreticalEvaluation
(
final
int
iteration
,
...
...
src/main/java/org/orekit/estimation/sequential/DSSTKalmanModel.java
View file @
46cc7802
...
...
@@ -92,6 +92,9 @@ public class DSSTKalmanModel implements KalmanODModel {
/** Providers for covariance matrices. */
private
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
;
/** Process noise matrix provider for measurement parameters. */
private
final
CovarianceMatrixProvider
measurementProcessNoiseMatrix
;
/** Indirection arrays to extract the noise components for estimated parameters. */
private
final
int
[][]
covarianceIndirection
;
...
...
@@ -134,18 +137,39 @@ public class DSSTKalmanModel implements KalmanODModel {
/** Type of the elements used to define the orbital state.*/
private
PropagationType
stateType
;
/** Kalman process model constructor
(package private)
.
/** Kalman process model constructor.
* @param propagatorBuilders propagators builders used to evaluate the orbits.
* @param covarianceMatricesProviders providers for covariance matrices
* @param estimatedMeasurementParameters measurement parameters to estimate
* @param propagationType type of the orbit used for the propagation (mean or osculating)
* @param stateType type of the elements used to define the orbital state (mean or osculating)
* @deprecated since 10.3, replaced by {@link
* #DSSTKalmanModel(List, List, ParameterDriversList, CovarianceMatrixProvider, PropagationType, PropagationType)}
*/
@Deprecated
public
DSSTKalmanModel
(
final
List
<
IntegratedPropagatorBuilder
>
propagatorBuilders
,
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
,
final
PropagationType
propagationType
,
final
PropagationType
stateType
)
{
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
,
final
PropagationType
propagationType
,
final
PropagationType
stateType
)
{
this
(
propagatorBuilders
,
covarianceMatricesProviders
,
estimatedMeasurementParameters
,
null
,
propagationType
,
stateType
);
}
/** Kalman process model constructor.
* @param propagatorBuilders propagators builders used to evaluate the orbits.
* @param covarianceMatricesProviders providers for covariance matrices
* @param estimatedMeasurementParameters measurement parameters to estimate
* @param measurementProcessNoiseMatrix provider for measurement process noise matrix
* @param propagationType type of the orbit used for the propagation (mean or osculating)
* @param stateType type of the elements used to define the orbital state (mean or osculating)
*/
public
DSSTKalmanModel
(
final
List
<
IntegratedPropagatorBuilder
>
propagatorBuilders
,
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
,
final
CovarianceMatrixProvider
measurementProcessNoiseMatrix
,
final
PropagationType
propagationType
,
final
PropagationType
stateType
)
{
this
.
builders
=
propagatorBuilders
;
this
.
estimatedMeasurementsParameters
=
estimatedMeasurementParameters
;
...
...
@@ -221,8 +245,9 @@ public class DSSTKalmanModel implements KalmanODModel {
}
// Store providers for process noise matrices
this
.
covarianceMatricesProviders
=
covarianceMatricesProviders
;
this
.
covarianceIndirection
=
new
int
[
covarianceMatricesProviders
.
size
()][
columns
];
this
.
covarianceMatricesProviders
=
covarianceMatricesProviders
;
this
.
measurementProcessNoiseMatrix
=
measurementProcessNoiseMatrix
;
this
.
covarianceIndirection
=
new
int
[
covarianceMatricesProviders
.
size
()][
columns
];
for
(
int
k
=
0
;
k
<
covarianceIndirection
.
length
;
++
k
)
{
final
ParameterDriversList
orbitDrivers
=
builders
.
get
(
k
).
getOrbitalParametersDrivers
();
final
ParameterDriversList
parametersDrivers
=
builders
.
get
(
k
).
getPropagationParametersDrivers
();
...
...
@@ -285,12 +310,30 @@ public class DSSTKalmanModel implements KalmanODModel {
// Set up initial covariance
final
RealMatrix
physicalProcessNoise
=
MatrixUtils
.
createRealMatrix
(
columns
,
columns
);
for
(
int
k
=
0
;
k
<
covarianceMatricesProviders
.
size
();
++
k
)
{
final
RealMatrix
noiseK
=
covarianceMatricesProviders
.
get
(
k
).
// Number of estimated measurement parameters
final
int
nbMeas
=
estimatedMeasurementParameters
.
getNbParams
();
// Number of estimated dynamic parameters (orbital + propagation)
final
int
nbDyn
=
orbitsEndColumns
[
k
]
-
orbitsStartColumns
[
k
]
+
estimatedPropagationParameters
[
k
].
getNbParams
();
// Covariance matrix
final
RealMatrix
noiseK
=
MatrixUtils
.
createRealMatrix
(
nbDyn
+
nbMeas
,
nbDyn
+
nbMeas
);
final
RealMatrix
noiseP
=
covarianceMatricesProviders
.
get
(
k
).
getInitialCovarianceMatrix
(
correctedSpacecraftStates
[
k
]);
noiseK
.
setSubMatrix
(
noiseP
.
getData
(),
0
,
0
);
if
(
measurementProcessNoiseMatrix
!=
null
)
{
final
RealMatrix
noiseM
=
measurementProcessNoiseMatrix
.
getInitialCovarianceMatrix
(
correctedSpacecraftStates
[
k
]);
noiseK
.
setSubMatrix
(
noiseM
.
getData
(),
nbDyn
,
nbDyn
);
}
checkDimension
(
noiseK
.
getRowDimension
(),
builders
.
get
(
k
).
getOrbitalParametersDrivers
(),
builders
.
get
(
k
).
getPropagationParametersDrivers
(),
estimatedMeasurementsParameters
);
final
int
[]
indK
=
covarianceIndirection
[
k
];
for
(
int
i
=
0
;
i
<
indK
.
length
;
++
i
)
{
if
(
indK
[
i
]
>=
0
)
{
...
...
@@ -944,9 +987,27 @@ public class DSSTKalmanModel implements KalmanODModel {
final
RealMatrix
physicalProcessNoise
=
MatrixUtils
.
createRealMatrix
(
previousState
.
getDimension
(),
previousState
.
getDimension
());
for
(
int
k
=
0
;
k
<
covarianceMatricesProviders
.
size
();
++
k
)
{
final
RealMatrix
noiseK
=
covarianceMatricesProviders
.
get
(
k
).
// Number of estimated measurement parameters
final
int
nbMeas
=
estimatedMeasurementsParameters
.
getNbParams
();
// Number of estimated dynamic parameters (orbital + propagation)
final
int
nbDyn
=
orbitsEndColumns
[
k
]
-
orbitsStartColumns
[
k
]
+
estimatedPropagationParameters
[
k
].
getNbParams
();
// Covariance matrix
final
RealMatrix
noiseK
=
MatrixUtils
.
createRealMatrix
(
nbDyn
+
nbMeas
,
nbDyn
+
nbMeas
);
final
RealMatrix
noiseP
=
covarianceMatricesProviders
.
get
(
k
).
getProcessNoiseMatrix
(
correctedSpacecraftStates
[
k
],
predictedSpacecraftStates
[
k
]);
noiseK
.
setSubMatrix
(
noiseP
.
getData
(),
0
,
0
);
if
(
measurementProcessNoiseMatrix
!=
null
)
{
final
RealMatrix
noiseM
=
measurementProcessNoiseMatrix
.
getProcessNoiseMatrix
(
correctedSpacecraftStates
[
k
],
predictedSpacecraftStates
[
k
]);
noiseK
.
setSubMatrix
(
noiseM
.
getData
(),
nbDyn
,
nbDyn
);
}
checkDimension
(
noiseK
.
getRowDimension
(),
builders
.
get
(
k
).
getOrbitalParametersDrivers
(),
builders
.
get
(
k
).
getPropagationParametersDrivers
(),
...
...
src/main/java/org/orekit/estimation/sequential/KalmanEstimator.java
View file @
46cc7802
...
...
@@ -94,11 +94,31 @@ public class KalmanEstimator {
* @param propagatorBuilders propagators builders used to evaluate the orbit.
* @param processNoiseMatricesProviders providers for process noise matrices
* @param estimatedMeasurementParameters measurement parameters to estimate
* @deprecated since 10.3, replaced by
* {@link #KalmanEstimator(MatrixDecomposer, List, List, ParameterDriversList, CovarianceMatrixProvider)}
*/
@Deprecated
KalmanEstimator
(
final
MatrixDecomposer
decomposer
,
final
List
<
IntegratedPropagatorBuilder
>
propagatorBuilders
,
final
List
<
CovarianceMatrixProvider
>
processNoiseMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
)
{
this
(
decomposer
,
propagatorBuilders
,
processNoiseMatricesProviders
,
estimatedMeasurementParameters
,
null
);
}
/** Kalman filter estimator constructor (package private).
* @param decomposer decomposer to use for the correction phase
* @param propagatorBuilders propagators builders used to evaluate the orbit.
* @param processNoiseMatricesProviders providers for process noise matrices
* @param estimatedMeasurementParameters measurement parameters to estimate
* @param measurementProcessNoiseMatrix provider for measurement process noise matrix
* @since 10.3
*/
KalmanEstimator
(
final
MatrixDecomposer
decomposer
,
final
List
<
IntegratedPropagatorBuilder
>
propagatorBuilders
,
final
List
<
CovarianceMatrixProvider
>
processNoiseMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
,
final
CovarianceMatrixProvider
measurementProcessNoiseMatrix
)
{
this
.
propagatorBuilders
=
propagatorBuilders
;
this
.
referenceDate
=
propagatorBuilders
.
get
(
0
).
getInitialOrbitDate
();
...
...
@@ -107,9 +127,8 @@ public class KalmanEstimator {
// Build the process model and measurement model
this
.
processModel
=
propagatorBuilders
.
get
(
0
).
buildKalmanModel
(
propagatorBuilders
,
processNoiseMatricesProviders
,
estimatedMeasurementParameters
);
//this.processModel = new KalmanModel(propagatorBuilders, processNoiseMatricesProviders,
//estimatedMeasurementParameters);
estimatedMeasurementParameters
,
measurementProcessNoiseMatrix
);
this
.
filter
=
new
ExtendedKalmanFilter
<>(
decomposer
,
processModel
,
processModel
.
getEstimate
());
...
...
src/main/java/org/orekit/estimation/sequential/KalmanEstimatorBuilder.java
View file @
46cc7802
...
...
@@ -45,6 +45,9 @@ public class KalmanEstimatorBuilder {
/** Process noise matrices providers. */
private
List
<
CovarianceMatrixProvider
>
processNoiseMatricesProviders
;
/** Process noise matrix provider for measurement parameters. */
private
CovarianceMatrixProvider
measurementProcessNoiseMatrix
;
/** Default constructor.
* Set an extended Kalman filter, with linearized covariance prediction.
*/
...
...
@@ -53,6 +56,7 @@ public class KalmanEstimatorBuilder {
this
.
propagatorBuilders
=
new
ArrayList
<>();
this
.
estimatedMeasurementsParameters
=
new
ParameterDriversList
();
this
.
processNoiseMatricesProviders
=
new
ArrayList
<>();
this
.
measurementProcessNoiseMatrix
=
null
;
}
/** Construct a {@link KalmanEstimator} from the data in this builder.
...
...
@@ -69,7 +73,7 @@ public class KalmanEstimatorBuilder {
throw
new
OrekitException
(
OrekitMessages
.
NO_PROPAGATOR_CONFIGURED
);
}
return
new
KalmanEstimator
(
decomposer
,
propagatorBuilders
,
processNoiseMatricesProviders
,
estimatedMeasurementsParameters
);
estimatedMeasurementsParameters
,
measurementProcessNoiseMatrix
);
}
/** Configure the matrix decomposer.
...
...
@@ -117,11 +121,28 @@ public class KalmanEstimatorBuilder {
* </p>
* @param estimatedMeasurementsParams The estimated measurements' parameters list.
* @return this object.
*
*
@deprecated since 10.3 replaced by {@link #estimatedMeasurementsParameters(ParameterDriversList, CovarianceMatrixProvider)}
*/
@Deprecated
public
KalmanEstimatorBuilder
estimatedMeasurementsParameters
(
final
ParameterDriversList
estimatedMeasurementsParams
)
{
estimatedMeasurementsParameters
=
estimatedMeasurementsParams
;
return
this
;
}
/** Configure the estimated measurement parameters.
* <p>
* If this method is not called, no measurement parameters will be estimated.
* </p>
* @param estimatedMeasurementsParams The estimated measurements' parameters list.
* @param provider covariance matrix provider for the estimated measurement parameters
* @return this object.
* @since 10.3
*/
public
KalmanEstimatorBuilder
estimatedMeasurementsParameters
(
final
ParameterDriversList
estimatedMeasurementsParams
,
final
CovarianceMatrixProvider
provider
)
{
estimatedMeasurementsParameters
=
estimatedMeasurementsParams
;
measurementProcessNoiseMatrix
=
provider
;
return
this
;
}
}
src/main/java/org/orekit/estimation/sequential/KalmanModel.java
View file @
46cc7802
...
...
@@ -87,6 +87,9 @@ public class KalmanModel implements KalmanODModel {
/** Providers for covariance matrices. */
private
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
;
/** Process noise matrix provider for measurement parameters. */
private
final
CovarianceMatrixProvider
measurementProcessNoiseMatrix
;
/** Indirection arrays to extract the noise components for estimated parameters. */
private
final
int
[][]
covarianceIndirection
;
...
...
@@ -123,14 +126,29 @@ public class KalmanModel implements KalmanODModel {
/** Corrected measurement. */
private
EstimatedMeasurement
<?>
correctedMeasurement
;
/** Kalman process model constructor (package private).
/** Kalman process model constructor.
* @param propagatorBuilders propagators builders used to evaluate the orbits.
* @param covarianceMatricesProviders providers for covariance matrices (orbital and propagation parameters)
* @param estimatedMeasurementParameters measurement parameters to estimate
* @deprecated since 10.3, replaced by {@link #KalmanModel(List, List, ParameterDriversList, CovarianceMatrixProvider)}
*/
@Deprecated
public
KalmanModel
(
final
List
<
IntegratedPropagatorBuilder
>
propagatorBuilders
,
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
)
{
this
(
propagatorBuilders
,
covarianceMatricesProviders
,
estimatedMeasurementParameters
,
null
);
}
/** Kalman process model constructor.
* @param propagatorBuilders propagators builders used to evaluate the orbits.
* @param covarianceMatricesProviders providers for covariance matrices
* @param estimatedMeasurementParameters measurement parameters to estimate
* @param measurementProcessNoiseMatrix provider for measurement process noise matrix
*/
public
KalmanModel
(
final
List
<
IntegratedPropagatorBuilder
>
propagatorBuilders
,
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
)
{
final
List
<
CovarianceMatrixProvider
>
covarianceMatricesProviders
,
final
ParameterDriversList
estimatedMeasurementParameters
,
final
CovarianceMatrixProvider
measurementProcessNoiseMatrix
)
{
this
.
builders
=
propagatorBuilders
;
this
.
estimatedMeasurementsParameters
=
estimatedMeasurementParameters
;
...
...
@@ -204,8 +222,9 @@ public class KalmanModel implements KalmanODModel {
}
// Store providers for process noise matrices
this
.
covarianceMatricesProviders
=
covarianceMatricesProviders
;
this
.
covarianceIndirection
=
new
int
[
covarianceMatricesProviders
.
size
()][
columns
];
this
.
covarianceMatricesProviders
=
covarianceMatricesProviders
;
this
.
measurementProcessNoiseMatrix
=
measurementProcessNoiseMatrix
;
this
.
covarianceIndirection
=
new
int
[
covarianceMatricesProviders
.
size
()][
columns
];
for
(
int
k
=
0
;
k
<
covarianceIndirection
.
length
;
++
k
)
{
final
ParameterDriversList
orbitDrivers
=
builders
.
get
(
k
).
getOrbitalParametersDrivers
();
final
ParameterDriversList
parametersDrivers
=
builders
.
get
(
k
).
getPropagationParametersDrivers
();
...
...
@@ -268,12 +287,30 @@ public class KalmanModel implements KalmanODModel {
// Set up initial covariance
final
RealMatrix
physicalProcessNoise
=
MatrixUtils
.
createRealMatrix
(
columns
,
columns
);