Fix NaN with zero values
All checks were successful
Build and Publish / release (push) Successful in 3m7s
All checks were successful
Build and Publish / release (push) Successful in 3m7s
This commit is contained in:
parent
2ed4eca56c
commit
c002331fd4
@ -13,7 +13,7 @@ func (u *WeatherUpdate) Enrich() {
|
||||
u.WindChillF = CalculateWindChill(u.TempOutdoorF, u.WindSpeedMPH)
|
||||
}
|
||||
|
||||
if u.DewPointF == 0 {
|
||||
if u.DewPointF == 0 && (u.TempOutdoorF != 0 && u.HumidityOudoor != 0) {
|
||||
u.DewPointF = CalculateDewPoint(u.TempOutdoorF, float64(u.HumidityOudoor))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user