GalileoNavigationMessage.java

  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.propagation.analytical.gnss.data;

  18. import org.hipparchus.CalculusFieldElement;
  19. import org.hipparchus.Field;
  20. import org.orekit.gnss.SatelliteSystem;
  21. import org.orekit.time.TimeScales;

  22. /**
  23.  * Container for data contained in a Galileo navigation message.
  24.  * @author Bryan Cazabonne
  25.  * @since 11.0
  26.  */
  27. public class GalileoNavigationMessage extends AbstractNavigationMessage<GalileoNavigationMessage> {

  28.     /** Message type.
  29.      * @since 14.0
  30.      */
  31.     public static final String INAV = "INAV";

  32.     /** Message type.
  33.      * @since 14.0
  34.      */
  35.     public static final String FNAV = "FNAV";

  36.     /** Issue of Data of the navigation batch. */
  37.     private int iodNav;

  38.     /** Data source.
  39.      * @since 12.0
  40.      */
  41.     private int dataSource;

  42.     /** E1/E5a broadcast group delay (s). */
  43.     private double bgbE1E5a;

  44.     /** E5b/E1 broadcast group delay (s). */
  45.     private double bgdE5bE1;

  46.     /** Signal in space accuracy. */
  47.     private double sisa;

  48.     /** Satellite health status. */
  49.     private double svHealth;

  50.     /** Constructor.
  51.      * @param timeScales known time scales
  52.      * @param system     satellite system to consider for interpreting week number
  53.      *                   (may be different from real system, for example in Rinex nav, weeks
  54.      *                   are always according to GPS)
  55.      * @param type       message type
  56.      */
  57.     public GalileoNavigationMessage(final TimeScales timeScales, final SatelliteSystem system,
  58.                                     final String type) {
  59.         super(GNSSConstants.GALILEO_MU, GNSSConstants.GALILEO_AV, GNSSConstants.GALILEO_WEEK_NB,
  60.               timeScales, system, type);
  61.     }

  62.     /** Constructor from field instance.
  63.      * @param <T> type of the field elements
  64.      * @param original regular field instance
  65.      */
  66.     public <T extends CalculusFieldElement<T>> GalileoNavigationMessage(final FieldGalileoNavigationMessage<T> original) {
  67.         super(original);
  68.         setIODNav(original.getIODNav());
  69.         setDataSource(original.getDataSource());
  70.         setBGDE1E5a(original.getBGDE1E5a().getReal());
  71.         setBGDE5bE1(original.getBGDE5bE1().getReal());
  72.         setSisa(original.getSisa().getReal());
  73.         setSvHealth(original.getSvHealth().getReal());
  74.     }

  75.     /** {@inheritDoc} */
  76.     @SuppressWarnings("unchecked")
  77.     @Override
  78.     public <T extends CalculusFieldElement<T>, F extends FieldGnssOrbitalElements<T, GalileoNavigationMessage>>
  79.         F toField(final Field<T> field) {
  80.         return (F) new FieldGalileoNavigationMessage<>(field, this);
  81.     }

  82.     /**
  83.      * Getter for the the Issue Of Data (IOD).
  84.      * @return the Issue Of Data (IOD)
  85.      */
  86.     public int getIODNav() {
  87.         return iodNav;
  88.     }

  89.     /**
  90.      * Setter for the Issue of Data of the navigation batch.
  91.      * @param iod the IOD to set
  92.      */
  93.     public void setIODNav(final int iod) {
  94.         this.iodNav = iod;
  95.     }

  96.     /**
  97.      * Getter for the the data source.
  98.      * @return the data source
  99.      * @since 12.0
  100.      */
  101.     public int getDataSource() {
  102.         return dataSource;
  103.     }

  104.     /**
  105.      * Setter for the data source.
  106.      * @param dataSource data source
  107.      * @since 12.0
  108.      */
  109.     public void setDataSource(final int dataSource) {
  110.         this.dataSource = dataSource;
  111.     }

  112.     /**
  113.      * Getter for the E1/E5a broadcast group delay.
  114.      * @return the E1/E5a broadcast group delay (s)
  115.      */
  116.     public double getBGDE1E5a() {
  117.         return bgbE1E5a;
  118.     }

  119.     /**
  120.      * Setter for the E1/E5a broadcast group delay (s).
  121.      * @param bgd the E1/E5a broadcast group delay to set
  122.      */
  123.     public void setBGDE1E5a(final double bgd) {
  124.         this.bgbE1E5a = bgd;
  125.     }

  126.     /**
  127.      * Setter for the E5b/E1 broadcast group delay (s).
  128.      * @param bgd the E5b/E1 broadcast group delay to set
  129.      */
  130.     public void setBGDE5bE1(final double bgd) {
  131.         this.bgdE5bE1 = bgd;
  132.     }

  133.     /**
  134.      * Getter for the the Broadcast Group Delay E5b/E1.
  135.      * @return the Broadcast Group Delay E5b/E1 (s)
  136.      */
  137.     public double getBGDE5bE1() {
  138.         return bgdE5bE1;
  139.     }

  140.     /**
  141.      * Getter for the signal in space accuracy (m).
  142.      * @return the signal in space accuracy
  143.      */
  144.     public double getSisa() {
  145.         return sisa;
  146.     }

  147.     /**
  148.      * Setter for the signal in space accuracy.
  149.      * @param sisa the sisa to set
  150.      */
  151.     public void setSisa(final double sisa) {
  152.         this.sisa = sisa;
  153.     }

  154.     /**
  155.      * Getter for the SV health status.
  156.      * @return the SV health status
  157.      */
  158.     public double getSvHealth() {
  159.         return svHealth;
  160.     }

  161.     /**
  162.      * Setter for the SV health status.
  163.      * @param svHealth the SV health status to set
  164.      */
  165.     public void setSvHealth(final double svHealth) {
  166.         this.svHealth = svHealth;
  167.     }

  168. }