Input arguments of stateToTLE

Hello,

I just noticed that the input arguments of TLE#stateToTLE recently changed from

final SpacecraftState state, final TLE templateTLE, final OsculatingToMeanConverter converter, final DataContext dataContext

to

final SpacecraftState state, final TleGenerationAlgorithm generationAlgorithm, final OsculatingToMeanConverter converter, final DataContext dataContext

however, I find counterintuitive having to input both a TleGenerationAlgorithm and an OsculatingToMeanConverter, as the TleGenerationAlgorithm:

  1. already holds an instance of OsculatingToMeanConverter, which can be retrieved with getConverter()
  2. is only used to extract the template TLE, which is the input argument that the generationAlgorithm has replaced

I thus find more intuitive the old signature, which is still used in the field version of the method FieldTLE#stateToTLE. Alternatively, the converter could be removed from the input arguments, and extracted from the generationAlgorithm.

What do you think?

Best,
Alberto

The change was due to issue 1867, which was a long running issue.
Basically, we removed templates everywhere, including in TLE. As the issue had deep side effects on a lot of basic stuff, it was very difficult to complete. It has now been integrated in the develop branch, but still has rough edges. There was a topic asking people to look at it before 14.0 is published.

I guess you just found one of these rough edges.

Putting the template back is certainly not the way we are going (the whole point of the issue was to remove them). Removing the converter argument on the other hand can certainly be done. Could you open a new issue for this?

Thanks @luc for the context.

I opened issue 1999 to remove the converter from the method’s arguments.

How about the field version, which still uses the “legacy” template TLE?

I intend to change this, but I need to have a field version of ParameterDriver, see this topic.