Expunge external data collection
This commit is contained in:
@@ -136,13 +136,6 @@ class davisDecoder(object):
|
|||||||
self.height = _HEIGHT
|
self.height = _HEIGHT
|
||||||
self.temp_dict = {}
|
self.temp_dict = {}
|
||||||
|
|
||||||
def load_external_data(self):
|
|
||||||
# Data external to the ISS
|
|
||||||
self.pressure = float(davis_data['P'])
|
|
||||||
self.inside_temp = round((float(davis_data['Ti'])\
|
|
||||||
+ float(davis_data['Thtu'])) / 2, 2)
|
|
||||||
self.inside_hum = davis_data['Hhtu']
|
|
||||||
|
|
||||||
def zero_fill(self, data):
|
def zero_fill(self, data):
|
||||||
binary_data = format(int(data), '08b')
|
binary_data = format(int(data), '08b')
|
||||||
msb = binary_data[0:4]
|
msb = binary_data[0:4]
|
||||||
@@ -179,12 +172,6 @@ class davisDecoder(object):
|
|||||||
def decode_humidity(self, hum):
|
def decode_humidity(self, hum):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def adjust_pressure(self, temp):
|
|
||||||
sh = 0.0065 * self.height
|
|
||||||
base = 1 - (sh) / (temp + sh + _ABS_ZERO)
|
|
||||||
result = round(self.pressure * pow(base, -5.257), 2)
|
|
||||||
return result
|
|
||||||
|
|
||||||
def supercap_decode(self, byte2, byte3):
|
def supercap_decode(self, byte2, byte3):
|
||||||
cap = (byte2 << 2) + (byte3 >> 6)
|
cap = (byte2 << 2) + (byte3 >> 6)
|
||||||
result = float(cap / 100.00)
|
result = float(cap / 100.00)
|
||||||
@@ -441,15 +428,7 @@ if '__main__':
|
|||||||
temp,
|
temp,
|
||||||
wind,
|
wind,
|
||||||
humidity)
|
humidity)
|
||||||
'''
|
|
||||||
External sensors again
|
|
||||||
|
|
||||||
out2 = "Padj: {}, Praw {}, Tins: {}, Humins: {}".format(
|
|
||||||
pressure_adjusted,
|
|
||||||
davis_decoder.pressure,
|
|
||||||
davis_decoder.inside_temp,
|
|
||||||
davis_decoder.inside_hum)
|
|
||||||
'''
|
|
||||||
out3 = "RainState: {}, Rrate {}, Rain Total: {}, Cap:{}, Volt: {}".format(
|
out3 = "RainState: {}, Rrate {}, Rain Total: {}, Cap:{}, Volt: {}".format(
|
||||||
rainstate,
|
rainstate,
|
||||||
rainrate,
|
rainrate,
|
||||||
|
|||||||
Reference in New Issue
Block a user