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
19 import java.io.Serializable;
20
21 import org.hipparchus.CalculusFieldElement;
22 import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
23 import org.hipparchus.geometry.euclidean.threed.Vector3D;
24 import org.orekit.time.AbsoluteDate;
25 import org.orekit.time.FieldAbsoluteDate;
26
27 /** Interface for IAU pole and prime meridian orientations.
28 * <p>
29 * This interface defines methods compliant with the report of the
30 * IAU/IAG Working Group on Cartographic Coordinates and Rotational
31 * Elements of the Planets and Satellites (WGCCRE). These definitions
32 * are common for all recent versions of this report published every
33 * three years.
34 * </p>
35 * <p>
36 * The precise values of pole direction and W angle coefficients may vary
37 * from publication year as models are adjusted. The latest value of
38 * constants for implementing this interface can be found in the <a
39 * href="http://astrogeology.usgs.gov/Projects/WGCCRE/">working group
40 * site</a>.
41 * </p>
42 * @see CelestialBodies
43 * @author Luc Maisonobe
44 */
45 public interface IAUPole extends Serializable {
46
47 /** Get the body North pole direction in ICRF frame.
48 * @param date current date
49 * @return body North pole direction in ICRF frame
50 */
51 Vector3D getPole(AbsoluteDate date);
52
53 /** Get the body North pole direction in ICRF frame.
54 * @param date current date
55 * @param <T> type of the field elements
56 * @return body North pole direction in ICRF frame
57 * @since 9.0
58 */
59 <T extends CalculusFieldElement<T>> FieldVector3D<T> getPole(FieldAbsoluteDate<T> date);
60
61 /** Get the body Q Node direction in ICRF frame.
62 * @param date current date
63 * @return body Q Node direction in ICRF frame
64 * @since 9.1
65 */
66 default Vector3D getNode(final AbsoluteDate date) {
67 return Vector3D.crossProduct(Vector3D.PLUS_K, getPole(date));
68 }
69
70 /** Get the body Q Node direction in ICRF frame.
71 * @param date current date
72 * @param <T> type of the field elements
73 * @return body Q Node direction in ICRF frame
74 * @since 9.1
75 */
76 default <T extends CalculusFieldElement<T>> FieldVector3D<T> getNode(final FieldAbsoluteDate<T> date) {
77 return FieldVector3D.crossProduct(FieldVector3D.getPlusK(date.getField()), getPole(date));
78 }
79
80 /** Get the prime meridian angle.
81 * <p>
82 * The prime meridian angle is the angle between the Q node and the
83 * prime meridian. represents the body rotation.
84 * </p>
85 * @param date current date
86 * @return prime meridian vector
87 */
88 double getPrimeMeridianAngle(AbsoluteDate date);
89
90 /** Get the prime meridian angle.
91 * <p>
92 * The prime meridian angle is the angle between the Q node and the
93 * prime meridian. represents the body rotation.
94 * </p>
95 * @param date current date
96 * @param <T> type of the field elements
97 * @return prime meridian vector
98 * @since 9.0
99 */
100 <T extends CalculusFieldElement<T>> T getPrimeMeridianAngle(FieldAbsoluteDate<T> date);
101
102 }