Orbis.GnssData.Product (Orbis v0.7.0)

Copy Markdown View Source

A GNSS product specification: the analysis center, content type, calendar date, and temporal sampling that together identify one archived file.

A Product is a pure value. It resolves — deterministically and without any network — to a canonical filename, a GPS week, a day-of-year, and a full archive URL via Orbis.GnssData.Catalog. Build one with the convenience builders (Orbis.GnssData.mgex_sp3/2 and friends) or with new/4.

Fields

  • :center — analysis-center code, e.g. :gfz, :cod, :grg, :wum, :igs
  • :content — content type: :sp3, :clk, :nav, or :ionex
  • :date — the product day as a Date
  • :sample — sampling code string, e.g. "05M", "30S", "01D"

Summary

Functions

The full, compressed archive URL for the product.

The canonical IGS long-name filename for the product (no .gz suffix).

The product's day-of-year (001366).

A short, human-readable description used in error messages.

The product's GPS week number.

Build a Product, validating the center, content type, and sampling code.

Types

t()

@type t() :: %Orbis.GnssData.Product{
  center: atom(),
  content: atom(),
  date: Date.t(),
  sample: String.t()
}

Functions

archive_url(p)

@spec archive_url(t()) :: {:ok, String.t()} | {:error, {:unsupported_product, term()}}

The full, compressed archive URL for the product.

canonical_filename(p)

@spec canonical_filename(t()) ::
  {:ok, String.t()} | {:error, {:unsupported_product, term()}}

The canonical IGS long-name filename for the product (no .gz suffix).

day_of_year(product)

@spec day_of_year(t()) :: 1..366

The product's day-of-year (001366).

describe(p)

@spec describe(t()) :: String.t()

A short, human-readable description used in error messages.

gps_week(product)

@spec gps_week(t()) :: non_neg_integer()

The product's GPS week number.

new(center, content, date, sample)

@spec new(atom(), atom(), Date.t(), String.t()) ::
  {:ok, t()} | {:error, {:unsupported_product, term()}}

Build a Product, validating the center, content type, and sampling code.

Returns {:ok, %Product{}} or {:error, {:unsupported_product, _}}.