SsrIgm05Data.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.CodeBias;

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

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

  30.     /** Map of code biases.
  31.      * First key: the signal ID
  32.      * Second key: the code bias object
  33.      */
  34.     private Map<Integer, CodeBias> biases;

  35.     /** Constructor. */
  36.     public SsrIgm05Data() {
  37.         // Initialize an empty map
  38.         this.biases = new HashMap<>();
  39.     }

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

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

  54.     /**
  55.      * Add a code bias value for the current satellite.
  56.      * @param bias the code bias to add
  57.      */
  58.     public void addCodeBias(final CodeBias bias) {
  59.         this.biases.put(bias.getSignalID(), bias);
  60.     }

  61.     /**
  62.      * Get the code biases for the current satellite.
  63.      * <p>
  64.      * First key: signal ID
  65.      * Second key: the code bias object
  66.      * </p>
  67.      * @return the code biases for the current satellite
  68.      */
  69.     public Map<Integer, CodeBias> getCodeBiases() {
  70.         return Collections.unmodifiableMap(biases);
  71.     }

  72.     /**
  73.      * Get the code bias for a given signal ID.
  74.      * @param signalID the signal IF
  75.      * @return the corresponding code bias (null if not provided)
  76.      */
  77.     public CodeBias getCodeBias(final int signalID) {
  78.         return biases.get(signalID);
  79.     }

  80. }