Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
Get Vatsim Wx Stations
Browse files Browse the repository at this point in the history
This may lead to WX stations not being included if the WX Stations are not on the Vatism Metar website.
We might have to go back to the original way of doing things.
#104
  • Loading branch information
Nikolai558 committed Aug 3, 2021
1 parent 210f83e commit 74e8cc2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 9 additions & 1 deletion ClassData/DataAccess/GetAptData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,15 @@ private void ParseAndWriteWxStation(string effectiveDate)

if (sList.Contains(id, StringComparer.OrdinalIgnoreCase) || lList.Contains(id, StringComparer.OrdinalIgnoreCase))
{
sb.AppendLine(final);
foreach (string vatsimWXLine in File.ReadLines($"{GlobalConfig.tempPath}\\{effectiveDate}_WX-VATSIM.txt"))
{
if (vatsimWXLine.Substring(0, 5).Trim() == apt.Icao)
{
sb.AppendLine(final);
Console.WriteLine($"Added weather station for {id}");
break;
}
}
}
else
{
Expand Down
6 changes: 4 additions & 2 deletions ClassData/GlobalConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ public static void DownloadAllFiles(string effectiveDate, string airacCycle, boo
{ $"{effectiveDate}_FIX.zip", $"https://nfdc.faa.gov/webContent/28DaySub/{effectiveDate}/FIX.zip" },
{ $"{effectiveDate}_NAV.zip", $"https://nfdc.faa.gov/webContent/28DaySub/{effectiveDate}/NAV.zip"},
{ $"{airacCycle}_TELEPHONY.html", $"https://www.faa.gov/air_traffic/publications/atpubs/cnt_html/chap3_section_2.html" },
{ $"{effectiveDate}_WX-CROSSCHECK.xml", $"https://w1.weather.gov/xml/current_obs/index.xml" }
{ $"{effectiveDate}_WX-CROSSCHECK.xml", $"https://w1.weather.gov/xml/current_obs/index.xml" },
{ $"{effectiveDate}_WX-VATSIM.txt", $"http://metar.vatsim.net/metar.php?id=all" }
};
}
else
Expand Down Expand Up @@ -194,7 +195,8 @@ public static void DownloadAllFiles(string effectiveDate, string airacCycle, boo
{ $"{effectiveDate}_FIX.zip", $"https://nfdc.faa.gov/webContent/28DaySub/{effectiveDate}/FIX.zip" },
{ $"{effectiveDate}_NAV.zip", $"https://nfdc.faa.gov/webContent/28DaySub/{effectiveDate}/NAV.zip"},
{ $"{airacCycle}_TELEPHONY.html", $"https://www.faa.gov/air_traffic/publications/atpubs/cnt_html/chap3_section_2.html" },
{ $"{effectiveDate}_WX-CROSSCHECK.xml", $"https://w1.weather.gov/xml/current_obs/index.xml" }
{ $"{effectiveDate}_WX-CROSSCHECK.xml", $"https://w1.weather.gov/xml/current_obs/index.xml" },
{ $"{effectiveDate}_WX-VATSIM.txt", $"http://metar.vatsim.net/metar.php?id=all" }
};
}

Expand Down

0 comments on commit 74e8cc2

Please sign in to comment.