sp3

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPVFlag added in v0.10.0

func GetPVFlag(s string) (string, error)

GetPVFlag returns the position or velocity flag based on the input string

func GetSystem

func GetSystem(csys string) (isys int, err error)

func GetVersion added in v0.10.0

func GetVersion(s string) (string, error)

GetVersion returns the SP3 version based on the input string

Types

type CompositeKey added in v0.10.0

type CompositeKey struct {
	System    gnss.System
	Satellite int
	Type      string // P, EP, V, EV
}

CompositeKey represents a composite key for the map

type EPRecord added in v0.10.0

type EPRecord struct {
	Xs     int
	Ys     int
	Zs     int
	ClkS   int
	XYCorr int
	XZCorr int
	XCCorr int
	YZCorr int
	YCCorr int
	ZCCorr int
	// contains filtered or unexported fields
}

EPRecord represents the Position and Clock Correlation record

func (EPRecord) GetEpoch added in v0.10.0

func (cf EPRecord) GetEpoch() time.Time

func (EPRecord) GetRowType added in v0.10.0

func (cf EPRecord) GetRowType() string

func (EPRecord) GetSatellite added in v0.10.0

func (cf EPRecord) GetSatellite() int

func (EPRecord) GetSystem added in v0.10.0

func (cf EPRecord) GetSystem() gnss.System

type EVRecord added in v0.10.0

type EVRecord struct {
	XVelSDev int
	YVelSDev int
	ZVelSDev int
	ClkSDev  int
	XYCorr   int
	XZCorr   int
	XCCorr   int
	YZCorr   int
	YCCorr   int
	ZCCorr   int
	// contains filtered or unexported fields
}

EVRecord represents the Velocity and Clock Rate-of-Change Correlation record

func (EVRecord) GetEpoch added in v0.10.0

func (cf EVRecord) GetEpoch() time.Time

func (EVRecord) GetRowType added in v0.10.0

func (cf EVRecord) GetRowType() string

func (EVRecord) GetSatellite added in v0.10.0

func (cf EVRecord) GetSatellite() int

func (EVRecord) GetSystem added in v0.10.0

func (cf EVRecord) GetSystem() gnss.System

type Epoch added in v0.10.0

type Epoch struct {
	Time    time.Time
	Records []Record
}
type Header struct {
	Version            string
	PosVelFlag         string
	StartTime          time.Time
	NumberOfEpochs     int
	DataUsed           string
	CoordinateSys      string
	OrbitType          string
	Agency             string
	GPSWeek            int
	SOW                float64 // Seconds of Week
	EpochInterval      float64
	MJD                int     // Modified Julian Date
	FractionalDay      float64 // Fractional Day
	NumberOfSatellites int
	Satellites         []string
	Accuracy           []int
	StringFields       [][]string
	FloatFields        [][]float64
	IntFields          [][]int
	Comments           []string
}

Header represents the header of an SP3 file

type PRecord added in v0.10.0

type PRecord struct {
	X    float64
	Y    float64
	Z    float64
	Clk  float64
	Xs   int
	Ys   int
	Zs   int
	ClkS int
	ClkE string
	ClkP string
	OrbM string
	OrbP string
	// contains filtered or unexported fields
}

PRecord represents the Position and Clock record

func (PRecord) GetEpoch added in v0.10.0

func (cf PRecord) GetEpoch() time.Time

func (PRecord) GetRowType added in v0.10.0

func (cf PRecord) GetRowType() string

func (PRecord) GetSatellite added in v0.10.0

func (cf PRecord) GetSatellite() int

func (PRecord) GetSystem added in v0.10.0

func (cf PRecord) GetSystem() gnss.System

type Record added in v0.10.0

type Record interface {
	GetEpoch() time.Time
	GetSystem() gnss.System
	GetSatellite() int
	GetRowType() string
}

Record is an interface for different SP3 record types

type SP3 added in v0.10.0

type SP3 struct {
	Reader *bufio.Reader
	Header Header
	Epochs []Epoch
}

func NewSP3 added in v0.10.0

func NewSP3(r io.Reader) (*SP3, error)

func (*SP3) ParseAccuracy added in v0.10.0

func (s *SP3) ParseAccuracy() error

ParseAccuracy parses the accuracy lines from an SP3 file

func (*SP3) ParseFirstLine added in v0.10.0

func (s *SP3) ParseFirstLine() error

ParseFirstLine parses the first line of an SP3 file into an SP3Header struct

func (*SP3) ParseSP3SatelliteInfo added in v0.10.0

func (s *SP3) ParseSP3SatelliteInfo() error

ParseSP3SatelliteInfo parses the satellite information and accuracy lines from an SP3 file

func (*SP3) ParseSatellites added in v0.10.0

func (s *SP3) ParseSatellites() error

ParseSatellites parses the satellite lines from an SP3 file

func (*SP3) ParseSecondLine added in v0.10.0

func (s *SP3) ParseSecondLine() error

ParseSecondLine parses the second line of an SP3 file into an SP3SecondLine struct

func (*SP3) Read added in v0.10.0

func (s *SP3) Read() (err error)

func (*SP3) ReadEpoch added in v0.10.0

func (s *SP3) ReadEpoch() (err error)

func (*SP3) ReadHeader added in v0.10.0

func (s *SP3) ReadHeader() error

ReadHeader reads and parses the SP3 header

type SP3DataMap added in v0.10.0

type SP3DataMap struct {
	Records map[CompositeKey][]Record
}

SP3DataMap holds the optimized data structure for fast lookups and interpolations

func NewSP3DataMap added in v0.10.0

func NewSP3DataMap(data *SP3) *SP3DataMap

NewSP3DataMap initializes a new SP3DataMap from raw SP3Data

func (*SP3DataMap) LinearInterpolateXYZ added in v0.10.0

func (data *SP3DataMap) LinearInterpolateXYZ(system gnss.System, satellite int, t time.Time) (float64, float64, float64, error)

LinearInterpolateXYZ interpolates the X, Y, Z values for a given system, satellite, and time

type VRecord added in v0.10.0

type VRecord struct {
	XVel        float64
	YVel        float64
	ZVel        float64
	ClkRateChg  float64
	XVelSDev    int
	YVelSDev    int
	ZVelSDev    int
	ClkRateSDev int
	// contains filtered or unexported fields
}

VRecord represents the Velocity and Clock Rate-of-Change record

func (VRecord) GetEpoch added in v0.10.0

func (cf VRecord) GetEpoch() time.Time

func (VRecord) GetRowType added in v0.10.0

func (cf VRecord) GetRowType() string

func (VRecord) GetSatellite added in v0.10.0

func (cf VRecord) GetSatellite() int

func (VRecord) GetSystem added in v0.10.0

func (cf VRecord) GetSystem() gnss.System

Jump to

Keyboard shortcuts

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