asr_vosk: Allow to handle keyword and command in one sentence
[ros_wild_thumper.git] / scripts / sensor_board.py
index c5e84c4..c8a0c0c 100755 (executable)
@@ -16,6 +16,8 @@ from wild_thumper.msg import Sensor
 # Board warming offset
 TEMP_ERROR = -3.0 # -5 # degree celsius
 PRESSURE_ERROR = -2.5
+A_dew_point = 17.271
+B_dew_point = 237.7
 
 """
 LDR:
@@ -93,6 +95,8 @@ class SensorBoard:
                                msg.pressure = pressure
                                msg.co = co
                                msg.ventilate = True if ventilate > 1.10 else False
+                               tmp = ((A_dew_point * temp) / (B_dew_point + temp)) + log(humidity/100.0)
+                               msg.dew_point = (B_dew_point * tmp) / (A_dew_point - tmp)
 
                                self.pub.publish(msg)