diff --git a/src/components/WeatherPanel.astro b/src/components/WeatherPanel.astro new file mode 100644 index 0000000..79e481a --- /dev/null +++ b/src/components/WeatherPanel.astro @@ -0,0 +1,653 @@ +--- +const weatherBase = (import.meta.env.PUBLIC_WEATHER_BASE ?? 'https://wx.swansea-airport.wales').replace(/\/$/, ''); +const mqttHost = import.meta.env.PUBLIC_WEATHER_MQTT_HOST ?? `${weatherBase}/mqtt`; +const archiveEndpoint = `${weatherBase}/agcs/archive.php`; +const pressureEndpoint = `${weatherBase}/wlproxy.php?api=current/195562`; +--- + +
+
+
+

Live airfield weather

+

Swansea EGFH conditions

+

+ Live readings from the airport weather station. Values update automatically where the + upstream feed is available. This page is for situational awareness only; always use + official pre-flight sources, NOTAMs, and radio updates for flight safety decisions. +

+
+
+ + Connecting +
+
+ +
+
+
+
+
+

Surface wind

+

XXX/XX

+

Waiting for 2 minute average

+
+
+

Instant wind

+

XXX/XX

+

Waiting for live wind

+
+
+
+ +
+
+
+
+

QNH

+

XXX

+
+
+

QFE

+

XXX

+
+
+

Waiting for pressure

+
+ +
+

2 minute gust

+

XXX/XX

+
+ +
+

OAT

+

XXX

+
+
+

+ Live weather is initialising. +

+
+ +
+
+
+

Wind over runway layout

+ Awaiting feed +
+ +
+
+
+
+ + + + diff --git a/src/lib/site.ts b/src/lib/site.ts index 33ccc77..aa3c37a 100644 --- a/src/lib/site.ts +++ b/src/lib/site.ts @@ -16,6 +16,7 @@ export const site = { navigation: [ { label: 'Home', href: '/' }, { label: 'Pilot Info', href: '/pilot-info/' }, + { label: 'Weather', href: '/weather/' }, { label: 'About', href: '/about/', diff --git a/src/pages/weather.astro b/src/pages/weather.astro new file mode 100644 index 0000000..7f53cd2 --- /dev/null +++ b/src/pages/weather.astro @@ -0,0 +1,10 @@ +--- +import BaseLayout from '../layouts/BaseLayout.astro'; +import WeatherPanel from '../components/WeatherPanel.astro'; +--- + + +
+ +
+