示例#1
0
def calculate_dewpoint(record):
    if 'outTemp' in record and 'outHumidity' in record:
        if record['units'] == 'ENGLISH':
            return formulas.dewpointF(record['outTemp'], record['outHumidity'])
        else:
            return formulas.dewpointC(record['outTemp'], record['outHumidity'])
示例#2
0
 def calc_dewPoint(self, data):
     if 'outTemp' in data and 'outHumidity' in data:
         data['dewpoint'] = formulas.dewpointF(
             data['outTemp'], data['outHumidity'])
     else:
         data['dewpoint'] = None