Sidereon.GNSS.Positioning.SourcedSolution (Sidereon v0.8.0)

Copy Markdown View Source

A single-point-positioning solution paired with the provenance of the ephemeris that produced it.

Returned by Sidereon.GNSS.Positioning.solve_with_fallback/5. solution is the usual Sidereon.GNSS.Positioning.Solution; source records which source produced the fix and how it related to the requested epoch, so a degraded or substituted source is never reported silently:

  • {:precise, %Sidereon.GNSS.Staleness.StalenessMetadata{}} - a precise SP3 product produced the fix. The metadata kind is :exact (zero staleness, the product covered the epoch) or :nearest_prior (a stale-but-within-cap product was used), with its source epoch and staleness.
  • {:broadcast, {:precise_unavailable, selection_error}} - the precise selection was declined outright (no precise products, none covering or preceding the epoch, or the nearest beyond the cap), so broadcast produced the fix. selection_error is the typed Sidereon.GNSS.Staleness.selection_error/0 reason.
  • {:broadcast, {:precise_degraded_unusable, staleness, spp_reason}} - a stale-but-within-cap precise product was selected but could not serve the requested epoch (its coverage ends before it), so broadcast produced the fix. staleness is the tried product's Sidereon.GNSS.Staleness.StalenessMetadata, and spp_reason is the precise solve error that triggered the fallback.

Summary

Types

source()

@type source() ::
  {:precise, Sidereon.GNSS.Staleness.StalenessMetadata.t()}
  | {:broadcast,
     {:precise_unavailable, Sidereon.GNSS.Staleness.selection_error()}}
  | {:broadcast,
     {:precise_degraded_unusable, Sidereon.GNSS.Staleness.StalenessMetadata.t(),
      term()}}

t()

@type t() :: %Sidereon.GNSS.Positioning.SourcedSolution{
  solution: Sidereon.GNSS.Positioning.Solution.t(),
  source: source()
}