spp

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DOP

type DOP struct {
	GDOP float64
	PDOP float64
	HDOP float64
	VDOP float64
}

DOP holds Dilution of Precision values computed from the WLS covariance matrix.

type Residual

type Residual struct {
	System      gnss.System
	SatelliteID observation.SatelliteID
	Residual    float64 // meters
	Elevation   float64 // degrees
	Azimuth     float64 // degrees
}

Residual holds per-satellite post-fit residual information.

type Result

type Result struct {
	Time                time.Time
	Position            coordinates.Vector3D
	ReceiverClockOffset float64 // seconds
	NumSatellites       int
	DOP                 DOP
	Residuals           []Residual
	Converged           bool
	Iterations          int
}

Result holds the output of an SPP position solution for a single epoch.

type SolverProcessor

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

SolverProcessor aggregates per-satellite pipeline states and computes a position solution using Bancroft for initial estimate followed by iterative weighted least squares refinement with elevation-dependent weighting.

This is an epoch-level processor: it runs after all satellites have been processed through the per-satellite pipeline. It is not a pipeline.Processor (which operates per-satellite), but rather consumes the collected states.

func NewSolverProcessor

func NewSolverProcessor(minSatellites int) *SolverProcessor

NewSolverProcessor creates a new SPP solver. minSatellites is the minimum number of satellites required for a solution (typically 4).

func (*SolverProcessor) ProcessEpoch

func (s *SolverProcessor) ProcessEpoch(
	_ context.Context,
	states []*pipeline.SatelliteState,
	epochTime time.Time,
) (*Result, error)

ProcessEpoch computes a position solution from the collected satellite states. Each state must have Position set (from PositionProcessor) and an ionosphere-free combination (from IonosphereFreeProcessor). States without IF are skipped.

The solver:

  1. Uses the Bancroft algorithm for an initial position estimate
  2. Refines with iterative weighted least squares using sin²(elevation) weighting
  3. Computes DOP values and per-satellite residuals

Jump to

Keyboard shortcuts

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