Observation.java

  1. /* Copyright 2002-2024 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.files.ccsds.ndm.tdm;

  18. import org.orekit.time.AbsoluteDate;


  19. /** The Observation class contains the data from an observation line.
  20.  * <p>
  21.  * It is not an Orekit object yet. It is a simple container holding:
  22.  * </p>
  23.  * <ul>
  24.  *  <li>a keyword, the type of the observation;</li>
  25.  *  <li>a timetag, the epoch of the observation;</li>
  26.  *  <li>a measurement, the value of the observation.</li>
  27.  * </ul>
  28.  * <p>
  29.  * WARNING. The same class handles many different measurements
  30.  * types (range, Doppler, clocks, pressure, power to noise ratio…).
  31.  * Since Orekit 11.0, it uses only SI units, so angular measurements
  32.  * have already been converted in radians, range has been converted
  33.  * in meters (according to the {@link TdmMetadata#getRangeUnits()
  34.  * range units}, Doppler has been converted to meters per second.
  35.  * Up to Orekit 10.x, the measurements were raw measurements as read
  36.  * in the TDM.
  37.  * </p>
  38.  * @author Maxime Journot
  39.  */
  40. public class Observation {

  41.     /** Type of the observation. */
  42.     private final ObservationType type;

  43.     /** Epoch: the timetag of the observation. */
  44.     private final AbsoluteDate epoch;

  45.     /** Measurement: the value of the observation. */
  46.     private final double measurement;

  47.     /** Simple constructor.
  48.      * @param type type of the observation
  49.      * @param epoch the timetag
  50.      * @param measurement the measurement (in SI units, converted from TDM)
  51.      */
  52.     public Observation(final ObservationType type, final AbsoluteDate epoch, final double measurement) {
  53.         this.type        = type;
  54.         this.epoch       = epoch;
  55.         this.measurement = measurement;
  56.     }

  57.     /** Get the type of observation.
  58.      * @return type of observation
  59.      */
  60.     public ObservationType getType() {
  61.         return type;
  62.     }

  63.     /** Getter for the epoch.
  64.      * @return the epoch
  65.      */
  66.     public AbsoluteDate getEpoch() {
  67.         return epoch;
  68.     }

  69.     /** Getter for the measurement.
  70.      * @return the measurement (in SI units, converted from TDM)
  71.      */
  72.     public double getMeasurement() {
  73.         return measurement;
  74.     }

  75. }