Difference in behavior between NumericalPropagator.addForceModel() and FieldNumericalPropagator().addForceModel()
NumericalPropagator np = ...; np.addForceModel(new NewtonianAttraction(...));
will replace the current central attraction force instead of adding a new force model. On the other hand
FieldNumericalPropagator<> fnp = ...; fnp.addForceModel(new NewtonianAttraction(...));
will add an additional copy of the central attraction force, making the satellite orbit around the Earth twice as fast. The code in FNP seems much simpler than the code in NP, so perhaps the best solution is to just add a note of the difference in behavior to the method comment for FNP.addForceModel().
#1 Updated by Luc Maisonobe 10 months ago
- Status changed from New to Resolved
I have used the same logic as per NumericalPropagator, i.e. the Newtonian attraction is stored
at the end of the force models list and care is taken to update it correctly, when either it
is added as a force model, set using setMu, or set at propagation start using the initial
state central attraction coefficient.
Indeed, we will need to manage this even more specially when we will merge the work currently
done in the SOCIS program by a student. He works on trajectories around Lagrange points and
there you don't really have one main central attraction, you have two bodies, and you may
integrate in a frame that is neither bodies center. So having already a similar logic in
FieldNumericalPropagator and NumericalPropagator seemed simpler for the future merge.