@@ -201,16 +201,27 @@ MQ131Class::~MQ131Class() {
201
201
switch (model) {
202
202
case LOW_CONCENTRATION :
203
203
// Use the equation to compute the O3 concentration in ppm
204
- // R^2 = 0.9987
205
204
// Compute the ratio Rs/R0 and apply the environmental correction
206
205
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);
208
213
case HIGH_CONCENTRATION :
209
214
// Use the equation to compute the O3 concentration in ppm
210
- // R^2 = 0.99
215
+
211
216
// Compute the ratio Rs/R0 and apply the environmental correction
212
217
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);
214
225
default :
215
226
return 0.0 ;
216
227
}
0 commit comments