diff --git a/apps/web/src/pages/home/index.tsx b/apps/web/src/pages/home/index.tsx index a34ba474..bc55f626 100644 --- a/apps/web/src/pages/home/index.tsx +++ b/apps/web/src/pages/home/index.tsx @@ -935,7 +935,7 @@ const InternalHome = observer(() => { className="underline" href="https://en.wikipedia.org/wiki/Pascal_(unit)" > - Pascal (Pa) + Hectopascal (hPa)
@@ -954,7 +954,8 @@ const InternalHome = observer(() => { {translationHome("pressure")}
- {weatherData.data.wind_pressure.toPrecision(2)} Pa + {Math.round(weatherData.data.wind_pressure * 100) / 100}{" "} + hPa
diff --git a/packages/api/src/routers/weather.ts b/packages/api/src/routers/weather.ts index 2b8a40be..3a3eb86e 100644 --- a/packages/api/src/routers/weather.ts +++ b/packages/api/src/routers/weather.ts @@ -626,10 +626,10 @@ export const weatherRouter = createTRPCRouter({ : hourlyForecast[0]?.apparentTemperature, // In meters per second wind_speed: presentWeather?.wind.speed, - // Calculates the wind pressure in Pa + // Calculates the wind pressure in hPa wind_pressure: - presentWeather?.wind.speed !== undefined - ? 0.5 * 1.225 * Math.pow(presentWeather.wind.speed, 2) + presentWeather?.main.pressure !== undefined + ? presentWeather?.main.pressure : undefined, // Index from 0 to 100 air_quality: presentAirQualityIndex,