-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forked MetarParserCore that fixes some parsing issues for when dewpoi…
…nt is missing from tempeature in METAR. Added README
- Loading branch information
Showing
58 changed files
with
3,463 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace MetarParserCore.Common | ||
{ | ||
/// <summary> | ||
/// Class of regex patterns for tokens parsing | ||
/// </summary> | ||
public class ParseRegex | ||
{ | ||
#region Prevailing visibility | ||
|
||
public static string VisibilityWholeNumber => @"^[1-2]{1}$"; | ||
|
||
public static string StatuteMilesVisibility => @"^M?(\d{1}\/\d{1,2}|\d{1,2})SM$"; | ||
|
||
public static string MetersVisibility => @"^\d{4}(N|S)?(E|W)?$"; | ||
|
||
public static string MetersVisibilityContainsDirections = @"^\d{4}(N|S|E|W){1,2}$"; | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Altimeter types | ||
/// </summary> | ||
public enum AltimeterUnitType | ||
{ | ||
/// <summary> | ||
/// Not specified | ||
/// </summary> | ||
None = 0, | ||
|
||
[Description("Q")] | ||
Hectopascal = 1, | ||
|
||
[Description("A")] | ||
InchesOfMercury = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Enum of cloud types | ||
/// </summary> | ||
public enum CloudType | ||
{ | ||
/// <summary> | ||
/// Not specified | ||
/// </summary> | ||
None = 0, | ||
|
||
/// <summary> | ||
/// Sky clear - No cloud present | ||
/// </summary> | ||
[Description("SKC")] | ||
SkyClear = 1, | ||
|
||
/// <summary> | ||
/// Few - 1-2 oktas | ||
/// </summary> | ||
[Description("FEW")] | ||
Few = 2, | ||
|
||
/// <summary> | ||
/// Scattered - 3-4 oktas | ||
/// </summary> | ||
[Description("SCT")] | ||
Scattered = 3, | ||
|
||
/// <summary> | ||
/// Broken - 5-7 oktas | ||
/// </summary> | ||
[Description("BKN")] | ||
Broken = 4, | ||
|
||
/// <summary> | ||
/// Overcast - 8 oktas | ||
/// </summary> | ||
[Description("OVC")] | ||
Overcast = 5, | ||
|
||
/// <summary> | ||
/// Vertical visibility - indefinite ceiling | ||
/// </summary> | ||
[Description("VV")] | ||
VerticalVisibility = 6, | ||
|
||
/// <summary> | ||
/// Clear below 10,000 ft as interpreted by an autostation | ||
/// </summary> | ||
[Description("CLR")] | ||
Clear = 7, | ||
|
||
/// <summary> | ||
/// No significant clouds - clouds present at and above 5,000 ft | ||
/// </summary> | ||
[Description("NSC")] | ||
NoSignificantClouds = 8, | ||
|
||
/// <summary> | ||
/// No cloud detected | ||
/// </summary> | ||
[Description("NCD")] | ||
NoCloudDetected = 9 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Convective cloud types | ||
/// </summary> | ||
public enum ConvectiveCloudType | ||
{ | ||
/// <summary> | ||
/// Not specified | ||
/// </summary> | ||
None = 0, | ||
|
||
[Description("CB")] | ||
Cumulonimbus = 1, | ||
|
||
[Description("TCU")] | ||
ToweringCumulus = 2, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Enum of marks indicating that a value is outside the bounds of measurement | ||
/// </summary> | ||
public enum MeasurableBound | ||
{ | ||
[Description("None")] | ||
None = 0, | ||
|
||
/// <summary> | ||
/// Preceding the lowest measurable value | ||
/// </summary> | ||
[Description("M")] | ||
Lower = 1, | ||
|
||
/// <summary> | ||
/// Preceding the highest measurable value | ||
/// </summary> | ||
[Description("P")] | ||
Higher = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Types of METAR data | ||
/// </summary> | ||
public enum MetarModifier | ||
{ | ||
[Description("None")] | ||
None = 0, | ||
|
||
[Description("AUTO")] | ||
Auto = 1, | ||
|
||
[Description("COR")] | ||
Cor = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Military color codes | ||
/// </summary> | ||
public enum MilitaryColorCode | ||
{ | ||
/// <summary> | ||
/// Unknown code | ||
/// </summary> | ||
Unknown = 0, | ||
|
||
/// <summary> | ||
/// Visibility is greater 5 mi, ceiling is greater 2500 ft | ||
/// </summary> | ||
[Description("BLU")] | ||
Blue = 1, | ||
|
||
/// <summary> | ||
/// Visibility 3 3/8 - 5 mi, ceiling 1500 - 2500 ft | ||
/// </summary> | ||
[Description("WHT")] | ||
White = 2, | ||
|
||
/// <summary> | ||
/// Visibility 2 1/4 - 3 - 1/8, ceiling > 700 - 1500 ft | ||
/// </summary> | ||
[Description("GRN")] | ||
Green = 3, | ||
|
||
/// <summary> | ||
/// Visibility 1 1/8 - 2 - 1/4, ceiling > 300 - 700 ft | ||
/// </summary> | ||
[Description("YLO")] | ||
Yellow = 4, | ||
|
||
/// <summary> | ||
/// Visibility 1/2 - 1 1/8 mi, ceiling 200 - 300 ft | ||
/// </summary> | ||
[Description("AMB")] | ||
Amber = 5, | ||
|
||
/// <summary> | ||
/// Visibility less 1/2 mi, ceiling less 200 ft | ||
/// </summary> | ||
[Description("RED")] | ||
Red = 6 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
public enum Month | ||
{ | ||
[Description("None")] | ||
None = 0, | ||
|
||
[Description("January")] | ||
January = 1, | ||
|
||
[Description("February")] | ||
February = 2, | ||
|
||
[Description("March")] | ||
March = 3, | ||
|
||
[Description("April")] | ||
April = 4, | ||
|
||
[Description("May")] | ||
May = 5, | ||
|
||
[Description("June")] | ||
June = 6, | ||
|
||
[Description("July")] | ||
July = 7, | ||
|
||
[Description("August")] | ||
August = 8, | ||
|
||
[Description("September")] | ||
September = 9, | ||
|
||
[Description("October")] | ||
October = 10, | ||
|
||
[Description("November")] | ||
November = 11, | ||
|
||
[Description("December")] | ||
December = 12 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Extent of contamination types | ||
/// </summary> | ||
public enum MotneExtentOfContamination | ||
{ | ||
/// <summary> | ||
/// Not reported, marked as "/" | ||
/// </summary> | ||
NotReported = 0, | ||
|
||
/// <summary> | ||
/// 10% or less of runway covered | ||
/// </summary> | ||
Less10 = 1, | ||
|
||
/// <summary> | ||
/// 11% to 25% of runway covered | ||
/// </summary> | ||
From11To25 = 2, | ||
|
||
/// <summary> | ||
/// 26% to 50% of runway covered | ||
/// </summary> | ||
From26To50 = 5, | ||
|
||
/// <summary> | ||
/// 51% to 100% of runway covered | ||
/// </summary> | ||
From51To100 = 9 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.ComponentModel; | ||
|
||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// MOTNE special signs | ||
/// </summary> | ||
public enum MotneSpecials | ||
{ | ||
/// <summary> | ||
/// Special sign not specified | ||
/// </summary> | ||
Default = 0, | ||
|
||
/// <summary> | ||
/// Contamination has disappeared or runway has been cleared | ||
/// </summary> | ||
[Description("CLRD")] | ||
Cleared = 1, | ||
|
||
/// <summary> | ||
/// Runway closed | ||
/// </summary> | ||
[Description("CLSD")] | ||
Closed = 2, | ||
|
||
/// <summary> | ||
/// Closed due to snow | ||
/// </summary> | ||
[Description("SNOCLO")] | ||
ClosedToSnow = 3 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace MetarParserCore.Enums | ||
{ | ||
/// <summary> | ||
/// Type of deposit | ||
/// </summary> | ||
public enum MotneTypeOfDeposit | ||
{ | ||
ClearAndDry = 0, | ||
|
||
Damp = 1, | ||
|
||
Wet = 2, | ||
|
||
Rime = 3, | ||
|
||
DrySnow = 4, | ||
|
||
WetSnow = 5, | ||
|
||
Slush = 6, | ||
|
||
Ice = 7, | ||
|
||
RolledSnow = 8, | ||
|
||
FrozenRuts = 9, | ||
|
||
/// <summary> | ||
/// Marked as "/" | ||
/// </summary> | ||
NotReported = 10 | ||
} | ||
} |
Oops, something went wrong.