summaryrefslogtreecommitdiffstats
path: root/converter.go
diff options
context:
space:
mode:
Diffstat (limited to 'converter.go')
-rw-r--r--converter.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/converter.go b/converter.go
index e843f35..efaed5b 100644
--- a/converter.go
+++ b/converter.go
@@ -83,9 +83,9 @@ func (fd *ForecastData) convertToCurrent(index int, timestamp int64, loc *time.L
current.DewPoint = val
}
- // Extract wind speed (convert m/s to km/h)
+ // Extract wind speed (FMI provides m/s)
if val, err := fd.getFloatValue(index, "WindSpeedMS"); err == nil && !math.IsNaN(val) {
- current.WindSpeed = val * 3.6
+ current.WindSpeed = val
}
// Extract wind direction
@@ -93,9 +93,9 @@ func (fd *ForecastData) convertToCurrent(index int, timestamp int64, loc *time.L
current.WindDeg = int(math.Round(val))
}
- // Extract wind gust (convert m/s to km/h)
+ // Extract wind gust (m/s)
if val, err := fd.getFloatValue(index, "WindGust"); err == nil && !math.IsNaN(val) {
- current.WindGust = val * 3.6
+ current.WindGust = val
}
// Extract cloud cover
@@ -109,7 +109,7 @@ func (fd *ForecastData) convertToCurrent(index int, timestamp int64, loc *time.L
}
// Calculate feels-like temperature
- current.FeelsLike = CalculateFeelsLike(current.Temp, float64(current.Humidity), current.WindSpeed)
+ current.FeelsLike = CalculateFeelsLike(current.Temp, float64(current.Humidity), current.WindSpeed*3.6)
// Handle precipitation (convert from mm/h)
if val, err := fd.getFloatValue(index, "PrecipitationRate"); err == nil && !math.IsNaN(val) && val > 0 {