Easy acces to C20 for spherical Harmonics

Hello everyone,

Is there an easy way to access the value of C20 from spherical Harmonics?
If not could we add a method (possibly with an AbsoluteDate argument?) in the relevant interface?
I believe this is an often used quantify, almost as much as mu.

Cheers,
Romain.

Given a {Un}normalizedSphericalHarmonics you can use harmonics.get{Un}normalizedCnm(2, 0). But I don’t see any direct method given a {Un}normalizedSphericalHarmonicsProvider. Currently, you have to do provider.onDate(original.getDate()).get{Un}normalizedCnm(2,0).

Do you want to add a method performing this in order to just do provider.get{Un}normalizedC20(date)?

Bryan

Thanks Bryan for the solution.
Your proposed new method sounds good to me.
Can we have anybody’s +1 on that?

Cheers,
Romain

+1 :wink:

I would personally call it “J2” and also allow getting J3 (and J4?) add:

  • For un-normalized: getJ2(date), getJ3(date), (getJ4(date)?)
  • For normalized: getNormalizedJ2(date) etc.

Beware of the sign and normalization that are different between J_n and C(n, 0)

I agree with Luc’s comment, I prefer getter with C(n, 0) in the name to avoid potential ambiguities (I hope the pun will be appreciate :wink:)

I’ll open an issue for get(un)normalizedC20.

Cheers