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 adviced 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 class
RinexClock.ClockDataLine
Clock data for a single station.static class
RinexClock.ClockDataType
Clock data type.static class
RinexClock.Receiver
Represents a receiver or a satellite with its position in the considered frame.static class
RinexClock.ReferenceClock
Represents 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 void
addAppliedDCBS(AppliedDCBS appliedDCBS)
Add an applied differencial code bias corrections.void
addAppliedPCVS(AppliedPCVS appliedPCVS)
Add an applied phase center variations.void
addClockData(String id, RinexClock.ClockDataLine clockDataLine)
Add a clock data line to a specified receiver/satellite.void
addClockDataType(RinexClock.ClockDataType clockDataType)
Add a clock data types.void
addComment(String comment)
Add a comment line.void
addReceiver(RinexClock.Receiver receiver)
Add a new receiver to the list of stored receivers.void
addReferenceClockList(List<RinexClock.ReferenceClock> referenceClockList, AbsoluteDate startDate)
Add a list of reference clocks which will be used after a specified date.void
addSatellite(String satId)
Add a new satellite with a given identifier to the list of stored satellites.void
addSystemObservationType(SatelliteSystem satSystem, ObservationType observationType)
Add an observation type for a specified satellite system.SampledClockModel
extractClockModel(String name, int nbInterpolationPoints)
Extract the clock model.String
getAgencyName()
Getter for the agency name.String
getAnalysisCenterID()
Getter for the analysis center ID.String
getAnalysisCenterName()
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.String
getComments()
Getter for the comments.AbsoluteDate
getCreationDate()
Getter for the creation date.String
getCreationDateString()
Getter for the creation date of the file as a string.String
getCreationTimeString()
Getter for the creation time of the file as a string.String
getCreationTimeZoneString()
Getter for the creation time zone of the file as a string.AbsoluteDate
getEarliestEpoch()
Get earliest epoch from theclock data
.String
getExternalClockReference()
Getter for the external clock reference.double
getFormatVersion()
Getter for the format version.Frame
getFrame()
Get the reference frame for the station positions.String
getFrameName()
Getter for the frame name.AbsoluteDate
getLatestEpoch()
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.int
getNumberOfClockDataTypes()
Get the number of different clock data types in the file.int
getNumberOfLeapSeconds()
Getter for the number of leap seconds.int
getNumberOfLeapSecondsGNSS()
Getter for the number of leap second for GNSS time scales.int
getNumberOfReceivers()
Get the number of receivers that are considered in the file.int
getNumberOfSatellites()
Get the number of satellites that are considered in the file.String
getProgramName()
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.SatelliteSystem
getSatelliteSystem()
Getter for the satellite system.String
getStationIdentifier()
Getter for the station identifier.String
getStationName()
Getter for the station name.Map<SatelliteSystem,List<ObservationType>>
getSystemObservationTypes()
Getter for the different observation type for each satellite system.TimeScale
getTimeScale()
Getter for the data time scale.TimeSystem
getTimeSystem()
Getter for the file time system.int
getTotalNumberOfDataLines()
Get the total number of complete data lines in the file.int
numberOfObsTypes(SatelliteSystem system)
Get the number of observation types for a given system.void
setAgencyName(String agencyName)
Setter for the agency name.void
setAnalysisCenterID(String analysisCenterID)
Setter for the analysis center ID.void
setAnalysisCenterName(String analysisCenterName)
Setter for the analysis center name.void
setCreationDate(AbsoluteDate creationDate)
Setter for the creation date.void
setCreationDateString(String creationDateString)
Setter for the creation date as a string.void
setCreationTimeString(String creationTimeString)
Setter for the creation time as a string.void
setCreationTimeZoneString(String creationTimeZoneString)
Setter for the creation time zone.void
setExternalClockReference(String externalClockReference)
Setter for the external clock reference.void
setFormatVersion(double formatVersion)
Setter for the format version.void
setFrameName(String frameName)
Setter for the frame name.void
setNumberOfLeapSeconds(int numberOfLeapSeconds)
Setter for the number of leap seconds.void
setNumberOfLeapSecondsGNSS(int numberOfLeapSecondsGNSS)
Setter for the number of leap seconds for GNSS time scales.void
setProgramName(String programName)
Setter for the program name.void
setSatelliteSystem(SatelliteSystem satelliteSystem)
Setter for the satellite system.void
setStationIdentifier(String stationIdentifier)
Setter for the station identifier.void
setStationName(String stationName)
Setter for the station name.void
setTimeScale(TimeScale timeScale)
Setter for the data time scale.void
setTimeSystem(TimeSystem timeSystem)
Setter for the file time system.static RinexClock
splice(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_INFINITY
if 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_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 file 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
-
-