Class RinexClock

java.lang.Object
org.orekit.files.rinex.RinexFile<RinexClockHeader>
org.orekit.files.rinex.clock.RinexClock

public class RinexClock extends RinexFile<RinexClockHeader>
Represents a parsed clock file from the IGS.

A time system should be specified in the file. However, if it is not, default time system will be chosen regarding the satellite system. If it is mixed or not specified, default time system will be UTC.

Some fields might be null after parsing. It is expected because of the numerous kind of data that can be stored in clock data file.

Caution, files with missing information in header can lead to wrong data dates and station positions. It is advised to check the correctness and format compliance of the clock file to be parsed. Some values such as file time scale still can be set by user.

Since:
11.0
Author:
Thomas Paulet
See Also:
  • Constructor Details

    • RinexClock

      public RinexClock()
      Constructor.
      Since:
      14.0
  • Method Details

    • getTotalNumberOfDataLines

      public int getTotalNumberOfDataLines()
      Get the total number of complete data lines in the file.
      Returns:
      the total number of complete data lines in the file
    • extractClockModel

      public SampledClockModel extractClockModel(String name, int nbInterpolationPoints)
      Extract the clock model.
      Parameters:
      name - receiver/satellite name
      nbInterpolationPoints - number of points to use in interpolation
      Returns:
      extracted clock model
      Since:
      12.1
    • getClockData

      public Map<String,List<ClockDataLine>> getClockData()
      Getter for an unmodifiable map of clock data.
      Returns:
      the clock data
    • addClockData

      public void addClockData(String id, ClockDataLine clockDataLine)
      Add a clock data line to a specified receiver/satellite.
      Parameters:
      id - the satellite system to add observation type
      clockDataLine - the clock data line to add
    • getEarliestEpoch

      public AbsoluteDate getEarliestEpoch()
      Get earliest epoch from the clock data.
      Returns:
      earliest epoch from the clock data, or AbsoluteDate.FUTURE_INFINITY if no data has been added
      Since:
      12.1
    • getLatestEpoch

      public AbsoluteDate getLatestEpoch()
      Get latest epoch from the clock data.
      Returns:
      latest epoch from the clock data, or AbsoluteDate.PAST_INFINITY if no data has been added
      Since:
      12.1
    • splice

      public static RinexClock splice(Collection<RinexClock> clocks, double maxGap)
      Splice several Rinex clock files together.

      Splicing Rinex clock files is intended to be used when continuous computation covering more than one file is needed. The metadata (version number, agency, …) will be retrieved from the earliest file only. Receivers and satellites will be merged from all files. Some receivers or satellites may be missing in some files… Once sorted (which is done internally), if the gap between segments from two files is larger than maxGap, then an error will be triggered.

      The spliced file only contains the receivers and satellites that were present in all files. Receivers and satellites present in some files and absent from other files are silently dropped.

      Depending on producer, successive clock files either have a gap between the last entry of one file and the first entry of the next file (for example, files with a 5 minutes epoch interval may end at 23:55 and the next file start at 00:00), or both files have one point exactly at the splicing date (i.e. 24:00 one day and 00:00 next day). In the later case, the last point of the early file is dropped, and the first point of the late file takes precedence, hence only one point remains in the spliced file; this design choice is made to enforce continuity and regular interpolation.

      Parameters:
      clocks - clock files to merge
      maxGap - maximum time gap between files
      Returns:
      merged clock file
      Since:
      12.1