Package org.orekit.files.rinex.section
Class RinexBaseHeader
- java.lang.Object
-
- org.orekit.files.rinex.section.RinexBaseHeader
-
- Direct Known Subclasses:
RinexClockObsBaseHeader,RinexNavigationHeader
public abstract class RinexBaseHeader extends Object
Base container for Rinex headers.- Since:
- 12.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRinexBaseHeader(RinexFileType fileType)Simple constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckType(String line, int typeIndex, String name)Check file type.abstract voidcheckType(String line, String name)Check file type.AbsoluteDategetCreationDate()Getter for the creation date.DateTimeComponentsgetCreationDateComponents()Getter for the creation date of the file as a string.StringgetCreationTimeZone()Getter for the creation time zone of the file as a string.StringgetDoi()Getter for the Digital Object Information.RinexFileTypegetFileType()Get the file type.doublegetFormatVersion()Getter for the format version.abstract intgetLabelIndex()Get the index of the header label.intgetLeapSecondsDayNum()Get the respective leap second day number.intgetLeapSecondsFuture()Get the future or past leap seconds.intgetLeapSecondsGNSS()Getter for the number of leap second for GNSS time scales.intgetLeapSecondsWeekNum()Get the respective leap second week number.StringgetLicense()Getter for the license of use.StringgetProgramName()Getter for the program name.StringgetReceiverNumber()Get the number of the receiver.StringgetReceiverType()Get the type of the receiver.StringgetReceiverVersion()Get the version of the receiver.StringgetRunByName()Getter for the run/by name.SatelliteSystemgetSatelliteSystem()Getter for the satellite system.StringgetStationInformation()Getter for the station information.abstract booleanmatchFound(Label label, String line)Check if a label is found in a line.protected voidparseProgramRunByDate(String prgm, String run, String date, TimeScales timeScales)Parse program, run/by and date.abstract voidparseProgramRunByDate(String line, TimeScales timeScales)Parse program, run/by and date.abstract SatelliteSystemparseSatelliteSystem(String line, SatelliteSystem defaultSatelliteSystem)Parse satellite system.voidparseVersionFileTypeSatelliteSystem(String line, SatelliteSystem defaultSatelliteSystem, String name, double... supportedVersions)Parse version, file type and satellite system.voidsetCreationDate(AbsoluteDate creationDate)Setter for the creation date.voidsetCreationDateComponents(DateTimeComponents creationDateComponents)Setter for the creation date as a string.voidsetCreationTimeZone(String creationTimeZone)Setter for the creation time zone.voidsetDoi(String doi)Setter for the Digital Object Information.voidsetFormatVersion(double formatVersion)Setter for the format version.voidsetLeapSecondsDayNum(int leapSecondsDayNum)Set the respective leap second day number.voidsetLeapSecondsFuture(int leapSecondsFuture)Set the future or past leap seconds.voidsetLeapSecondsGNSS(int leapSecondsGNSS)Setter for the number of leap seconds for GNSS time scales.voidsetLeapSecondsWeekNum(int leapSecondsWeekNum)Set the respective leap second week number.voidsetLicense(String license)Setter for the license of use.voidsetProgramName(String programName)Setter for the program name.voidsetReceiverNumber(String receiverNumber)Set the number of the receiver.voidsetReceiverType(String receiverType)Set the type of the receiver.voidsetReceiverVersion(String receiverVersion)Set the version of the receiver.voidsetRunByName(String runByName)Setter for the run/by name.voidsetSatelliteSystem(SatelliteSystem satelliteSystem)Setter for the satellite system.voidsetStationInformation(String stationInformation)Setter for the station information.
-
-
-
Constructor Detail
-
RinexBaseHeader
protected RinexBaseHeader(RinexFileType fileType)
Simple constructor.- Parameters:
fileType- file type
-
-
Method Detail
-
getFileType
public RinexFileType getFileType()
Get the file type.- Returns:
- file type
-
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.Not specified for RINEX 2.X versions (value is null).
- Returns:
- the satellite system
-
setSatelliteSystem
public void setSatelliteSystem(SatelliteSystem satelliteSystem)
Setter for the satellite system.- Parameters:
satelliteSystem- the satellite system to set
-
parseSatelliteSystem
public abstract SatelliteSystem parseSatelliteSystem(String line, SatelliteSystem defaultSatelliteSystem)
Parse satellite system.- Parameters:
line- header linedefaultSatelliteSystem- satellite system to use if string is null or empty- Returns:
- parsed satellite system
- Since:
- 14.0
-
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
-
getRunByName
public String getRunByName()
Getter for the run/by name.- Returns:
- the run/by name
-
setRunByName
public void setRunByName(String runByName)
Setter for the run/by name.- Parameters:
runByName- the run/by name to set
-
getCreationDateComponents
public DateTimeComponents getCreationDateComponents()
Getter for the creation date of the file as a string.- Returns:
- the creation date
-
setCreationDateComponents
public void setCreationDateComponents(DateTimeComponents creationDateComponents)
Setter for the creation date as a string.- Parameters:
creationDateComponents- the creation date to set
-
getCreationTimeZone
public String getCreationTimeZone()
Getter for the creation time zone of the file as a string.- Returns:
- the creation time zone as a string
-
setCreationTimeZone
public void setCreationTimeZone(String creationTimeZone)
Setter for the creation time zone.- Parameters:
creationTimeZone- the creation time zone to set
-
getCreationDate
public AbsoluteDate getCreationDate()
Getter for the creation date.The creation date seems to be mandatory, but we have seen several files missing it, even files created by IGS itself (in clock files, essentially). We accept these null dates to at least allow parsing the files as this header information does not really seem essential
- Returns:
- the creation date
-
setCreationDate
public void setCreationDate(AbsoluteDate creationDate)
Setter for the creation date.- Parameters:
creationDate- the creation date to set
-
setReceiverNumber
public void setReceiverNumber(String receiverNumber)
Set the number of the receiver.- Parameters:
receiverNumber- number of the receiver
-
getReceiverNumber
public String getReceiverNumber()
Get the number of the receiver.- Returns:
- number of the receiver
-
setReceiverType
public void setReceiverType(String receiverType)
Set the type of the receiver.- Parameters:
receiverType- type of the receiver
-
getReceiverType
public String getReceiverType()
Get the type of the receiver.- Returns:
- type of the receiver
-
setReceiverVersion
public void setReceiverVersion(String receiverVersion)
Set the version of the receiver.- Parameters:
receiverVersion- version of the receiver
-
getReceiverVersion
public String getReceiverVersion()
Get the version of the receiver.- Returns:
- version of the receiver
-
getLeapSecondsGNSS
public int getLeapSecondsGNSS()
Getter for the number of leap second for GNSS time scales.- Returns:
- the number of leap seconds for GNSS time scales
- Since:
- 14.0
-
setLeapSecondsGNSS
public void setLeapSecondsGNSS(int leapSecondsGNSS)
Setter for the number of leap seconds for GNSS time scales.- Parameters:
leapSecondsGNSS- the number of leap seconds for GNSS time scales to set- Since:
- 14.0
-
setLeapSecondsFuture
public void setLeapSecondsFuture(int leapSecondsFuture)
Set the future or past leap seconds.- Parameters:
leapSecondsFuture- Future or past leap seconds- Since:
- 14.0
-
getLeapSecondsFuture
public int getLeapSecondsFuture()
Get the future or past leap seconds.- Returns:
- Future or past leap seconds
- Since:
- 14.0
-
setLeapSecondsWeekNum
public void setLeapSecondsWeekNum(int leapSecondsWeekNum)
Set the respective leap second week number.- Parameters:
leapSecondsWeekNum- Respective leap second week number- Since:
- 14.0
-
getLeapSecondsWeekNum
public int getLeapSecondsWeekNum()
Get the respective leap second week number.- Returns:
- Respective leap second week number
- Since:
- 14.0
-
setLeapSecondsDayNum
public void setLeapSecondsDayNum(int leapSecondsDayNum)
Set the respective leap second day number.- Parameters:
leapSecondsDayNum- Respective leap second day number- Since:
- 14.0
-
getLeapSecondsDayNum
public int getLeapSecondsDayNum()
Get the respective leap second day number.- Returns:
- Respective leap second day number
- Since:
- 14.0
-
getDoi
public String getDoi()
Getter for the Digital Object Information.- Returns:
- the Digital Object Information
- Since:
- 12.0
-
setDoi
public void setDoi(String doi)
Setter for the Digital Object Information.- Parameters:
doi- the Digital Object Information to set- Since:
- 12.0
-
getLicense
public String getLicense()
Getter for the license of use.- Returns:
- the license of use
- Since:
- 12.0
-
setLicense
public void setLicense(String license)
Setter for the license of use.- Parameters:
license- the license of use- Since:
- 12.0
-
getStationInformation
public String getStationInformation()
Getter for the station information.- Returns:
- the station information
- Since:
- 12.0
-
setStationInformation
public void setStationInformation(String stationInformation)
Setter for the station information.- Parameters:
stationInformation- the station information to set- Since:
- 12.0
-
parseVersionFileTypeSatelliteSystem
public void parseVersionFileTypeSatelliteSystem(String line, SatelliteSystem defaultSatelliteSystem, String name, double... supportedVersions)
Parse version, file type and satellite system.- Parameters:
line- line to parsedefaultSatelliteSystem- satellite system to use if string is null or emptyname- file name (for error message generation)supportedVersions- supported versions- Since:
- 14.0
-
parseProgramRunByDate
public abstract void parseProgramRunByDate(String line, TimeScales timeScales)
Parse program, run/by and date.- Parameters:
line- line to parsetimeScales- the set of time scales used for parsing dates- Since:
- 14.0
-
parseProgramRunByDate
protected void parseProgramRunByDate(String prgm, String run, String date, TimeScales timeScales)
Parse program, run/by and date.- Parameters:
prgm- PGM fieldrun- RUN BY fielddate- date fieldtimeScales- the set of time scales used for parsing dates- Since:
- 14.0
-
checkType
public abstract void checkType(String line, String name)
Check file type.- Parameters:
line- header linename- file name (for error message)- Since:
- 14.0
-
checkType
protected void checkType(String line, int typeIndex, String name)
Check file type.- Parameters:
line- header linetypeIndex- index of the file type in the linename- file name (for error message)- Since:
- 14.0
-
getLabelIndex
public abstract int getLabelIndex()
Get the index of the header label.- Returns:
- index of the header label
- Since:
- 14.0
-
-