Class Taf
- Namespace
- Cavok
- Assembly
- Cavok.dll
A parsed terminal aerodrome forecast. Use Parse(string) to parse leniently or ParseStrict(string) to throw on errors.
public sealed record Taf : IEquatable<Taf>
- Inheritance
-
Taf
- Implements
- Inherited Members
Properties
Base
The initial forecast conditions.
public ForecastConditions Base { get; init; }
Property Value
Changes
Change groups in order.
public IReadOnlyList<TafChange> Changes { get; init; }
Property Value
Diagnostics
Problems found while parsing.
public IReadOnlyList<Diagnostic> Diagnostics { get; init; }
Property Value
HasErrors
True when at least one diagnostic is an error.
public bool HasErrors { get; }
Property Value
IsAmended
True for an amended forecast (AMD).
public bool IsAmended { get; init; }
Property Value
IsCancelled
True when the forecast is cancelled (CNL).
public bool IsCancelled { get; init; }
Property Value
IsCorrected
True for a corrected forecast (COR).
public bool IsCorrected { get; init; }
Property Value
IsNil
True for a missing forecast (NIL).
public bool IsNil { get; init; }
Property Value
IssueTime
Issue day and time (UTC).
public DayTime? IssueTime { get; init; }
Property Value
Raw
The forecast exactly as given to the parser.
public string Raw { get; init; }
Property Value
Remarks
Everything after RMK as text, not decoded; also the closing statement of US military forecasts such as
LAST NO AMDS AFT 2020 NEXT 2104. Runs of whitespace (including line breaks) become one space and a
trailing = is removed; null when there are no remarks.
public string? Remarks { get; init; }
Property Value
Station
ICAO location indicator; null when missing or invalid.
public string? Station { get; init; }
Property Value
Temperatures
Maximum and minimum temperature forecasts (TX/TN).
public IReadOnlyList<TemperatureForecast> Temperatures { get; init; }
Property Value
Validity
Validity period.
public ValidityPeriod? Validity { get; init; }
Property Value
Methods
Describe(Language)
Describes the forecast in plain language: the base conditions and one block per change group.
public string Describe(Language language = Language.English)
Parameters
languageLanguageThe language of the description.
Returns
- string
The description; lines are separated by
\n.
Parse(string)
Parses a TAF. Never throws for bad content: whatever is understood is returned and every problem is listed in Diagnostics.
public static Taf Parse(string raw)
Parameters
rawstringThe forecast, with or without the
TAFprefix; line breaks are allowed.
Returns
- Taf
The parsed forecast.
Exceptions
- ArgumentNullException
rawisnull.
ParseStrict(string)
Parses a TAF and throws when it contains errors; warnings are allowed.
public static Taf ParseStrict(string raw)
Parameters
rawstringThe forecast, with or without the
TAFprefix.
Returns
- Taf
The parsed forecast.
Exceptions
- ArgumentNullException
rawisnull.- CavokParseException
The forecast contains at least one error.