Skip to content

Commit

Permalink
Update co_conversion.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tmylk authored Jan 19, 2017
1 parent edc1206 commit 8da0689
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions co_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# sensor #1
CO_WORKING_ELECTRODE_ZERO_OFFSET_MV = 310;
CO_AUXILIARY_ELECTRODE_ZERO_OFFSET_MV = 272;
CO_SENSITIVITY = 0.197;
CO_SENSITIVITY = 0.197; # mV/ppb
# reverse to raw readings
def reverse_co(CO_working=None, CO_aux=None, ppbCO=None):

Expand All @@ -21,7 +21,7 @@ def reverse_co(CO_working=None, CO_aux=None, ppbCO=None):
reverse_co(ppbCO = 882.585, CO_aux = 349.344, CO_working = 483.866)]
merged_with_kings = zip(readings,(200,300,400))

### Trying to reproduce kings...
### This gives right trend and right order of magnitude

for x in merged_with_kings:
print ((x[0][0] - 33) + (x[0][2] + 5) )*CO_SENSITIVITY
print (x[0][0] - (x[0][2] ) )/CO_SENSITIVITY, x[1]

0 comments on commit 8da0689

Please sign in to comment.