public class BatchLSEstimator extends Object
Constructor and Description |
---|
BatchLSEstimator(org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer optimizer,
NumericalPropagatorBuilder... propagatorBuilder)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMeasurement(ObservedMeasurement<?> measurement)
Add a measurement.
|
NumericalPropagator[] |
estimate()
Estimate the orbital, propagation and measurements parameters.
|
int |
getEvaluationsCount()
Get the number of evaluations used for last estimation.
|
int |
getIterationsCount()
Get the number of iterations used for last estimation.
|
Map<ObservedMeasurement<?>,EstimatedMeasurement<?>> |
getLastEstimations()
Get the last estimations performed.
|
ParameterDriversList |
getMeasurementsParametersDrivers(boolean estimatedOnly)
Get the measurements parameters supported by this estimator (including measurements and modifiers).
|
org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum |
getOptimum()
Get the optimum found.
|
ParameterDriversList |
getOrbitalParametersDrivers(boolean estimatedOnly)
Get the orbital parameters supported by this estimator.
|
ParameterDriversList |
getPropagatorParametersDrivers(boolean estimatedOnly)
Get the propagator parameters supported by this estimator.
|
void |
setMaxEvaluations(int maxEvaluations)
Set the maximum number of model evaluations.
|
void |
setMaxIterations(int maxIterations)
Set the maximum number of iterations.
|
void |
setObserver(BatchLSObserver observer)
Set an observer for iterations.
|
void |
setParametersConvergenceThreshold(double parametersConvergenceThreshold)
Set convergence threshold.
|
public BatchLSEstimator(org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer optimizer, NumericalPropagatorBuilder... propagatorBuilder) throws OrekitException
If multiple propagator builders
are set up,
the orbits of several spacecrafts will be used simultaneously.
This is useful if the propagators share some model or measurements
parameters (typically pole motion, prime meridian correction or
ground stations positions).
Setting up multiple propagator builders
is
also useful when inter-satellite measurements are used, even if only one
of the orbit is estimated and the other ones are fixed. This is typically
used when very high accuracy GNSS measurements are needed and the
navigation bulletins are not considered accurate enough and the navigation
constellation must be propagated numerically.
optimizer
- solver for least squares problempropagatorBuilder
- builders to use for propagationOrekitException
- if some propagator parameter cannot be retrievedpublic void setObserver(BatchLSObserver observer)
observer
- observer to be notified at the end of each iterationpublic void addMeasurement(ObservedMeasurement<?> measurement) throws OrekitException
measurement
- measurement to addOrekitException
- if the measurement has a parameter
that is already usedpublic void setMaxIterations(int maxIterations)
The iterations correspond to the top level iterations of
the least squares optimizer
.
maxIterations
- maxIterations maximum number of iterationssetMaxEvaluations(int)
,
getIterationsCount()
public void setMaxEvaluations(int maxEvaluations)
The evaluations correspond to the orbit propagations and measurements estimations performed with a set of estimated parameters.
For Gauss-Newton optimizer
there is one evaluation at each iteration,
so the maximum numbers may be set to the same value. For Levenberg-Marquardt optimizer
, there can be several evaluations at
some iterations (typically for the first couple of iterations), so the
maximum number of evaluations may be set to a higher value than the
maximum number of iterations.
maxEvaluations
- maximum number of model evaluationssetMaxIterations(int)
,
getEvaluationsCount()
public ParameterDriversList getOrbitalParametersDrivers(boolean estimatedOnly) throws OrekitException
If there are more than one propagator builder, then the names of the drivers have an index marker in square brackets appended to them in order to distinguish the various orbits. So for example with one builder generating Keplerian orbits the names would be simply "a", "e", "i"... but if there are several builders the names would be "a[0]", "e[0]", "i[0]"..."a[1]", "e[1]", "i[1]"...
estimatedOnly
- if true, only estimated parameters are returnedOrekitException
- if different parameters have the same namepublic ParameterDriversList getPropagatorParametersDrivers(boolean estimatedOnly) throws OrekitException
estimatedOnly
- if true, only estimated parameters are returnedOrekitException
- if different parameters have the same namepublic ParameterDriversList getMeasurementsParametersDrivers(boolean estimatedOnly) throws OrekitException
estimatedOnly
- if true, only estimated parameters are returnedOrekitException
- if different parameters have the same namepublic void setParametersConvergenceThreshold(double parametersConvergenceThreshold)
The convergence used for estimation is based on the estimated
parameters normalized values
.
Convergence is considered to have been reached when the difference
between previous and current normalized value is less than the
convergence threshold for all parameters. The same value is used
for all parameters since they are normalized and hence dimensionless.
Normalized values are computed as (current - reference)/scale
,
so convergence is reached when the following condition holds for
all estimated parameters:
|current[i] - previous[i]| <= threshold * scale[i]
So the convergence threshold specified here can be considered as a multiplication factor applied to scale. Since for all parameters the scale is often small (typically about 1 m for orbital positions for example), then the threshold should not be too small. A value of 10⁻³ is often quite accurate.
parametersConvergenceThreshold
- convergence threshold on
normalized parameters (dimensionless, related to parameters scales)EvaluationRmsChecker
public NumericalPropagator[] estimate() throws OrekitException
The initial guess for all parameters must have been set before calling this method
using getOrbitalParametersDrivers(boolean)
, getPropagatorParametersDrivers(boolean)
,
and getMeasurementsParametersDrivers(boolean)
and then setting the values
of the parameters.
For parameters whose reference date has not been set to a non-null date beforehand (i.e.
the parameters for which ParameterDriver.getReferenceDate()
returns null
,
a default reference date will be set automatically at the start of the estimation to the
initial orbit date
of the first
propagator builder. For parameters whose reference date has been set to a non-null date,
this reference date is untouched.
After this method returns, the estimated parameters can be retrieved using
getOrbitalParametersDrivers(boolean)
, getPropagatorParametersDrivers(boolean)
,
and getMeasurementsParametersDrivers(boolean)
and then getting the values
of the parameters.
As a convenience, the method also returns a fully configured and ready to use propagator set up with all the estimated values.
For even more in-depth information, the getOptimum()
method provides detailed
elements (covariance matrix, estimated parameters standard deviation, weighted Jacobian, RMS,
χ², residuals and more).
OrekitException
- if there is a conflict in parameters names
or if orbit cannot be determinedpublic Map<ObservedMeasurement<?>,EstimatedMeasurement<?>> getLastEstimations()
public org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresOptimizer.Optimum getOptimum()
The LeastSquaresOptimizer.Optimum
object contains detailed elements (covariance matrix, estimated
parameters standard deviation, weighted Jacobian, RMS, χ², residuals and more).
estimate()
public int getIterationsCount()
setMaxIterations(int)
public int getEvaluationsCount()
setMaxEvaluations(int)
Copyright © 2002-2017 CS Systèmes d'information. All rights reserved.