LegacyNavigationMessage.java

  1. /* Copyright 2002-2024 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.propagation.analytical.gnss.data;

  18. /**
  19.  * Container for data contained in a GPS/QZNSS legacy navigation message.
  20.  * @author Bryan Cazabonne
  21.  * @since 11.0
  22.  */
  23. public class LegacyNavigationMessage extends AbstractNavigationMessage implements GNSSClockElements {

  24.     /** Identifier for message type. */
  25.     public static final String LNAV = "LNAV";

  26.     /** Issue of Data, Ephemeris. */
  27.     private int iode;

  28.     /** Issue of Data, Clock. */
  29.     private int iodc;

  30.     /** Group Delay Differential (s). */
  31.     private double tgd;

  32.     /** The user SV accuracy (m). */
  33.     private double svAccuracy;

  34.     /** Satellite health status. */
  35.     private int svHealth;

  36.     /** Fit interval.
  37.      * @since 12.0
  38.      */
  39.     private int fitInterval;

  40.     /**
  41.      * Constructor.
  42.      * @param mu Earth's universal gravitational parameter
  43.      * @param angularVelocity mean angular velocity of the Earth for the GNSS model
  44.      * @param weekNumber number of weeks in the GNSS cycle
  45.      */
  46.     protected LegacyNavigationMessage(final double mu,
  47.                                       final double angularVelocity,
  48.                                       final int weekNumber) {
  49.         super(mu, angularVelocity, weekNumber);
  50.     }

  51.     /**
  52.      * Getter for the Issue Of Data Ephemeris (IODE).
  53.      * @return the Issue Of Data Ephemeris (IODE)
  54.      */
  55.     public int getIODE() {
  56.         return iode;
  57.     }

  58.     /**
  59.      * Setter for the Issue of Data Ephemeris.
  60.      * @param value the IODE to set
  61.      */
  62.     public void setIODE(final double value) {
  63.         // The value is given as a floating number in the navigation message
  64.         this.iode = (int) value;
  65.     }

  66.     /**
  67.      * Getter for the Issue Of Data Clock (IODC).
  68.      * @return the Issue Of Data Clock (IODC)
  69.      */
  70.     public int getIODC() {
  71.         return iodc;
  72.     }

  73.     /**
  74.      * Setter for the Issue of Data Clock.
  75.      * @param value the IODC to set
  76.      */
  77.     public void setIODC(final int value) {
  78.         this.iodc = value;
  79.     }

  80.     /**
  81.      * Getter for the Group Delay Differential (s).
  82.      * @return the Group Delay Differential in seconds
  83.      */
  84.     public double getTGD() {
  85.         return tgd;
  86.     }

  87.     /**
  88.      * Setter for the Group Delay Differential (s).
  89.      * @param time the group delay differential to set
  90.      */
  91.     public void setTGD(final double time) {
  92.         this.tgd = time;
  93.     }

  94.     /**
  95.      * Getter for the user SV accuray (meters).
  96.      * @return the user SV accuracy
  97.      */
  98.     public double getSvAccuracy() {
  99.         return svAccuracy;
  100.     }

  101.     /**
  102.      * Setter for the user SV accuracy.
  103.      * @param svAccuracy the value to set
  104.      */
  105.     public void setSvAccuracy(final double svAccuracy) {
  106.         this.svAccuracy = svAccuracy;
  107.     }

  108.     /**
  109.      * Getter for the satellite health status.
  110.      * @return the satellite health status
  111.      */
  112.     public int getSvHealth() {
  113.         return svHealth;
  114.     }

  115.     /**
  116.      * Setter for the satellite health status.
  117.      * @param svHealth the value to set
  118.      */
  119.     public void setSvHealth(final int svHealth) {
  120.         this.svHealth = svHealth;
  121.     }

  122.     /**
  123.      * Getter for the fit interval.
  124.      * @return the fit interval
  125.      * @since 12.0
  126.      */
  127.     public int getFitInterval() {
  128.         return fitInterval;
  129.     }

  130.     /**
  131.      * Setter for the fit interval.
  132.      * @param fitInterval fit interval
  133.      * @since 12.0
  134.      */
  135.     public void setFitInterval(final int fitInterval) {
  136.         this.fitInterval = fitInterval;
  137.     }

  138. }