spectraphilic / wasp_sketches

Waspmote sketches develoded by our group
1 stars 0 forks source link

BME280 Pressure unit bug #83

Open jdavid opened 2 years ago

jdavid commented 2 years ago

Data from BME280 is stored in Pa, because that's what returns the getPressure function from the Waspmote API. e.g. see bme_pres in https://wsn.latice.eu/admin/wsn/frame/22948999 /change/

Except when we use the SDI-12 slave board (QT Py). Then the data is in hPa (hPa is what the sensor actually sends I think). e.g see bme_pres in https://wsn.latice.eu/admin/wsn/frame/38139406/change/

The bug: The pressure values are in Pa or hPa depending on whether it's directly attached to the waspmote, or it goes through SDI-12. Should this be fixed so we have always the same unit in the database?

Which unit should be used: Pa or hPa? Even if we decide not to fix it in the Waspmote, I need to know what unit to use for the future RIOT based motes. @ArcticSnow

Personally I prefer Pa because: then we can use integers (more efficient than floats), and because most of the data today is in Pa. But maybe from a scientific point of view hPa makes more sense?

ArcticSnow commented 2 years ago

Pa is fine and is the SI unit. hPa is a meteorological convention. The most important is to be aware in which unit the data is.

jdavid commented 2 years ago

Ok, done for the Riot application, sends Pa.

But what to do with existing data, and the deployed motes that use Qt Py? Should I handle this an convert hPa to Pa in the server, so we use the same unit for every mote?