1   /* Copyright 2022-2025 Luc Maisonobe
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.gnss.SatelliteSystem;
20  import org.orekit.gnss.TimeSystem;
21  import org.orekit.time.AbsoluteDate;
22  
23  /**
24   * Container for data contained in a System Time Offset navigation message.
25   * @author Luc Maisonobe
26   * @since 12.0
27   */
28  public class SystemTimeOffsetMessage extends TypeSvMessage {
29  
30      /** Reference epoch. */
31      private AbsoluteDate referenceEpoch;
32  
33      /** Time system defined by this message. */
34      private TimeSystem definedTimeSystem;
35  
36      /** Time system used as a reference to define a time system. */
37      private TimeSystem referenceTimeSystem;
38  
39      /** SBAS ID. */
40      private SbasId sbasId;
41  
42      /** UTC ID. */
43      private UtcId utcId;
44  
45      /** Constant term of the offset. */
46      private double a0;
47  
48      /** Linear term of the offset. */
49      private double a1;
50  
51      /** Quadratic term of the offset. */
52      private double a2;
53  
54      /** Transmission time. */
55      private double transmissionTime;
56  
57      /** Simple constructor.
58       * @param system satellite system
59       * @param prn satellite number
60       * @param navigationMessageType navigation message type
61       */
62      public SystemTimeOffsetMessage(final SatelliteSystem system, final int prn, final String navigationMessageType) {
63          super(system, prn, navigationMessageType);
64      }
65  
66      /** Get the reference epoch.
67       * @return the reference epoch
68       */
69      public AbsoluteDate getReferenceEpoch() {
70          return referenceEpoch;
71      }
72  
73      /** Set the reference epoch.
74       * @param referenceEpoch the reference epoch to set
75       */
76      public void setReferenceEpoch(final AbsoluteDate referenceEpoch) {
77          this.referenceEpoch = referenceEpoch;
78      }
79  
80      /** Get the time system defined by this message.
81       * @return the time system defined by this message
82       */
83      public TimeSystem getDefinedTimeSystem() {
84          return definedTimeSystem;
85      }
86  
87      /** Set the time system defined by this message.
88       * @param definedTimeSystem the time system defined by this message
89       */
90      public void setDefinedTimeSystem(final TimeSystem definedTimeSystem) {
91          this.definedTimeSystem = definedTimeSystem;
92      }
93  
94      /** Get the time system used as a reference to define a time system.
95       * @return the time system used as a reference to define a time system
96       */
97      public TimeSystem getReferenceTimeSystem() {
98          return referenceTimeSystem;
99      }
100 
101     /** Set the time system used as a reference to define a time system.
102      * @param referenceTimeSystem the time system used as a reference to define a time system
103      */
104     public void setReferenceTimeSystem(final TimeSystem referenceTimeSystem) {
105         this.referenceTimeSystem = referenceTimeSystem;
106     }
107 
108     /** Get the SBAS Id.
109      * @return the SBAS Id
110      */
111     public SbasId getSbasId() {
112         return sbasId;
113     }
114 
115     /** Set the SBAS Id.
116      * @param sbasId the SBAS Id to set
117      */
118     public void setSbasId(final SbasId sbasId) {
119         this.sbasId = sbasId;
120     }
121 
122     /** Get the UTC Id.
123      * @return the URTC Id
124      */
125     public UtcId getUtcId() {
126         return utcId;
127     }
128 
129     /** Set the UTC Id.
130      * @param utcId the URC Id to set
131      */
132     public void setUtcId(final UtcId utcId) {
133         this.utcId = utcId;
134     }
135 
136     /** Get the constant term of the offset.
137      * @return the constant term of the offset
138      */
139     public double getA0() {
140         return a0;
141     }
142 
143     /** Set the constant term of the offset.
144      * @param a0 constant term of the offset
145      */
146     public void setA0(final double a0) {
147         this.a0 = a0;
148     }
149 
150     /** Get the linear term of the offset.
151      * @return the linear term of the offset
152      */
153     public double getA1() {
154         return a1;
155     }
156 
157     /** set the linear term of the offset.
158      * @param a1 the linear term of the offset
159      */
160     public void setA1(final double a1) {
161         this.a1 = a1;
162     }
163 
164     /** Get the quadratic term of the offset.
165      * @return the quadratic term of the offset
166      */
167     public double getA2() {
168         return a2;
169     }
170 
171     /** Set the quadratic term of the offset.
172      * @param a2 quadratic term of the offset
173      */
174     public void setA2(final double a2) {
175         this.a2 = a2;
176     }
177 
178     /** Get the message transmission time.
179      * @return message transmission time
180      */
181     public double getTransmissionTime() {
182         return transmissionTime;
183     }
184 
185     /** Set the message transmission time.
186      * @param transmissionTime the message transmission time
187      */
188     public void setTransmissionTime(final double transmissionTime) {
189         this.transmissionTime = transmissionTime;
190     }
191 
192 }