Skip to content

Commit

Permalink
Added in Nasa Satellite image to allow one to check the incoming weat…
Browse files Browse the repository at this point in the history
…her.
  • Loading branch information
zizwiz committed Sep 18, 2024
1 parent 97f52d6 commit ca372c1
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/myFlightInfo/obj
/myFlightInfo/bin
/docs
/weather_images
128 changes: 80 additions & 48 deletions myFlightInfo/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion myFlightInfo/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ private async void Form1_Load(object sender, EventArgs e)
await webView_synoptic.EnsureCoreWebView2Async();
await webView_gransden_lodge_weather.EnsureCoreWebView2Async();
await webView_weather_windy.EnsureCoreWebView2Async();
await webView_nasa_satellite.EnsureCoreWebView2Async();

await webView_navFromChart.EnsureCoreWebView2Async();
await webView_navToChart.EnsureCoreWebView2Async();

webView_notams.CoreWebView2.Navigate("https://www.notaminfo.com/ukmap?destination=node%2F39");

SetMetarPages();
SetWeatherPages();

Expand Down Expand Up @@ -457,6 +458,7 @@ private void SetWeatherPages()
"https://metoffice.gov.uk/weather/maps-and-charts/surface-pressure");
webView_weather_windy.CoreWebView2.Navigate(
"https://www.windy.com/51.352/0.505/airgram?iconD2,temp,51.344,0.508,13");
webView_nasa_satellite.CoreWebView2.Navigate("https://worldview.earthdata.nasa.gov/?v=-102.69792073327362,-6.560486491860303,31.10441711257043,74.21716114996451&t=" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "-T00%3A35%3A36Z");
}
else
{
Expand Down Expand Up @@ -492,6 +494,7 @@ private void SetWeatherPages()
"https://members.camgliding.uk/members/GRLweather.aspx");
webView_weather_windy.CoreWebView2.Navigate(
"https://www.windy.com/52.166/-0.154/airgram?iconD2,temp,52.164,-0.156,15");
webView_nasa_satellite.CoreWebView2.Navigate("https://worldview.earthdata.nasa.gov/?v=-102.69792073327362,-6.560486491860303,31.10441711257043,74.21716114996451&t=" + DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + "-T00%3A35%3A36Z");
}

}
Expand Down
7 changes: 7 additions & 0 deletions myFlightInfo/TabChanges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ private void tabcnt_weather_SelectedIndexChanged(object sender, EventArgs e)
{
cmbobx_gransden_lodge.Visible = false;

grpbx_towns.Visible = false;
btn_school.Visible = false;
}
else if (tabcnt_weather.SelectedTab == tab_nasa_satellite)
{
cmbobx_gransden_lodge.Visible = false;

grpbx_towns.Visible = false;
btn_school.Visible = false;
}
Expand Down
10 changes: 10 additions & 0 deletions myFlightInfo/utils/HelpfulFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,15 @@ public static string getCardinalPointsFromDecimalDegrees(double bearing)

return cardinal;
}

/// <summary>
/// Gets yesterdays date.
/// </summary>
/// <param></param>
/// <returns>Yesetrdays date as yyyy-mm-dd</returns>
public static string getYesterday()
{
return DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
}
}
}

0 comments on commit ca372c1

Please sign in to comment.