filter

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmbiguityKey

type AmbiguityKey struct {
	System      gnss.System
	SatelliteID int
	Observable  observation.ObservationKey
}

AmbiguityKey uniquely identifies a phase ambiguity parameter

func (AmbiguityKey) String

func (ak AmbiguityKey) String() string

String returns a string representation of the ambiguity key

type EKFState

type EKFState struct {
	// State vector components
	Position       coordinates.Vector3D     // Receiver position in ECEF (meters)
	ReceiverClocks map[gnss.System]float64  // Per-system receiver clocks (meters)
	TroposphereZWD float64                  // Zenith wet delay (meters)
	TropGradientNE [2]float64               // Troposphere gradients North/East (meters)
	Ambiguities    map[AmbiguityKey]float64 // Float ambiguities per satellite+signal (meters)

	// Covariance matrix (stored as full matrix)
	// Order: [X, Y, Z, Clk_GPS, Clk_GLO, ..., Trop_ZWD, Grad_N, Grad_E, N_1, N_2, ...]
	Covariance [][]float64

	// Metadata
	Epoch     time.Time
	StateSize int
	// contains filtered or unexported fields
}

EKFState represents the state vector and covariance for the PPP filter

func NewEKF

func NewEKF(
	initialPosition coordinates.Vector3D,
	processingMode string,
	estimateTroposphere bool,
	estimateGradients bool,
	processNoisePosition float64,
	processNoiseClock float64,
	processNoiseTroposphere float64,
	processNoiseAmbiguity float64,
) *EKFState

NewEKF creates a new EKF state with initial values and covariance

func (*EKFState) AddAmbiguity

func (ekf *EKFState) AddAmbiguity(key AmbiguityKey, initialValue float64, initialVariance float64)

AddAmbiguity adds a new ambiguity parameter to the state vector

func (*EKFState) ComputePDOP

func (ekf *EKFState) ComputePDOP() float64

ComputePDOP computes the Position Dilution of Precision from the covariance matrix

func (*EKFState) GetPositionCovariance

func (ekf *EKFState) GetPositionCovariance() [3][3]float64

GetPositionCovariance extracts the 3x3 position covariance submatrix

func (*EKFState) GetStateVector

func (ekf *EKFState) GetStateVector() []float64

GetStateVector returns the current state as a flat vector

func (*EKFState) IsConverged

func (ekf *EKFState) IsConverged(threshold float64) bool

IsConverged checks if the solution has converged based on position uncertainty

func (*EKFState) Predict

func (ekf *EKFState) Predict(dt float64) error

Predict performs the time update (prediction) step of the EKF This propagates the state and covariance forward in time

func (*EKFState) RemoveAmbiguity

func (ekf *EKFState) RemoveAmbiguity(key AmbiguityKey) error

RemoveAmbiguity removes an ambiguity parameter from the state This is needed when a satellite drops out or after cycle slip

func (*EKFState) Update

func (ekf *EKFState) Update(sats *state.PPPSatelliteStateMap) error

Update performs the measurement update step of the EKF This incorporates new observations to correct the predicted state

func (*EKFState) UpdateFromVector

func (ekf *EKFState) UpdateFromVector(x []float64)

UpdateFromVector updates the state from a flat vector

Jump to

Keyboard shortcuts

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