StationDifferentialSignalBias.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 java.util.Collection;
  19. import java.util.HashMap;

  20. import org.orekit.gnss.SatelliteSystem;

  21. /** Container for {@link DifferentialSignalBias Differential Signal Biases} associated to one station.
  22.  * @author Louis Aucouturier
  23.  * @since 12.0
  24.  */
  25. public class StationDifferentialSignalBias {

  26.     /** Site code. */
  27.     private final String siteCode;

  28.     /** Map containing DSB objects as a function of the satellite system. */
  29.     private final HashMap<SatelliteSystem, DifferentialSignalBias> dsbMap;

  30.     /** Simple constructor.
  31.      * @param siteCode the site code (station identifier)
  32.      */
  33.     public StationDifferentialSignalBias(final String siteCode) {
  34.         this.siteCode = siteCode;
  35.         this.dsbMap   = new HashMap<>();
  36.     }

  37.     /** Get the site code (station identifier).
  38.      * @return the site code
  39.      */
  40.     public String getSiteCode() {
  41.         return siteCode;
  42.     }

  43.     /** Get the DSB data for a given satellite system.
  44.      * @param satelliteSystem satellite system
  45.      * @return the DSB data corresponding to the satellite system
  46.      */
  47.     public DifferentialSignalBias getDsb(final SatelliteSystem satelliteSystem) {
  48.         return dsbMap.computeIfAbsent(satelliteSystem, s -> new DifferentialSignalBias());
  49.     }

  50.     /** Get the satellite systems available for the station.
  51.      * @return a Set containing all SatelliteSystems available for DSB computation.
  52.      */
  53.     public Collection<SatelliteSystem> getAvailableSatelliteSystems() {
  54.         return dsbMap.keySet();
  55.     }

  56. }