FieldPropagator derivative w.r.t. ForceModel parameter

Hi,

I’m trying to use a FieldNumericalPropagator with Gradient to compute the derivative of the final state with respect to a force model parameter (so that I can check I’ve implemented the derivatives correctly when using NumericalPropagator). I saw using a FieldNumericalPropagator suggested for the purpose in [1]. But I can’t figure out how to treat the force model parameter as a variable. It seems that ForceModel.addContribution(FieldSpacecraftState, FieldTimeDerivativesEquationsAdder) assumes all the force model parameters are constants (Gradient.getZero().add(...)).

How should I set up the FieldNumericalPropagator to treat a force model parameter as a Gradient.variable(...)? I’m probably missing something obvious…

Thanks in advance,
Evan

[1] Jacobian parameters computation model

Hi Evan,

I’m not sure I understand what you’re trying to do. When you talk about the NumericalPropagator, do you mean the built-in STM computation? If so, the thing is that it uses the Fielded acceleration method of ForceModel, so I’m not sure how you can validate your code with it, because it would basically be comparing to itself. Sorry if I didn’t understand.

If you’re looking to check results, there’s always the finite differences I guess.

Cheers,
Romain.