Sidereon.GNSS.Ntrip (Sidereon v0.30.0)

Copy Markdown View Source

NTRIP client helpers and stream process.

Protocol handling is delegated to the core sans-I/O machine through the NIF. This module owns transport, reconnect timing, and delivery of opaque payload bytes or decoded RTCM messages. User-supplied NTRIP endpoints are not checked against the archive host allowlist; redirects are classified as terminal protocol rejections and are never followed.

Basic credentials over plain TCP are sent in cleartext. Use tls: true when the caster supports it.

Summary

Functions

Format one NMEA GGA sentence for a VRS feed.

Alias for request_bytes/2, matching the canonical facade function name.

Parse sourcetable bytes through the core parser.

Build the raw NTRIP request bytes for a host and option set.

Fetch and parse a caster sourcetable.

Serialize a parsed sourcetable through the core serializer.

Return an Elixir stream of payload binaries from a started NTRIP stream process.

Types

error_reason()

@type error_reason() ::
  :unauthorized
  | :digest_not_supported
  | {:mountpoint_not_found, Sidereon.GNSS.Ntrip.Sourcetable.t() | nil}
  | {:caster_error, String.t()}
  | {:http_status, non_neg_integer(), String.t()}
  | {:unexpected_content_type, String.t()}
  | {:protocol, term()}
  | {:network, term()}
  | {:stream_stalled, number()}

Functions

format_gga(position, utc_seconds_of_day)

Format one NMEA GGA sentence for a VRS feed.

ntrip_request_bytes(host, opts \\ [])

@spec ntrip_request_bytes(
  String.t(),
  keyword()
) :: {:ok, binary()} | {:error, error_reason()}

Alias for request_bytes/2, matching the canonical facade function name.

parse_sourcetable(bytes)

Parse sourcetable bytes through the core parser.

request_bytes(host, opts \\ [])

@spec request_bytes(
  String.t(),
  keyword()
) :: {:ok, binary()} | {:error, error_reason()}

Build the raw NTRIP request bytes for a host and option set.

The options match sourcetable/2 and Ntrip.Stream.start_link/1: :mountpoint, :port, :version, :credentials, :user_agent_product, and :gga. This is the public sans-I/O request builder used by the stream and raw sourcetable flows.

sourcetable(host, opts \\ [])

@spec sourcetable(
  String.t(),
  keyword()
) :: {:ok, Sidereon.GNSS.Ntrip.Sourcetable.t()} | {:error, error_reason()}

Fetch and parse a caster sourcetable.

sourcetable_to_text(sourcetable)

Serialize a parsed sourcetable through the core serializer.

stream(opts)

Return an Elixir stream of payload binaries from a started NTRIP stream process.