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 String timeSystemCorrectionType;
29
30 /** A0 coefficient of linear polynomial for time system correction. */
31 private double timeSystemCorrectionA0;
32
33 /** A1 coefficient of linear polynomial for time system correction. */
34 private double timeSystemCorrectionA1;
35
36 /** Reference date for time system correction. */
37 private AbsoluteDate referenceDate;
38
39 /**
40 * Constructor.
41 * @param timeSystemCorrectionType time system correction type
42 * @param referenceDate reference date for time system correction
43 * @param timeSystemCorrectionA0 A0 coefficient of linear polynomial for time system correction
44 * @param timeSystemCorrectionA1 A1 coefficient of linear polynomial for time system correction
45 */
46 public TimeSystemCorrection(final String timeSystemCorrectionType,
47 final AbsoluteDate referenceDate,
48 final double timeSystemCorrectionA0,
49 final double timeSystemCorrectionA1) {
50 this.timeSystemCorrectionType = timeSystemCorrectionType;
51 this.referenceDate = referenceDate;
52 this.timeSystemCorrectionA0 = timeSystemCorrectionA0;
53 this.timeSystemCorrectionA1 = timeSystemCorrectionA1;
54 }
55
56 /**
57 * Getter for the time system correction type.
58 * @return the time system correction type
59 */
60 public String getTimeSystemCorrectionType() {
61 return timeSystemCorrectionType;
62 }
63
64 /**
65 * Getter for the A0 coefficient of the time system correction.
66 * <p>
67 * deltaT = {@link #getTimeSystemCorrectionA0() A0} +
68 * {@link #getTimeSystemCorrectionA1() A1} * (t - tref)
69 * </p>
70 * @return the A0 coefficient of the time system correction
71 */
72 public double getTimeSystemCorrectionA0() {
73 return timeSystemCorrectionA0;
74 }
75
76 /**
77 * Getter for the A1 coefficient of the time system correction.
78 * <p>
79 * deltaT = {@link #getTimeSystemCorrectionA0() A0} +
80 * {@link #getTimeSystemCorrectionA1() A1} * (t - tref)
81 * </p>
82 * @return the A1 coefficient of the time system correction
83 */
84 public double getTimeSystemCorrectionA1() {
85 return timeSystemCorrectionA1;
86 }
87
88 /**
89 * Getter for the reference date of the time system correction polynomial.
90 * @return the reference date of the time system correction polynomial,
91 * or null for GLONASS correction, which is constant
92 */
93 public AbsoluteDate getReferenceDate() {
94 return referenceDate;
95 }
96
97 }