GithubHelp home page GithubHelp logo

Comments (8)

ludiazv avatar ludiazv commented on July 3, 2024

You are right. I will include a parameter with default value 1013.25hPa.
You can however quick fix this by removing the 0 parameter in this line manually.

pl.altitude_M = BME280.calculateAltitudeMeters(data.pressure_hPa, 0);

from node-red-contrib-bme280.

ludiazv avatar ludiazv commented on July 3, 2024

Updated in master branch the correction

from node-red-contrib-bme280.

dachshund-digital avatar dachshund-digital commented on July 3, 2024

The correct solution is to query for the correct data from one of the many weather sites, using a geo location site to get the global coordinates then the actual sea level pressure for the given time and location. The 1013.25 value is a common estimate, but it is not truly accurate. When I wrote my python script to support BME280 sensors, I do get the longitude and altitude, and the valid sea level pressure for the actual location of the sensor, thus I get the most accurate altitude measurement. It is a bit of work, but to get the most accurate result, required. This is one of situations where a GPS reading is of benefit, versus having the user provide the location before sensor sampling.

from node-red-contrib-bme280.

ludiazv avatar ludiazv commented on July 3, 2024

GPS or query to external service is beyond the scope of this custom node. Nodered have tons of tools to design your own flows with this logic point out. Now the nodes has a configuration option so you can tune this with your value. But make a modificaiton to allow dynamic change of the value using the trigger input.

from node-red-contrib-bme280.

dachshund-digital avatar dachshund-digital commented on July 3, 2024

Yes, I just thought it should be noted what the real, true, methodology is to get the altitude correct. Given that you can inject the correct sea-level value, as noted above, into the node, that is reasonable and appropriate.

from node-red-contrib-bme280.

dachshund-digital avatar dachshund-digital commented on July 3, 2024

Unfortunately, using 1013.25 as an estimated value of pressure at sea level is still not very accurate. I live about 40 m above sea level but the current code, works the elevation out to be over 90 m.

from node-red-contrib-bme280.

fmuntean avatar fmuntean commented on July 3, 2024

Maybe it should be a parameter we can pass in so we can change that.

from node-red-contrib-bme280.

dachshund-digital avatar dachshund-digital commented on July 3, 2024

It is, you can feed the correct value to the node module. The trick is how you get it, you need the GPS coordinates then query a weather site for the sea level pressure value base on the GPS coordinates, if you do this, this will significantly improve the resulting value from the bme280 chip. For example, using 1013.25 at my location, as the 'estimated' seal level pressure, the bme280 reports my location is about 93m elevation. If I use 1004, which for yesterday was the official sea level pressure at my location, bme280 reports the elevation at about 43m. As validation, the official reported elevation for the city I live in, is 41m. So, 43m is reasonable and comparable to the official value. Whereas, 93m, using the estimated sea level value, is just not even remotely accurate.

from node-red-contrib-bme280.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.