SsrIgm06Data.java

  1. /* Copyright 2002-2022 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. /**
  22.  * Container for SSR IGM06 data.
  23.  * @author Bryan Cazabonne
  24.  * @since 11.0
  25.  */
  26. public class SsrIgm06Data extends SsrIgmData {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  111. }