1   /* Copyright 2013-2017 CS Systèmes d'Information
2    * Licensed to CS Systèmes d'Information (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.DerivativeStructure;
22  import org.hipparchus.geometry.euclidean.threed.FieldVector3D;
23  import org.hipparchus.geometry.euclidean.threed.Vector3D;
24  import org.orekit.rugged.utils.DSGenerator;
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 index los pixel index
60       * @param date date
61       * @param generator generator to use for building {@link DerivativeStructure} instances
62       * @return line of sight, and its first partial derivatives with respect to the parameters
63       * @since 2.0
64       */
65      FieldVector3D<DerivativeStructure> getLOSDerivatives(int index, AbsoluteDate date,
66                                                           DSGenerator generator);
67  
68      /** Get the drivers for LOS parameters.
69       * @return drivers for LOS parameters
70       * @since 2.0
71       */
72      Stream<ParameterDriver> getParametersDrivers();
73  
74  }