SsrIgm06Data.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.metric.messages.ssr.igm;

  18. import java.util.Collections;
  19. import java.util.HashMap;
  20. import java.util.Map;

  21. import org.orekit.gnss.metric.messages.common.PhaseBias;

  22. /**
  23.  * Container for SSR IGM06 data.
  24.  * @author Bryan Cazabonne
  25.  * @since 11.0
  26.  */
  27. public class SsrIgm06Data extends SsrIgmData {

  28.     /** Number of biases processed for the current satellite. */
  29.     private int numberOfBiasesProcessed;

  30.     /** Yaw angle used for computation of phase wind-up correction [rad]. */
  31.     private double yawAngle;

  32.     /** Yaw rate [rad/s]. */
  33.     private double yawRate;

  34.     /** Map of phase biases.
  35.      * First key: the signal ID
  36.      * Second key: the phase bias object
  37.      */
  38.     private Map<Integer, PhaseBias> biases;

  39.     /** Constructor. */
  40.     public SsrIgm06Data() {
  41.         // Initialize an empty map
  42.         this.biases = new HashMap<>();
  43.     }

  44.     /**
  45.      * Get the number of biases processed for the current satellite.
  46.      * @return the number of biases processed
  47.      */
  48.     public int getNumberOfBiasesProcessed() {
  49.         return numberOfBiasesProcessed;
  50.     }

  51.     /**
  52.      * Set the number of biases processed for the current satellite.
  53.      * @param numberOfBiasesProcessed the number to set
  54.      */
  55.     public void setNumberOfBiasesProcessed(final int numberOfBiasesProcessed) {
  56.         this.numberOfBiasesProcessed = numberOfBiasesProcessed;
  57.     }

  58.     /**
  59.      * Get the yaw angle used for computation of phase wind-up correction.
  60.      * @return the yaw angle in radians
  61.      */
  62.     public double getYawAngle() {
  63.         return yawAngle;
  64.     }

  65.     /**
  66.      * Set the yaw angle used for computation of phase wind-up correction.
  67.      * @param yawAngle the yaw angle to set in radians
  68.      */
  69.     public void setYawAngle(final double yawAngle) {
  70.         this.yawAngle = yawAngle;
  71.     }

  72.     /**
  73.      * Get the yaw rate.
  74.      * @return the yaw rate in radians per second
  75.      */
  76.     public double getYawRate() {
  77.         return yawRate;
  78.     }

  79.     /**
  80.      * Set the yaw rate.
  81.      * @param yawRate the yaw rate to set in radians per second
  82.      */
  83.     public void setYawRate(final double yawRate) {
  84.         this.yawRate = yawRate;
  85.     }

  86.     /**
  87.      * Add a phase bias value for the current satellite.
  88.      * @param bias the phase bias to add
  89.      */
  90.     public void addPhaseBias(final PhaseBias bias) {
  91.         this.biases.put(bias.getSignalID(), bias);
  92.     }

  93.     /**
  94.      * Get the phase biases for the current satellite.
  95.      * <p>
  96.      * First key: signal ID
  97.      * Second key: the phase bias object
  98.      * </p>
  99.      * @return the phase biases for the current satellite
  100.      */
  101.     public Map<Integer, PhaseBias> getPhaseBiases() {
  102.         return Collections.unmodifiableMap(biases);
  103.     }

  104.     /**
  105.      * Get the phase bias for a given signal ID.
  106.      * @param signalID the signal IF
  107.      * @return the corresponding phase bias (null if not provided)
  108.      */
  109.     public PhaseBias getPhaseBias(final int signalID) {
  110.         return biases.get(signalID);
  111.     }

  112. }