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.geometry.euclidean.threed.FieldVector3D;
23  import org.hipparchus.geometry.euclidean.threed.Vector3D;
24  import org.orekit.rugged.utils.DerivativeGenerator;
25  import org.orekit.time.AbsoluteDate;
26  import org.orekit.utils.ParameterDriver;
27  
28  /** Interface representing a line-of-sight which depends on time.
29   * @see org.orekit.rugged.linesensor.LineSensor
30   * @author Luc Maisonobe
31   */
32  public interface TimeDependentLOS {
33  
34      /** Get the number of pixels.
35       * @return number of pixels
36       */
37      int getNbPixels();
38  
39      /** Get the line of sight for a given date.
40       * @param index los pixel index
41       * @param date date
42       * @return line of sight
43       */
44      Vector3D getLOS(int index, AbsoluteDate date);
45  
46      /** Get the line of sight and its partial derivatives for a given date.
47       * <p>
48       * This method is used for LOS calibration purposes. It allows to compute
49       * the Jacobian matrix of the LOS with respect to the estimated parameters, which
50       * are typically polynomials coefficients representing rotation angles.
51       * These polynomials can be used for example to model thermo-elastic effects.
52       * </p>
53       * <p>
54       * Note that in order for the partial derivatives to be properly set up, the
55       * {@link org.orekit.utils.ParameterDriver#setSelected(boolean) setSelected}
56       * method must have been set to {@code true} for the various parameters returned
57       * by {@link #getParametersDrivers()} that should be estimated.
58       * </p>
59       * @param <T> derivative type
60       * @param index los pixel index
61       * @param date date
62       * @param generator generator to use for building {@link Derivative} instances
63       * @return line of sight, and its first partial derivatives with respect to the parameters
64       * @since 2.0
65       */
66      <T extends Derivative<T>> FieldVector3D<T> getLOSDerivatives(int index, AbsoluteDate date,
67                                                                   DerivativeGenerator<T> generator);
68  
69      /** Get the drivers for LOS parameters.
70       * @return drivers for LOS parameters
71       * @since 2.0
72       */
73      Stream<ParameterDriver> getParametersDrivers();
74  
75  }