Hello Maxime,
Thanks for your reply.
If I donāt estimate then how is supposed Orekit to decorrelate the station clock from the Orbit ? If I remove it from the estimation parameters, the measurement will be corrected for the station bias ? In that case when I initialise the ground station I am obliged to set up the getClockOffsetDriver().setValue() to a very accurate value.
By the way what is the difference between setValue and setReference ?
[quote=āMaximeJ, post:2, topic:775ā]
I donāt think so, but you need to initialize the covariance matrix for all the parameters though. For propagation or measurements parameters it is usually a diagonal matrix
with the square values of the initial errors of your parameters. These initial errors you will have to guess though, it depends on your simulation and knowledge of the parameters at the start of your run.
[/quote
Here I put you some code Iāve wrote regarding this matter:
Process Noise matrix Orbit part
cartesianOrbitalQ = MatrixUtils.createRealDiagonalMatrix([1.0e-4, 1.0e-4, 1.0e-4, 1.0e-10, 1.0e-10, 1.0e-10])
Coovariance Matrix orbit part
cartesianOrbitalP = MatrixUtils.createRealDiagonalMatrix([1.0e4, 4e3, 1.0, 5e-3, 6e-5, 1.0e-4])
Propagation parameters part
propagationP = MatrixUtils.createRealDiagonalMatrix([0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.001])
propagationQ = MatrixUtils.createRealDiagonalMatrix([1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-12])
Coovariance of the measurements per each station
measurementP = MatrixUtils.createRealDiagonalMatrix([1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0,
1000.0, 1000.0, 1000.0, 1000.0, 1000.0, 1000.0])
#measurementP = None
Process noise matrix of the measurement model
measQ = 1e-6*1e-6
measurementQ = MatrixUtils.createRealIdentityMatrix(measurementP.getRowDimension()).scalarMultiply(measQ)
measurementQ = None
measurementP = None
Jacobian of the orbital parameters w/r to Cartesian
dYdC = JArray_double2D(6,6)
propagatorBuilder.getPositionAngle()
initialOrbit.getJacobianWrtCartesian(propagatorBuilder.getPositionAngle(),dYdC)
Jac = MatrixUtils.createRealMatrix(dYdC)
orbitalP = Jac.multiply(cartesianOrbitalP.multiply(Jac.transpose()))
Orbital Process noise matrix
orbitalQ = Jac.multiply(cartesianOrbitalQ.multiply(Jac.transpose()))
Build the full covariance matrix and process noise matrix
nbPropag = propagationP.getRowDimension() if propagationP != None else 0
nbMeas = measurementP.getRowDimension() if measurementP != None else 0
print(nbPropag, nbMeas)
initialP = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas, 6 + nbPropag + nbMeas)
Q = MatrixUtils.createRealMatrix(6 + nbPropag + nbMeas, 6 + nbPropag+nbMeas)
Orbital part
initialP.setSubMatrix(orbitalP.getData(), 0, 0)
Q.setSubMatrix(orbitalQ.getData(), 0, 0)
Propagation part
if propagationP != None:
initialP.setSubMatrix(propagationP.getData(), 6, 6)
Q.setSubMatrix(propagationQ.getData(), 6, 6)
Measurement part
if measurementP != None:
initialP.setSubMatrix(measurementP.getData(), 6 + nbPropag, 6 + nbPropag)
Q.setSubMatrix(measurementQ.getData(), 6 + nbPropag, 6 + nbPropag)
Notice that the measurementP and Q I change it to empty because when I am calling the:
Configure propagator
kalman = KalmanEstimatorBuilder().addPropagationConfiguration(propagatorBuilder,
ConstantProcessNoise(initialP, Q)).estimatedMeasurementsParameters(estimatedMeasurementsParameters).build()
Was giving me some errors regarding the dimensions. If you know the problem I would appreciate it.
The code is large. If you tell me which part to share I can copy paste it. The Kalman filter is being called as:
from org.orekit.estimation.sequential import KalmanObserver
from org.orekit.propagation.integration import AbstractIntegratedPropagator
from org.orekit.python import PythonKalmanObserver
import MyObserver
Add observer
kalman.setObserver(MyObserver.MyObserver())
#aux = ObservedMeasurement(2)
Process the list of measurements
finalMeas = ArrayList().of_(ObservedMeasurement)
for meas in multiplexedMeasurements:
finalMeas.add(meas)
estimated = kalman.processMeasurements(finalMeas)[0].getInitialState().getOrbit()
The error I get in this line is:
JavaError Traceback (most recent call last)
in
14 finalMeas.add(meas)
15
ā> 16 estimated = kalman.processMeasurements(finalMeas)[0].getInitialState().getOrbit()
JavaError: <super: <class āJavaErrorā>, >
Java stacktrace:
org.orekit.errors.OrekitException: minimal step size (1.00E-03) reached, integration needs 9.26E-04
at org.orekit.errors.OrekitException.unwrap(OrekitException.java:154)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:494)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:414)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:397)
at org.orekit.estimation.sequential.KalmanModel.predictState(KalmanModel.java:1028)
at org.orekit.estimation.sequential.KalmanModel.getEvolution(KalmanModel.java:897)
at org.orekit.estimation.sequential.KalmanModel.getEvolution(KalmanModel.java:58)
at org.hipparchus.filtering.kalman.extended.ExtendedKalmanFilter.estimationStep(ExtendedKalmanFilter.java:56)
at org.orekit.estimation.sequential.KalmanEstimator.estimationStep(KalmanEstimator.java:218)
at org.orekit.estimation.sequential.KalmanEstimator.processMeasurements(KalmanEstimator.java:236)
Caused by: org.hipparchus.exception.MathIllegalArgumentException: minimal step size (1.00E-03) reached, integration needs 9.26E-04
at org.hipparchus.ode.nonstiff.AdaptiveStepsizeIntegrator.filterStep(AdaptiveStepsizeIntegrator.java:330)
at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:281)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:468)
I know there is a lot of information and questions but I would appreciate at least some guidance whether I am in the good direction and what can I do to improve the process and reach convergence. My priority at this point is to compute the Orbit, then the satellite clock and then the stations clocks.
Thanks in advance
Jordi