AdditionalData are removed by AbstractGradientConverter

Hi everyone,

I have come across an issue when trying to add a ForceModel which uses an additionalData of SpacecraftState to compute its acceleration.

More precisely, it works fine in a propagation but not in an orbit determination (with a BatchLSEstimator), because here in AbstractStateTransitionMatrixGenerator(line 270) the SpacecraftSate dsState provided to compute partial derivatives has no additionalData.

final Gradient[] ratesPartials = computeRatesPartialsAndUpdateFactor(forceModel, dsState, parameters, factor);

After investigation, it seems that NumericalGradientConverter does not keep the additionalData when creating dsStatefrom the parameter stateof the method AbstractStateTransitionMatrixGenerator.computePartials(final SpacecraftState state), which has the additionalData needed to compute the acceleration.

Is this a know issue ?

Best regards,
Lio

Hi @Lio,

Welcome to the forum!
And sorry for the delay.

I don’t think so, but I may be wrong.
By the time these converters were developed, I don’t think anyone envisioned implementing a ForceModel that uses additionalData.
So this would qualify for a bug or an enhancement of the actual behavior of the code.
Would you care to open the issue on the forge ?

Best regards,
Maxime

Hi !

Thanks for the reply. I have juste created the issue in Gitlab: Making sure you're not a bot!

Best regards,

Lio

Hi Lio,

this will be fixed in the next patch.
You’ll just have to make sure your ForceModel returns false in dependsOnlyOnPosition.

Cheers,
Romain.

Hi Romain,

Thank you very much !

Best regards,

Lio