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  package org.orekit.files.rinex.navigation;
18  
19  import org.orekit.time.AbsoluteDate;
20  
21  /** Container for time system corrections.
22   * @author Bryan Cazabonne
23   * @since 12.0
24   */
25  public class TimeSystemCorrection {
26  
27      /** Time system correction type. */
28      private final String timeSystemCorrectionType;
29  
30      /** A0 coefficient of linear polynomial for time system correction. */
31      private final double timeSystemCorrectionA0;
32  
33      /** A1 coefficient of linear polynomial for time system correction. */
34      private final double timeSystemCorrectionA1;
35  
36      /** Reference date for time system correction. */
37      private final AbsoluteDate referenceDate;
38  
39      /** Satellite ID.
40       * @since 14.0
41       */
42      private final String satId;
43  
44      /** UTC ID.
45       * @since 14.0
46       */
47      private final int utcId;
48  
49      /**
50       * Constructor.
51       * @param timeSystemCorrectionType time system correction type
52       * @param referenceDate            reference date for time system correction
53       * @param timeSystemCorrectionA0   A0 coefficient of linear polynomial for time system correction
54       * @param timeSystemCorrectionA1   A1 coefficient of linear polynomial for time system correction
55       * @param satId                    satellite ID
56       * @param utcId                    UTC id
57       */
58      public TimeSystemCorrection(final String timeSystemCorrectionType, final AbsoluteDate referenceDate,
59                                  final double timeSystemCorrectionA0, final double timeSystemCorrectionA1,
60                                  final String satId, final int utcId) {
61          this.timeSystemCorrectionType = timeSystemCorrectionType;
62          this.referenceDate            = referenceDate;
63          this.timeSystemCorrectionA0   = timeSystemCorrectionA0;
64          this.timeSystemCorrectionA1   = timeSystemCorrectionA1;
65          this.satId                    = satId;
66          this.utcId                    = utcId;
67      }
68  
69      /**
70       * Getter for the time system correction type.
71       * @return the time system correction type
72       */
73      public String getTimeSystemCorrectionType() {
74          return timeSystemCorrectionType;
75      }
76  
77      /**
78       * Getter for the A0 coefficient of the time system correction.
79       * <p>
80       * deltaT = {@code A0 + A1 * (t - tref)}
81       * </p>
82       * @return the A0 coefficient of the time system correction
83       */
84      public double getTimeSystemCorrectionA0() {
85          return timeSystemCorrectionA0;
86      }
87  
88      /**
89       * Getter for the A1 coefficient of the time system correction.
90       * <p>
91       * deltaT = {@code A0 + A1 * (t - tref)}
92       * </p>
93       * @return the A1 coefficient of the time system correction
94       */
95      public double getTimeSystemCorrectionA1() {
96          return timeSystemCorrectionA1;
97      }
98  
99      /**
100      * Getter for the reference date of the time system correction polynomial.
101      * @return the reference date of the time system correction polynomial,
102      * or null for GLONASS correction, which is constant
103      */
104     public AbsoluteDate getReferenceDate() {
105         return referenceDate;
106     }
107 
108     /**
109      * Getter for the satellite ID.
110      * @return satellite ID
111      * @since 14.0
112      */
113     public String getSatId() {
114         return satId;
115     }
116 
117     /**
118      * Getter for the UTC ID.
119      * @return UTC ID
120      * @since 14.0
121      */
122     public int getUtcId() {
123         return utcId;
124     }
125 
126 }