Documentation ¶
Overview ¶
Package rinex provides functions for reading RINEX files.
Index ¶
- Constants
- Variables
- func Crx2rnx(crxFilename string) (string, error)
- func GetCaseSensitiveName(path string) string
- func IsHatanakaCompressed(filename string) bool
- func ParseDoy(year, doy int) time.Time
- func Rnx2Filename(rnx3filepath string) (string, error)
- func Rnx2crx(rnxFilename string) (string, error)
- func Rnx3Filename(rnx2filepath string, countryCode string) (string, error)
- type ClockDecoder
- type ClockHeader
- type ContentType
- type Coord
- type CoordNEU
- type DiffOptions
- type Eph
- type EphBDS
- type EphGAL
- type EphGLO
- type EphGPS
- type EphNavIC
- type EphQZSS
- type EphSBAS
- type Epoch
- type EpochFlag
- type FilePeriod
- type FilerHandler
- type MetDecoder
- type MeteoEpoch
- type MeteoFile
- type MeteoHeader
- type MeteoObsType
- type MeteoSensor
- type MeteoStats
- type NavDecoder
- type NavFile
- type NavHeader
- type NavRecordType
- type NavStats
- type Obs
- type ObsCode
- type ObsDecoder
- type ObsFile
- type ObsHeader
- type ObsStats
- type Options
- type RinexError
- type RnxFil
- func (f *RnxFil) IsDaily() bool
- func (f *RnxFil) IsHourly() bool
- func (f *RnxFil) IsMeteoType() bool
- func (f *RnxFil) IsNavType() bool
- func (f *RnxFil) IsObsType() bool
- func (f *RnxFil) ParseFilename() error
- func (f *RnxFil) Rnx2Filename() (string, error)
- func (f *RnxFil) SetStationName(name string) error
- func (f *RnxFil) StationName() string
- type SatObs
- type SyncEpochs
Examples ¶
Constants ¶
const ( // TimeOfClockFormat is the time format within RINEX-3 Nav records. TimeOfClockFormat string = "2006 1 2 15 4 5" // TimeOfClockFormatv2 is the time format within RINEX-2 Nav records. TimeOfClockFormatv2 string = "06 1 2 15 4 5.0" )
Variables ¶
var ( // ErrNoHeader is returned when reading RINEX data that does not begin with a RINEX Header. ErrNoHeader = errors.New("rinex: no header") // ErrParser is returned on any RINEX parsing error. ErrParser = errors.New("rinex: parse error") )
General RINEX errors.
var ( // Rnx2FileNamePattern is the regex for RINEX2 filenames. Rnx2FileNamePattern = regexp.MustCompile(`(?i)(([a-z0-9]{4})(\d{3})([a-x0])(\d{2})?\.(\d{2})([domnglqfphs]))\.?([a-zA-Z0-9]+)?`) // Rnx3FileNamePattern is the regex for RINEX3 filenames. Rnx3FileNamePattern = regexp.MustCompile(`(?i)((([A-Z0-9]{4})(\d)(\d)([A-Z]{3})_([RSU])_((\d{4})(\d{3})(\d{2})(\d{2}))_(\d{2}[A-Z])_?(\d{2}[CZSMHDU])?_([GREJCISM][MNO]))\.(rnx|crx))\.?([a-zA-Z0-9]+)?`) )
Functions ¶
func Crx2rnx ¶
Crx2rnx decompresses a Hatanaka-compressed RINEX obs file and returns the decompressed filename. The crxFilename must be a valid RINEX filename, RINEX v2 lowercase and RINEX v3 uppercase. see http://terras.gsi.go.jp/ja/crx2rnx.html
func GetCaseSensitiveName ¶
Returns the RINEX filename with the correct case sensitivity. RINEX-3 long filenames must be uppercase except format, whereas RINEX-2 short names have to be lowercase.
func IsHatanakaCompressed ¶
Returns true if the file giveb by filename is Hatanaka compressed. This is checked by the filenames' extension.
func ParseDoy ¶
ParseDoy returns the UTC-Time corresponding to the given year and day of year. Added in Go 1.13 !!!
func Rnx2Filename ¶
Rnx2Filename returns the filename following the RINEX2 convention.
func Rnx2crx ¶
Rnx2crx Hatanaka compresses a RINEX obs file (compact RINEX) and returns the compressed filename. The rnxFilename must be a valid RINEX filename. see http://terras.gsi.go.jp/ja/crx2rnx.html
func Rnx3Filename ¶
Rnx3Filename returns the RTCM RINEX-3 compliant filename for the given RINEX-2 file. The countryCode must be the 3 char ISO ?? code. Datasource as option!?
Example ¶
Convert a RINEX 2 filename to a RINEX 3 one.
rnx2name, err := Rnx3Filename("testdata/white/brst155h.20o", "FRA") if err != nil { log.Fatalln(err) } fmt.Println(rnx2name)
Output: BRST00FRA_R_20201550700_01H_30S_MO.rnx
Types ¶
type ClockDecoder ¶
type ClockDecoder struct { // The Header is valid after NewClockDecoder or Reader.Reset. The header must exist, // otherwise ErrNoHeader will be returned. Header *ClockHeader // contains filtered or unexported fields }
ClockDecoder reads and decodes from a RINEX Clock input stream.
func NewClockDecoder ¶
func NewClockDecoder(r io.Reader) (*ClockDecoder, error)
NewClockDecoder returns a new RINEX clock decoder that reads from r. The RINEX header will be read implicitly. The header must exist.
It is the caller's responsibility to call Close on the underlying reader when done!
func (*ClockDecoder) Err ¶
func (dec *ClockDecoder) Err() error
Err returns the first non-EOF error that was encountered by the decoder.
type ClockHeader ¶
type ClockHeader struct { RINEXVersion float32 // RINEX Format version RINEXType string // RINEX File type SatSystem gnss.System // Satellite System. System is "Mixed" if more than one. Pgm string // name of program creating this file RunBy string // name of agency creating this file Date time.Time // Date and time of file creation TimeSystemID string // Time system used for time tags, 3 char (GPS, GAL, UTC, TAI,...) AC string // Analysis Center as 3-character IGS AC designator NumSolnSats int // Number of different satellites in the clock data records. StaCoordinates []string // List of stations/receivers with coordinates. Sats []gnss.PRN // List of all satellites reported in this file (PRN LIST). Comments []string // comments Labels []string // all Header Labels found }
A ClockHeader stores the RINEX Clock Header information. That header is exposed as the fields of the Decoder and Encoder structs. TODO Parse all fields.
type ContentType ¶
type ContentType int
The ContentType defines the content of a RINEX file.
const ( ContentTypeObs ContentType = iota + 1 // Observation content. ContentTypeMet // Meteo content. )
func (ContentType) String ¶
func (c ContentType) String() string
type CoordNEU ¶
type CoordNEU struct {
N, E, Up float64
}
CoordNEU defines a North-, East-, Up-coordinate or eccentrity
type DiffOptions ¶
type DiffOptions struct { SatSys string // satellite systems GRE... CheckHeader bool // also compare the RINEX header }
DiffOptions sets options for file comparison.
type Eph ¶
type Eph interface { // Validate checks the ephemeris. Validate() error // Returns the ephemermis' PRN. GetPRN() gnss.PRN // Returns the ephemermis' time of clock (toc). GetTime() time.Time }
Eph is the interface that wraps some methods for all types of ephemeris.
type EphBDS ¶
type EphBDS struct { PRN gnss.PRN MessageType string // Navigation Message Type. // Clock TOC time.Time // Time of Clock, clock reference epoch ClockBias float64 // sc clock bias in seconds ClockDrift float64 // sec/sec ClockDriftRate float64 // sec/sec2 IODE float64 // Issue of Data, Ephemeris Crs float64 // meters DeltaN float64 // radians/sec M0 float64 // radians Cuc float64 // radians Ecc float64 // Eccentricity Cus float64 // radians SqrtA float64 // sqrt(m) Toe float64 // time of ephemeris (sec of GPS week) Cic float64 // radians Omega0 float64 // radians Cis float64 // radians I0 float64 // radians Crc float64 // meters Omega float64 // radians OmegaDot float64 // radians/sec IDOT float64 // radians/sec L2Codes float64 ToeWeek float64 // GPS week (to go with TOE) Continuous L2PFlag float64 URA float64 // SV accuracy in meters Health float64 // SV health (bits 17-22 w 3 sf 1) TGD float64 // seconds IODC float64 // Issue of Data, clock Tom float64 // transmission time of message, seconds of GPS week FitInterval float64 // Fit interval in hours }
EphBDS describes a chinese BDS ephemeris.
type EphGAL ¶
type EphGAL struct { PRN gnss.PRN MessageType string // Navigation Message Type. // Clock TOC time.Time // Time of Clock, clock reference epoch ClockBias float64 // sc clock bias in seconds ClockDrift float64 // sec/sec ClockDriftRate float64 // sec/sec2 IODE float64 // Issue of Data, Ephemeris Crs float64 // meters DeltaN float64 // radians/sec M0 float64 // radians Cuc float64 // radians Ecc float64 // Eccentricity Cus float64 // radians SqrtA float64 // sqrt(m) Toe float64 // time of ephemeris (sec of GPS week) Cic float64 // radians Omega0 float64 // radians Cis float64 // radians I0 float64 // radians Crc float64 // meters Omega float64 // radians OmegaDot float64 // radians/sec IDOT float64 // radians/sec L2Codes float64 ToeWeek float64 // GPS week (to go with TOE) Continuous L2PFlag float64 URA float64 // SV accuracy in meters Health float64 // SV health (bits 17-22 w 3 sf 1) TGD float64 // seconds IODC float64 // Issue of Data, clock Tom float64 // transmission time of message, seconds of GPS week }
EphGAL describes a Galileo ephemeris.
type EphGPS ¶
type EphGPS struct { PRN gnss.PRN MessageType string // Navigation Message Type, LNAV etc., see RINEX 4 spec. // Clock TOC time.Time // Time of Clock, clock reference epoch ClockBias float64 // sc clock bias in seconds ClockDrift float64 // sec/sec ClockDriftRate float64 // sec/sec2 IODE float64 // Issue of Data, Ephemeris Crs float64 // meters DeltaN float64 // radians/sec M0 float64 // radians Cuc float64 // radians Ecc float64 // Eccentricity Cus float64 // radians SqrtA float64 // sqrt(m) Toe float64 // time of ephemeris (sec of GPS week) Cic float64 // radians Omega0 float64 // radians Cis float64 // radians I0 float64 // radians Crc float64 // meters Omega float64 // radians OmegaDot float64 // radians/sec IDOT float64 // radians/sec L2Codes float64 ToeWeek float64 // GPS week (to go with TOE) Continuous L2PFlag float64 URA float64 // SV accuracy in meters Health float64 // SV health (bits 17-22 w 3 sf 1) TGD float64 // seconds IODC float64 // Issue of Data, clock Tom float64 // transmission time of message, seconds of GPS week FitInterval float64 // Fit interval in hours }
EphGPS describes a GPS ephemeris.
type EphQZSS ¶
type EphQZSS struct { PRN gnss.PRN MessageType string // Navigation Message Type. // Clock TOC time.Time // Time of Clock, clock reference epoch ClockBias float64 // sc clock bias in seconds ClockDrift float64 // sec/sec ClockDriftRate float64 // sec/sec2 IODE float64 // Issue of Data, Ephemeris Crs float64 // meters DeltaN float64 // radians/sec M0 float64 // radians Cuc float64 // radians Ecc float64 // Eccentricity Cus float64 // radians SqrtA float64 // sqrt(m) Toe float64 // time of ephemeris (sec of GPS week) Cic float64 // radians Omega0 float64 // radians Cis float64 // radians I0 float64 // radians Crc float64 // meters Omega float64 // radians OmegaDot float64 // radians/sec IDOT float64 // radians/sec L2Codes float64 ToeWeek float64 // GPS week (to go with TOE) Continuous L2PFlag float64 URA float64 // SV accuracy in meters Health float64 // SV health (bits 17-22 w 3 sf 1) TGD float64 // seconds IODC float64 // Issue of Data, clock Tom float64 // transmission time of message, seconds of GPS week FitInterval float64 // Fit interval in hours }
EphQZSS describes a QZSS ephemeris.
type EphSBAS ¶
type EphSBAS struct { PRN gnss.PRN MessageType string // EPH Navigation Message Type. TOC time.Time }
EphSBAS describes a SBAS payload.
type Epoch ¶
type Epoch struct { Time time.Time // The epoch time. Flag EpochFlag // The epoch flag 0:OK, 1:power failure between previous and current epoch, >1 : Special event. NumSat uint8 // The number of satellites per epoch. ObsList []SatObs // The list of observations per epoch. }
Epoch contains a RINEX obs data epoch.
type EpochFlag ¶
type EpochFlag uint8
EpochFlag for indicating special occurrences during the tracking in RINEX observation files.
const ( EpochFlagOK EpochFlag = iota // 0: OK EpochFlagPowerFailure // 1: power failure between previous and current epoch EpochFlagMovingAntenna // 2: start moving antenna EpochFlagNewSite // 3: new site occupation (end of kinematic data) (at least MARKER NAME record follows) EpochFlagHeaderInfo // 4: header information follows EpochFlagExternalEvent // 5: external event (epoch is significant, same time frame as observation time tags) EpochFlagCycleSlip // 6: cycle slip records follow to optionally report detected and repaired cycle slips )
type FilePeriod ¶
type FilePeriod string
The FilePeriod specifies the intended (nominal) collection period of a file.
const ( FilePeriodUnspecified FilePeriod = "00U" FilePeriod15Min FilePeriod = "15M" // 15 minutes, usually for high-rate 1Hz files. FilePeriodHourly FilePeriod = "01H" FilePeriodDaily FilePeriod = "01D" FilePeriodYearly FilePeriod = "01Y" )
func (FilePeriod) Duration ¶
func (p FilePeriod) Duration() time.Duration
Duration returns the duration of the file period.
type FilerHandler ¶
type FilerHandler interface { // Rnx3Filename returns the filename following the RINEX3 convention. Rnx3Filename() (string, error) }
FilerHandler is the interface for RINEX files..
func NewFile ¶
func NewFile(filepath string) (FilerHandler, error)
NewFile returns a new RINEX file object.
type MetDecoder ¶
type MetDecoder struct { // The Header is valid after NewMetDecoder or Reader.Reset. The header must exist, // otherwise ErrNoHeader will be returned. Header MeteoHeader // contains filtered or unexported fields }
MetDecoder reads and decodes header and data records from a RINEX Meteo input stream.
func NewMetDecoder ¶
func NewMetDecoder(r io.Reader) (*MetDecoder, error)
NewMetDecoder creates a new decoder for RINEX Meteo data. The RINEX header will be read implicitly. The header must exist.
It is the caller's responsibility to call Close on the underlying reader when done!
func (*MetDecoder) Epoch ¶
func (dec *MetDecoder) Epoch() *MeteoEpoch
Epoch returns the most recent epoch generated by a call to NextEpoch.
func (*MetDecoder) Err ¶
func (dec *MetDecoder) Err() error
Err returns the first non-EOF error that was encountered by the decoder.
func (*MetDecoder) NextEpoch ¶
func (dec *MetDecoder) NextEpoch() bool
NextEpoch reads the observations for the next epoch. It returns false when the scan stops, either by reaching the end of the input or an error.
type MeteoEpoch ¶
type MeteoEpoch struct { Time time.Time // The epoch time. Obs []float64 // The observations in the same sequence as given in the header. }
MeteoEpoch contains a RINEX meteo epoch.
type MeteoFile ¶
type MeteoFile struct { *RnxFil Header *MeteoHeader Stats *MeteoStats // Some Obersavation statistics. }
MeteoFile contains fields and methods for RINEX Meteo files.
func NewMeteoFile ¶
NewMeteoFile returns a new RINEX Meteo file. The file must exist and the name will be parsed.
func (*MeteoFile) ComputeObsStats ¶
func (f *MeteoFile) ComputeObsStats() (stats MeteoStats, err error)
ComputeObsStats reads the file and computes some statistics on the observations.
func (*MeteoFile) ReadHeader ¶
func (f *MeteoFile) ReadHeader() (MeteoHeader, error)
Parse and return the Header lines.
func (*MeteoFile) Rnx3Filename ¶
Rnx3Filename returns the filename following the RINEX3 convention.
type MeteoHeader ¶
type MeteoHeader struct { RINEXVersion float32 // RINEX Format version RINEXType string // RINEX File type. O for Obs Pgm string // name of program creating this file RunBy string // name of agency creating this file Date time.Time // Date and time of file creation. MarkerName, MarkerNumber string // antennas' marker name, *number and type DOI string // Digital Object Identifier (DOI) for data citation i.e. https://doi.org/<DOI-number>. Licenses []string // Line(s) with the data license of use. Name of the license plus link to the specific version of the license. Using standard data license as from https://creativecommons.org/licenses/ StationInfos []string // Line(s) with the link(s) to persistent URL with the station metadata (site log, GeodesyML, etc). ObsTypes []MeteoObsType // The different observation types stored in the file. Sensors []*MeteoSensor // Description of the meteo sensors. Comments []string Labels []string // all Header Labels found. }
A MeteoHeader provides the RINEX Meteo Header information.
type MeteoObsType ¶
type MeteoObsType string
MeteoObsType is a meteorological observation type abbreviation PR, TD, etc.
type MeteoSensor ¶
type MeteoSensor struct { Model string // Model (manufacturer). Type string // The type. Accuracy float64 // Accuracy with same units as obs values. ObservationType MeteoObsType // The observation type. Position Coord // Approx. position of the sensor - Geocentric coordinates X, Y, Z (ITRF or WGS84). Height float64 // Ellipsoidal height. }
MeteoSensor describes a meteorological seonsor.
type MeteoStats ¶
type MeteoStats struct { NumEpochs int `json:"numEpochs"` // The number of epochs in the file. Sampling time.Duration `json:"sampling"` // The saampling interval derived from the data. TimeOfFirstObs time.Time `json:"timeOfFirstObs"` // Time of the first observation. TimeOfLastObs time.Time `json:"timeOfLastObs"` // Time of the last observation. }
MeteoStats holds some statistics about a RINEX meteo file, derived from the data.
type NavDecoder ¶
type NavDecoder struct { // e.g. if you want to read from a stream. Then ErrNoHeader will be returned. Header NavHeader // contains filtered or unexported fields }
A NavDecoder reads and decodes header and data records from a RINEX Nav input stream.
func NewNavDecoder ¶
func NewNavDecoder(r io.Reader) (*NavDecoder, error)
NewNavDecoder creates a new decoder for RINEX Navigation data. The RINEX header will be read implicitly if it exists. The header must not exist, that is usful e.g. for reading from streams.
It is the caller's responsibility to call Close on the underlying reader when done!
func (*NavDecoder) Ephemeris ¶
func (dec *NavDecoder) Ephemeris() Eph
Ephemeris returns the most recent ephemeris generated by a call to NextEphemeris.
func (*NavDecoder) Err ¶
func (dec *NavDecoder) Err() error
Err returns the first non-EOF error that was encountered by the decoder.
func (*NavDecoder) NextEphemeris ¶
func (dec *NavDecoder) NextEphemeris() bool
NextEphemeris reads the next Ephemeris into the buffer. It returns false when the scan stops, either by reaching the end of the input or an error.
TODO: read all values
type NavFile ¶
type NavFile struct {}
A NavFile contains fields and methods for RINEX navigation files and includes common methods for handling RINEX Nav files. It is useful e.g. for operations on the RINEX filename. If you do not need these file-related features, use the NavDecoder instead.
func NewNavFile ¶
NewNavFile returns a new Navigation File object. The file must exist and the name will be parsed.
func (*NavFile) ReadHeader ¶
Parse and return the Header lines.
func (*NavFile) Rnx3Filename ¶
Rnx3Filename returns the filename following the RINEX3 convention. TODO !!!
type NavHeader ¶
type NavHeader struct {}
A NavHeader containes the RINEX Navigation Header information. All header parameters are optional and may comprise different types of ionospheric model parameters and time conversion parameters.
type NavRecordType ¶
type NavRecordType string
The NavRecordType specifies the Navigation Data Record Type introduced in RINEX Vers 4.
const ()
The Navigation Data Record Types.
type NavStats ¶
type NavStats struct {}
NavStats holds some statistics about a RINEX nav file, derived from the data.
type Obs ¶
type Obs struct { Val float64 // The observation itself. LLI int8 // LLI is the loss of lock indicator. SNR int8 // SNR is the signal-to-noise ratio. }
Obs specifies a RINEX observation.
type ObsCode ¶
type ObsCode string
ObsCode is the RINEX observation code that specifies frequency, signal and tracking mode like "L1C".
type ObsDecoder ¶
type ObsDecoder struct { // The Header is valid after NewObsDecoder or Reader.Reset. The header must exist, // otherwise ErrNoHeader will be returned. Header ObsHeader // contains filtered or unexported fields }
ObsDecoder reads and decodes header and data records from a RINEX Obs input stream.
Example (Loop) ¶
Loop over the epochs of a observation data input stream.
filepath := "testdata/white/REYK00ISL_R_20192701000_01H_30S_MO.rnx" r, err := os.Open(filepath) if err != nil { log.Fatalf("%v", err) } defer r.Close() dec, err := NewObsDecoder(r) if err != nil { log.Fatalf("%v", err) } nEpochs := 0 for dec.NextEpoch() { nEpochs++ _ = dec.Epoch() // Do something with epoch } if err := dec.Err(); err != nil { log.Printf("reading epochs: %v", err) } fmt.Printf("%d epochs found.", nEpochs)
Output: 120 epochs found.
func NewObsDecoder ¶
func NewObsDecoder(r io.Reader) (*ObsDecoder, error)
NewObsDecoder creates a new decoder for RINEX Observation data. The RINEX header will be read implicitly. The header must exist.
It is the caller's responsibility to call Close on the underlying reader when done!
func (*ObsDecoder) Epoch ¶
func (dec *ObsDecoder) Epoch() *Epoch
Epoch returns the most recent epoch generated by a call to NextEpoch.
func (*ObsDecoder) Err ¶
func (dec *ObsDecoder) Err() error
Err returns the first non-EOF error that was encountered by the decoder.
func (*ObsDecoder) NextEpoch ¶
func (dec *ObsDecoder) NextEpoch() bool
NextEpoch reads the observations for the next epoch. It returns false when the scan stops, either by reaching the end of the input or an error. TODO: add phase shifts
func (*ObsDecoder) SyncEpoch ¶
func (dec *ObsDecoder) SyncEpoch() SyncEpochs
SyncEpoch returns the current pair of time-synchronized epochs from two RINEX Obs input streams.
type ObsFile ¶
type ObsFile struct { *RnxFil Header *ObsHeader Opts *Options Stats *ObsStats // Some Obersavation statistics. }
ObsFile contains fields and methods for RINEX observation files. Use NewObsFil() to instantiate a new ObsFile.
func NewObsFile ¶
NewObsFile returns a new ObsFile. The file must exist and the name will be parsed.
func (*ObsFile) ComputeObsStats ¶
ComputeObsStats reads the file and computes some statistics on the observations.
func (*ObsFile) IsHatanakaCompressed ¶
IsHatanakaCompressed returns true if the obs file is Hatanaka compressed, otherwise false.
func (*ObsFile) ReadHeader ¶
Parse and return the Header lines.
func (*ObsFile) Rnx3Filename ¶
Rnx3Filename returns the filename following the RINEX3 convention. In most cases we must read the read the header. The countrycode must come from an external source.
Example ¶
Convert a filename from RINEX-2 to RINEX-3.
file, err := NewObsFile("testdata/white/brst155h.20o") if err != nil { log.Fatalln(err) } file.CountryCode = "FRA" file.DataSource = "R" rnx3name, err := file.Rnx3Filename() if err != nil { log.Fatalln(err) } fmt.Println(rnx3name)
Output: BRST00FRA_R_20201550700_01H_30S_MO.rnx
type ObsHeader ¶
type ObsHeader struct { RINEXVersion float32 // RINEX Format version RINEXType string // RINEX File type. O for Obs // The header satellite system. Note that system is "Mixed" if more than one. Use SatSystems() to get a list of all used systems. SatSystem gnss.System Pgm string // name of program creating this file RunBy string // name of agency creating this file Date time.Time // Date and time of file creation. Comments []string // * comment lines MarkerName string // The name of the antenna marker, usually the 9-character station ID. MarkerNumber string // The IERS DOMES number assigned to the station marker is expected. MarkerType string // Type of the marker. See RINEX specification. // TODO: make list. Observer, Agency string ReceiverNumber, ReceiverType, ReceiverVersion string AntennaNumber, AntennaType string Position Coord // Geocentric approximate marker position [m] AntennaDelta CoordNEU // North,East,Up deltas in [m] DOI string // Digital Object Identifier (DOI) for data citation i.e. https://doi.org/<DOI-number>. Licenses []string // Line(s) with the data license of use. Name of the license plus link to the specific version of the license. Using standard data license as from https://creativecommons.org/licenses/ StationInfos []string // Line(s) with the link(s) to persistent URL with the station metadata (site log, GeodesyML, etc). ObsTypes map[gnss.System][]ObsCode // List of all observation types per GNSS. SignalStrengthUnit string Interval float64 // Observation interval in seconds TimeOfFirstObs time.Time TimeOfLastObs time.Time GloSlots map[gnss.PRN]int // GLONASS slot and frequency numbers. LeapSeconds int // The current number of leap seconds NSatellites int // Number of satellites, for which observations are stored in the file Labels []string // all Header Labels found. }
A ObsHeader provides the RINEX Observation Header information.
func (*ObsHeader) SatSystems ¶
SatSystems returns all used satellite systems. The header must have been read before. For RINEX-2 files use SatSystem().
type ObsStats ¶
type ObsStats struct { NumEpochs int `json:"numEpochs"` // The number of epochs in the file. NumSatellites int `json:"numSatellites"` // The number of satellites derived from the header. Sampling time.Duration `json:"sampling"` // The sampling interval derived from the data. TimeOfFirstObs time.Time `json:"timeOfFirstObs"` // Time of the first observation. TimeOfLastObs time.Time `json:"timeOfLastObs"` // Time of the last observation. ObsPerSat map[gnss.PRN]map[ObsCode]int `json:"obsstats"` // Number of observations per PRN and observation-type. }
ObsStats holds some statistics about a RINEX obs file, derived from the data.
type Options ¶
type Options struct {
SatSys string // satellite systems GRE... Why not gnss.System?
}
Options for global settings.
type RinexError ¶
type RinexError struct { Err error // Additional information. This can have any type, mainly used struct, map or string. Meta any }
A RinexError holds a warning or error that may occur during the processing a RINEX file. RinexError implements the error interface.
func (*RinexError) Error ¶
func (e *RinexError) Error() string
RinexError implements the error interface.
func (*RinexError) Unwrap ¶
func (e *RinexError) Unwrap() error
Unwrap returns the wrapped error, to allow interoperability with errors.Is(), errors.As() and errors.Unwrap()
type RnxFil ¶
type RnxFil struct { Path string FourCharID string // The 4char ID of the file or site. MonumentNumber int // The site monument number. ReceiverNumber int // The site receiver number. CountryCode string // ISO 3char StartTime time.Time // StartTime is the nominal start time derived from the filename. DataSource string // [RSU] FilePeriod FilePeriod // The intended collection period of the file. DataFreq string // 30S, not for nav files // TODO make type frequency!! DataType string // The data type abbreviations GO, RO, MN, MM, ... Format string // rnx, crx, etc. Attention: Format and Hatanaka are dependent! Compression string // gz, ... Warnings []string // List of warnings that might occur when reading the file. }
RnxFil contains fields and methods that can be used by all RINEX file types. Usually you won't instantiate a RnxFil directly and use NewObsFil() and NewNavFileReader() instead. Both ObsFil and NavFile embed RnxFil.
func (*RnxFil) IsMeteoType ¶
IsMeteoType returns true if the file is a RINEX meteo file type.
func (*RnxFil) ParseFilename ¶
ParseFilename parses the specified filename, which must be a valid RINEX filename, and fills its fields.
func (*RnxFil) Rnx2Filename ¶
Rnx2Filename returns the filename following the RINEX2 convention.
func (*RnxFil) SetStationName ¶
SetStationName sets the station or project name. IGS users should follow XXXXMRCCC (9 char) site and station naming convention described above. GNSS industry users could use the 9 characters to indicate the project name and/or number.
func (*RnxFil) StationName ¶
StationName returns the long 9-char station name if possible, otherwiese - mainly for RINEX-2 files - it returns the fourCharID. The returned name is uppercase.
type SatObs ¶
type SatObs struct { Prn gnss.PRN // The satellite number or PRN. Obss map[ObsCode]Obs // A map of observations with the obs-code as key. L1C: Obs{Val:0, LLI:0, SNR:0}, L2C: Obs{Val:...},... }
SatObs contains all observations for a satellite per epoch.
type SyncEpochs ¶
SyncEpochs contains two epochs from different files with the same timestamp.