Sidereon.GNSS.Distribution (Sidereon v0.29.0)

Copy Markdown View Source

Exact GNSS product acquisition from explicit public distributors.

Product identity is independent from transport. An ordered source list may contain the cataloged direct archive, NASA CDDIS/Earthdata, a local file, or caller-provided bytes. Switching source never changes center, solution class, issue, cadence, date, family, or official filename.

This module owns authenticated HTTP and cache IO. The Rust core and NIF remain network-free and continue to own catalog derivation and SP3/IONEX parsing. Sidereon.GNSS.Data delegates identity/1, request/2, cddis_url/1, and acquire/2 here.

Summary

Functions

Acquire an exact product from only its ordered, caller-selected sources.

Build the official CDDIS URL for an exact SP3 or IONEX identity.

Cataloged direct analysis-center distribution.

Resolve an existing data product to exact distributor-independent identity.

Caller-provided in-memory product bytes.

Caller-provided local file source.

Official NASA CDDIS/Earthdata HTTPS distribution.

Build an exact request from an ordered list of acceptable distributors.

Types

error_reason()

@type error_reason() ::
  :offline_cache_miss
  | {:unsupported_distribution, atom(), String.t()}
  | {:authentication_required, integer(), String.t()}
  | {:authentication_failed, integer(), String.t()}
  | {:authorization_denied, integer(), String.t()}
  | {:product_not_published, integer(), String.t()}
  | {:retired_endpoint, integer(), String.t()}
  | {:redirect_policy_failure, integer(), String.t()}
  | {:malformed_url, String.t()}
  | {:transport, atom(), String.t()}
  | {:http_status, integer(), String.t()}
  | {:invalid_content_type, String.t(), String.t()}
  | {:error_document, String.t()}
  | {:content_length_mismatch, term(), non_neg_integer(), String.t()}
  | {:download_size_exceeded, non_neg_integer()}
  | {:decompression_failed, term()}
  | {:checksum_mismatch, String.t(), String.t()}
  | {:product_validation_failed, term()}
  | {:cache_read_failed, term()}
  | {:cache_write_failed, term()}
  | {:all_distributors_failed, [Sidereon.GNSS.Distribution.SourceFailure.t()]}

Functions

acquire(request, opts \\ [])

Acquire an exact product from only its ordered, caller-selected sources.

cddis_url(identity)

@spec cddis_url(Sidereon.GNSS.Distribution.ProductIdentity.t()) ::
  {:ok, String.t()} | {:error, error_reason() | term()}

Build the official CDDIS URL for an exact SP3 or IONEX identity.

direct()

Cataloged direct analysis-center distribution.

identity(product)

Resolve an existing data product to exact distributor-independent identity.

in_memory(content, opts \\ [])

@spec in_memory(
  binary(),
  keyword()
) :: Sidereon.GNSS.Distribution.Source.t()

Caller-provided in-memory product bytes.

local_file(path, opts \\ [])

@spec local_file(
  String.t(),
  keyword()
) :: Sidereon.GNSS.Distribution.Source.t()

Caller-provided local file source.

nasa_cddis()

@spec nasa_cddis() :: Sidereon.GNSS.Distribution.Source.t()

Official NASA CDDIS/Earthdata HTTPS distribution.

request(product, sources)

Build an exact request from an ordered list of acceptable distributors.