tdcp

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsDuration added in v0.9.0

func AbsDuration(d time.Duration) time.Duration

Helper function to get the absolute value of a time.Duration

func FilterEpochs added in v0.10.1

func FilterEpochs(epochs []observation.Epoch, config gnssconfig.Config) ([]observation.Epoch, error)

func Prepare added in v0.10.1

func Prepare(epochs []observation.Epoch, ephStore *ephemeris.EphemerisStore, config gnssconfig.Config) ([]state.SatelliteStateMap, error)

Types

type CartesianDelta added in v0.12.3

type CartesianDelta struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	Z float64 `json:"z"`
}

type GeodeticDelta added in v0.12.3

type GeodeticDelta struct {
	E float64 `json:"e"`
	N float64 `json:"n"`
	U float64 `json:"u"`
}

type Input added in v0.12.3

type Input struct {
	Type    string      `json:"type"`    // "configuration", "ephemeris", "observation"
	Payload interface{} `json:"payload"` // The actual data (Metadata, Ephemeris, Epoch)
}

Input represents the input data structure for the TDCP

type Output added in v0.12.3

type Output struct {
	Type    string      `json:"type"`    // "velocity", "metrics"
	Payload interface{} `json:"payload"` // The actual velocity or metrics data
}

Output represents the output data structure for the TDCP

func Calculate added in v0.10.1

func Calculate(epochs []observation.Epoch, ssm []state.SatelliteStateMap, config gnssconfig.Config) ([]Output, error)

CalculateTDCP calculates the TDCP for the two epochs.

func Process

func Process(epochs []observation.Epoch, ephStore *ephemeris.EphemerisStore, config *gnssconfig.Config) ([]Output, error)

Process calculates the TDCP for the two epochs.

type TDCP

type TDCP struct {
	Config         gnssconfig.Config
	InputChan      chan Input
	OutputChan     chan Output
	Epochs         []observation.Epoch
	Ephemeris      *ephemeris.EphemerisStore
	SatelliteState []state.SatelliteStateMap
}

TDCP is a struct that contains the data channels and the metadata, ephemeris, and epochs

func NewTDCP added in v0.9.0

func NewTDCP(config gnssconfig.Config) *TDCP

NewTDCP creates a new TDCP

func (*TDCP) Close added in v0.9.0

func (tdcp *TDCP) Close()

Close closes the data and results channels

func (*TDCP) Run

func (tdcp *TDCP) Run()

Run runs the TDCP

type Velocity added in v0.12.0

type Velocity struct {
	StreamID       string         `json:"stream_id"`
	Timestamp      time.Time      `json:"timestamp"`
	SatelliteCount int            `json:"satellite_count"`
	TimeDelta      time.Duration  `json:"time_delta"`
	ClockOffset    float64        `json:"clock_offset"`
	GeodeticDelta  GeodeticDelta  `json:"geodetic_delta"`
	CartesianDelta CartesianDelta `json:"cartesian_delta"`
}

func (*Velocity) Decode added in v0.12.0

func (r *Velocity) Decode(data []byte) (interface{}, error)

func (*Velocity) Encode added in v0.12.0

func (r *Velocity) Encode(value interface{}) ([]byte, error)

func (*Velocity) WriteJSON added in v0.12.0

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

Jump to

Keyboard shortcuts

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