Error when performing TLE-based Orbit Determination

Hi team,

I am having some issues with TLE-based orbit determination and was hoping you may be able to help.

I am trying to fit a TLE to a set of measurements of a GEO spacecraft using the BatchLeastSquares estimator, but in a scenario where I only have an initial state vector to begin the OD rather than a prior TLE. In this case, I am using the TLEGenerationAlgorithm generate method to create an initial guess TLE to begin the OD. I have found that the FixedPointTLEGenerationAlgorithm often fails on the osc2mean step, so I switched to using the LeastSquaresTLEGenerationAlgorithm and this seems to work more consistently to generate the initial TLE.

With this in mind, for the BatchLeastSquares estimator itself I have configured the TLEPropagatorBuilder to also use the LeastSquaresTLEGenerationAlgorithm. However, once the OD run has begun, it will frequently fail with an ‘org.orekit.errors.OrekitException: unable to compute TLE mean parameters after 101 iterations’ error. This error often occurs on the first iteration of the BLS estimator, suggesting that something is incorrect with the initial TLE, but it can also occur after several iterations.

Looking into the error stack trace (see below), it seems that the Batch Least Squares estimator is still using the FixedPointTLEGenerationAlgorithm somewhere behind the scenes, even though the TLEPropagatorBuilder was set up to use the LeastSquaresTLEGenerationAlgorithm.

I have checked the initial TLE is valid and can be propagated with the TLEPropagator, as well as using the same measurement set and a numerical propagator to fit a state vector and this works without issue, so the measurements also seem to be valid.

Do you have any ideas of what may cause this error to occur within the estimator and if there is any way to avoid it? Many thanks in advance.

org.orekit.errors.OrekitException: unable to compute TLE mean parameters after 101 iterations
at org.orekit.propagation.conversion.osc2mean.FixedPointConverter.convertToMean(FixedPointConverter.java:335)
at org.orekit.propagation.analytical.tle.generation.FixedPointTleGenerationAlgorithm.generate(FixedPointTleGenerationAlgorithm.java:134)
at org.orekit.propagation.analytical.tle.TLEGradientConverter.getPropagator(TLEGradientConverter.java:93)
at org.orekit.propagation.analytical.tle.TLEGradientConverter.getPropagator(TLEGradientConverter.java:35)
at org.orekit.propagation.analytical.AbstractAnalyticalMatricesHarvester.setReferenceState(AbstractAnalyticalMatricesHarvester.java:167)
at org.orekit.propagation.analytical.AbstractAnalyticalMatricesHarvester.updateDerivativesIfNeeded(AbstractAnalyticalMatricesHarvester.java:229)
at org.orekit.propagation.analytical.AbstractAnalyticalMatricesHarvester.getAdditionalData(AbstractAnalyticalMatricesHarvester.java:111)
at org.orekit.propagation.analytical.AbstractAnalyticalMatricesHarvester.getAdditionalData(AbstractAnalyticalMatricesHarvester.java:47)
at org.orekit.propagation.AdditionalDataProvider.update(AdditionalDataProvider.java:135)
at org.orekit.propagation.AbstractPropagator.updateAdditionalData(AbstractPropagator.java:249)
at org.orekit.propagation.analytical.AbstractAnalyticalPropagator.propagate(AbstractAnalyticalPropagator.java:135)
at org.orekit.propagation.PropagatorsParallelizer.propagate(PropagatorsParallelizer.java:157)
at org.orekit.estimation.leastsquares.AbstractBatchLSModel.value(AbstractBatchLSModel.java:299)
at org.hipparchus.optim.nonlinear.vector.leastsquares.LeastSquaresFactory$LocalLeastSquaresProblem.evaluate(LeastSquaresFactory.java:440)
at org.orekit.estimation.leastsquares.BatchLSEstimator$TappedLSProblem.evaluate(BatchLSEstimator.java:645)
at org.hipparchus.optim.nonlinear.vector.leastsquares.LevenbergMarquardtOptimizer.optimize(LevenbergMarquardtOptimizer.java:446)
at org.orekit.estimation.leastsquares.BatchLSEstimator.estimate(BatchLSEstimator.java:459)

There are examples of TLEOrbitDeterminationTest.java, TLEBatchLSEstimatorTest.java in orekit’s test unit. Maybe you should check with if there is something wrong in your implementation.

Thanks @xzguo for those pointers, I have double checked my configuration and haven’t been able to find an obvious discrepancies against the tutorials and tests so far.

However, I have done some more debugging this morning and think I have found the origin of the error message. Within the BLS estimate step, there is a point where the ‘getPropagator’ method of the TLEGradientConverter is called. Within this method, it calls TLEPropagator.getDefaultTleGenerationAlgorithm (line 93 of the TLEGradientConverter). This method will always return a FixedPointTLEGenerationAlgorithm, rather than using the generation algorithm set during the configuration of the OD job (line 669 of TLEPropagator).

Is this expected behaviour? Or should the TLEGradientConverter be using the generation algorithm set during the OD setup? I am unsure how many steps into the BLS process the generation algorithm defined during setup should be used.

Hello @heb and welcome to the Orekit forum !

Regarding your initial need, you mention this :

Can you provide more information on this initial state vector? How accurate is it? Where does it come from? Do you perhaps have multiple state vectors over some time span?

I would not necessarily convert it to a TLE if i were you because trying to convert a single state vector to a TLE is not very accurate. But of course it depends on what information you have.

This is probably legacy code as it was not even possible to change the algorithm at first. I think we can open an issue!

Thank you for pointing that out @heb :+1:

Cheers,
Vincent

UPDATE:

Issue created: TLEGradientConverter should allow to choose what TleGenerationAlgorithm we want to use (#1936) · Issues · Orekit / Orekit · GitLab

Hi Vincent,

At the moment I am testing out my OD code by generating a set of simulated measurements from a ‘truth’ state vector, then perturbing that state vector by a few km to use as my initial guess for the OD and seeing how well the OD then converges back to my original ‘truth’ vector using the generated measurements.

Given the TLE based OD requires a start TLE for the propagator, I only have my initial guess vector to work from so am generating the guess TLE just from that and then performing the OD, but I appreciate it will never be particularly accurate as a start point. Would you recommend propagating this start vector over a short arc and fitting a TLE to that first before beginning the OD with the measurements?

Thanks!

Hello @heb

Ok i better understand your case. I wanted to make sure you had no other information at hand that could have proven to be useful in this state-to-TLE conversion.

We’ll have to fix the issue you mentioned but i would say you can keep the single state conversion for now. I don’t see any real benefits by propagating your single state and then fitting a TLE (though i may be wrong).

Cheers,
Vincent

Hi Vincent,

Understood, thanks for your help, much appreciated!