common

package
v0.16.8 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SPEED_OF_LIGHT = 299792458.0
	// earth semimajor axis (m)
	RE_GRS80 float64 = 6378137.0
	RE_WGS84 float64 = 6378137.0
	// earth flattening
	FE_GRS80 float64 = 1.0 / 298.257222101
	FE_WGS84 float64 = 1.0 / 298.257223563
)

Functions

This section is empty.

Types

type Combination added in v0.16.0

type Combination string

Combination is a type that defines the combination method for GNSS observables. IF = Ionosphere-Free NL = Narrow-Lane

func (Combination) MarshalJSON added in v0.16.0

func (c Combination) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Combination.

func (*Combination) UnmarshalJSON added in v0.16.0

func (c *Combination) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Combination.

type Config added in v0.16.0

type Config struct {
	Name                string                            `json:"name"`
	SystemSignalMapping *observation.ObservationsBySystem `json:"system_signal_mapping"`
	ElevationMasks      *ElevationMaskBySystem            `json:"elevation_masks"`
	Coordinates         coordinates.Vector3D              `json:"coordinates"`
	SampleInterval      int                               `json:"sample_interval"` // in milliseconds
	MWSlipThreshold     float64                           `json:"mw_slip_threshold"`
	Combination         string                            `json:"combination"` // "IF" or "NL"
	Output              Output                            `json:"output"`
}

Config is a struct that defines the configuration for a GNSS processing run.

func NewConfigFromFile added in v0.16.0

func NewConfigFromFile(path string) (*Config, error)

NewConfigFromFile reads a JSON file and returns a Config struct.

func (*Config) MarshalJSON added in v0.16.0

func (c *Config) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Config.

func (*Config) UnmarshalJSON added in v0.16.0

func (c *Config) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Config.

type ElevationMaskBySystem added in v0.16.0

type ElevationMaskBySystem map[gnss.System]float64

ElevationMaskBySystem is a map of GNSS systems to elevation mask values.

func NewElevationMaskBySystem added in v0.16.0

func NewElevationMaskBySystem() *ElevationMaskBySystem

NewElevationMaskBySystem returns a new ElevationMaskBySystem with default values.

func (ElevationMaskBySystem) MarshalJSON added in v0.16.0

func (e ElevationMaskBySystem) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ElevationMaskBySystem.

func (*ElevationMaskBySystem) UnmarshalJSON added in v0.16.0

func (e *ElevationMaskBySystem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ElevationMaskBySystem.

type FilterMap added in v0.16.8

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

FilterMap stores a map of high-pass filters, keyed by a unique identifier (e.g., satellite ID).

func NewFilterMap added in v0.16.8

func NewFilterMap(cutoffFreq float64, samplingPeriod float64) *FilterMap

NewFilterMap creates a new FilterMap.

func (*FilterMap) GetFilter added in v0.16.8

func (fm *FilterMap) GetFilter(key string) (*HighPassFilter, error)

GetFilter returns the high-pass filter for the given key. If no filter exists for the key, a new one is created.

type HighPassFilter added in v0.16.8

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

HighPassFilter represents a simple real-time first-order high-pass filter. It filters out low-frequency components from an input signal, allowing high-frequency components to pass through.

func NewHighPassFilter added in v0.16.8

func NewHighPassFilter(cutoffFreq float64, samplingPeriod float64) (*HighPassFilter, error)

NewHighPassFilter initializes a high-pass filter with the given cutoff frequency and sampling rate. cutoffFreq: The cutoff frequency in Hz. samplingRate: The sampling period in seconds. Returns a pointer to the initialized HighPassFilter and an error if the input values are invalid.

func (*HighPassFilter) Apply added in v0.16.8

func (hp *HighPassFilter) Apply(inputSample float64) float64

Apply processes a single input sample and returns the filtered output.

func (*HighPassFilter) Reset added in v0.16.8

func (hp *HighPassFilter) Reset()

type Output added in v0.16.0

type Output struct {
	Velocity     bool `json:"velocity"`
	GeometryFree bool `json:"geometry_free"`
	Residuals    bool `json:"residuals"`
}

Output is a struct that defines the output options for a GNSS configuration.

Jump to

Keyboard shortcuts

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