SkillAgentSearch skills...

MetarParserCore

A .NET Core library intended for decoding raw METAR data

Install / Use

/learn @ValerXenus/MetarParserCore
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MetarParserCore

A .NET 6.0 library intended for parsing raw METAR data. Current version can parse METAR and TREND reports. Nuget package: https://www.nuget.org/packages/MetarParserCore/

Getting started

This library is easy to use. Just follow exanple below:

// Input raw METAR string
var raw = "UWKD 291500Z 32003MPS CAVOK 18/02 Q1019 R29/CLRD70 NOSIG RMK QFE753/1004=";
// Initialize METAR parser
var metarParser = new MetarParser();
// Parse raw METAR
var airportMetar = metarParser.Parse(raw);
// Serialization using Newtonsoft.Json
var serializedResult = JsonConvert.SerializeObject(airportMetar);

Types overview

Base types

| Classes | Description | |--------------------------|-----------------------------------------------------------------------------------------------| | ReportBase | Base abstract class for all meteorological reports. | | Metar | General METAR data class. Any property of this class could be null. Inhereted from ReportBase.|

<a name="report-base"/>Structure of ReportBase

| Property name | Type | Description | |----------------------|----------------------|----------------------------------------------| | ReportType | enum ReportType | METAR report type | | IsNil | bool | Report is empty | | Month | enum Month | Current month | | Modifier | enum MetarModifier | METAR modifier | | SurfaceWind | SurfaceWind | Info about surface wind | | PrevailingVisibility | PrevailingVisibility | Info about visibility | | PresentWeather | WeatherPhenomena[] | Special weather conditions | | CloudLayers | CloudLayer[] | Info about clouds (Cloud layers) | | ParseErrors | string[] | Array of parse errors | | Unrecognized | string[] | Unrecognized tokens by METAR TokenRecognizer |

<a name="metar"/>Structure of Metar

| Property name | Type | Description | |--------------------|-----------------------|-------------------------------------------------------| | Airport | string | Airport ICAO code | | ObservationDayTime | ObservationDayTime | Date and time by Zulu of the observation | | RunwayVisualRanges | RunwayVisualRange[] | Info about visibility on runways (RVR) | | Temperature | TemperatureInfo | Information about temperature | | AltimeterSetting | AltimeterSetting | Information about air pressure | | RecentWeather | WeatherPhenomena | Recent weather info | | WindShear | WindShear | Wind shear info | | Motne | Motne[] | Info about runway conditions | | SeaCondition | SeaCondition | Info about sea-surface temperature and state | | Trends | Trend[] | Information about changes of weather forecast | | IsDeneb | bool | Fog dispersal operations are in progress | | MilitaryWeather | MilitaryWeather | Military airfield weather (represents in color codes) | | Remarks | string | Additional remarks (RMK) |

<a name="surface-wind"/>Structure of SurfaceWind

| Property name | Type | Description | |-----------------------|-----------------------|-------------------------------------------| | Direction | int | Current wind direction (heading) | | IsVariable | bool | Sign if wind has variable direction (VRB) | | Speed | int | Speed of the wind | | GustSpeed | int | Max wind speed or gust speed | | WindUnit | enum WindUnit | Type of wind unit | | ExtremeWindDirections | ExtremeWindDirections | Info about extreme wind directions |

<a name="prevailing-visibility"/>Structure of PrevailingVisibility

| Property name | Type | Description | |--------------------------|--------------------------|---------------------------------------------------------------------| | IsCavok | bool | Sign if visibility marked as CAVOK. Means Ceiling and Visibility OK | | VisibilityInMeters | VisibilityInMeters | Prevailing visibility in meters | | VisibilityInStatuteMiles | VisibilityInStatuteMiles | Prevailing visibility in statute miles |

<a name="weather-phenomena"/>Structure of WeatherPhenomena

| Property name | Type | Description | |------------------|-----------------------|-------------------------------------| | WeatherCondition | enum WeatherCondition | Ordered array of weather conditions |

<a name="cloud-layer"/>Structure of CloudLayer

| Property name | Type | Description | |---------------------|--------------------------|--------------------------------------------| | CloudType | enum CloudType | Cloud type | | CloudAltitude | int | Cloud altitude | | ConvectiveCloudType | enum ConvectiveCloudType | Convective cloud type | | IsCloudBelow | bool | Cloud below airport (in mountain airports) |

<a name="observation-day-time"/>Structure of ObservationDayTime

| Property name | Type | Description | |---------------|------|--------------------------| | Day | int | Day of the current month | | Time | Time | Time of the observation |

<a name="runway-visual-range"/>Structure of RunwayVisualRange

| Property name | Type | Description | |-----------------|----------------------|---------------------------------| | RunwayNumber | string | Number of the current runway | | VisibilityValue | int | RVR value in meters/feets (min) | | UnitType | enum RvrUnitType | Unit type of the current RVR | | MeasurableBound | enum MeasurableBound | Mark of the measurement area | | RvrTrend | enum RvrTrend | Rvr trend |

<a name="temperature-info"/>Structure of TemperatureInfo

| Property name | Type | Description | |---------------|------|----------------------------------| | Value | int | Temperature value in Celsius | | DewPoint | int | Temperature dew point in Celsius |

<a name="altimeter-setting"/>Structure of AltimeterSetting

| Property name | Type | Description | |---------------|------------------------|---------------------| | UnitType | enum AltimeterUnitType | Altimeter unit type | | Value | int | Altimeter value |

<a name="wind-shear"/>Structure of WindShear

| Property name | Type | Description | |---------------|--------------------|---------------------------| | IsAll | bool | Wind shear on all runways | | Type | enum WindShearType | Wind shear type | | RunwayNumber | string | Runway number |

<a name="motne"/>Structure of Motne

| Property name | Type | Description | |-----------------------|---------------------------------|-------------------------------------------------------------------------| | RunwayNumber | string | Runway number | | Specials | enum MotneSpecials | MOTNE special sign | | TypeOfDeposit | enum MotneTypeOfDeposit | Type of deposit | | ExtentOfContamination | enum MotneExtentOfContamination | Extent of contamination of the current runway | | DepthOfDeposit | int | Depth of deposit (2 digits) -1 - depth not significant (has value "//") | | FrictionCoefficient | int

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated3mo ago
Forks3

Languages

C#

Security Score

87/100

Audited on Dec 16, 2025

No findings