[BUG] BStar estimation in TLEPropagator
When using TLEPropagator
as the Propagator
to do an orbit determination, if BStar
is selected to be estimated, it would raise the following exception:
java.lang.ArrayIndexOutOfBoundsException: 6
at org.orekit.propagation.analytical.tle.TLEJacobiansMapper.analyticalDerivatives(TLEJacobiansMapper.java:178)
at org.orekit.estimation.leastsquares.AbstractBatchLSModel.fetchEvaluatedMeasurement(AbstractBatchLSModel.java:390)
at org.orekit.estimation.leastsquares.MeasurementHandler.handleStep(MeasurementHandler.java:94)
at org.orekit.propagation.PropagatorsParallelizer$SinglePropagatorHandler.handleStep(PropagatorsParallelizer.java:259)
@bryan has found that, in resetInitialState()
method of the TLEPropagator
, there is a missing step to set BStar
to be estimated for the new TLE if BStar
is estimated.
It fixed this bug.
public void resetInitialState(final SpacecraftState state) {
super.resetInitialState(state);
super.setStartDate(state.getDate());
final TLE newTLE = TLE.stateToTLE(state, tle, utc, teme);
if (tle.getParametersDrivers().get(0).isSelected()) {
newTLE.getParametersDrivers().get(0).setSelected(true);
}
this.tle = newTLE;
initializeCommons();
sxpInitialize();
}
See forum here