Skip to content

Commit 4fffaa0

Browse files
authored
Go back to previous sensitivity curves
Less precise but start as 0ppm/ppb
1 parent 7b829a8 commit 4fffaa0

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/MQ131.cpp

+15-4
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,27 @@ MQ131Class::~MQ131Class() {
201201
switch(model) {
202202
case LOW_CONCENTRATION :
203203
// Use the equation to compute the O3 concentration in ppm
204-
// R^2 = 0.9987
205204
// Compute the ratio Rs/R0 and apply the environmental correction
206205
ratio = lastValueRs / valueR0 * getEnvCorrectRatio();
207-
return convert((10.66435681 * pow(ratio, 2.25889394) - 10.66435681), PPB, unit);
206+
// R^2 = 0.9906
207+
// Use this if you are monitoring low concentration of O3 (air quality project)
208+
return convert(9.4783 * pow(ratio, 2.3348), PPB, unit);
209+
210+
// R^2 = 0.9986 but nearly impossible to have 0ppb
211+
// Use this if you are constantly monitoring high concentration of O3
212+
// return convert((10.66435681 * pow(ratio, 2.25889394) - 10.66435681), PPB, unit);
208213
case HIGH_CONCENTRATION :
209214
// Use the equation to compute the O3 concentration in ppm
210-
// R^2 = 0.99
215+
211216
// Compute the ratio Rs/R0 and apply the environmental correction
212217
ratio = lastValueRs / valueR0 * getEnvCorrectRatio();
213-
return convert((8.37768358 * pow(ratio, 2.30375446) - 8.37768358), PPM, unit);
218+
// R^2 = 0.9900
219+
// Use this if you are monitoring low concentration of O3 (air quality project)
220+
return convert(8.1399 * pow(ratio, 2.3297), PPM, unit);
221+
222+
// R^2 = 0.9985 but nearly impossible to have 0ppm
223+
// Use this if you are constantly monitoring high concentration of O3
224+
// return convert((8.37768358 * pow(ratio, 2.30375446) - 8.37768358), PPM, unit);
214225
default :
215226
return 0.0;
216227
}

0 commit comments

Comments
 (0)