PredefinedGnssSignal.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.gnss;

  18. /**
  19.  * Enumerate for GNSS predefined signals.
  20.  *
  21.  * @author Luc Maisonobe
  22.  * @since 9.2
  23.  */
  24. public enum PredefinedGnssSignal implements GnssSignal {

  25.     // CHECKSTYLE: stop MultipleStringLiterals check
  26.     /** GPS L1 (1575.42 MHz). */
  27.     G01(SatelliteSystem.GPS,     "L1", 154),

  28.     /** GPS L2 (1227.6 MHz). */
  29.     G02(SatelliteSystem.GPS,     "L2", 120),

  30.     /** GPS L5 (1176.45 MHz). */
  31.     G05(SatelliteSystem.GPS,     "L5", 115),

  32.     /** GLONASS, "G1" (1602 MHZ). */
  33.     R01(SatelliteSystem.GLONASS, "G1", 1602.0 / 10.23),

  34.     /** GLONASS, "G2" (1246 MHz). */
  35.     R02(SatelliteSystem.GLONASS, "G2", 1246.0 / 10.23),

  36.     /** GLONASS, "G3" (1202.025 MHz). */
  37.     R03(SatelliteSystem.GLONASS, "G3", 117.5),

  38.     /** GLONASS, "G1a" (1600.995 MHZ). */
  39.     R04(SatelliteSystem.GLONASS, "G1a", 156.5),

  40.     /** GLONASS, "G2a" (1248.06 MHz). */
  41.     R06(SatelliteSystem.GLONASS, "G2a", 122),

  42.     /** Galileo, "E1" (1575.42 MHz). */
  43.     E01(SatelliteSystem.GALILEO, "E1", 154),

  44.     /** Galileo E5a (1176.45 MHz). */
  45.     E05(SatelliteSystem.GALILEO, "E5a", 115),

  46.     /** Galileo E5b (1207.14 MHz). */
  47.     E07(SatelliteSystem.GALILEO, "E5b", 118),

  48.     /** Galileo E5 (E5a + E5b) (1191.795MHz). */
  49.     E08(SatelliteSystem.GALILEO, "E5 (E5a+E5b)", 116.5),

  50.     /** Galileo E6 (1278.75 MHz). */
  51.     E06(SatelliteSystem.GALILEO, "E6", 125),

  52.     /** In the ANTEX files, both C01 and C02 refer to Beidou B1 signal (1561.098 MHz). */
  53.     C01(SatelliteSystem.BEIDOU, "B1", 152.6),

  54.     /** In the ANTEX files, both C01 and C02 refer to Beidou B1 signal (1561.098 MHz). */
  55.     C02(SatelliteSystem.BEIDOU, "B1", 152.6),

  56.     /** In the ANTEX files, C05 appears without much reference
  57.      * for consistency with Rinex 4 tables, we assume it is B2a (1176.45 MHz).
  58.      */
  59.     C05(SatelliteSystem.BEIDOU, "B2a", 115),

  60.     /** In the ANTEX files, C06 appears without much reference, we assume it is B2 (1207.14 MHz). */
  61.     C06(SatelliteSystem.BEIDOU, "B2", 118),

  62.     /** In the ANTEX files, C07 seems to refer to a signal close to E06, probably B3... (1268.52 MHz). */
  63.     C07(SatelliteSystem.BEIDOU, "B3", 124),

  64.     /** In the ANTEX files, C08 appears without much reference
  65.      * for consistency with Rinex 4 tables, we assume it is B2 (B2a+B2b) (1191.795 MHz).
  66.      */
  67.     C08(SatelliteSystem.BEIDOU, "B2 (B2a+B2b)", 116.5),

  68.     /** Beidou B1 (1561.098 MHz). */
  69.     B01(SatelliteSystem.BEIDOU,  "B1", 152.6),

  70.     /** Beidou B2 (1207.14 MHz). */
  71.     B02(SatelliteSystem.BEIDOU,  "B2", 118),

  72.     /** Beidou B3 (1268.52 MHz). */
  73.     B03(SatelliteSystem.BEIDOU,  "B3", 124),

  74.     /** Beidou B1C (1575.42 MHz). */
  75.     B1C(SatelliteSystem.BEIDOU,  "B1C", 154),

  76.     /** Beidou B1A (1575.42 MHz). */
  77.     B1A(SatelliteSystem.BEIDOU,  "B1A", 154),

  78.     /** Beidou B2a (1176.45 MHz). */
  79.     B2A(SatelliteSystem.BEIDOU, "B2a", 115),

  80.     /** Beidou B2b (1207.14 MHz). */
  81.     B2B(SatelliteSystem.BEIDOU, "B2b", 118),

  82.     /** Beidou B2 (B2a + B2b) (1191.795MHz). */
  83.     B08(SatelliteSystem.BEIDOU, "B2 (B2a+B2b)", 116.5),

  84.     /** Beidou B3A (1268.52 MHz). */
  85.     B3A(SatelliteSystem.BEIDOU, "B3A", 124),

  86.     /** QZSS L1 (1575.42 MHz). */
  87.     J01(SatelliteSystem.QZSS,    "L1", 154),

  88.     /** QZSS L2 (1227.6 MHz). */
  89.     J02(SatelliteSystem.QZSS,    "L2", 120),

  90.     /** QZSS L5 (1176.45 MHz). */
  91.     J05(SatelliteSystem.QZSS,    "L5", 115),

  92.     /** QZSS LEX (1278.75 MHz). */
  93.     J06(SatelliteSystem.QZSS,    "LEX", 125),

  94.     /** NavIC L1. (1575.42 MHz)
  95.      * @since 13.0
  96.      */
  97.     I01(SatelliteSystem.NAVIC, "L1", 154),

  98.     /** NavIC L5. (1176.45 MHz) */
  99.     I05(SatelliteSystem.NAVIC, "L5", 115),

  100.     /** NavIC S (2492.028 MHz). */
  101.     I09(SatelliteSystem.NAVIC, "S", 243.6),

  102.     /** SBAS L1 (1575.42 MHz). */
  103.     S01(SatelliteSystem.SBAS,    "L1", 154),

  104.     /** SBAS L5 (1176.45 MHz). */
  105.     S05(SatelliteSystem.SBAS,    "L5", 115);
  106.     // CHECKSTYLE: resume MultipleStringLiterals check

  107.     /** Satellite system. */
  108.     private final SatelliteSystem satelliteSystem;

  109.     /** RINEX name for the frequency. */
  110.     private final String name;

  111.     /** Ratio f/f0, where {@link GnssSignal#F0 f0} is the common frequency. */
  112.     private final double ratio;

  113.     /** Simple constructor.
  114.      * @param name for the frequency
  115.      * @param satelliteSystem satellite system for which this frequency is defined
  116.      * @param ratio ratio f/f0, where {@link GnssSignal#F0 f0} is the common frequency
  117.      */
  118.     PredefinedGnssSignal(final SatelliteSystem satelliteSystem, final String name, final double ratio) {
  119.         this.satelliteSystem = satelliteSystem;
  120.         this.name            = name;
  121.         this.ratio           = ratio;
  122.     }

  123.     /** {@inheritDoc} */
  124.     @Override
  125.     public String getName() {
  126.         return name;
  127.     }

  128.     /** {@inheritDoc} */
  129.     @Override
  130.     public SatelliteSystem getSatelliteSystem() {
  131.         return satelliteSystem;
  132.     }

  133.     /** {@inheritDoc} */
  134.     @Override
  135.     public double getRatio() {
  136.         return ratio;
  137.     }

  138.     /** {@inheritDoc} */
  139.     @Override
  140.     public double getFrequency() {
  141.         return ratio * GnssSignal.F0;
  142.     }

  143. }