NormalizedSphericalHarmonics - how are the C and S coefficients related to an instant time?

Hello,

I am currently investigating Gravity force model for my propagation study and I was wondering how is the raw Cosine and Sine coefficients coming from a EGM data is getting converted into time-dependant coefficients. How are the coefficients related to the time?

For example,
Lets consider EGM 96,
The raw values are:
C_{2, 1} = -0.186987635955e-09 and
S_{2, 1} = 0.119528012031e-08

and when I query the C and S parameters I get different values:

gravityProvider = GravityFieldFactory.getNormalizedProvider(2, 1)
gravityProvider.onDate(initialOrbit.getDate()).getNormalizedCnm(2, 1)
gravityProvider.onDate(initialOrbit.getDate()).getNormalizedSnm(2, 1)

the above gives
C_{2, 1} = -5.164244223389185e-10 and
S_{2, 1} = 1.642505567284939e-09

and when I add a shift to the date,

gravityProvider.onDate(initialOrbit.getDate().shiftedBy(100.0)).getNormalizedCnm(2, 1)
gravityProvider.onDate(initialOrbit.getDate().shiftedBy(100.0)).getNormalizedSnm(2, 1)

C_{2, 1} = -5.164245325805116e-10 and
S_{2, 1} = 1.6425059324084946e-09

What could I be missing?

Are you sure you have loaded EGM96 and not another gravity field?
You can check it by adding this at the end of your program (i.e. after all files loading
have occurred):

DataProvidersManager.getInstance().
                     getLoadedDataNames().
                     stream().
                     forEach(name -> System.out.println(name));

If you see your EGM96 file, then you have loaded it. If you don’t see this file but for example something like eigen-6s.gfc, it means you loaded another file that is present in the default orekit-data and that you forgot to remove when adding EGM96. Beware that you should have only one gravity field file in your data set, otherwise the Orekit will load the first one that it finds and that has sufficient degree and order. So if you add EGM96, you should remove the other gravity field.

EGM96 does not depend on time, so the same value should always be return regardless of the date you put in the onDate call. Eigen-6s does depend on time, with a combination of linear trend, harmonic coefficients at half-year period and harmonic coefficients at one year period. Other gravity fields can have different evolution models.

Ah I see, removing the eigen-6s.gfc, file fixed the issue. That’s good to know. Thanks.