Table of Contents

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

ForecastConditions

Changes

Change groups in order.

public IReadOnlyList<TafChange> Changes { get; init; }

Property Value

IReadOnlyList<TafChange>

Diagnostics

Problems found while parsing.

public IReadOnlyList<Diagnostic> Diagnostics { get; init; }

Property Value

IReadOnlyList<Diagnostic>

HasErrors

True when at least one diagnostic is an error.

public bool HasErrors { get; }

Property Value

bool

IsAmended

True for an amended forecast (AMD).

public bool IsAmended { get; init; }

Property Value

bool

IsCancelled

True when the forecast is cancelled (CNL).

public bool IsCancelled { get; init; }

Property Value

bool

IsCorrected

True for a corrected forecast (COR).

public bool IsCorrected { get; init; }

Property Value

bool

IsNil

True for a missing forecast (NIL).

public bool IsNil { get; init; }

Property Value

bool

IssueTime

Issue day and time (UTC).

public DayTime? IssueTime { get; init; }

Property Value

DayTime?

Raw

The forecast exactly as given to the parser.

public string Raw { get; init; }

Property Value

string

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

string

Station

ICAO location indicator; null when missing or invalid.

public string? Station { get; init; }

Property Value

string

Temperatures

Maximum and minimum temperature forecasts (TX/TN).

public IReadOnlyList<TemperatureForecast> Temperatures { get; init; }

Property Value

IReadOnlyList<TemperatureForecast>

Validity

Validity period.

public ValidityPeriod? Validity { get; init; }

Property Value

ValidityPeriod?

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

language Language

The 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

raw string

The forecast, with or without the TAF prefix; line breaks are allowed.

Returns

Taf

The parsed forecast.

Exceptions

ArgumentNullException

raw is null.

ParseStrict(string)

Parses a TAF and throws when it contains errors; warnings are allowed.

public static Taf ParseStrict(string raw)

Parameters

raw string

The forecast, with or without the TAF prefix.

Returns

Taf

The parsed forecast.

Exceptions

ArgumentNullException

raw is null.

CavokParseException

The forecast contains at least one error.