Comments (7)
Ok I just added it to the SettingsBuilder
as with_temperature_offset(i32)
. After looking at the code again the reason why I initially moved out t_fine was that I felt that the this enforces the order of function execution.
Temperature measurement can be enabled or skipped. Skipping the measurement is
typically not recommended since temperature information is used to compensate temperature influences in the other parameters. Datasheet
When looking at the calculation of the pressure and humidity it actually looks to me more like the temperature measurement must not be skipped.
E.g. in the C library the order of execution affect the results of
L887/L903
What do you think about this and would you mind giving the code a try ? It's located in the offset branch.
from bme680.
I thought about adding a t_fine member to the CalibData struct, and modifying that with an offset (basically just doing the same as python code does in the previous mentioned links), but I've noticed in the commit below, that such a member previously existed but was removed and instead t_fine was explicitly passed to temp/pressure/humidity function instead. Was there reason for removing t_fine from the CalibData struct? Would be acceptable to add it back, and then modify it with new adding temp_offset setting?
6b6e19b#diff-b4aea3e418ccdb71239b96952d9cddb6L229
from bme680.
Hi nick, sorry for the slow the response. I'll try to check this in the next days, thanks for digging in the commits. It does sound like a good suggestion though.
from bme680.
I've had a look over https://github.com/marcelbuesing/bme680/compare/offset and this should work fine. I agree that it appears that order appears to be import in both the C and Python implementations with t_fine being an output from temperature calculation and an input for pressure/humidity. Storing it in calibration data can make appear as if pressure/humidity can be calculated independently from temperature, but your approach makes them explicitly dependant which I think is better.
from bme680.
Thank for looking at this! I've just released 0.4.0
containing the change.
from bme680.
Would you mind looking at the fix again? Sorry for this. It actually also fixes the else instead of else if case (offset > 0) that was corrected later in the python merge request.
from bme680.
Well I had to get creative, since there does not seem to be a copysign
fn for i32
, but I think this should do the job.
from bme680.
Related Issues (14)
- Error when trying to run the example HOT 3
- Logged setting do not match those explicitly set in the example code HOT 5
- no_std compatible HOT 1
- Feature Request: SPI Support HOT 1
- Multiple calls to set forced power mode necessary to get a valid read HOT 2
- The newest version always returns the same value for the gasresistance HOT 5
- Owning the delayer appears problematic HOT 7
- Avoid floating point precision when reading values from the sensor
- This crate is awesome but example needs to be improved HOT 1
- BME688 gives constant humidity and gas readings HOT 2
- Why does SettingsBuilder::with_humidity_control set a heater flag?
- Multiple gas heater profile support
- Add optional serde support for `FieldData`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bme680.