TimeSystemCorrection.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.rinex.navigation;

  18. import org.orekit.time.AbsoluteDate;

  19. /** Container for time system corrections.
  20.  * @author Bryan Cazabonne
  21.  * @since 12.0
  22.  */
  23. public class TimeSystemCorrection {

  24.     /** Time system correction type. */
  25.     private String timeSystemCorrectionType;

  26.     /** A0 coefficient of linear polynomial for time system correction. */
  27.     private double timeSystemCorrectionA0;

  28.     /** A1 coefficient of linear polynomial for time system correction. */
  29.     private double timeSystemCorrectionA1;

  30.     /** Reference date for time system correction. */
  31.     private AbsoluteDate referenceDate;

  32.     /**
  33.      * Constructor.
  34.      * @param timeSystemCorrectionType       time system correction type
  35.      * @param referenceDate                  reference date for time system correction
  36.      * @param timeSystemCorrectionA0         A0 coefficient of linear polynomial for time system correction
  37.      * @param timeSystemCorrectionA1         A1 coefficient of linear polynomial for time system correction
  38.      */
  39.     public TimeSystemCorrection(final String timeSystemCorrectionType,
  40.                                 final AbsoluteDate referenceDate,
  41.                                 final double timeSystemCorrectionA0,
  42.                                 final double timeSystemCorrectionA1) {
  43.         this.timeSystemCorrectionType = timeSystemCorrectionType;
  44.         this.referenceDate            = referenceDate;
  45.         this.timeSystemCorrectionA0   = timeSystemCorrectionA0;
  46.         this.timeSystemCorrectionA1   = timeSystemCorrectionA1;
  47.     }

  48.     /**
  49.      * Getter for the time system correction type.
  50.      * @return the time system correction type
  51.      */
  52.     public String getTimeSystemCorrectionType() {
  53.         return timeSystemCorrectionType;
  54.     }

  55.     /**
  56.      * Getter for the A0 coefficient of the time system correction.
  57.      * <p>
  58.      * deltaT = {@link #getTimeSystemCorrectionA0() A0} +
  59.      *          {@link #getTimeSystemCorrectionA1() A1} * (t - tref)
  60.      * </p>
  61.      * @return the A0 coefficient of the time system correction
  62.      */
  63.     public double getTimeSystemCorrectionA0() {
  64.         return timeSystemCorrectionA0;
  65.     }

  66.     /**
  67.      * Getter for the A1 coefficient of the time system correction.
  68.      * <p>
  69.      * deltaT = {@link #getTimeSystemCorrectionA0() A0} +
  70.      *          {@link #getTimeSystemCorrectionA1() A1} * (t - tref)
  71.      * </p>
  72.      * @return the A1 coefficient of the time system correction
  73.      */
  74.     public double getTimeSystemCorrectionA1() {
  75.         return timeSystemCorrectionA1;
  76.     }

  77.     /**
  78.      * Getter for the reference date of the time system correction polynomial.
  79.      * @return the reference date of the time system correction polynomial,
  80.      * or null for GLONASS correction, which is constant
  81.      */
  82.     public AbsoluteDate getReferenceDate() {
  83.         return referenceDate;
  84.     }

  85. }