The descriptive IONEX header records a product carries.
The records a product's grid determines (EPOCH OF FIRST MAP,
EPOCH OF LAST MAP, MAP DIMENSION) are derived by the reader and writer and
are not held here. # OF MAPS IN FILE is held as the file wrote it, because
IONEX 1 describes it as the total TEC/RMS/height map count while producers
write the TEC map count, and a product written back carries the one it came
with.
Mapping function
mapping_function distinguishes a product that declares no
MAPPING FUNCTION record from one that declares a code:
nil- the product carries noMAPPING FUNCTIONrecord.:none,:cosz,:qfac- the three codes IONEX 1 names.- a string - any other code, kept exactly as written.
""is a declared blank code, which is a different statement fromnil.
A field left at its struct default reads as the value IONEX 1 gives for an
unstated record: version 1.0, blank text fields, no descriptions or
comments, an INTERVAL of 0 (may vary), an ELEVATION CUTOFF of 0.0
(unknown), and no station, satellite or map count.
What is refused
{:invalid_header_field, field, value}- a field whose value is not of the field's type, such as a count that is not an integer or a description list holding something other than strings.{:value_out_of_range, field, value}- a count outside0..4294967295, the unsigned 32-bit rangeINTERVAL,# OF STATIONS,# OF SATELLITESand# OF MAPS IN FILEcross the boundary in, or a version or elevation cutoff that is an integer larger in magnitude than the largest finite double, which has no double to be read onto. The offending value is returned as given.{:invalid_mapping_function, value}- a mapping function that is neithernil, one of the three atoms, nor a string.
A mapping code is carried to the product exactly as given. Writing it back out
as text is a separate, fallible step: Sidereon.GNSS.Ionosphere.ionex_to_string/1
refuses a code the reader would not read back as itself, such as "" or a
code longer than four characters, rather than writing something else. Such a
code is held and read back unchanged until a caller asks for text.
Summary
Functions
A header declaring mapping_function, with every other record at the value
IONEX 1 gives for an unstated one.
Types
@type mapping_function() :: :none | :cosz | :qfac | String.t() | nil
@type t() :: %Sidereon.GNSS.Ionosphere.Header{ comments: [String.t()], date: String.t(), descriptions: [String.t()], elevation_cutoff_deg: float(), interval_s: non_neg_integer(), mapping_function: mapping_function(), maps_in_file: non_neg_integer() | nil, observables_used: String.t(), program: String.t(), run_by: String.t(), satellite_count: non_neg_integer() | nil, satellite_system: String.t(), station_count: non_neg_integer() | nil, version: float() }
Functions
@spec new( mapping_function(), keyword() ) :: t()
A header declaring mapping_function, with every other record at the value
IONEX 1 gives for an unstated one.
Pass nil to declare no MAPPING FUNCTION record at all. opts sets any of
the other records.