Safe use of harmonics provider


I realized that one of the bottlenecks of some of my simulations in Python were the “set-up” of integrator-based propagators.
The fact is that, for each propagator I define, I do something like this:

GravityFieldFactory.addPotentialCoefficientsReader(ICGEMFormatReader('eigen-6s.*', missing_coef_allowed))
normalized_provider = GravityFieldFactory.getNormalizedProvider(self._harmonics_degree, self._harmonics_order)

Would it be safe to execute this only ONCE and reuse the outputted NormalizedSphericalHarmonicsProvider with different propagators?
For example:

base_earth = ReferenceEllipsoid.getWgs84(FramesFactory.getIRTF())
earth = Geoid(normalized_provider, base_earth)
models = []
for i in range(2):
    models.append(HolmesFeatherstoneAttractionModel(earth.getBodyFrame(), normalized_provider))

and then add the Holmes-Feather force models to two distinct propagators.


Yes, I think it is safe.

1 Like