tudat-team / tudatpy

A Python platform to perform astrodynamics and space research.

Home Page:https://tudat-space.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spherical harmonics variations does not work

manuflo97 opened this issue · comments

Hi guys, I was trying to use the gravity_field_variation function but it does not have any effect (https://py.api.tudat.space/en/latest/gravity_field_variation.html#functions).
There is probably some issue with the conda package.

Hi Manuel,

You had a python script where you were trying to use this functionality. Could you link to it?

So, apparently the conda package is fine, it's my understanding of Python when writing the examples that is wrong. This works:

gravity_field_variation_settings = list( )
gravity_field_variation_settings.append(environment_setup.gravity_field_variation.solid_body_tide(
     tide_raising_body, love_number_Io, degree))
body_settings.get("Io").gravity_field_variation_settings = gravity_field_variation_settings

This:

body_settings.get("Io").gravity_field_variation_settings.append(environment_setup.gravity_field_variation.solid_body_tide(
     tide_raising_body, love_number_Io, degree))

does not. I think it's because body_settings.get("Io").gravity_field_variation_settings returns the list of gravity field variations, and not a reference/pointer. I'll update the docs

Thanks a lot!