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.rinex.navigation;
18
19 import java.util.ArrayList;
20 import java.util.List;
21
22 import org.orekit.files.rinex.section.RinexBaseHeader;
23 import org.orekit.files.rinex.utils.RinexFileType;
24
25 /** Header for Rinex Navigation.
26 * @author Luc Maisonobe
27 * @since 12.0
28 */
29 public class RinexNavigationHeader extends RinexBaseHeader {
30
31 /** Ionospheric correction type. */
32 private IonosphericCorrectionType ionosphericCorrectionType;
33
34 /** List of time system corrections. */
35 private List<TimeSystemCorrection> timeSystemCorrections;
36
37 /** Number of merged files. */
38 private int mergedFiles;
39
40 /** Current number of leap seconds. */
41 private int numberOfLeapSeconds;
42
43 /** Simple constructor.
44 */
45 public RinexNavigationHeader() {
46 super(RinexFileType.NAVIGATION);
47 this.timeSystemCorrections = new ArrayList<>();
48 this.mergedFiles = -1;
49 this.numberOfLeapSeconds = -1;
50 }
51
52 /**
53 * Getter for the ionospheric correction type.
54 * @return the ionospheric correction type
55 */
56 public IonosphericCorrectionType getIonosphericCorrectionType() {
57 return ionosphericCorrectionType;
58 }
59
60 /**
61 * Setter for the ionospheric correction type.
62 * @param ionosphericCorrectionType the ionospheric correction type to set
63 */
64 public void setIonosphericCorrectionType(final IonosphericCorrectionType ionosphericCorrectionType) {
65 this.ionosphericCorrectionType = ionosphericCorrectionType;
66 }
67
68 /**
69 * Getter for the time system corrections contained in the file header.
70 * <p>
71 * Corrections to transform the system time to UTC or oter time system.
72 * </p>
73 * @return the list of time system corrections
74 */
75 public List<TimeSystemCorrection> getTimeSystemCorrections() {
76 return timeSystemCorrections;
77 }
78
79 /**
80 * Add a time system correction to the list.
81 * @param timeSystemCorrection the element to add
82 */
83 public void addTimeSystemCorrections(final TimeSystemCorrection timeSystemCorrection) {
84 this.timeSystemCorrections.add(timeSystemCorrection);
85 }
86
87 /**
88 * Getter for the number of merged files.
89 * @return the number of merged files
90 */
91 public int getMergedFiles() {
92 return mergedFiles;
93 }
94
95 /**
96 * Setter for the number of merged files.
97 * @param mergedFiles the number of merged files
98 */
99 public void setMergedFiles(final int mergedFiles) {
100 this.mergedFiles = mergedFiles;
101 }
102
103 /**
104 * Getter for the current number of leap seconds.
105 * @return the current number of leap seconds
106 */
107 public int getNumberOfLeapSeconds() {
108 return numberOfLeapSeconds;
109 }
110
111 /**
112 * Setter for the current number of leap seconds.
113 * @param numberOfLeapSeconds the number of leap seconds to set
114 */
115 public void setNumberOfLeapSeconds(final int numberOfLeapSeconds) {
116 this.numberOfLeapSeconds = numberOfLeapSeconds;
117 }
118
119 }