Go Down

Topic: BMP 280 exact Altimeter readings.  (Read 546 times) previous topic - next topic

tiger369

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.

floresta

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

Don

jremington

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.

tiger369

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.

wwaver

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.

ElCaron

#5
Dec 06, 2017, 09:31 am Last Edit: Dec 06, 2017, 09:32 am by ElCaron
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.

Go Up