tdcp

package
v0.7.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateNormECEF added in v0.6.10

func CalculateNormECEF(x, y, z float64) float64

CalculateNormECEF calculates the norm (magnitude) of ECEF XYZ coordinates.

func IsNormWithinRange added in v0.6.10

func IsNormWithinRange(x, y, z, minNorm, maxNorm float64) bool

IsNormWithinRange checks if the norm of ECEF coordinates is within the specified range.

func Norm added in v0.7.4

func Norm(vector []float64) float64

norm calculates the Euclidean norm of a vector.

Types

type EphemerisMap added in v0.7.6

type EphemerisMap map[SatKey]gnss.Ephemeris

type EphemerisSlice added in v0.7.4

type EphemerisSlice []gnss.Ephemeris

func (EphemerisSlice) GetEphemeris added in v0.7.4

func (ephemerisSlice EphemerisSlice) GetEphemeris(sys gnss.System, sat int, t time.Time) (gnss.Ephemeris, error)

find the closest ephemeris to the time of clock

func (EphemerisSlice) GetEphemerisMap added in v0.7.6

func (ephemerisSlice EphemerisSlice) GetEphemerisMap(t time.Time) EphemerisMap

type Metadata

type Metadata struct {
	Name           string   `xml:"name"       json:"name"`
	X              float64  `xml:"x"          json:"x"`
	Y              float64  `xml:"y"          json:"y"`
	Z              float64  `xml:"z"          json:"z"`
	EleMask        float64  `xml:"elevation_mask" json:"elevation_mask"`
	GPSFrequencies []string `xml:"gps_frequencies" json:"gps_frequencies"`
	// GLOFrequencies   []string `xml:"glo_frequencies" json:"glo_frequencies"`
	// GALFrequencies   []string `xml:"gal_frequencies" json:"gal_frequencies"`
	// BDSFrequencies   []string `xml:"bds_frequencies" json:"bds_frequencies"`
	// QZSSFrequencies  []string `xml:"qzss_frequencies" json:"qzss_frequencies"`
	// IRNSSFrequencies []string `xml:"irnss_frequencies" json:"irnss_frequencies"`
	// SBASFrequencies  []string `xml:"sbas_frequencies" json:"sbas_frequencies"`
	MWSlipThreshold float64 `xml:"mw_slip_threshold" json:"mw_slip_threshold"`
	Combination     string  `xml:"combination" json:"combination"`
}

TODO: add validation for metadata Metadata contains the metadata of the station

func (Metadata) CheckCoordinates added in v0.7.4

func (meta Metadata) CheckCoordinates() bool

CheckCoordinates checks if the metadata has valid coordinates

type Results

type Results struct {
	Metadata
	// time of first epoch
	Time time.Time
	// time difference between epochs
	DeltaTime time.Duration
	// estimated parameters
	DelC float64
	DelE float64
	DelN float64
	DelU float64
	DelX float64
	DelY float64
	DelZ float64
}

func CalculateTDCP

func CalculateTDCP(metadata Metadata, satellites []Satellites) (results Results, err error)

func Process

func Process(meta Metadata, ephemerisSlice EphemerisSlice, epochs [2]gnss.Epoch) (r Results, err error)

func (*Results) WriteJSON added in v0.7.4

func (r *Results) WriteJSON(w io.Writer) error

type SatKey added in v0.7.4

type SatKey struct {
	Sys  gnss.System
	SvID int
}

type Satellite

type Satellite struct {
	Sys                    gnss.System
	SvID                   int
	Prepared               bool
	SatellitePosition      SatellitePosition
	SatelliteElevation     float64
	SatelliteAzimuth       float64
	TroposphericCorrection float64
	IonosphericCorrection  float64
	MelbourneWubbena       float64
	// IonosphereFree         float64
	// GeometryFree           float64
	ObservationMap map[string]*gnss.Observation
}

func (*Satellite) CalculateIonosphericCorrection added in v0.7.4

func (s *Satellite) CalculateIonosphericCorrection() error

func (*Satellite) CalculateMelbourneWubbena added in v0.7.4

func (s *Satellite) CalculateMelbourneWubbena(meta Metadata) error

CalculateMelbourneWubbena calculates the Melbourne-Wubbena combination for a given pair of observation codes c1 and c2 (e.g. "1C" and "2W")

func (*Satellite) CalculateSatelliteAzimuthElevation added in v0.7.4

func (s *Satellite) CalculateSatelliteAzimuthElevation(meta Metadata) error

func (*Satellite) CalculateSatelliteCoordinates added in v0.7.4

func (s *Satellite) CalculateSatelliteCoordinates(meta Metadata, epochTime time.Time, eph gnss.Ephemeris) error

func (*Satellite) CalculateTroposphericCorrection added in v0.7.4

func (s *Satellite) CalculateTroposphericCorrection(meta Metadata) error

func (*Satellite) Prepare added in v0.7.4

func (s *Satellite) Prepare(meta Metadata, ephemeris gnss.Ephemeris, dt time.Time) error

func (*Satellite) WriteJSON added in v0.7.4

func (s *Satellite) WriteJSON(w io.Writer) error

type SatellitePosition added in v0.7.4

type SatellitePosition struct {
	X, Y, Z              float64
	ClockCorrection      float64
	RelativityCorrection float64
}

type Satellites added in v0.7.4

type Satellites struct {
	Time         time.Time
	SatelliteMap map[SatKey]*Satellite
}

func NewSatellitesFromEpoch added in v0.7.4

func NewSatellitesFromEpoch(epoch gnss.Epoch) Satellites

func (*Satellites) PrepareAll added in v0.7.4

func (satellites *Satellites) PrepareAll(meta Metadata, ephemerisMap EphemerisMap) error

func (*Satellites) WriteJSON added in v0.7.4

func (satellites *Satellites) WriteJSON(w io.Writer) error

type TDCP

type TDCP struct {
	// Metadata Channel
	MetaChan <-chan Metadata
	// Ephemeris Channel
	EphChan <-chan gnss.Ephemeris
	// Observation Channel
	ObsChan <-chan gnss.Epoch
	// Results Channel
	ResultsChan chan<- Results
}

func (*TDCP) Run

func (tdcp *TDCP) Run()

Run the event loop

Jump to

Keyboard shortcuts

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