NormalizedSphericalHarmonicsProvider.java

  1. /* Copyright 2002-2025 CS GROUP
  2.  * Licensed to CS GROUP (CS) under one or more
  3.  * contributor license agreements.  See the NOTICE file distributed with
  4.  * this work for additional information regarding copyright ownership.
  5.  * CS licenses this file to You under the Apache License, Version 2.0
  6.  * (the "License"); you may not use this file except in compliance with
  7.  * the License.  You may obtain a copy of the License at
  8.  *
  9.  *   http://www.apache.org/licenses/LICENSE-2.0
  10.  *
  11.  * Unless required by applicable law or agreed to in writing, software
  12.  * distributed under the License is distributed on an "AS IS" BASIS,
  13.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.  * See the License for the specific language governing permissions and
  15.  * limitations under the License.
  16.  */
  17. package org.orekit.forces.gravity.potential;

  18. import org.orekit.time.AbsoluteDate;
  19. import org.orekit.time.TimeStamped;

  20. /** Interface used to provide normalized spherical harmonics coefficients.
  21.  * @see GravityFields
  22.  * @author Luc Maisonobe
  23.  * @since 6.0
  24.  */
  25. public interface NormalizedSphericalHarmonicsProvider extends SphericalHarmonicsProvider {

  26.     /**
  27.      * The normalized geopotential coefficients at a specific instance in time.
  28.      * @see NormalizedSphericalHarmonicsProvider
  29.      * @see NormalizedSphericalHarmonicsProvider#onDate(AbsoluteDate)
  30.      * @since 6.1
  31.      */
  32.     interface NormalizedSphericalHarmonics extends TimeStamped {

  33.         /** Get a spherical harmonic cosine coefficient.
  34.          * @param n degree of the coefficient
  35.          * @param m order of the coefficient
  36.          * @return normalized coefficient Cnm
  37.          */
  38.         double getNormalizedCnm(int n, int m);

  39.         /** Get a spherical harmonic sine coefficient.
  40.          * @param n degree of the coefficient
  41.          * @param m order of the coefficient
  42.          * @return normalized coefficient Snm
  43.          */
  44.         double getNormalizedSnm(int n, int m);

  45.     }

  46.     /**
  47.      * Get the normalized spherical harmonic coefficients at a specific instance in time.
  48.      *
  49.      * @param date of evaluation
  50.      * @return normalized coefficients on {@code date}.
  51.      * @since 6.1
  52.      */
  53.     NormalizedSphericalHarmonics onDate(AbsoluteDate date);

  54.     /**
  55.      * Get the normalized coefficient of degree 2 and order 0 at a specific instance in time.
  56.      *
  57.      * @param date of evaluation (may be null if model is not time-dependent)
  58.      * @return normalized C20 on {@code date}.
  59.      * @since 12.1
  60.      */
  61.     default double getNormalizedC20(final AbsoluteDate date) {
  62.         return onDate(date).getNormalizedCnm(2, 0);
  63.     }

  64. }