Class RinexClock
- java.lang.Object
 - 
- org.orekit.files.rinex.clock.RinexClock
 
 
- 
public class RinexClock extends Object
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:
 - 3.00 clock file format, 3.02 clock file format, 3.04 clock file format
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description classRinexClock.ClockDataLineClock data for a single station.static classRinexClock.ClockDataTypeClock data type.static classRinexClock.ReceiverRepresents a receiver or a satellite with its position in the considered frame.static classRinexClock.ReferenceClockRepresents a reference clock with its validity time span. 
- 
Constructor Summary
Constructors Constructor Description RinexClock(Function<? super String,? extends Frame> frameBuilder)Constructor. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAppliedDCBS(AppliedDCBS appliedDCBS)Add an applied differencial code bias corrections.voidaddAppliedPCVS(AppliedPCVS appliedPCVS)Add an applied phase center variations.voidaddClockData(String id, RinexClock.ClockDataLine clockDataLine)Add a clock data line to a specified receiver/satellite.voidaddClockDataType(RinexClock.ClockDataType clockDataType)Add a clock data types.voidaddComment(String comment)Add a comment line.voidaddReceiver(RinexClock.Receiver receiver)Add a new receiver to the list of stored receivers.voidaddReferenceClockList(List<RinexClock.ReferenceClock> referenceClockList, AbsoluteDate startDate)Add a list of reference clocks which will be used after a specified date.voidaddSatellite(String satId)Add a new satellite with a given identifier to the list of stored satellites.voidaddSystemObservationType(SatelliteSystem satSystem, ObservationType observationType)Add an observation type for a specified satellite system.SampledClockModelextractClockModel(String name, int nbInterpolationPoints)Extract the clock model.StringgetAgencyName()Getter for the agency name.StringgetAnalysisCenterID()Getter for the analysis center ID.StringgetAnalysisCenterName()Getter for the analysis center name.Map<String,List<RinexClock.ClockDataLine>>getClockData()Getter for an unmodifiable map of clock data.List<RinexClock.ClockDataType>getClockDataTypes()Getter for the different clock data types.StringgetComments()Getter for the comments.AbsoluteDategetCreationDate()Getter for the creation date.StringgetCreationDateString()Getter for the creation date of the file as a string.StringgetCreationTimeString()Getter for the creation time of the file as a string.StringgetCreationTimeZoneString()Getter for the creation time zone of the file as a string.AbsoluteDategetEarliestEpoch()Get earliest epoch from theclock data.StringgetExternalClockReference()Getter for the external clock reference.doublegetFormatVersion()Getter for the format version.FramegetFrame()Get the reference frame for the station positions.StringgetFrameName()Getter for the frame name.AbsoluteDategetLatestEpoch()Get latest epoch from theclock data.List<AppliedDCBS>getListAppliedDCBS()Getter for the applied differential code bias corrections.List<AppliedPCVS>getListAppliedPCVS()Getter for the applied phase center variations.intgetNumberOfClockDataTypes()Get the number of different clock data types in the file.intgetNumberOfLeapSeconds()Getter for the number of leap seconds.intgetNumberOfLeapSecondsGNSS()Getter for the number of leap second for GNSS time scales.intgetNumberOfReceivers()Get the number of receivers that are considered in the file.intgetNumberOfSatellites()Get the number of satellites that are considered in the file.StringgetProgramName()Getter for the program name.List<RinexClock.Receiver>getReceivers()Getter for the receivers.TimeSpanMap<List<RinexClock.ReferenceClock>>getReferenceClocks()Getter for the reference clocks.List<String>getSatellites()Getter for the satellites.SatelliteSystemgetSatelliteSystem()Getter for the satellite system.StringgetStationIdentifier()Getter for the station identifier.StringgetStationName()Getter for the station name.Map<SatelliteSystem,List<ObservationType>>getSystemObservationTypes()Getter for the different observation type for each satellite system.TimeScalegetTimeScale()Getter for the data time scale.TimeSystemgetTimeSystem()Getter for the file time system.intgetTotalNumberOfDataLines()Get the total number of complete data lines in the file.intnumberOfObsTypes(SatelliteSystem system)Get the number of observation types for a given system.voidsetAgencyName(String agencyName)Setter for the agency name.voidsetAnalysisCenterID(String analysisCenterID)Setter for the analysis center ID.voidsetAnalysisCenterName(String analysisCenterName)Setter for the analysis center name.voidsetCreationDate(AbsoluteDate creationDate)Setter for the creation date.voidsetCreationDateString(String creationDateString)Setter for the creation date as a string.voidsetCreationTimeString(String creationTimeString)Setter for the creation time as a string.voidsetCreationTimeZoneString(String creationTimeZoneString)Setter for the creation time zone.voidsetExternalClockReference(String externalClockReference)Setter for the external clock reference.voidsetFormatVersion(double formatVersion)Setter for the format version.voidsetFrameName(String frameName)Setter for the frame name.voidsetNumberOfLeapSeconds(int numberOfLeapSeconds)Setter for the number of leap seconds.voidsetNumberOfLeapSecondsGNSS(int numberOfLeapSecondsGNSS)Setter for the number of leap seconds for GNSS time scales.voidsetProgramName(String programName)Setter for the program name.voidsetSatelliteSystem(SatelliteSystem satelliteSystem)Setter for the satellite system.voidsetStationIdentifier(String stationIdentifier)Setter for the station identifier.voidsetStationName(String stationName)Setter for the station name.voidsetTimeScale(TimeScale timeScale)Setter for the data time scale.voidsetTimeSystem(TimeSystem timeSystem)Setter for the file time system.static RinexClocksplice(Collection<RinexClock> clocks, double maxGap)Splice several Rinex clock files together. 
 - 
 
- 
- 
Method Detail
- 
addSatellite
public void addSatellite(String satId)
Add a new satellite with a given identifier to the list of stored satellites.- Parameters:
 satId- the satellite identifier
 
- 
addReceiver
public void addReceiver(RinexClock.Receiver receiver)
Add a new receiver to the list of stored receivers.- Parameters:
 receiver- the receiver
 
- 
getNumberOfClockDataTypes
public int getNumberOfClockDataTypes()
Get the number of different clock data types in the file.- Returns:
 - the number of different clock data types
 
 
- 
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
 
 
- 
numberOfObsTypes
public int numberOfObsTypes(SatelliteSystem system)
Get the number of observation types for a given system.- Parameters:
 system- the satellite system to consider- Returns:
 - the number of observation types for a given system
 
 
- 
getNumberOfReceivers
public int getNumberOfReceivers()
Get the number of receivers that are considered in the file.- Returns:
 - the number of receivers that are considered in the file
 
 
- 
getNumberOfSatellites
public int getNumberOfSatellites()
Get the number of satellites that are considered in the file.- Returns:
 - the number of satellites that are considered in the file
 
 
- 
getFormatVersion
public double getFormatVersion()
Getter for the format version.- Returns:
 - the format version
 
 
- 
setFormatVersion
public void setFormatVersion(double formatVersion)
Setter for the format version.- Parameters:
 formatVersion- the format version to set
 
- 
getSatelliteSystem
public SatelliteSystem getSatelliteSystem()
Getter for the satellite system.- Returns:
 - the satellite system
 
 
- 
setSatelliteSystem
public void setSatelliteSystem(SatelliteSystem satelliteSystem)
Setter for the satellite system.- Parameters:
 satelliteSystem- the satellite system to set
 
- 
getProgramName
public String getProgramName()
Getter for the program name.- Returns:
 - the program name
 
 
- 
setProgramName
public void setProgramName(String programName)
Setter for the program name.- Parameters:
 programName- the program name to set
 
- 
getAgencyName
public String getAgencyName()
Getter for the agency name.- Returns:
 - the agencyName
 
 
- 
setAgencyName
public void setAgencyName(String agencyName)
Setter for the agency name.- Parameters:
 agencyName- the agency name to set
 
- 
getCreationDateString
public String getCreationDateString()
Getter for the creation date of the file as a string.- Returns:
 - the creation date as a string
 
 
- 
setCreationDateString
public void setCreationDateString(String creationDateString)
Setter for the creation date as a string.- Parameters:
 creationDateString- the creation date as a string to set
 
- 
getCreationTimeString
public String getCreationTimeString()
Getter for the creation time of the file as a string.- Returns:
 - the creation time as a string
 
 
- 
setCreationTimeString
public void setCreationTimeString(String creationTimeString)
Setter for the creation time as a string.- Parameters:
 creationTimeString- the creation time as a string to set
 
- 
getCreationTimeZoneString
public String getCreationTimeZoneString()
Getter for the creation time zone of the file as a string.- Returns:
 - the creation time zone as a string
 
 
- 
setCreationTimeZoneString
public void setCreationTimeZoneString(String creationTimeZoneString)
Setter for the creation time zone.- Parameters:
 creationTimeZoneString- the creation time zone as a string to set
 
- 
getCreationDate
public AbsoluteDate getCreationDate()
Getter for the creation date.- Returns:
 - the creation date
 
 
- 
setCreationDate
public void setCreationDate(AbsoluteDate creationDate)
Setter for the creation date.- Parameters:
 creationDate- the creation date to set
 
- 
getComments
public String getComments()
Getter for the comments.- Returns:
 - the comments
 
 
- 
addComment
public void addComment(String comment)
Add a comment line.- Parameters:
 comment- the comment line to add
 
- 
getSystemObservationTypes
public Map<SatelliteSystem,List<ObservationType>> getSystemObservationTypes()
Getter for the different observation type for each satellite system.- Returns:
 - the map of the different observation type per satellite system
 
 
- 
addSystemObservationType
public void addSystemObservationType(SatelliteSystem satSystem, ObservationType observationType)
Add an observation type for a specified satellite system.- Parameters:
 satSystem- the satellite system to add observation typeobservationType- the system observation type to set
 
- 
getTimeSystem
public TimeSystem getTimeSystem()
Getter for the file time system.- Returns:
 - the file time system
 
 
- 
setTimeSystem
public void setTimeSystem(TimeSystem timeSystem)
Setter for the file time system.- Parameters:
 timeSystem- the file time system to set
 
- 
getTimeScale
public TimeScale getTimeScale()
Getter for the data time scale.- Returns:
 - the data time scale
 
 
- 
setTimeScale
public void setTimeScale(TimeScale timeScale)
Setter for the data time scale.- Parameters:
 timeScale- the data time scale to set
 
- 
getNumberOfLeapSeconds
public int getNumberOfLeapSeconds()
Getter for the number of leap seconds.- Returns:
 - the number of leap seconds
 
 
- 
setNumberOfLeapSeconds
public void setNumberOfLeapSeconds(int numberOfLeapSeconds)
Setter for the number of leap seconds.- Parameters:
 numberOfLeapSeconds- the number of leap seconds to set
 
- 
getNumberOfLeapSecondsGNSS
public int getNumberOfLeapSecondsGNSS()
Getter for the number of leap second for GNSS time scales.- Returns:
 - the number of leap seconds for GNSS time scales
 
 
- 
setNumberOfLeapSecondsGNSS
public void setNumberOfLeapSecondsGNSS(int numberOfLeapSecondsGNSS)
Setter for the number of leap seconds for GNSS time scales.- Parameters:
 numberOfLeapSecondsGNSS- the number of leap seconds for GNSS time scales to set
 
- 
getListAppliedDCBS
public List<AppliedDCBS> getListAppliedDCBS()
Getter for the applied differential code bias corrections.- Returns:
 - the list of applied differential code bias corrections
 
 
- 
addAppliedDCBS
public void addAppliedDCBS(AppliedDCBS appliedDCBS)
Add an applied differencial code bias corrections.- Parameters:
 appliedDCBS- the applied differencial code bias corrections to add
 
- 
getListAppliedPCVS
public List<AppliedPCVS> getListAppliedPCVS()
Getter for the applied phase center variations.- Returns:
 - the list of the applied phase center variations
 
 
- 
addAppliedPCVS
public void addAppliedPCVS(AppliedPCVS appliedPCVS)
Add an applied phase center variations.- Parameters:
 appliedPCVS- the phase center variations to add
 
- 
getClockDataTypes
public List<RinexClock.ClockDataType> getClockDataTypes()
Getter for the different clock data types.- Returns:
 - the list of the different clock data types
 
 
- 
addClockDataType
public void addClockDataType(RinexClock.ClockDataType clockDataType)
Add a clock data types.- Parameters:
 clockDataType- the clock data types to add
 
- 
getStationName
public String getStationName()
Getter for the station name.- Returns:
 - the station name
 
 
- 
setStationName
public void setStationName(String stationName)
Setter for the station name.- Parameters:
 stationName- the station name to set
 
- 
getStationIdentifier
public String getStationIdentifier()
Getter for the station identifier.- Returns:
 - the station identifier
 
 
- 
setStationIdentifier
public void setStationIdentifier(String stationIdentifier)
Setter for the station identifier.- Parameters:
 stationIdentifier- the station identifier to set
 
- 
getExternalClockReference
public String getExternalClockReference()
Getter for the external clock reference.- Returns:
 - the external clock reference
 
 
- 
setExternalClockReference
public void setExternalClockReference(String externalClockReference)
Setter for the external clock reference.- Parameters:
 externalClockReference- the external clock reference to set
 
- 
getAnalysisCenterID
public String getAnalysisCenterID()
Getter for the analysis center ID.- Returns:
 - the analysis center ID
 
 
- 
setAnalysisCenterID
public void setAnalysisCenterID(String analysisCenterID)
Setter for the analysis center ID.- Parameters:
 analysisCenterID- the analysis center ID to set
 
- 
getAnalysisCenterName
public String getAnalysisCenterName()
Getter for the analysis center name.- Returns:
 - the analysis center name
 
 
- 
setAnalysisCenterName
public void setAnalysisCenterName(String analysisCenterName)
Setter for the analysis center name.- Parameters:
 analysisCenterName- the analysis center name to set
 
- 
getReferenceClocks
public TimeSpanMap<List<RinexClock.ReferenceClock>> getReferenceClocks()
Getter for the reference clocks.- Returns:
 - the time span map of the different refence clocks
 
 
- 
addReferenceClockList
public void addReferenceClockList(List<RinexClock.ReferenceClock> referenceClockList, AbsoluteDate startDate)
Add a list of reference clocks which will be used after a specified date. If the reference map has not been already created, it will be.- Parameters:
 referenceClockList- the reference clock liststartDate- the date the list will be valid after.
 
- 
getFrameName
public String getFrameName()
Getter for the frame name.- Returns:
 - the frame name
 
 
- 
setFrameName
public void setFrameName(String frameName)
Setter for the frame name.- Parameters:
 frameName- the frame name to set
 
- 
getReceivers
public List<RinexClock.Receiver> getReceivers()
Getter for the receivers.- Returns:
 - the list of the receivers
 
 
- 
getSatellites
public List<String> getSatellites()
Getter for the satellites.- Returns:
 - the list of the satellites
 
 
- 
getFrame
public Frame getFrame()
Get the reference frame for the station positions.- Returns:
 - the reference frame for station positions
 
 
- 
extractClockModel
public SampledClockModel extractClockModel(String name, int nbInterpolationPoints)
Extract the clock model.- Parameters:
 name- receiver/satellite namenbInterpolationPoints- number of points to use in interpolation- Returns:
 - extracted clock model
 - Since:
 - 12.1
 
 
- 
getClockData
public Map<String,List<RinexClock.ClockDataLine>> getClockData()
Getter for an unmodifiable map of clock data.- Returns:
 - the clock data
 
 
- 
addClockData
public void addClockData(String id, RinexClock.ClockDataLine clockDataLine)
Add a clock data line to a specified receiver/satellite.- Parameters:
 id- the satellite system to add observation typeclockDataLine- the clock data line to add
 
- 
getEarliestEpoch
public AbsoluteDate getEarliestEpoch()
Get earliest epoch from theclock data.- Returns:
 - earliest epoch from the 
clock data, orAbsoluteDate.FUTURE_INFINITYif no data has been added - Since:
 - 12.1
 
 
- 
getLatestEpoch
public AbsoluteDate getLatestEpoch()
Get latest epoch from theclock data.- Returns:
 - latest epoch from the 
clock data, orAbsoluteDate.PAST_INFINITYif 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 mergemaxGap- maximum time gap between files- Returns:
 - merged clock file
 - Since:
 - 12.1
 
 
 - 
 
 -