BMP 280 exact Altimeter readings.

Hi,

I was just going through this pressure sensor tutorial.

What I want to know is how can I set the exact altimeter in my readings depending upon my different geographical place ? or may be if I am attaching the sensor to my balloon.

If you get your answer at StackExchange make sure you let us know (and vice versa).

Don

In order to calibrate the BMP280 to give correct relative altitude readings, you need to know the actual altitude at some point. Some other means to determine altitude must be used.

Pressure sensors must be recalibrated very frequently.

ya, I did post same question at StackExchange also to get different views on same topic. till now I got following answer from Mr. Jose. This seems quite logical.Will work on it.

The tutorial sample source code has the line:

Serial.print(bmp.readAltitude(1013.25)); // this should be adjusted to your local forcase

That 1013.25 value should be the local pressure at sea level in hundreds of Pa. If want to show altitude above ground level, you will need to know that for your location and write your code to calculate the altitude offset.

The sensor can't know location -- it only measures pressure. The AdaFruit library provides the altitude conversion, but being generic, it relies on several assumptions.

I have been playing around with this as I want to have an Altimeter with a HUD inside my skydiving helmet. I started using the Example sketch and out of the box works very well. I then decided to start playing with the idea of setting a Relative ground value either on boot or somehow with a input button.

By taking the current pressure and dividing by 100 I could get the current pressure to correct the altitude to zero. All I care about in skydiving is setting my relative ground level to zero each day or jump or whichever.

I started by playing with a float in the loop.

float relAlt = (bmp.readPressure()/100);

Serial.print(bmp.readAltitude(relAlt)*3.28084) // converted to feet

This inside the loop works well and each read basically gives me a ground value, starting point. However when I try to take the float outside of loop like up to the body I get a return of "-inf" instead of a relative altitude. My goal would be to have a relative altitude set on power on or using a button press to initiate setting a new relative altitude. Much like a skydiver would adjust a manual altimeter before board a plane.

If you declare a variable inside a loop, it is only valid inside that loop. readings outside are not defined. I would have expected a compiler error, though ...

BTW, regarding tiger369: People don't like questions asked at different places in parallel, because they answer your question in their free time for free. That time may very well be waste if you already got the information somewhere else. If you want to reach different people, at least cross link your questions. ("I have have also asked this at StackExchange). If you just want to test if people at different place give you the same answer, then go waste someone else's time.

ElCaron:
BTW, regarding tiger369: People don't like questions asked at different places in parallel, because they answer your question in their free time for free. That time may very well be waste if you already got the information somewhere else. If you want to reach different people, at least cross link your questions. ("I have have also asked this at StackExchange). If you just want to test if people at different place give you the same answer, then go waste someone else's time.

Surely though it is advisable to ask and get answers from as many places as possible to gauge a full and correct answer - I think it is very weird to have one forum constraining questioners to asking in that forum only - very bad science.

1 Like

D6equj5:
Surely though it is advisable to ask and get answers from as many places as possible to gauge a full and correct answer - I think it is very weird to have one forum constraining questioners to asking in that forum only - very bad science.

Well that is the difference between being an egocentric asshole that only cares for gatting as many answers as possible, and being a proper member of society that does not waste the time of people trying to help.
If you have a table made, do you order from 5 carpenters to get the maximum amount of choice and quality, and then only pay one? The difference is, here you do not even pay one.
If you don't trust that you get reasonable answers in a single forum, at least make people aware where else you asked, so they can check if their solution was already proposed.

D6equj5:
Surely though it is advisable to ask and get answers from as many places as possible to gauge a full and correct answer - I think it is very weird to have one forum constraining questioners to asking in that forum only - very bad science.

There's also very bad manners (and I'm not talking about the ska band).

1 Like

D6equj5:
Surely though it is advisable to ask and get answers from as many places as possible to gauge a full and correct answer - I think it is very weird to have one forum constraining questioners to asking in that forum only - very bad science.

That's because you haven't thought through how these forums actually function, you've not understood
the view from the answering side. Threads are there to serve as answers for people with the same
question in the future too, they don't want to have to wade through 3 or 4 incomplete confusing
similar threads to find the actual one with the answer, they want a complete story.

These forums are effectively curating a knowledge base, and curation requires order and some categorization.

A better system would have tags for categorizing threads, so you could add multiple tags to a thread, making
navigation more flexible for everyone. In lieu of that, put important keywords in the subject line and post
a single thread.

1 Like