Seems basic enough? The problem is the altitude readings go down in a linear progression, even as the device itself goes up from one floor to the next, and stays on that floor for hours at a time! At this point I don't even care about the absolute altitude, I just want the relative altitude to make sense.
RED line is altitude in the graph. What am I missing?
Yeah that's an interesting thought. The problem is this is in my house which is powered by a single HVAC system and the floors are all open to each other. I wouldn't expect to see these values within what I would classify as a "box" of my house :).
Unfortunately I'm actually trying to measure indoor altitude. Basically I'm trying to see if I can build an indoor asset tracking system that measures x,y,z coordinates with GPS (if available), wi-fi triangulation (if no GPS lock), and a 680 for altitude. I'm concurrently testing the new BMP581 which advertises extremely precise altitude measurements, but I'm hitting the same inverse altitude data issues.
Maybe what I want to do is literally impossible because of how an HVAC system can impact pressure changes?
I haven't worked with the BME680, but other pressure sensors I've used are fairly noisy, and averaging over a number of measurements is required to get reliable values.
I suggest to average 30 to 100 measurements, over a period of maybe 30 seconds in one location, then move up.
Pressure and altitude are inversely correlated using the hydrostatic method.
Is the altitude change correct in absolute terms? If so, there may be a missing negative sign somewhere.
I believe the temperature compensation you refer is part of the sensor calibration that is effected by the temperature of the sensor. I do not believe they use the temperature to adjust the outputted pressure and altitude. How would the sensor be able to know whether the pressure change is due to an actual change in the baro pressure, altitude, ...
Those absolute pressure sensors work by measuring the volume of a sealed chamber. Both the temperature and the volume must be known in order calculate the pressure, using the Gas Law:
If the ideal gas law was a better approximation than the strain gage method they would probably use it. There is a strong market drive for highly accurate baro sensors, for apps like locating people within a building to better estimates of altitude for unmanned air vehicles.
If they were to use an ideal gas law approximation they surely would not use R but a molecular form of the constant.
All of this is not germane to my original post where I addressed the issue of temperature and how it used in the MEMS baro sensors. I stand by my original theses of how temperature is to compensate the sensors, not calculate the pressure directly.
The world has moved a long ways beyond the ideal gas law.