RinexNavigationHeader.java

  1. /* Copyright 2002-2024 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. import java.util.ArrayList;
  19. import java.util.List;

  20. import org.orekit.files.rinex.section.RinexBaseHeader;
  21. import org.orekit.files.rinex.utils.RinexFileType;

  22. /** Header for Rinex Navigation.
  23.  * @author Luc Maisonobe
  24.  * @since 12.0
  25.  */
  26. public class RinexNavigationHeader extends RinexBaseHeader {

  27.     /** Ionospheric correction type. */
  28.     private IonosphericCorrectionType ionosphericCorrectionType;

  29.     /** List of time system corrections. */
  30.     private List<TimeSystemCorrection> timeSystemCorrections;

  31.     /** Number of merged files. */
  32.     private int mergedFiles;

  33.     /** Current number of leap seconds. */
  34.     private int numberOfLeapSeconds;

  35.     /** Simple constructor.
  36.      */
  37.     public RinexNavigationHeader() {
  38.         super(RinexFileType.NAVIGATION);
  39.         this.timeSystemCorrections = new ArrayList<>();
  40.         this.mergedFiles           = -1;
  41.         this.numberOfLeapSeconds   = -1;
  42.     }

  43.     /**
  44.      * Getter for the ionospheric correction type.
  45.      * @return the ionospheric correction type
  46.      */
  47.     public IonosphericCorrectionType getIonosphericCorrectionType() {
  48.         return ionosphericCorrectionType;
  49.     }

  50.     /**
  51.      * Setter for the ionospheric correction type.
  52.      * @param ionosphericCorrectionType the ionospheric correction type to set
  53.      */
  54.     public void setIonosphericCorrectionType(final IonosphericCorrectionType ionosphericCorrectionType) {
  55.         this.ionosphericCorrectionType = ionosphericCorrectionType;
  56.     }

  57.     /**
  58.      * Getter for the time system corrections contained in the file header.
  59.      * <p>
  60.      * Corrections to transform the system time to UTC or oter time system.
  61.      * </p>
  62.      * @return the list of time system corrections
  63.      */
  64.     public List<TimeSystemCorrection> getTimeSystemCorrections() {
  65.         return timeSystemCorrections;
  66.     }

  67.     /**
  68.      * Add a time system correction to the list.
  69.      * @param timeSystemCorrection the element to add
  70.      */
  71.     public void addTimeSystemCorrections(final TimeSystemCorrection timeSystemCorrection) {
  72.         this.timeSystemCorrections.add(timeSystemCorrection);
  73.     }

  74.     /**
  75.      * Getter for the number of merged files.
  76.      * @return the number of merged files
  77.      */
  78.     public int getMergedFiles() {
  79.         return mergedFiles;
  80.     }

  81.     /**
  82.      * Setter for the number of merged files.
  83.      * @param mergedFiles the number of merged files
  84.      */
  85.     public void setMergedFiles(final int mergedFiles) {
  86.         this.mergedFiles = mergedFiles;
  87.     }

  88.     /**
  89.      * Getter for the current number of leap seconds.
  90.      * @return the current number of leap seconds
  91.      */
  92.     public int getNumberOfLeapSeconds() {
  93.         return numberOfLeapSeconds;
  94.     }

  95.     /**
  96.      * Setter for the current number of leap seconds.
  97.      * @param numberOfLeapSeconds the number of leap seconds to set
  98.      */
  99.     public void setNumberOfLeapSeconds(final int numberOfLeapSeconds) {
  100.         this.numberOfLeapSeconds = numberOfLeapSeconds;
  101.     }

  102. }