Sidereon.GNSS.SSR (Sidereon v0.29.2)

Copy Markdown View Source

State-space GNSS corrections.

This module is the Elixir wrapper over the core SSR/HAS correction store and corrected broadcast ephemeris source. It holds decoded corrections in a native resource and evaluates corrected satellite states through the core.

Summary

Functions

Return the latest clock correction for a satellite.

Evaluate an SSR-corrected broadcast satellite state at an epoch.

Decode framed RTCM SSR/HAS messages into a correction store.

Ingest one decoded RTCM message into an existing correction store.

Create an empty correction store.

Return the latest orbit correction for a satellite.

Sample an SSR-corrected broadcast source over a time grid.

Return the latest SSR URA index for a satellite.

Types

epoch()

@type epoch() :: NaiveDateTime.t() | tuple() | number()

t()

@type t() :: %Sidereon.GNSS.SSR{handle: reference()}

Functions

clock(ssr, satellite_id)

@spec clock(t(), String.t()) ::
  {:ok, Sidereon.GNSS.SSR.ClockCorrection.t()} | {:error, term()}

Return the latest clock correction for a satellite.

clock!(store, satellite_id)

corrected_position(broadcast, ssr, satellite_id, epoch, opts \\ [])

@spec corrected_position(
  Sidereon.GNSS.Broadcast.t(),
  t(),
  String.t(),
  epoch(),
  keyword()
) ::
  {:ok, %{position_ecef_m: {float(), float(), float()}, clock_s: float()}}
  | {:error, term()}

Evaluate an SSR-corrected broadcast satellite state at an epoch.

corrected_position!(broadcast, store, satellite_id, epoch, opts \\ [])

from_rtcm(bytes, week, tow_s, opts \\ [])

@spec from_rtcm(binary(), non_neg_integer(), number(), keyword()) ::
  {:ok, t()} | {:error, term()}

Decode framed RTCM SSR/HAS messages into a correction store.

from_rtcm!(bytes, week, tow_s, opts \\ [])

ingest(ssr, message, week, tow_s)

@spec ingest(t(), Sidereon.GNSS.RTCM.message(), non_neg_integer(), number()) ::
  :ok | {:error, term()}

Ingest one decoded RTCM message into an existing correction store.

Non-SSR RTCM messages are ignored by the core store.

new()

@spec new() :: t()

Create an empty correction store.

orbit(ssr, satellite_id)

@spec orbit(t(), String.t()) ::
  {:ok, Sidereon.GNSS.SSR.OrbitCorrection.t()} | {:error, term()}

Return the latest orbit correction for a satellite.

orbit!(store, satellite_id)

sample(broadcast, ssr, satellites, arg, step_s, opts \\ [])

Sample an SSR-corrected broadcast source over a time grid.

sample!(broadcast, store, satellites, window, step_s, opts \\ [])

ura_index(ssr, satellite_id)

@spec ura_index(t(), String.t()) :: {:ok, integer()} | {:error, term()}

Return the latest SSR URA index for a satellite.

ura_index!(store, satellite_id)