SystemTimeOffsetMessage.java

  1. /* Copyright 2002-2024 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. import org.orekit.gnss.SatelliteSystem;
  19. import org.orekit.gnss.TimeSystem;
  20. import org.orekit.time.AbsoluteDate;

  21. /**
  22.  * Container for data contained in a System Time Offset navigation message.
  23.  * @author Luc Maisonobe
  24.  * @since 12.0
  25.  */
  26. public class SystemTimeOffsetMessage extends TypeSvMessage {

  27.     /** Reference epoch. */
  28.     private AbsoluteDate referenceEpoch;

  29.     /** Time system defined by this message. */
  30.     private TimeSystem definedTimeSystem;

  31.     /** Time system used as a reference to define a time system. */
  32.     private TimeSystem referenceTimeSystem;

  33.     /** SBAS ID. */
  34.     private SbasId sbasId;

  35.     /** UTC ID. */
  36.     private UtcId utcId;

  37.     /** Constant term of the offset. */
  38.     private double a0;

  39.     /** Linear term of the offset. */
  40.     private double a1;

  41.     /** Quadratic term of the offset. */
  42.     private double a2;

  43.     /** Transmission time. */
  44.     private double transmissionTime;

  45.     /** Simple constructor.
  46.      * @param system satellite system
  47.      * @param prn satellite number
  48.      * @param navigationMessageType navigation message type
  49.      */
  50.     public SystemTimeOffsetMessage(final SatelliteSystem system, final int prn, final String navigationMessageType) {
  51.         super(system, prn, navigationMessageType);
  52.     }

  53.     /** Get the reference epoch.
  54.      * @return the reference epoch
  55.      */
  56.     public AbsoluteDate getReferenceEpoch() {
  57.         return referenceEpoch;
  58.     }

  59.     /** Set the reference epoch.
  60.      * @param referenceEpoch the reference epoch to set
  61.      */
  62.     public void setReferenceEpoch(final AbsoluteDate referenceEpoch) {
  63.         this.referenceEpoch = referenceEpoch;
  64.     }

  65.     /** Get the time system defined by this message.
  66.      * @return the time system defined by this message
  67.      */
  68.     public TimeSystem getDefinedTimeSystem() {
  69.         return definedTimeSystem;
  70.     }

  71.     /** Set the time system defined by this message.
  72.      * @param definedTimeSystem the time system defined by this message
  73.      */
  74.     public void setDefinedTimeSystem(final TimeSystem definedTimeSystem) {
  75.         this.definedTimeSystem = definedTimeSystem;
  76.     }

  77.     /** Get the time system used as a reference to define a time system.
  78.      * @return the time system used as a reference to define a time system
  79.      */
  80.     public TimeSystem getReferenceTimeSystem() {
  81.         return referenceTimeSystem;
  82.     }

  83.     /** Set the time system used as a reference to define a time system.
  84.      * @param referenceTimeSystem the time system used as a reference to define a time system
  85.      */
  86.     public void setReferenceTimeSystem(final TimeSystem referenceTimeSystem) {
  87.         this.referenceTimeSystem = referenceTimeSystem;
  88.     }

  89.     /** Get the SBAS Id.
  90.      * @return the SBAS Id
  91.      */
  92.     public SbasId getSbasId() {
  93.         return sbasId;
  94.     }

  95.     /** Set the SBAS Id.
  96.      * @param sbasId the SBAS Id to set
  97.      */
  98.     public void setSbasId(final SbasId sbasId) {
  99.         this.sbasId = sbasId;
  100.     }

  101.     /** Get the UTC Id.
  102.      * @return the URTC Id
  103.      */
  104.     public UtcId getUtcId() {
  105.         return utcId;
  106.     }

  107.     /** Set the UTC Id.
  108.      * @param utcId the URC Id to set
  109.      */
  110.     public void setUtcId(final UtcId utcId) {
  111.         this.utcId = utcId;
  112.     }

  113.     /** Get the constant term of the offset.
  114.      * @return the constant term of the offset
  115.      */
  116.     public double getA0() {
  117.         return a0;
  118.     }

  119.     /** Set the constant term of the offset.
  120.      * @param a0 constant term of the offset
  121.      */
  122.     public void setA0(final double a0) {
  123.         this.a0 = a0;
  124.     }

  125.     /** Get the linear term of the offset.
  126.      * @return the linear term of the offset
  127.      */
  128.     public double getA1() {
  129.         return a1;
  130.     }

  131.     /** set the linear term of the offset.
  132.      * @param a1 the linear term of the offset
  133.      */
  134.     public void setA1(final double a1) {
  135.         this.a1 = a1;
  136.     }

  137.     /** Get the quadratic term of the offset.
  138.      * @return the quadratic term of the offset
  139.      */
  140.     public double getA2() {
  141.         return a2;
  142.     }

  143.     /** Set the quadratic term of the offset.
  144.      * @param a2 quadratic term of the offset
  145.      */
  146.     public void setA2(final double a2) {
  147.         this.a2 = a2;
  148.     }

  149.     /** Get the message transmission time.
  150.      * @return message transmission time
  151.      */
  152.     public double getTransmissionTime() {
  153.         return transmissionTime;
  154.     }

  155.     /** Set the message transmission time.
  156.      * @param transmissionTime the message transmission time
  157.      */
  158.     public void setTransmissionTime(final double transmissionTime) {
  159.         this.transmissionTime = transmissionTime;
  160.     }

  161. }