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
18 package org.orekit.files.sinex;
19
20 import org.orekit.gnss.SatelliteSystem;
21
22 import java.util.Collection;
23 import java.util.HashMap;
24
25 /**
26 * Class based on OSB, used to store the data parsed in {@link SinexBiasParser}
27 * for Observation Signal Biases computed for stations.
28 * <p>
29 * Satellites and stations have differentiated classes as stations might have multiple satellite systems.
30 * The data are stored in a Map of OSB, identified by the {@link SatelliteSystem}
31 * </p>
32 * @author Louis Aucouturier
33 * @author Luc Maisonobe
34 * @since 13.0
35 */
36 public class StationObservableSpecificSignalBias {
37
38 /** Site code. */
39 private final String siteCode;
40
41 /** Map containing OSB objects as a function of the satellite system. */
42 private final HashMap<SatelliteSystem, ObservableSpecificSignalBias> osbMap;
43
44 /** Simple constructor.
45 * @param siteCode the site code (station identifier)
46 */
47 public StationObservableSpecificSignalBias(final String siteCode) {
48 this.siteCode = siteCode;
49 this.osbMap = new HashMap<>();
50 }
51
52 /** Get the site code (station identifier).
53 * @return the site code
54 */
55 public String getSiteCode() {
56 return siteCode;
57 }
58
59 /** Get the OSB data for a given satellite system.
60 * @param satelliteSystem satellite system
61 * @return the OSB data corresponding to the satellite system
62 */
63 public ObservableSpecificSignalBias getOsb(final SatelliteSystem satelliteSystem) {
64 return osbMap.computeIfAbsent(satelliteSystem, s -> new ObservableSpecificSignalBias());
65 }
66
67 /** Get the satellite systems available for the station.
68 * @return a Set containing all SatelliteSystems available for DSB computation.
69 */
70 public Collection<SatelliteSystem> getAvailableSatelliteSystems() {
71 return osbMap.keySet();
72 }
73
74 }