2020-10-28 13:42:58 -04:00
|
|
|
import math
|
|
|
|
import helpers.constants as cte
|
|
|
|
|
|
|
|
|
|
|
|
class Weather(object):
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def sky_temperature(ambient_temperature):
|
|
|
|
# Swinbank - Fuentes sky model approximation(1963) based on cloudiness statistics(32 %) in United States
|
|
|
|
# ambient temperatures( in °C)
|
|
|
|
# sky temperatures( in °C)
|
|
|
|
values = []
|
2020-10-30 13:47:59 -04:00
|
|
|
for temperature in ambient_temperature:
|
2020-10-28 13:42:58 -04:00
|
|
|
value = 0.037536 * math.pow((temperature + cte.celsius_to_kelvin), 1.5) \
|
|
|
|
+ 0.32 * (temperature + cte.celsius_to_kelvin) - cte.celsius_to_kelvin
|
|
|
|
values.append(value)
|
2020-10-30 13:47:59 -04:00
|
|
|
return values
|