1   /* Copyright 2002-2022 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.attitudes;
18  
19  import org.hipparchus.CalculusFieldElement;
20  import org.orekit.frames.Frame;
21  import org.orekit.utils.FieldPVCoordinatesProvider;
22  import org.orekit.utils.PVCoordinatesProvider;
23  import org.orekit.utils.TimeStampedAngularCoordinates;
24  import org.orekit.utils.TimeStampedFieldAngularCoordinates;
25  
26  
27  /** This interface represents a builder for attitude.
28   * <p>
29   * It is intended to modify raw angular coordinates when build attitudes,
30   * for example if these coordinates are not defined from the desired reference frame.
31   * </p>
32   * @author Luc Maisonobe
33   * @since 11.0
34   */
35  public interface AttitudeBuilder {
36  
37      /**Build a filtered attitude.
38       * @param frame reference frame with respect to which attitude must be defined
39       * @param pvProv provider for spacecraft position and velocity
40       * @param rawAttitude raw rotation/rotation rate/rotation acceleration
41       * @return filtered attitude
42       */
43      Attitude build(Frame frame, PVCoordinatesProvider pvProv, TimeStampedAngularCoordinates rawAttitude);
44  
45      /**Build a filtered attitude.
46       * @param frame reference frame with respect to which attitude must be defined
47       * @param pvProv provider for spacecraft position and velocity
48       * @param rawAttitude raw rotation/rotation rate/rotation acceleration
49       * @return filtered attitude
50       * @param <T> the type of the field elements
51       */
52      <T extends CalculusFieldElement<T>> FieldAttitude<T> build(Frame frame,
53                                                             FieldPVCoordinatesProvider<T> pvProv,
54                                                             TimeStampedFieldAngularCoordinates<T> rawAttitude);
55  
56  }