Updated model and normalizers to map provider “feels like” fields into a single ApparentTemperatureC field.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user