IAUPole.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.bodies;

  18. import java.io.Serializable;

  19. import org.hipparchus.CalculusFieldElement;
  20. import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
  21. import org.hipparchus.geometry.euclidean.threed.Vector3D;
  22. import org.orekit.time.AbsoluteDate;
  23. import org.orekit.time.FieldAbsoluteDate;

  24. /** Interface for IAU pole and prime meridian orientations.
  25.  * <p>
  26.  * This interface defines methods compliant with the report of the
  27.  * IAU/IAG Working Group on Cartographic Coordinates and Rotational
  28.  * Elements of the Planets and Satellites (WGCCRE). These definitions
  29.  * are common for all recent versions of this report published every
  30.  * three years.
  31.  * </p>
  32.  * <p>
  33.  * The precise values of pole direction and W angle coefficients may vary
  34.  * from publication year as models are adjusted. The latest value of
  35.  * constants for implementing this interface can be found in the <a
  36.  * href="http://astrogeology.usgs.gov/Projects/WGCCRE/">working group
  37.  * site</a>.
  38.  * </p>
  39.  * @see CelestialBodies
  40.  * @author Luc Maisonobe
  41.  */
  42. public interface IAUPole extends Serializable {

  43.     /** Get the body North pole direction in ICRF frame.
  44.      * @param date current date
  45.      * @return body North pole direction in ICRF frame
  46.      */
  47.     Vector3D getPole(AbsoluteDate date);

  48.     /** Get the body North pole direction in ICRF frame.
  49.      * @param date current date
  50.      * @param <T> type of the field elements
  51.      * @return body North pole direction in ICRF frame
  52.      * @since 9.0
  53.      */
  54.     <T extends CalculusFieldElement<T>> FieldVector3D<T> getPole(FieldAbsoluteDate<T> date);

  55.     /** Get the body Q Node direction in ICRF frame.
  56.      * @param date current date
  57.      * @return body Q Node direction in ICRF frame
  58.      * @since 9.1
  59.      */
  60.     default Vector3D getNode(AbsoluteDate date) {
  61.         return Vector3D.crossProduct(Vector3D.PLUS_K, getPole(date));
  62.     }

  63.     /** Get the body Q Node direction in ICRF frame.
  64.      * @param date current date
  65.      * @param <T> type of the field elements
  66.      * @return body Q Node direction in ICRF frame
  67.      * @since 9.1
  68.      */
  69.     default <T extends CalculusFieldElement<T>> FieldVector3D<T> getNode(FieldAbsoluteDate<T> date) {
  70.         return FieldVector3D.crossProduct(FieldVector3D.getPlusK(date.getField()), getPole(date));
  71.     }

  72.     /** Get the prime meridian angle.
  73.      * <p>
  74.      * The prime meridian angle is the angle between the Q node and the
  75.      * prime meridian. represents the body rotation.
  76.      * </p>
  77.      * @param date current date
  78.      * @return prime meridian vector
  79.      */
  80.     double getPrimeMeridianAngle(AbsoluteDate date);

  81.     /** Get the prime meridian angle.
  82.      * <p>
  83.      * The prime meridian angle is the angle between the Q node and the
  84.      * prime meridian. represents the body rotation.
  85.      * </p>
  86.      * @param date current date
  87.      * @param <T> type of the field elements
  88.      * @return prime meridian vector
  89.      * @since 9.0
  90.      */
  91.     <T extends CalculusFieldElement<T>> T getPrimeMeridianAngle(FieldAbsoluteDate<T> date);

  92. }