common

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 2 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

func FloatPtrEqual added in v0.26.1

func FloatPtrEqual[F float32 | float64](val1 *F, val2 *F) bool

func PrintFloatPtr added in v0.26.1

func PrintFloatPtr[F float32 | float64](format string, val *F) string

func ValueOrZero added in v0.26.1

func ValueOrZero[F float32 | float64](val *F) F

Types

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()

Directories

Path Synopsis
Package coordinates provides functions for coordinate transformations between geodetic, ECEF, ENU, and body frames, including ionospheric pierce point calculations.
Package coordinates provides functions for coordinate transformations between geodetic, ECEF, ENU, and body frames, including ionospheric pierce point calculations.
sun
Package sun provides a low-precision Sun position calculator in ECEF coordinates.
Package sun provides a low-precision Sun position calculator in ECEF coordinates.

Jump to

Keyboard shortcuts

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