rinex

package
v0.56.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 26 Imported by: 3

Documentation

Index

Examples

Constants

View Source
const (
	ObsSecondsLength    = 11
	ObsSecondsPrecision = 7
	ObsWidth            = 16
	ObsValueLength      = 14
	ObsValuePrecision   = 3
	ObsLLIIndex         = 14
	ObsSNRIndex         = 15
)
View Source
const (
	// Epoch Header Line Fields
	V2EpochMinLength      = 26
	V2EpochYearStart      = 1
	V2EpochYearEnd        = 3
	V2EpochMonthStart     = 4
	V2EpochMonthEnd       = 6
	V2EpochDayStart       = 7
	V2EpochDayEnd         = 9
	V2EpochHourStart      = 10
	V2EpochHourEnd        = 12
	V2EpochMinuteStart    = 13
	V2EpochMinuteEnd      = 15
	V2EpochSecondStart    = 16
	V2EpochSecondEnd      = 18
	V2EpochNanosecStart   = 19
	V2EpochNanosecEnd     = 26
	V2EpochFlagIndex      = 28
	V2EpochNumSatStart    = 29
	V2EpochNumSatEnd      = 32
	V2EpochPrnStartOffset = 32
	V2EpochPrnFieldWidth  = 3
	V2EpochPrnMaxPerLine  = 12
	V2ObsStart            = 0

	// Observation Line Fields
	V2ObsPerLine = 5

	// 80 bytes (split after 5th obs)
	V2LineBreak = V2ObsPerLine * ObsWidth
	// 128 bytes total
	V2TotalBytes = 8 * ObsWidth

	// Column Offsets (L1, L2, C1, P2, P1, S1, S2, C2)
	V2OffsetL1 = 0 * ObsWidth
	V2OffsetL2 = 1 * ObsWidth
	V2OffsetC1 = 2 * ObsWidth
	V2OffsetP2 = 3 * ObsWidth
	V2OffsetP1 = 4 * ObsWidth
	V2OffsetS1 = 5 * ObsWidth
	V2OffsetS2 = 6 * ObsWidth
	V2OffsetC2 = 7 * ObsWidth
)

Define field boundaries for RINEX v2 Observation files.

View Source
const (
	// Epoch Header Line Fields (RINEX 3/4)
	V34EpochStartIdentifier = '>'
	V34EpochMinLength       = 29
	V34EpochYearStart       = 2
	V34EpochYearEnd         = 6
	V34EpochMonthStart      = 7
	V34EpochMonthEnd        = 9
	V34EpochDayStart        = 10
	V34EpochDayEnd          = 12
	V34EpochHourStart       = 13
	V34EpochHourEnd         = 15
	V34EpochMinuteStart     = 16
	V34EpochMinuteEnd       = 18
	V34EpochSecondStart     = 19
	V34EpochSecondEnd       = 21
	V34EpochNanosecStart    = 22
	V34EpochNanosecEnd      = 29

	// Flags and Satellite Counts
	V34EpochFlagMinLength = 32
	V34EpochFlagIndex     = 31
	V34EpochNumSatStart   = 32
	V34EpochNumSatEnd     = 35

	// Receiver Clock Offset and Pico seconds
	V34EpochClkOffsetStart     = 41
	V34EpochClkOffsetEnd       = 56
	V34EpochClkOffsetWidth     = 15
	V34EpochClkOffsetPrecision = 12
	V34EpochPicoStart          = 57
	V34EpochPicoEnd            = 62
	V34EpochPicoWidth          = 5

	// Observation Line Fields
	V34ObsStart = 3
)
View Source
const (
	MaxLengthContent = 60
	MaxLengthLabel   = 20
)
View Source
const MinorVersionMultiplier float64 = 100.

Variables

View Source
var (
	// ErrNoHeader is returned when the header is missing, e.g. in RINEX files.
	ErrNoHeader = errors.New("no header")

	// ErrVersionNotSupported is returned when the given (RINEX-) version is not supported.
	ErrVersionNotSupported = errors.New("version not supported")
)
View Source
var (
	ErrBlankSystem = errors.New("system identifier is blank")
)
View Source
var ObservationKeyLookup = map[gnss.System]map[string]observation.ObservationKey{
	gnss.GPS: {

		"L1": {Frequency: observation.GPS_L1, SignalType: observation.C},
		"L2": {Frequency: observation.GPS_L2, SignalType: observation.W},
		"L5": {Frequency: observation.GPS_L5, SignalType: observation.Q},

		"P1": {Frequency: observation.GPS_L1, SignalType: observation.W},
		"P2": {Frequency: observation.GPS_L2, SignalType: observation.W},
		"C1": {Frequency: observation.GPS_L1, SignalType: observation.C},
		"C2": {Frequency: observation.GPS_L2, SignalType: observation.L},
		"C5": {Frequency: observation.GPS_L5, SignalType: observation.Q},

		"D1": {Frequency: observation.GPS_L1, SignalType: observation.C},
		"D2": {Frequency: observation.GPS_L2, SignalType: observation.W},
		"D5": {Frequency: observation.GPS_L5, SignalType: observation.Q},

		"S1": {Frequency: observation.GPS_L1, SignalType: observation.C},
		"S2": {Frequency: observation.GPS_L2, SignalType: observation.W},
		"S5": {Frequency: observation.GPS_L5, SignalType: observation.Q},
	},
	gnss.GLONASS: {

		"L1": {Frequency: observation.GLONASS_G1, SignalType: observation.C},
		"L2": {Frequency: observation.GLONASS_G2, SignalType: observation.C},

		"C1": {Frequency: observation.GLONASS_G1, SignalType: observation.C},
		"P1": {Frequency: observation.GLONASS_G1, SignalType: observation.P},
		"C2": {Frequency: observation.GLONASS_G2, SignalType: observation.C},
		"P2": {Frequency: observation.GLONASS_G2, SignalType: observation.P},

		"D1": {Frequency: observation.GLONASS_G1, SignalType: observation.C},
		"D2": {Frequency: observation.GLONASS_G2, SignalType: observation.C},

		"S1": {Frequency: observation.GLONASS_G1, SignalType: observation.C},
		"S2": {Frequency: observation.GLONASS_G2, SignalType: observation.C},
	},
	gnss.SBAS: {

		"L1": {Frequency: observation.SBAS_L1, SignalType: observation.C},
		"L5": {Frequency: observation.SBAS_L5, SignalType: observation.I},

		"C1": {Frequency: observation.SBAS_L1, SignalType: observation.C},
		"C5": {Frequency: observation.SBAS_L5, SignalType: observation.I},

		"D1": {Frequency: observation.SBAS_L1, SignalType: observation.C},
		"D5": {Frequency: observation.SBAS_L5, SignalType: observation.I},

		"S1": {Frequency: observation.SBAS_L1, SignalType: observation.C},
		"S5": {Frequency: observation.SBAS_L5, SignalType: observation.I},
	},
	gnss.GALILEO: {

		"C1": {Frequency: observation.Galileo_E1, SignalType: observation.C},
		"C5": {Frequency: observation.Galileo_E5a, SignalType: observation.Q},
		"C7": {Frequency: observation.Galileo_E5b, SignalType: observation.Q},
		"C8": {Frequency: observation.Galileo_E5ab, SignalType: observation.Q},
		"C6": {Frequency: observation.Galileo_E6, SignalType: observation.C},

		"L1": {Frequency: observation.Galileo_E1, SignalType: observation.C},
		"L5": {Frequency: observation.Galileo_E5a, SignalType: observation.Q},
		"L7": {Frequency: observation.Galileo_E5b, SignalType: observation.Q},
		"L8": {Frequency: observation.Galileo_E5ab, SignalType: observation.Q},
		"L6": {Frequency: observation.Galileo_E6, SignalType: observation.C},

		"D1": {Frequency: observation.Galileo_E1, SignalType: observation.C},
		"D5": {Frequency: observation.Galileo_E5a, SignalType: observation.Q},
		"D7": {Frequency: observation.Galileo_E5b, SignalType: observation.Q},
		"D8": {Frequency: observation.Galileo_E5ab, SignalType: observation.Q},
		"D6": {Frequency: observation.Galileo_E6, SignalType: observation.C},

		"S1": {Frequency: observation.Galileo_E1, SignalType: observation.C},
		"S5": {Frequency: observation.Galileo_E5a, SignalType: observation.Q},
		"S7": {Frequency: observation.Galileo_E5b, SignalType: observation.Q},
		"S8": {Frequency: observation.Galileo_E5ab, SignalType: observation.Q},
		"S6": {Frequency: observation.Galileo_E6, SignalType: observation.C},
	},
}

ObservationKeyLookup maps a GNSS system and its RINEX 2.11 observation code (e.g. "L2") to a ObservationKey.

Unfortunantly, the RINEX 2.11 observation codes cannot be mapped to RINEX 3&4 observation codes without making assumptions about how the RINEX file was generated. For example, we don't know if the "L2" column contains L2C or L2W values.

View Source
var (
	// REGEX_TYPE_SV_MSSG is a regular expression for capturing TYPE/SV/MSSG from RINEX 4 navigation files.
	REGEX_TYPE_SV_MSSG = regexp.MustCompile(`^> (EPH|STO|EOP|ION)\s([A-Z])([0-9]{2}|\s{2})\s([A-Z0-9]{1,4})(?:\s+([A-Z0-9]{1,4}))?\s*$`)
)

Functions

func EncodeObs added in v0.54.0

func EncodeObs(w io.Writer, epochMap observation.Epoch, settings *Settings) error

func EncodeObsV2 added in v0.54.0

func EncodeObsV2(w io.Writer, epoch observation.Epoch, settings *Settings) error

EncodeObsV2 writes an observation.Epoch as RINEX 2 to the provided io.Writer interface. This function is highly optimized to produce zero heap allocations per epoch.

func EncodeObsV3 added in v0.54.0

func EncodeObsV3(w io.Writer, epoch observation.Epoch, settings *Settings) (err error)

EncodeObsV3 writes a observation.EpochMap as RINEX 3 to the provided io.Writer interface.

func EncodeObsV4 added in v0.54.0

func EncodeObsV4(w io.Writer, epoch observation.Epoch, settings *Settings) (err error)

EncodeObsV4 writes a single observation.Epoch in RINEX 4 format to the provided io.Writer.

The satellites within the epoch are automatically sorted by GNSS system and PRN before writing. The ordering of the observation columns is strictly dictated by the pre-sorted keys in settings.ObservationsBySystem. The selection of measurements to be output (Phase, Range, SNR, Doppler) is controlled by settings.OutputSettings.

This function is highly optimized for performance. It utilizes sync.Pool for buffer management and slice sorting, avoiding the fmt package to achieve zero heap allocations per epoch. Missing observations are automatically padded with blank spaces to conform to the RINEX specification.

func FormatDateForSettings added in v0.50.0

func FormatDateForSettings(date time.Time) string

func GetLeapSeconds added in v0.5.6

func GetLeapSeconds(queryTime time.Time) (s int, err error)

func IsVersionSupported added in v0.50.0

func IsVersionSupported(version float64) bool

func ToRinex2Nav added in v0.50.0

func ToRinex2Nav(w io.Writer, ephemeris ephemeris.GenericEphemeris) error

func ToRinex3Nav added in v0.50.0

func ToRinex3Nav(w io.Writer, ephemeris ephemeris.GenericEphemeris) error

func ToRinex4Nav added in v0.50.0

func ToRinex4Nav(w io.Writer, ephemeris ephemeris.GenericEphemeris) error

func ValidateION added in v0.50.0

func ValidateION(sys gnss.System, msgType, subtype string) (canonMsg string, canonSubtype string, nLines int, err error)

ValidateION validates and canonicalizes ION message types and subtypes. It returns the canonical msgType, canonical subtype (\"\" if blank/BNK), and the number of ION lines to parse.

Types

type ClockFile added in v0.50.0

type ClockFile struct {
	Header  *Header               // RINEX header
	Records []precise.ClockRecord // Clock data records
	Version Version               // RINEX version (3.00, 3.02, 3.04, etc.)
}

ClockFile represents a complete RINEX clock file

func NewClockFile added in v0.50.0

func NewClockFile(r io.Reader) (*ClockFile, error)

NewClockFile creates a new ClockFile from a reader This function reads the entire file into memory. For streaming access, use NewScanner() and NextClockEpoch() instead.

func (*ClockFile) GetClockBias added in v0.50.0

func (cf *ClockFile) GetClockBias(sys gnss.System, svID int, t time.Time, tolerance time.Duration) (float64, bool)

GetClockBias returns the clock bias for a given satellite at a specific time Returns the record with the closest time match (within tolerance)

func (*ClockFile) GetReceiverClockRecords added in v0.50.0

func (cf *ClockFile) GetReceiverClockRecords() []precise.ClockRecord

GetReceiverClockRecords returns all receiver clock records (AR, CR, or DR types)

func (*ClockFile) GetSatelliteClockRecords added in v0.50.0

func (cf *ClockFile) GetSatelliteClockRecords() []precise.ClockRecord

GetSatelliteClockRecords returns all satellite clock records (AS or MS types)

type Header struct {
	Records  []Record
	ObsTypes map[int][]string
}

Header is a struct for storing header records.

func NewHeader added in v0.50.0

func NewHeader(settings *Settings) (*Header, error)

func NewMetHeader added in v0.50.0

func NewMetHeader(settings *Settings) (*Header, error)

func NewNavHeader added in v0.50.0

func NewNavHeader(settings *Settings) (*Header, error)

func NewObsHeader added in v0.50.0

func NewObsHeader(settings *Settings) (*Header, error)

NewObsHeader creates a new RINEX observation header.

func (*Header) AddAntennaOffsetRecord added in v0.50.0

func (h *Header) AddAntennaOffsetRecord(antennaOffsetHEN [3]float64)

AddAntennaOffsetRecord adds an ANTENNA: DELTA H/E/N record to the header.

func (*Header) AddAntennaPositionRecord added in v0.50.0

func (h *Header) AddAntennaPositionRecord(antennaPosition [3]float64)

AddAntennaPositionRecord adds an APPROX POSITION XYZ record to the header.

func (*Header) AddAntennaRecord added in v0.50.0

func (h *Header) AddAntennaRecord(antennaSerial, antennaModel string)

AddAntennaRecord adds an ANT # / TYPE record to the header.

func (*Header) AddComments added in v0.50.0

func (h *Header) AddComments(comments []string)

AddComments adds COMMENT records to the header. Each comment will be on its own line. If a comment is greater than 60 chars, it will be split. The split will occur at the last space before the 60-character limit to avoid breaking words. Each line is padded to 60 characters.

func (*Header) AddEndOfHeaderRecord added in v0.50.0

func (h *Header) AddEndOfHeaderRecord()

AddEndOfHeaderRecord adds an END OF HEADER record to the header.

func (*Header) AddGlonassPhaseBias added in v0.50.0

func (h *Header) AddGlonassPhaseBias()

AddGlonassPhaseBias adds zeroes for GLONASS COD/PHS/BIS (Rinex 3)

func (*Header) AddGlonassSlot added in v0.50.0

func (h *Header) AddGlonassSlot(settings *Settings) error

AddGlonassSlot adds the GLONASS satellite numbers and frequency channels (Rinex 3/4)

func (*Header) AddLeapSecondsRecord added in v0.50.0

func (h *Header) AddLeapSecondsRecord()

AddLeapSecondsRecord adds a LEAP SECONDS record to the header. (optional)

func (*Header) AddMarkerNameRecord added in v0.50.0

func (h *Header) AddMarkerNameRecord(markerName string)

AddMarkerNameRecord adds a MARKER NAME record to the header.

func (*Header) AddMarkerNumberRecord added in v0.50.0

func (h *Header) AddMarkerNumberRecord(markerNumber string)

AddMarkerNumberRecord adds a MARKER NUMBER record to the header.

func (*Header) AddMarkerTypeRecord added in v0.50.0

func (h *Header) AddMarkerTypeRecord(markerType string)

AddMarkerTypeRecord adds a MARKER TYPE record to the header.

func (*Header) AddObsTypesRecord added in v0.50.0

func (h *Header) AddObsTypesRecord(settings *Settings)

AddObsTypesRecord adds a # / TYPES OF OBSERV or a SYS / # / OBS TYPES record to the header depending on the version.

func (*Header) AddObsTypesRecordV2 added in v0.50.0

func (h *Header) AddObsTypesRecordV2(settings *Settings)

func (*Header) AddObsTypesRecordV3 added in v0.50.0

func (h *Header) AddObsTypesRecordV3(settings *Settings) error

func (*Header) AddObserverRecord added in v0.50.0

func (h *Header) AddObserverRecord(observer, agency string)

AddObserverRecord adds an OBSERVER / AGENCY record to the header.

func (*Header) AddPhaseShifts added in v0.50.0

func (h *Header) AddPhaseShifts(settings *Settings) error

AddPhaseShifts adds phase shift corrections (Rinex 3)

func (*Header) AddProgramRecord added in v0.50.0

func (h *Header) AddProgramRecord(program, runBy string, date string)

AddProgramRecord adds a PGM / RUN BY / DATE record to the header.

func (*Header) AddReceiverRecord added in v0.50.0

func (h *Header) AddReceiverRecord(receiverSerial, receiverModel, receiverFirmware string)

AddReceiverRecord adds a REC # / TYPE / VERS record to the header.

func (*Header) AddTimeOfFirstObsRecord added in v0.50.0

func (h *Header) AddTimeOfFirstObsRecord(timeOfFirst time.Time)

AddTimeOfFirstObsRecord adds a TIME OF FIRST OBS record to the header.

func (*Header) AddTimeOfLastObsRecord added in v0.50.0

func (h *Header) AddTimeOfLastObsRecord(timeOfLast time.Time)

func (*Header) AddVersionRecord added in v0.50.0

func (h *Header) AddVersionRecord(rinexVersion Version, rinexType, rinexSystem string)

AddVersionRecord adds a RINEX VERSION / TYPE record to the header.

func (*Header) FindRecord added in v0.50.0

func (h *Header) FindRecord(labelPrefix string) (*Record, bool)

Helper to find the first record with a given label prefix

func (*Header) GetApproxPosition added in v0.50.1

func (h *Header) GetApproxPosition() (coordinates.Vector3D, error)

GetApproxPosition parses the APPROX POSITION XYZ record and returns the receiver ECEF coordinates in metres. Returns an error if the record is missing or cannot be parsed.

func (*Header) GetDate added in v0.50.0

func (h *Header) GetDate() (date string, err error)

func (*Header) GetMarkerName added in v0.50.1

func (h *Header) GetMarkerName() (string, error)

GetMarkerName returns the station marker name from the RINEX header.

func (*Header) GetRinex2Types

func (h *Header) GetRinex2Types() (typeMap map[int][]string, err error)

GetRinex2Types - Get the observation types for RINEX 2

func (*Header) GetRinex3Types

func (h *Header) GetRinex3Types() (types map[int][]string, err error)

GetRinex3Types -

func (*Header) GetRinexProgram added in v0.50.0

func (h *Header) GetRinexProgram() (program string, err error)

GetRinexPGM parses the program, run_by, and date fields from the RINEX header

func (*Header) GetRinexSystem

func (h *Header) GetRinexSystem() (system string, err error)

GetRinexSystem parses the system from the RINEX header.

func (*Header) GetRinexType

func (h *Header) GetRinexType() (rinexType string, err error)

GetRinexType parses the RINEX type from the header.

func (*Header) GetRinexVersion

func (h *Header) GetRinexVersion() (Version, error)

GetRinexVersion parses the RINEX version from the header.

func (*Header) GetRunBy added in v0.50.0

func (h *Header) GetRunBy() (runBy string, err error)

GetRunBy parses the run_by field from the RINEX header

func (*Header) IsCRINEX added in v0.50.0

func (h *Header) IsCRINEX() bool

IsCRINEX returns true if the header contains a CRINEX VERS / TYPE record, indicating the file body is Hatanaka-compressed and cannot be parsed directly.

func (*Header) String added in v0.50.0

func (h *Header) String() string

func (*Header) Write added in v0.3.9

func (h *Header) Write(w io.Writer) error

type LeapSecond added in v0.5.6

type LeapSecond struct {
	Time   time.Time
	Second int
}

type MajorVersion added in v0.50.0

type MajorVersion int8
const (
	MajorVersionUnknown MajorVersion = -1
	MajorVersion2       MajorVersion = 2
	MajorVersion3       MajorVersion = 3
	MajorVersion4       MajorVersion = 4
)

type MinorVersion added in v0.50.0

type MinorVersion int8
const (
	MinorVersionUnknown MinorVersion = -1
	MinorVersion0       MinorVersion = 0
	MinorVersion01      MinorVersion = 1
	MinorVersion02      MinorVersion = 2
	MinorVersion03      MinorVersion = 3
	MinorVersion04      MinorVersion = 4
	MinorVersion05      MinorVersion = 5
	MinorVersion06      MinorVersion = 6
	MinorVersion07      MinorVersion = 7
	MinorVersion08      MinorVersion = 8
	MinorVersion09      MinorVersion = 9
	MinorVersion10      MinorVersion = 10
	MinorVersion11      MinorVersion = 11
)

type ObsLineElement

type ObsLineElement struct {
	Value float64
	LLI   uint8
	SNR   uint8
}

type ObsWriter added in v0.50.0

type ObsWriter struct {
	// contains filtered or unexported fields
}

ObsWriter implements observation.EpochWriter for RINEX observation output.

RINEX headers declare which observation types exist before any epoch data, creating a chicken-and-egg problem for streaming. ObsWriter handles this in two modes:

  • With a pre-configured header (via ObsWriterWithSettings): epochs are written directly as they arrive. Use this for RINEX-to-RINEX conversion where the source header is already known.

  • Without a header: epochs are buffered in memory. On ObsWriter.Flush, the observation types are collected from all buffered epochs, the header is written, then all epochs follow. This is equivalent to the current batch approach but encapsulated inside the writer.

func NewObsWriter added in v0.50.0

func NewObsWriter(w io.Writer, settings *Settings) *ObsWriter

NewObsWriter creates a buffered RINEX writer. All epochs are held in memory until ObsWriter.Flush is called, at which point the header is derived from the buffered data and written before the epochs. Use ObsWriterWithSettings when the header content is known up front.

func ObsWriterWithSettings added in v0.50.0

func ObsWriterWithSettings(w io.Writer, settings *Settings) *ObsWriter

ObsWriterWithSettings creates a streaming RINEX writer with a pre-configured header. The header is written on the first call to Write, and epochs stream through without buffering.

func (*ObsWriter) Flush added in v0.50.0

func (ow *ObsWriter) Flush() error

Flush finalizes the RINEX file. In buffered mode it collects observation types from all epochs, writes the header, then writes all epochs. In streaming mode it is a no-op.

func (*ObsWriter) Write added in v0.50.0

func (ow *ObsWriter) Write(epoch observation.Epoch) (int, error)

Write writes or buffers a single observation epoch.

type ObservationTypesMap added in v0.50.0

type ObservationTypesMap map[gnss.System][]string

type OutputSettings

type OutputSettings struct {
	Phase   bool
	Range   bool
	SNR     bool
	Doppler bool
}

OutputSetting

func NewOutputSettings

func NewOutputSettings() OutputSettings

NewOutputSettings returns a struct with the default RINEX outputs enabled. Doppler is disabled by default.

func (OutputSettings) CountEnabled

func (os OutputSettings) CountEnabled() int

CountEnabled

type Record added in v0.50.0

type Record struct {
	Content string
	Label   string
}

Record stores the header lines in a struct splitting the content (60 chars) and the label (20 chars) into two separate strings. Supports versions 2,3,4.

type Scanner

type Scanner struct {
	*bufio.Scanner
	Header  Header
	Version Version
	Type    string
	System  string
	// contains filtered or unexported fields
}

Scanner -

func NewScanner

func NewScanner(r io.Reader) (scanner *Scanner, err error)

NewScanner creates a new RINEX scanner. It reads the header, extracting the version, type and system. Other type and version specific information is extracted in later steps.

CRINEX (Hatanaka-compressed) files are decompressed transparently on the fly.

It is the caller's responsibility to call Close on the underlying reader when done.

func (Scanner) DecodeClkEpochV3 added in v0.54.0

func (scanner Scanner) DecodeClkEpochV3() (precise.ClockRecord, error)

DecodeClkEpochV3 reads a single clock record from RINEX v3.00-3.02 Uses 4-character clock name field

func (Scanner) DecodeClkEpochV304 added in v0.54.0

func (scanner Scanner) DecodeClkEpochV304() (precise.ClockRecord, error)

DecodeClkEpochV304 reads a single clock record from RINEX v3.04+ Uses 9-character clock name field

func (Scanner) DecodeMetEpochV2 added in v0.54.0

func (scanner Scanner) DecodeMetEpochV2() (epoch met.Epoch, err error)

func (Scanner) DecodeMetEpochV3 added in v0.54.0

func (scanner Scanner) DecodeMetEpochV3() (epoch met.Epoch, err error)

func (Scanner) DecodeMetEpochV4 added in v0.54.0

func (scanner Scanner) DecodeMetEpochV4() (epoch met.Epoch, err error)

func (Scanner) DecodeNavEpochV2 added in v0.54.0

func (scanner Scanner) DecodeNavEpochV2() (eph ephemeris.GenericEphemeris, err error)

func (Scanner) DecodeNavEpochV3 added in v0.54.0

func (scanner Scanner) DecodeNavEpochV3() (eph ephemeris.GenericEphemeris, err error)

func (Scanner) DecodeNavEpochV4 added in v0.54.0

func (scanner Scanner) DecodeNavEpochV4() (eph ephemeris.GenericEphemeris, err error)

DecodeNavEpochV4 reads and decodes a full RINEX 4 navigation record. It reads the header line, epoch line, and all subsequent data lines for a single record.

func (Scanner) DecodeNavGLO added in v0.54.0

func (scanner Scanner) DecodeNavGLO() (eph ephemeris.GenericEphemeris, err error)

func (Scanner) DecodeNavGPS added in v0.54.0

func (scanner Scanner) DecodeNavGPS() (eph ephemeris.GenericEphemeris, err error)

func (Scanner) DecodeNavValuesV3 added in v0.54.0

func (scanner Scanner) DecodeNavValuesV3(line string, nLines int) (vals []float64, err error)

func (Scanner) DecodeNavValuesV4 added in v0.54.0

func (scanner Scanner) DecodeNavValuesV4(line string, nLines int) ([]float64, error)

DecodeNavValuesV4 parses a standard RINEX 4 navigation data block, consisting of one line with epoch and 3 clock-related values, followed by nLines each containing 4 orbit values.

func (*Scanner) DecodeObsEpochV2 added in v0.54.0

func (scanner *Scanner) DecodeObsEpochV2() (observation.Epoch, error)

DecodeObsEpochV2 -

func (Scanner) DecodeObsEpochV3 added in v0.54.0

func (scanner Scanner) DecodeObsEpochV3() (observation.Epoch, error)

DecodeObsEpochV3 -

func (*Scanner) DecodeObsEpochV4 added in v0.54.0

func (scanner *Scanner) DecodeObsEpochV4() (observation.Epoch, error)

DecodeObsEpochV4 -

func (*Scanner) NextClockEpoch added in v0.50.0

func (scanner *Scanner) NextClockEpoch() (rec precise.ClockRecord, err error)

NextClockEpoch reads the next clock record from a RINEX clock file

func (*Scanner) NextEpoch added in v0.50.0

func (scanner *Scanner) NextEpoch() (epoch observation.Epoch, err error)

NextEpoch returns the next observation epoch. It returns any error encountered or io.EOF when done. Inplements the observation.EpochReader interface.

Example
package main

import (
	"fmt"
	"io"
	"strings"
	"time"

	"gitlab.com/earthscope/gnsstools/codecs/rinex"
)

func main() {
	r := strings.NewReader(rnx303ObsData)
	dec, err := rinex.NewScanner(r)
	if err != nil {
		fmt.Println("new scanner:", err)
		return
	}

	numEpochs := 0
	lastEpoch := time.Time{}
	for {
		epoch, err := dec.NextEpoch()
		if err != nil {
			if err == io.EOF {
				break
			} else {
				fmt.Println("read epoch:", err)
				return
			}
		}

		numEpochs++
		lastEpoch = epoch.Time
		// Do something with epoch.
	}

	fmt.Printf("last epoch: %s\n", lastEpoch.Format(time.DateTime))
	fmt.Printf("#epochs: %d", numEpochs)
}

// RINEX 3.03 obs testdata, source: BRUX00BEL_R_20183101900_01H_30S_MO.rnx.
const rnx303ObsData = `     3.03           OBSERVATION DATA    M                   RINEX VERSION / TYPE
sbf2rin-12.3.1                          20181106 200225 UTC PGM / RUN BY / DATE
BRUX                                                        MARKER NAME
13101M010                                                   MARKER NUMBER
GEODETIC                                                    MARKER TYPE
ROB                 ROB                                     OBSERVER / AGENCY
3001376             SEPT POLARX4TR      2.9.6               REC # / TYPE / VERS
00464               JAVRINGANT_DM   NONE                    ANT # / TYPE
  4027881.8478   306998.2610  4919498.6554                  APPROX POSITION XYZ
        0.4689        0.0000        0.0010                  ANTENNA: DELTA H/E/N
G   14 C1C L1C S1C C1W S1W C2W L2W S2W C2L L2L S2L C5Q L5Q  SYS / # / OBS TYPES
       S5Q                                                  SYS / # / OBS TYPES
E   12 C1C L1C S1C C5Q L5Q S5Q C7Q L7Q S7Q C8Q L8Q S8Q      SYS / # / OBS TYPES
R   12 C1C L1C S1C C2P L2P S2P C2C L2C S2C C3Q L3Q S3Q      SYS / # / OBS TYPES
C    6 C2I L2I S2I C7I L7I S7I                              SYS / # / OBS TYPES
SEPTENTRIO RECEIVERS OUTPUT ALIGNED CARRIER PHASES.         COMMENT
NO FURTHER PHASE SHIFT APPLIED IN THE RINEX ENCODER.        COMMENT
G L1C                                                       SYS / PHASE SHIFT
G L2W                                                       SYS / PHASE SHIFT
G L2L  0.00000                                              SYS / PHASE SHIFT
G L5Q  0.00000                                              SYS / PHASE SHIFT
E L1C  0.00000                                              SYS / PHASE SHIFT
E L5Q  0.00000                                              SYS / PHASE SHIFT
E L7Q  0.00000                                              SYS / PHASE SHIFT
E L8Q  0.00000                                              SYS / PHASE SHIFT
R L1C                                                       SYS / PHASE SHIFT
R L2P  0.00000                                              SYS / PHASE SHIFT
R L2C                                                       SYS / PHASE SHIFT
R L3Q  0.00000                                              SYS / PHASE SHIFT
C L2I                                                       SYS / PHASE SHIFT
C L7I                                                       SYS / PHASE SHIFT
    30.000                                                  INTERVAL
  2018    11     6    19     0    0.0000000     GPS         TIME OF FIRST OBS
  2018    11     6    19    59   30.0000000     GPS         TIME OF LAST OBS
    43                                                      # OF SATELLITES
 C1C    0.000 C2C    0.000 C2P    0.000                     GLONASS COD/PHS/BIS
DBHZ                                                        SIGNAL STRENGTH UNIT
 11 R03  5 R04  6 R05  1 R06 -4 R13 -2 R14 -7 R15  0 R16 -1 GLONASS SLOT / FRQ #
    R22 -3 R23  3 R24  2                                    GLONASS SLOT / FRQ #
                                                            END OF HEADER
> 2018 11 06 19 00  0.0000000  0 31
C05  40278058.411 5 209738433.88205        35.000    40278053.546 6 162183054.61506        38.500
C10  39899167.919 6 207765467.14406        36.500    39899163.943 6 160657440.43806        40.000
C14  23592315.462 7 122851404.37907        43.500    23592312.173 8  94996489.69408        48.500
C18  40682893.411 6 211846535.82906        36.500
C24  22035687.055 8 114745651.85508        52.000
C25  25987556.245 5 135324023.84505        33.000
C26  22200013.345 8 115601347.71408        51.000
C29  25871433.174 6 134719354.13106        39.000
E07  25651683.364 7 134800539.63407        44.000    25651687.670 7 100662776.93007        47.250    25651683.773 7 103288744.64507        47.250    25651685.037 8 101975746.29508        50.250
E11                                                                                                                                                  27029845.740 4 107454466.60604        28.250
E19  25311692.795 6 133013852.19406        40.250    25311694.166 7  99328538.68907        43.250    25311690.663 7 101919704.00907        43.750    25311691.779 7 100624126.35407        46.500
E20  22407731.374 7 117753428.36707        42.250
E21  26253644.414 7 137963840.23007        42.000    26253648.089 7 103024969.13807        45.750    26253643.944 7 105712563.02407        44.750    26253645.515 8 104368764.09308        48.250
E27  23151127.336 8 121660042.13008        49.500    23151130.364 8  90850070.76308        53.750    23151126.610 8  93220054.38108        53.750    23151127.924 9  92035060.07809        56.750
E30  23301645.064 7 122451035.38307        46.000    23301647.971 8  91440752.57208        49.750    23301644.130 8  93826142.79508        49.750    23301645.456 8  92633444.18908        52.750
G05  24148980.351 6 126903771.43806        40.750    24148980.329 4        25.250    24148979.790 4  98886051.56404        25.250    24148980.141 6  98886040.56606        38.250
G13  20319006.082 8 106777151.40808        49.750    20319005.854 7        45.000    20319003.204 7  83202982.91307        45.000
G15  20676737.504 8 108657012.53008        52.000    20676737.526 7        45.000    20676734.835 7  84667802.19907        45.000    20676735.039 8  84667808.19908        48.250
G17  24268008.736 6 127529257.27106        41.500    24268008.602 4        24.250    24268006.582 4  99373434.55304        24.250    24268006.694 6  99373437.56506        36.750
G20  23406070.701 6 122999735.42506        38.750    23406069.865 3        21.500    23406066.916 3  95843935.49703        21.500
G24  22372616.851 7 117568919.09607        43.000    22372616.904 5        32.500    22372617.253 5  91612143.13305        32.500    22372617.696 7  91612138.13907        44.500    22372618.980 8  87794975.92608        49.750
G28  21738049.490 8 114234256.86708        48.000    21738048.851 6        38.000    21738046.420 6  89013715.22306        38.000
G30  23566304.820 7 123841837.95007        42.500    23566304.279 4        27.750    23566305.325 4  96500173.15004        27.750    23566305.080 6  96500169.15806        40.250    23566306.201 7  92479341.91407        45.000
R03  22941264.290 6 122806392.15306        40.250    22941265.059 6  95516116.36606        41.500    22941265.419 6  95516110.36006        40.750
R04  19474276.830 8 104283877.09908        51.500    19474276.741 8  81109702.06708        51.000    19474276.717 8  81109716.06608        50.000
R05  20382278.367 8 108954963.83708        50.250    20382278.949 8  84742767.68308        49.250    20382278.957 8  84742756.67808        48.500
R13  21776089.506 6 116283164.21706        40.250    21776090.214 6  90442485.75506        41.750    21776091.152 6  90442488.76606        41.500
R14  19214800.198 8 102425753.70108        51.250    19214802.036 8  79664504.85308        51.000    19214802.163 8  79664490.85008        50.250
R15  20245911.746 8 108188052.54008        48.500    20245915.017 6  84146269.22206        41.500    20245915.248 6  84146273.23906        41.250
R22  23189673.405 6 123788048.07506        41.000    23189674.671 6  96279604.97606        40.250    23189675.328 6  96279539.98106        40.000
R23  23544646.016 6 125947984.26606        39.750    23544649.992 5  97959556.99105        33.000    23544649.033 5  97959481.98705        33.500
> 2018 11 06 19 00 30.0000000  0 30
C05  40277819.057 5 209737186.71405        35.250    40277814.444 6 162182090.20406        39.000
C10  39904948.095 6 207795567.92306        36.250    39904944.786 6 160680716.26906        39.750
C14  23609438.688 7 122940574.52907        43.500    23609436.004 8  95065441.69308        48.750
C18  40689124.585 6 211878983.54706        37.000
C24  22028015.764 8 114705704.83808        52.000
C25  25970063.784 6 135232938.21606        36.750
C26  22208952.503 8 115647895.73308        50.750
C29  25869661.063 6 134710122.58206        40.250
E07  25667148.955 7 134881813.17407        44.500    25667153.408 7 100723468.19107        47.250    25667149.499 7 103351019.15407        47.000    25667151.002 8 102037229.18008        50.250
E19  25299844.542 6 132951590.19106        40.000    25299846.079 7  99282044.34107        43.250    25299842.708 7 101871996.76607        44.000    25299843.715 7 100577025.55807        46.500
E20  22409671.722 7 117763624.58407        42.500
E21  26238274.096 7 137883069.18407        42.250    26238277.555 7 102964653.13007        45.000    26238274.037 7 105650673.56307        45.750    26238275.251 8 104307661.34708        48.250
E27  23148160.709 8 121644452.24008        49.250    23148163.712 8  90838428.96608        53.250    23148159.933 8  93208108.88508        53.750    23148161.261 9  92023266.43109        56.500
E30  23313447.820 7 122513059.77607        45.750    23313450.839 8  91487069.48708        49.500    23313447.012 8  93873667.97708        49.500    23313448.313 8  92680365.23608        52.500
G05  24170159.828 7 127015065.86707        43.500    24170159.779 3        23.500    24170157.457 3  98972774.47603        23.500    24170157.592 6  98972763.49406        36.250
G13  20324751.754 8 106807344.77108        49.500    20324751.522 7        45.000    20324748.886 7  83226510.20007        45.000
G15  20669901.148 8 108621087.32608        52.000    20669901.170 7        44.750    20669898.480 7  84639808.53107        44.750    20669898.785 8  84639814.52008        48.250
G17  24252352.505 6 127446983.77106        41.750    24252352.376 4        24.000    24252350.456 4  99309325.37804        24.000    24252350.780 6  99309328.37306        37.250
G20  23395270.466 6 122942983.26606        38.500    23395269.653 3        22.000    23395267.657 3  95799713.04603        22.000
G24  22356385.317 7 117483620.80707        42.500    22356385.352 5        32.500    22356385.902 5  91545676.95605        32.500    22356385.670 7  91545671.96207        44.500    22356386.973 8  87731279.17208        49.500
G28  21747504.151 7 114283941.48407        47.750    21747503.517 6        37.750    21747501.054 6  89052430.50906        37.750
G30  23584154.530 7 123935638.50907        42.500    23584153.976 4        27.500    23584154.973 4  96573264.47304        27.500    23584154.960 6  96573260.48006        39.750    23584156.096 7  92549387.76107        45.000
R03  22966166.459 6 122939702.53506        40.250    22966168.299 6  95619802.20706        41.000    22966168.363 6  95619796.19006        40.500
R04  19484042.697 8 104336171.82308        52.000    19484042.357 8  81150375.72308        50.750    19484042.170 8  81150389.72208        50.000
R05  20368506.764 8 108881348.31208        49.750    20368507.442 8  84685511.16208        49.000    20368507.530 8  84685500.16308        48.500    20368591.658 7  81668348.76317        43.500
R13  21795989.466 6 116389431.94006        40.500    21795990.414 6  90525138.43606        41.000    21795990.739 6  90525141.42706        40.500
R14  19217884.532 8 102442195.04508        51.500    19217886.418 8  79677292.56608        51.250    19217886.510 8  79677278.56608        50.500
R15  20232582.290 8 108116824.16808        48.500    20232585.235 6  84090869.39806        41.250    20232585.751 6  84090873.38806        41.000
R22  23192181.497 6 123801434.60906        41.750    23192182.441 6  96290016.73406        40.250    23192181.976 6  96289951.71606        40.250
R23  23527759.931 6 125857653.80006        41.750    23527763.616 5  97889299.99405        33.000    23527761.442 5  97889225.00605        33.000
> 2018 11 06 19 01  0.0000000  0 31
C05  40277579.035 5 209735937.49405        35.500    40277574.677 6 162181124.23306        38.750
C10  39910730.373 5 207825682.16605        35.500    39910727.916 6 160704002.52006        39.750
C14  23626613.258 7 123030006.04207        43.000    23626610.599 8  95134595.79308        48.500
C18  40695352.565 6 211911416.86106        36.250
C24  22020407.309 8 114666085.91408        52.000
C25  25952586.963 5 135141942.76905        33.000
C26  22217944.533 8 115694720.00808        51.000
C29  25867982.415 6 134701383.19706        40.250
E07  25682652.132 7 134963282.53207        44.500    25682656.434 7 100784305.67407        46.750    25682652.850 7 103413443.70307        47.250    25682654.091 8 102098860.19608        50.000
E11                                                                                                                                                  27044622.794 4 107513211.63804        28.000
E19  25288043.470 6 132889574.36006        40.250    25288044.892 7  99235733.81607        43.250    25288041.379 7 101824478.13907        43.500    25288042.521 7 100530110.98407        46.500
E20  22411685.367 7 117774206.94307        42.750
E21  26222936.944 7 137802471.10107        42.500    26222940.721 7 102904466.25707        45.500    26222936.851 7 105588916.60607        45.750    26222938.172 8 104246689.44008        48.500
E27  23145259.770 8 121629207.89608        49.500    23145262.794 8  90827045.21008        53.500    23145259.023 8  93196428.15808        53.750    23145260.350 9  92011734.18909        56.500
E30  23325290.032 7 122575290.66307        46.000    23325292.906 8  91533540.59608        49.500    23325289.241 8  93921351.37908        49.500    23325290.471 8  92727442.49408        52.500
G05  24191352.147 6 127126435.39606        39.500    24191352.080 4        24.500    24191350.779 4  99059555.93704        24.500    24191351.832 6  99059544.93406        39.250
G13  20330586.567 8 106838007.50908        50.000    20330586.339 7        44.750    20330583.754 7  83250403.24307        44.750
G15  20663156.832 8 108585646.49208        52.000    20663156.845 7        45.250    20663154.316 7  84612192.29607        45.250    20663154.684 8  84612198.29208        48.500
G17  24236739.593 7 127364936.89207        42.500    24236739.482 4        24.000    24236737.880 4  99245392.77604        24.000    24236737.335 6  99245395.74806        36.750
G20  23384568.823 6 122886742.52806        38.750    23384568.010 3        22.000    23384565.369 3  95755889.08703        22.000
G24  22340198.068 7 117398555.76707        43.000    22340198.117 5        32.500    22340198.289 5  91479392.52205        32.500    22340198.452 7  91479387.53107        43.750    22340199.792 8  87667756.59308        49.750
G28  21757042.535 8 114334066.39508        48.000    21757041.901 6        38.000    21757039.441 6  89091488.88606        38.000
G30  23602024.969 7 124029547.24007        42.500    23602024.428 4        28.000    23602025.102 4  96646440.09704        28.000    23602024.805 6  96646436.10106        40.250    23602026.048 7  92619514.39907        44.500
R03  22991105.424 6 123073198.17806        41.750    22991106.100 6  95723632.10406        40.500    22991105.847 6  95723626.11606        40.500
R04  19493945.713 8 104389201.74508        52.000    19493945.168 8  81191621.20408        50.750    19493945.299 8  81191635.20008        49.750
R05  20354851.279 8 108808350.72008        50.250    20354851.720 8  84628735.24508        49.000    20354851.854 8  84628724.24908        48.500
R13  21815924.114 6 116495881.99806        39.250    21815925.592 6  90607932.91706        41.250    21815926.140 6  90607935.90606        41.250
R14  19221075.832 8 102459205.70008        51.750    19221077.547 8  79690523.07908        51.250    19221077.729 8  79690509.07608        50.500
R15  20219345.930 8 108046090.47808        49.000    20219348.544 6  84035854.31006        41.500    20219348.496 6  84035858.31006        41.000
R22  23194837.227 6 123815613.01206        41.500    23194838.227 6  96301044.39406        40.500    23194838.922 6  96300979.40306        40.000
R23  23510961.988 6 125767797.61706        40.000    23510965.622 5  97819411.85905        32.250    23510962.945 5  97819336.85005        33.250
> 2018 11 06 19 01 30.0000000  0 30
C05  40277338.315 5 209734686.33405        35.250    40277334.381 6 162180156.74006        38.750
C10  39916515.788 5 207855809.57005        34.500    39916513.964 6 160727298.91706        39.250
C14  23643837.483 7 123119696.84407        43.500    23643834.731 8  95203950.39808        48.750
C18  40701578.412 5 211943835.64805        35.250
C24  22012861.918 8 114626795.22508        52.250
C25  25935131.344 5 135051038.30505        35.750
C26  22226989.675 8 115741819.33308        50.750
C29  25866398.356 6 134693136.51906        38.750
E07  25698192.116 7 135044946.61207        44.000    25698196.748 7 100845288.57407        47.000    25698192.976 7 103476017.46407        47.000    25698194.205 8 102160638.52608        50.000
E19  25276289.279 6 132827806.18306        40.500    25276290.734 7  99189608.22707        43.250    25276287.399 7 101777149.27107        44.000    25276288.383 7 100483383.75507        46.500
E20  22413772.661 7 117785175.48707        42.500
E21  26207632.280 7 137722046.72007        42.500    26207636.185 7 102844409.11907        46.000    26207632.221 7 105527292.73807        45.250    26207633.623 8 104185848.93408        48.500
E27  23142424.604 8 121614308.79008        49.750    23142427.582 8  90815919.26508        53.500    23142423.813 8  93185011.96908        53.750    23142425.140 9  92000463.12209        56.750
E30  23337171.057 7 122637726.70807        46.250    23337174.101 8  91580164.91308        49.500    23337170.315 8  93969191.98108        49.500    23337171.648 8  92774674.95308        52.500
G05  24212559.844 7 127237877.51907        43.250    24212559.840 4        24.750    24212558.111 4  99146393.87204        24.750    24212557.160 5  99146382.91405        35.750
G13  20336510.865 8 106869139.65608        50.000    20336510.637 7        44.500    20336507.997 7  83274662.05007        44.500
G15  20656505.253 8 108550691.26308        51.500    20656505.266 7        45.250    20656502.519 7  84584954.45507        45.250    20656502.998 8  84584960.45508        48.500
G17  24221170.243 7 127283119.44507        42.750    24221170.123 4        24.000    24221168.249 4  99181638.93904        24.000    24221168.187 6  99181641.93906        36.750
G20  23373963.597 6 122831014.79006        40.000    23373962.779 3        22.250    23373961.135 3  95712464.87403        22.250
G24  22324055.072 7 117313724.96907        46.000    22324055.130 5        35.000    22324055.240 5  91413290.60105        35.000    22324055.546 7  91413285.60807        44.250    22324057.010 8  87604408.93008        49.750
G28  21766664.214 7 114384629.65907        47.500    21766663.575 6        38.000    21766661.286 6  89130888.83406        38.000
G30  23619915.098 7 124123563.04207        42.000    23619914.580 4        27.000    23619915.366 4  96719699.14804        27.000    23619915.866 6  96719695.15406        39.500    23619916.824 7  92689720.98607        44.500
R03  23016078.040 6 123206875.71406        40.750    23016078.386 6  95827603.51406        40.500    23016078.349 6  95827597.50806        40.750
R04  19503985.347 8 104442965.25008        51.750    19503985.114 8  81233437.25608        50.500    19503985.199 8  81233451.25008        49.750
R05  20341311.568 8 108735974.60708        50.000    20341312.590 8  84572442.72108        49.500    20341312.333 8  84572431.72508        48.750
R13  21835892.857 6 116602511.68406        40.250    21835894.212 7  90690867.12807        42.000    21835894.398 6  90690870.11306        41.750
R14  19224373.376 8 102476783.75808        51.750    19224375.171 8  79704194.90508        51.000    19224375.094 8  79704180.90808        50.500
R15  20206201.526 8 107975852.61208        49.000    20206204.415 6  83981224.87106        41.500    20206204.748 6  83981228.87806        41.250
R22  23197642.479 6 123830583.01806        41.000    23197642.941 6  96312687.74906        41.000    23197643.601 6  96312622.74906        41.000
R23  23494254.199 6 125678420.02806        41.500    23494257.704 5  97749895.98405        33.000    23494255.809 5  97749820.94805        32.500
> 2018 11 06 19 02  0.0000000  0 30
C05  40277098.401 5 209733433.09105        35.000    40277093.428 6 162179187.66106        38.750
C10  39922305.563 5 207885949.99205        35.000    39922301.686 6 160750605.39306        40.000
C14  23661111.625 7 123209645.01907        43.000    23661108.451 8  95273504.01308        48.500
C18  40707801.144 5 211976239.72605        35.250
C24  22005379.616 8 114587832.98608        52.000
C25  25917691.167 5 134960225.58005        33.750
C26  22236087.088 8 115789192.57908        50.500
C29  25864909.997 6 134685383.03106        39.000
E07  25713769.718 7 135126804.36807        43.750    25713773.793 7 100906416.09807        47.000    25713769.896 7 103538739.62607        47.000    25713771.276 8 102222563.36908        50.000
E19  25264582.669 6 132766287.06706        40.250    25264584.088 7  99143668.65107        43.500    25264580.770 7 101730011.27007        44.000    25264581.724 7 100436844.96607        46.750
E20  22415933.432 7 117796530.61207        42.500
E21  26192361.541 7 137641796.82907        42.250    26192364.974 7 102784482.27607        45.250    26192361.372 7 105465802.58807        45.750    26192362.576 8 104125140.43508        48.500
E27  23139655.011 8 121599754.60908        49.750    23139658.030 8  90805050.89108        53.750    23139654.279 8  93173860.07208        53.750    23139655.574 9  91989452.98609        56.750
E30  23349091.059 7 122700366.54407        46.000    23349094.133 8  91626941.41608        49.750    23349090.382 8  94017188.74008        49.500    23349091.634 8  92822061.58508        52.500
G05  24233779.356 6 127349389.30006        38.000    24233779.378 3        23.000    24233776.890 3  99233286.22203        23.000    24233778.057 6  99233275.19206        38.250
G13  20342524.496 8 106900741.16808        50.000    20342524.268 7        44.500    20342521.591 7  83299286.59907        44.500
G15  20649946.042 8 108516223.01808        51.500    20649946.068 7        45.250    20649943.471 7  84558096.07907        45.250    20649943.731 8  84558102.08108        48.500
G17  24205644.816 6 127201534.16706        41.750    24205644.709 4        24.250    24205643.160 4  99118066.01304        24.250    24205642.749 6  99118069.02306        37.000
G20  23363457.051 6 122775801.93206        40.000    23363456.215 3        23.000    23363454.589 3  95669441.88703        23.000
G24  22307957.154 7 117229129.85507        46.000    22307957.207 5        35.000    22307957.591 5  91347372.34305        35.000    22307957.426 7  91347367.35507        44.500    22307959.058 8  87541237.27408        49.750
G28  21776369.368 7 114435629.78207        47.500    21776368.729 6        38.000    21776366.330 6  89170629.18506        38.000
G30  23637826.142 6 124217684.77606        41.750    23637825.606 4        27.000    23637826.222 4  96793040.74104        27.000    23637827.022 6  96793036.74706        39.250    23637827.570 7  92760006.69707        44.500
R03  23041082.928 6 123340731.73006        41.250    23041084.133 6  95931713.70406        41.000    23041084.198 6  95931707.68806        40.500
R04  19514161.897 8 104497460.68008        51.500    19514161.991 8  81275822.59008        50.750    19514161.774 8  81275836.58108        50.000
R05  20327889.159 8 108664223.21308        50.250    20327889.759 8  84516636.07708        49.500    20327889.787 8  84516625.07408        48.500    20327975.477 7  81505497.97317        42.750
R13  21855894.389 6 116709318.98606        39.750    21855895.561 6  90773939.46706        41.750    21855895.718 6  90773942.47006        41.250
R14  19227777.065 8 102494927.78108        51.500    19227778.859 8  79718306.92508        51.250    19227779.022 8  79718292.92808        50.500
R15  20193150.067 8 107906110.78208        48.500    20193153.283 6  83926981.25806        41.750    20193153.997 6  83926985.25906        41.000
R22  23200593.684 6 123846343.99906        41.250    23200595.106 6  96324946.31106        40.000    23200596.246 6  96324881.29706        40.000
R23  23477635.202 6 125589525.51706        39.000    23477639.446 5  97680755.79005        33.750    23477637.864 5  97680680.81605        34.000
`
Output:
last epoch: 2018-11-06 19:02:00
#epochs: 5

func (*Scanner) NextMetEpoch added in v0.3.10

func (scanner *Scanner) NextMetEpoch() (epoch met.Epoch, err error)

func (*Scanner) NextNavEpoch

func (scanner *Scanner) NextNavEpoch() (eph ephemeris.GenericEphemeris, err error)

NextNavEpoch -

func (*Scanner) NextObsEpoch

func (scanner *Scanner) NextObsEpoch() (epoch observation.Epoch, err error)

NextObsEpoch -

func (*Scanner) ScanHeader

func (scanner *Scanner) ScanHeader() (header Header, err error)

ScanHeader -

func (*Scanner) SetSystemFilter added in v0.50.0

func (scanner *Scanner) SetSystemFilter(sys gnss.Systems)

SetSystemFilter makes the scanner filter only these systems. Default is reading all systems.

type Settings added in v0.50.0

type Settings struct {
	RinexVersion     Version              `json:"rinex_version"`
	RinexType        string               `json:"rinex_type"`
	RinexSystem      string               `json:"rinex_system"`
	Interval         float64              `json:"interval"`
	TimeOfFirst      time.Time            `json:"time_of_first"`
	TimeOfLast       time.Time            `json:"time_of_last"`
	MarkerName       string               `json:"marker_name"`
	MarkerNumber     string               `json:"marker_number"`
	MarkerType       string               `json:"marker_type"`
	Observer         string               `json:"observer"`
	Agency           string               `json:"agency"`
	Program          string               `json:"program"`
	RunBy            string               `json:"run_by"`
	Date             string               `json:"date"`
	Comments         []string             `json:"comments"`
	ReceiverModel    string               `json:"receiver_model"`
	ReceiverSerial   string               `json:"receiver_serial"`
	ReceiverFirmware string               `json:"receiver_firmware"`
	AntennaModel     string               `json:"antenna_model"`
	AntennaSerial    string               `json:"antenna_serial"`
	AntennaPosition  coordinates.Vector3D `json:"antenna_position"`
	AntennaOffsetHEN coordinates.Vector3D `json:"antenna_offsetHEN"`
	// Sets which observation types to output (e.g. range, phase, doppler, snr)
	OutputSettings OutputSettings `json:"output_settings"`
	// This stores the order of the observation codes for each system.
	// The order of the observation codes is important for the RINEX 3&4 headers.
	// Important: RINEX 3 and 4 cannot be streamed because the header must be written before the data.
	ObservationsBySystem *observation.ObservationsBySystem `json:"observation_map"`
}

Settings - settings for RINEX header

func NewSettings added in v0.50.0

func NewSettings() *Settings

func (*Settings) FillFromSiteLog added in v0.50.0

func (s *Settings) FillFromSiteLog(site *sitelog.Site, date time.Time)

Updates the Settings with information from the sitelog Will try to fill using 9-char name but if empty fills using the 4-char name

type Version added in v0.50.0

type Version struct {
	Major MajorVersion
	Minor MinorVersion // out of 100
}

func LatestVersionFromMajor added in v0.50.0

func LatestVersionFromMajor(mv MajorVersion) Version

func VersionFromFloat added in v0.50.0

func VersionFromFloat(version float64) Version

func (Version) Equals added in v0.50.0

func (v Version) Equals(other Version) bool

func (Version) IsSupported added in v0.50.0

func (v Version) IsSupported() bool

func (Version) String added in v0.50.0

func (v Version) String() string

func (Version) ToFloat added in v0.50.0

func (v Version) ToFloat() float64

func (*Version) UnmarshalJSON added in v0.50.0

func (v *Version) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL