StationObservableSpecificSignalBias.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.files.sinex;

  18. import org.orekit.gnss.SatelliteSystem;

  19. import java.util.Collection;
  20. import java.util.HashMap;

  21. /**
  22.  * Class based on OSB, used to store the data parsed in {@link SinexBiasParser}
  23.  * for Observation Signal Biases computed for stations.
  24.  * <p>
  25.  * Satellites and stations have differentiated classes as stations might have multiple satellite systems.
  26.  * The data are stored in a Map of OSB, identified by the {@link SatelliteSystem}
  27.  * </p>
  28.  * @author Louis Aucouturier
  29.  * @author Luc Maisonobe
  30.  * @since 13.0
  31.  */
  32. public class StationObservableSpecificSignalBias {

  33.     /** Site code. */
  34.     private final String siteCode;

  35.     /** Map containing OSB objects as a function of the satellite system. */
  36.     private final HashMap<SatelliteSystem, ObservableSpecificSignalBias> osbMap;

  37.     /** Simple constructor.
  38.      * @param siteCode the site code (station identifier)
  39.      */
  40.     public StationObservableSpecificSignalBias(final String siteCode) {
  41.         this.siteCode = siteCode;
  42.         this.osbMap   = new HashMap<>();
  43.     }

  44.     /** Get the site code (station identifier).
  45.      * @return the site code
  46.      */
  47.     public String getSiteCode() {
  48.         return siteCode;
  49.     }

  50.     /** Get the OSB data for a given satellite system.
  51.      * @param satelliteSystem satellite system
  52.      * @return the OSB data corresponding to the satellite system
  53.      */
  54.     public ObservableSpecificSignalBias getOsb(final SatelliteSystem satelliteSystem) {
  55.         return osbMap.computeIfAbsent(satelliteSystem, s -> new ObservableSpecificSignalBias());
  56.     }

  57.     /** Get the satellite systems available for the station.
  58.      * @return a Set containing all SatelliteSystems available for DSB computation.
  59.      */
  60.     public Collection<SatelliteSystem> getAvailableSatelliteSystems() {
  61.         return osbMap.keySet();
  62.     }

  63. }