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.     /** Issue of Data of the navigation batch. */
  29.     private int iodNav;

  30.     /** Data source.
  31.      * @since 12.0
  32.      */
  33.     private int dataSource;

  34.     /** E1/E5a broadcast group delay (s). */
  35.     private double bgbE1E5a;

  36.     /** E5b/E1 broadcast group delay (s). */
  37.     private double bgdE5bE1;

  38.     /** Signal in space accuracy. */
  39.     private double sisa;

  40.     /** Satellite health status. */
  41.     private double svHealth;

  42.     /** Constructor.
  43.      * @param timeScales known time scales
  44.      * @param system     satellite system to consider for interpreting week number
  45.      *                   (may be different from real system, for example in Rinex nav, weeks
  46.      *                   are always according to GPS)
  47.      */
  48.     public GalileoNavigationMessage(final TimeScales timeScales, final SatelliteSystem system) {
  49.         super(GNSSConstants.GALILEO_MU, GNSSConstants.GALILEO_AV, GNSSConstants.GALILEO_WEEK_NB,
  50.               timeScales, system);
  51.     }

  52.     /** Constructor from field instance.
  53.      * @param <T> type of the field elements
  54.      * @param original regular field instance
  55.      */
  56.     public <T extends CalculusFieldElement<T>> GalileoNavigationMessage(final FieldGalileoNavigationMessage<T> original) {
  57.         super(original);
  58.         setIODNav(original.getIODNav());
  59.         setDataSource(original.getDataSource());
  60.         setBGDE1E5a(original.getBGDE1E5a().getReal());
  61.         setBGDE5bE1(original.getBGDE5bE1().getReal());
  62.         setSisa(original.getSisa().getReal());
  63.         setSvHealth(original.getSvHealth().getReal());
  64.     }

  65.     /** {@inheritDoc} */
  66.     @SuppressWarnings("unchecked")
  67.     @Override
  68.     public <T extends CalculusFieldElement<T>, F extends FieldGnssOrbitalElements<T, GalileoNavigationMessage>>
  69.         F toField(final Field<T> field) {
  70.         return (F) new FieldGalileoNavigationMessage<>(field, this);
  71.     }

  72.     /**
  73.      * Getter for the the Issue Of Data (IOD).
  74.      * @return the Issue Of Data (IOD)
  75.      */
  76.     public int getIODNav() {
  77.         return iodNav;
  78.     }

  79.     /**
  80.      * Setter for the Issue of Data of the navigation batch.
  81.      * @param iod the IOD to set
  82.      */
  83.     public void setIODNav(final int iod) {
  84.         this.iodNav = iod;
  85.     }

  86.     /**
  87.      * Getter for the the data source.
  88.      * @return the data source
  89.      * @since 12.0
  90.      */
  91.     public int getDataSource() {
  92.         return dataSource;
  93.     }

  94.     /**
  95.      * Setter for the data source.
  96.      * @param dataSource data source
  97.      * @since 12.0
  98.      */
  99.     public void setDataSource(final int dataSource) {
  100.         this.dataSource = dataSource;
  101.     }

  102.     /**
  103.      * Getter for the E1/E5a broadcast group delay.
  104.      * @return the E1/E5a broadcast group delay (s)
  105.      */
  106.     public double getBGDE1E5a() {
  107.         return bgbE1E5a;
  108.     }

  109.     /**
  110.      * Setter for the E1/E5a broadcast group delay (s).
  111.      * @param bgd the E1/E5a broadcast group delay to set
  112.      */
  113.     public void setBGDE1E5a(final double bgd) {
  114.         this.bgbE1E5a = bgd;
  115.     }

  116.     /**
  117.      * Setter for the E5b/E1 broadcast group delay (s).
  118.      * @param bgd the E5b/E1 broadcast group delay to set
  119.      */
  120.     public void setBGDE5bE1(final double bgd) {
  121.         this.bgdE5bE1 = bgd;
  122.     }

  123.     /**
  124.      * Getter for the the Broadcast Group Delay E5b/E1.
  125.      * @return the Broadcast Group Delay E5b/E1 (s)
  126.      */
  127.     public double getBGDE5bE1() {
  128.         return bgdE5bE1;
  129.     }

  130.     /**
  131.      * Getter for the signal in space accuracy (m).
  132.      * @return the signal in space accuracy
  133.      */
  134.     public double getSisa() {
  135.         return sisa;
  136.     }

  137.     /**
  138.      * Setter for the signal in space accuracy.
  139.      * @param sisa the sisa to set
  140.      */
  141.     public void setSisa(final double sisa) {
  142.         this.sisa = sisa;
  143.     }

  144.     /**
  145.      * Getter for the SV health status.
  146.      * @return the SV health status
  147.      */
  148.     public double getSvHealth() {
  149.         return svHealth;
  150.     }

  151.     /**
  152.      * Setter for the SV health status.
  153.      * @param svHealth the SV health status to set
  154.      */
  155.     public void setSvHealth(final double svHealth) {
  156.         this.svHealth = svHealth;
  157.     }

  158. }