File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -269,14 +269,19 @@ float SGP30::getEthanol()
269
269
// CALIBRATION
270
270
//
271
271
272
+ // slightly different formula
273
+ // https://carnotcycle.wordpress.com/2012/08/04/how-to-convert-relative-humidity-to-absolute-humidity/
274
+ // Absolute Humidity (grams/m3) = 6.112 × e^[(17.67 × T)/(T+243.5)] × rh × 2.1674
275
+ // (273.15+T)
276
+
272
277
// T in °C
273
278
// RH == RelativeHumidity
274
279
float SGP30::setRelHumidity (float T, float RH) // Page 10
275
280
{
276
281
// page 10 datasheet
277
282
// AH = AbsoluteHumidity
278
283
// uint16_t AH = 216.7 * RH/100 * 6.117 * exp((17.62 * T)/(243.12 + T)) / (273.15 + T);
279
- float absoluteHumidity = (2.167 * 6.112 ) * RH ;
284
+ float absoluteHumidity = (2.167 * 6.112 ) * RH;
280
285
absoluteHumidity *= exp ((17.62 * T)/(243.12 + T));
281
286
absoluteHumidity /= (273.15 + T);
282
287
You can’t perform that action at this time.
0 commit comments