Skip to content

Commit 05f2dd9

Browse files
authored
Fix environmental correction ratio
1 parent 8b27290 commit 05f2dd9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/MQ131.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ MQ131Class::~MQ131Class() {
178178
}
179179
// For humidity > 75%, use the 85% curve
180180
if(humidityPercent > 75) {
181-
// R^2 = 0.9986
182-
return -0.0141 * temperatureCelsuis + 1.5623;
181+
// R^2 = 0.996
182+
return -0.0103 * temperatureCelsuis + 1.1507;
183183
}
184184
// For humidity > 50%, use the 60% curve
185185
if(humidityPercent > 50) {
@@ -188,8 +188,8 @@ MQ131Class::~MQ131Class() {
188188
}
189189

190190
// Humidity < 50%, use the 30% curve
191-
// R^2 = 0.996
192-
return -0.0103 * temperatureCelsuis + 1.1507;
191+
// R^2 = 0.9986
192+
return -0.0141 * temperatureCelsuis + 1.5623;
193193
}
194194

195195
/**

0 commit comments

Comments
 (0)