Updated model and normalizers to map provider “feels like” fields into a single ApparentTemperatureC field.

This commit is contained in:
2026-01-17 10:36:19 -06:00
parent c12cf91115
commit b4a67e208c
8 changed files with 33 additions and 14 deletions

View File

@@ -68,6 +68,11 @@ func buildObservation(parsed owmResponse) (model.WeatherObservation, time.Time,
// - wind speed is m/s -> km/h conversion
tempC := parsed.Main.Temp
rh := parsed.Main.Humidity
var apparentC *float64
if parsed.Main.FeelsLike != nil {
v := *parsed.Main.FeelsLike
apparentC = &v
}
surfacePa := normcommon.PressurePaFromHPa(parsed.Main.Pressure)
var seaLevelPa *float64
@@ -117,6 +122,7 @@ func buildObservation(parsed owmResponse) (model.WeatherObservation, time.Time,
IconURL: iconURL,
TemperatureC: &tempC,
ApparentTemperatureC: apparentC,
WindDirectionDegrees: parsed.Wind.Deg,
WindSpeedKmh: &wsKmh,