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 type navigation message type
61       * @param subType navigation message subtype
62       */
63      public SystemTimeOffsetMessage(final SatelliteSystem system, final int prn,
64                                     final String type, final String subType) {
65          super(system, prn, type, subType);
66      }
67  
68      /** {@inheritDoc} */
69      @Override
70      public AbsoluteDate getDate() {
71          return referenceEpoch;
72      }
73  
74      /** Get the reference epoch.
75       * @return the reference epoch
76       */
77      public AbsoluteDate getReferenceEpoch() {
78          return referenceEpoch;
79      }
80  
81      /** Set the reference epoch.
82       * @param referenceEpoch the reference epoch to set
83       */
84      public void setReferenceEpoch(final AbsoluteDate referenceEpoch) {
85          this.referenceEpoch = referenceEpoch;
86      }
87  
88      /** Get the time system defined by this message.
89       * @return the time system defined by this message
90       */
91      public TimeSystem getDefinedTimeSystem() {
92          return definedTimeSystem;
93      }
94  
95      /** Set the time system defined by this message.
96       * @param definedTimeSystem the time system defined by this message
97       */
98      public void setDefinedTimeSystem(final TimeSystem definedTimeSystem) {
99          this.definedTimeSystem = definedTimeSystem;
100     }
101 
102     /** Get the time system used as a reference to define a time system.
103      * @return the time system used as a reference to define a time system
104      */
105     public TimeSystem getReferenceTimeSystem() {
106         return referenceTimeSystem;
107     }
108 
109     /** Set the time system used as a reference to define a time system.
110      * @param referenceTimeSystem the time system used as a reference to define a time system
111      */
112     public void setReferenceTimeSystem(final TimeSystem referenceTimeSystem) {
113         this.referenceTimeSystem = referenceTimeSystem;
114     }
115 
116     /** Get the SBAS Id.
117      * @return the SBAS Id
118      */
119     public SbasId getSbasId() {
120         return sbasId;
121     }
122 
123     /** Set the SBAS Id.
124      * @param sbasId the SBAS Id to set
125      */
126     public void setSbasId(final SbasId sbasId) {
127         this.sbasId = sbasId;
128     }
129 
130     /** Get the UTC Id.
131      * @return the URTC Id
132      */
133     public UtcId getUtcId() {
134         return utcId;
135     }
136 
137     /** Set the UTC Id.
138      * @param utcId the URC Id to set
139      */
140     public void setUtcId(final UtcId utcId) {
141         this.utcId = utcId;
142     }
143 
144     /** Get the constant term of the offset.
145      * @return the constant term of the offset
146      */
147     public double getA0() {
148         return a0;
149     }
150 
151     /** Set the constant term of the offset.
152      * @param a0 constant term of the offset
153      */
154     public void setA0(final double a0) {
155         this.a0 = a0;
156     }
157 
158     /** Get the linear term of the offset.
159      * @return the linear term of the offset
160      */
161     public double getA1() {
162         return a1;
163     }
164 
165     /** set the linear term of the offset.
166      * @param a1 the linear term of the offset
167      */
168     public void setA1(final double a1) {
169         this.a1 = a1;
170     }
171 
172     /** Get the quadratic term of the offset.
173      * @return the quadratic term of the offset
174      */
175     public double getA2() {
176         return a2;
177     }
178 
179     /** Set the quadratic term of the offset.
180      * @param a2 quadratic term of the offset
181      */
182     public void setA2(final double a2) {
183         this.a2 = a2;
184     }
185 
186     /** Get the message transmission time.
187      * @return message transmission time
188      */
189     public double getTransmissionTime() {
190         return transmissionTime;
191     }
192 
193     /** Set the message transmission time.
194      * @param transmissionTime the message transmission time
195      */
196     public void setTransmissionTime(final double transmissionTime) {
197         this.transmissionTime = transmissionTime;
198     }
199 
200 }