Possible issue in extracting acceleration

Hi guys, a quick question: is there any change between versions 11.3 and 13.1 regarding acceleration method for SolidTides and OceanTides classes? Several years ago, this python code (with properly defined parameters) worked perfectly:

solidTides = SolidTides(earth_frame, gravityProvider.getAe(), gravityProvider.getMu(), gravityProvider.getTideSystem(), True, solidtides_timestep, solidtides_points, IERSConventions.IERS_2010, ut1, [CelestialBodyFactory.getMoon(), CelestialBodyFactory.getSun()]

acc_solidtides = solidTides.acceleration(some_state, ForceModel.cast_(solidTides).getParameters()).toArray()

Now, with version 13.1, the exact same code produces an error

AttributeError: ‘SolidTides’ object has no attribute ‘acceleration’

The same problem arises for OceanTides as well. But this acceleration method still works fine for some other force models like ThirdBodyAttraction or HolmesFeatherstoneAttractionModel, so no error here:

moon_perturbation = ThirdBodyAttraction(CelestialBodyFactory.getMoon())

acc_moon = moon_perturbation.acceleration(state, ForceModel.cast_(moon_perturbation).getParameters()).toArray()

Hope this has a simple explanation, I would greatly appreciate it.

Hi @Aspern,

Yes, SolidTides and OceanTides now implements ForceModelModifier (since 13.0), and indeed they do not expose the acceleration method directly anymore. I haven’t tried but I guess you have to cast to ForceModelModifier or ForceModel to access the acceleration method.

Hope this helps,
Maxime

Hi Maxime,

yes it does help! Here is the piece of Python code that allows to extract accelerations caused by tides in versions 13.x

solidTides = SolidTides(…)

solidTides_model_instance = ForceModel.cast_(solidTides)

acc_solidTides = solidTides_model_instance.acceleration(some_state, solidTides_model_instance.getParameters()).toArray()

Thank you very much!

Hi there,

Note that to avoid this awkward “casting” it is possible in most cases to switch to the other python wrapper (jpype).

Cheers,
Romain.