1   /* Copyright 2013-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.rugged.los;
18  
19  import java.util.stream.Stream;
20  
21  import org.hipparchus.analysis.differentiation.Derivative;
22  import org.hipparchus.analysis.differentiation.DerivativeStructure;
23  import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
24  import org.hipparchus.geometry.euclidean.threed.Vector3D;
25  import org.orekit.rugged.utils.DerivativeGenerator;
26  import org.orekit.time.AbsoluteDate;
27  import org.orekit.utils.ParameterDriver;
28  
29  /** Interface for lines-of-sight transforms.
30   * @author Luc Maisonobe
31   * @see LOSBuilder
32   */
33  public interface LOSTransform {
34  
35      /** Transform a line-of-sight.
36       * @param i los pixel index
37       * @param los line-of-sight to transform
38       * @param date current date
39       * @return transformed line-of-sight
40       */
41      Vector3D transformLOS(int i, Vector3D los, AbsoluteDate date);
42  
43      /** Transform a line-of-sight and its partial derivatives.
44       * <p>
45       * This method is used for LOS calibration purposes. It allows to compute
46       * the Jacobian matrix of the LOS with respect to the parameters, which
47       * are typically polynomials coefficients representing rotation angles.
48       * These polynomials can be used for example to model thermo-elastic effects.
49       * </p>
50       * @param <T> derivative type
51       * @param index los pixel index
52       * @param los line-of-sight to transform
53       * @param date date
54       * @param generator generator to use for building {@link DerivativeStructure} instances
55       * @return line of sight, and its first partial derivatives with respect to the parameters
56       */
57      <T extends Derivative<T>> FieldVector3D<T> transformLOS(int index, FieldVector3D<T> los,
58                                                              AbsoluteDate date, DerivativeGenerator<T> generator);
59  
60      /** Get the drivers for LOS parameters.
61       * @return drivers for LOS parameters
62       * @since 2.0
63       */
64      Stream<ParameterDriver> getParametersDrivers();
65  
66  }