1   /* Copyright 2022-2025 Romain Serra
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.attitudes;
18  
19  import org.hipparchus.CalculusFieldElement;
20  import org.hipparchus.geometry.euclidean.threed.FieldRotation;
21  import org.hipparchus.geometry.euclidean.threed.Rotation;
22  import org.orekit.propagation.FieldSpacecraftState;
23  import org.orekit.propagation.SpacecraftState;
24  import org.orekit.utils.ParameterDriversProvider;
25  
26  /**
27   * Interface for (attitude) rotation models taking as inputs a spacecraft state and model parameters.
28   * The rotation is defined between a reference frame and the satellite one.
29   *
30   * @author Romain Serra
31   * @see SpacecraftState
32   * @see FieldSpacecraftState
33   * @see Rotation
34   * @see FieldRotation
35   * @see Attitude
36   * @see FieldAttitude
37   * @see org.orekit.forces.maneuvers.Maneuver
38   * @since 13.0
39   */
40  public interface AttitudeRotationModel extends ParameterDriversProvider {
41  
42      /**
43       * Computed the rotation given the input state and parameters' values.
44       * @param state spacecraft state
45       * @param parameters values for parameter drivers
46       * @return attitude's rotation
47       */
48      Rotation getAttitudeRotation(SpacecraftState state, double[] parameters);
49  
50      /**
51       * Computed the rotation given the input state and parameters' values.
52       * @param state spacecraft state
53       * @param parameters values for parameter drivers
54       * @param <T> field type
55       * @return attitude's rotation
56       */
57      <T extends CalculusFieldElement<T>> FieldRotation<T> getAttitudeRotation(FieldSpacecraftState<T> state, T[] parameters);
58  }