Commit b10bad07 authored by Martin Vítek's avatar Martin Vítek
Browse files

Add aparent temperature

parent 04b7c1c3
......@@ -16,23 +16,27 @@ def calculate_observation(time_from):
clouds_medium = 0
clouds_low = 0
clouds_high = 0
apparent_temperature = 0
for i in range(data_start,data_start+4):
clouds_low += data['parameterValues']['CLOUDS_LOW'][i]
clouds_medium += data['parameterValues']['CLOUDS_MEDIUM'][i]
clouds_high += data['parameterValues']['CLOUDS_HIGH'][i]
clouds_total += data['parameterValues']['CLOUDS_TOTAL'][i]
apparent_temperature += data['parameterValues']['APPARENT_TEMPERATURE'][i]
clouds_low = clouds_low / 4.0
clouds_medium = clouds_medium / 4.0
clouds_high = clouds_high / 4.0
clouds_total = clouds_total / 4.0
apparent_temperature = apparent_temperature / 4.0
print('Clouds low:\t%6.2f%%' %(clouds_low*100))
print('Clouds medium:\t%6.2f%%' %(clouds_medium*100))
print('Clouds high:\t%6.2f%%' %(clouds_high*100))
print('Clouds total:\t%6.2f%%' %(clouds_total*100))
print('Clouds low:\t\t%6.2f%%' %(clouds_low*100))
print('Clouds medium:\t\t%6.2f%%' %(clouds_medium*100))
print('Clouds high:\t\t%6.2f%%' %(clouds_high*100))
print('Clouds total:\t\t%6.2f%%' %(clouds_total*100))
print('Apparent temperature:\t%6.2f°C\n' %(apparent_temperature))
possible = True
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment