@@ -94,7 +94,7 @@ def __init__(self, data, units):
94
94
self .type = 'air'
95
95
self .timestamp = data [0 ]
96
96
self .pressure = UnitConversion .pressure (self , data [1 ], units )
97
- self .temperature = data [2 ]
97
+ self .temperature = round ( data [2 ], 1 )
98
98
self .humidity = data [3 ]
99
99
self .lightning_count = data [4 ]
100
100
self .lightning_distance = UnitConversion .distance (self , data [5 ], units )
@@ -176,10 +176,10 @@ def getDewPoint(self, temperature, humidity):
176
176
def getWindChill (self , wind_speed , temperature ):
177
177
""" Returns Wind Chill in Celcius """
178
178
if wind_speed < 1.3 :
179
- return temperature
179
+ return round ( temperature , 1 )
180
180
else :
181
181
windKmh = wind_speed * 3.6
182
- return round (13.12 + (0.6215 * temperature ) - (11.37 * math .pow (windKmh , 0.16 )) + (0.3965 * temperature * math .pow (windKmh , 0.16 )), 2 )
182
+ return round (13.12 + (0.6215 * temperature ) - (11.37 * math .pow (windKmh , 0.16 )) + (0.3965 * temperature * math .pow (windKmh , 0.16 )), 1 )
183
183
184
184
def getHeatIndex (self , temperature , humidity ):
185
185
""" Returns Heat Index in Celcius """
@@ -222,4 +222,4 @@ def getFeelsLike(self, temperature, wind_chill, heat_index):
222
222
elif temperature < 10 :
223
223
return wind_chill
224
224
else :
225
- return temperature
225
+ return round ( temperature , 1 )
0 commit comments