1   /* Copyright 2002-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  
18  package org.orekit.files.ccsds.ndm.tdm;
19  
20  import org.orekit.time.AbsoluteDate;
21  
22  
23  /** The Observation class contains the data from an observation line.
24   * <p>
25   * It is not an Orekit object yet. It is a simple container holding:
26   * </p>
27   * <ul>
28   *  <li>a keyword, the type of the observation;</li>
29   *  <li>a timetag, the epoch of the observation;</li>
30   *  <li>a measurement, the value of the observation.</li>
31   * </ul>
32   * <p>
33   * WARNING. The same class handles many different measurements
34   * types (range, Doppler, clocks, pressure, power to noise ratio…).
35   * Since Orekit 11.0, it uses only SI units, so angular measurements
36   * have already been converted in radians, range has been converted
37   * in meters (according to the {@link TdmMetadata#getRangeUnits()
38   * range units}, Doppler has been converted to meters per second.
39   * Up to Orekit 10.x, the measurements were raw measurements as read
40   * in the TDM.
41   * </p>
42   * @author Maxime Journot
43   */
44  public class Observation {
45  
46      /** Type of the observation. */
47      private final ObservationType type;
48  
49      /** Epoch: the timetag of the observation. */
50      private final AbsoluteDate epoch;
51  
52      /** Measurement: the value of the observation. */
53      private final double measurement;
54  
55      /** Simple constructor.
56       * @param type type of the observation
57       * @param epoch the timetag
58       * @param measurement the measurement (in SI units, converted from TDM)
59       */
60      public Observation(final ObservationType type, final AbsoluteDate epoch, final double measurement) {
61          this.type        = type;
62          this.epoch       = epoch;
63          this.measurement = measurement;
64      }
65  
66      /** Get the type of observation.
67       * @return type of observation
68       */
69      public ObservationType getType() {
70          return type;
71      }
72  
73      /** Getter for the epoch.
74       * @return the epoch
75       */
76      public AbsoluteDate getEpoch() {
77          return epoch;
78      }
79  
80      /** Getter for the measurement.
81       * @return the measurement (in SI units, converted from TDM)
82       */
83      public double getMeasurement() {
84          return measurement;
85      }
86  
87  }