You should utilize readings out of your atmosphere to calculate your peak above sea degree with a great diploma of accuracy. The BME280 sensor can measure issues like air strain, humidity, and temperature after which relay that info to the Raspberry Pi Pico. From there, the code you could have put in can take the air strain studying, and use it to determine your altitude.
The explanation this works partially comes all the way down to gravity. It impacts all the pieces with mass to a point, and pulls most of earth’s fuel as near the floor as potential. This ends in the air being dense at sea degree, with the density lowering the additional up you go. The denser the air is, the extra strain it may well exert, so the decrease densities at increased up will lead to much less strain exerted on the sensor.
Air strain is round 14.7 PSI at sea degree, and solely about 4.84 PSI on the summit of Mount Everest. Should you’re mountaineering, you are on land and the strain you are experiencing will probably be someplace in between. As a rule of thumb, strain will drop by round 0.5 PSI for each 1000 ft you go above sea degree, although this fee drops off the upper you go. With the right algorithm, it is simple to translate a strain studying into an altitude estimate. If you wish to do this your self, the Pi Pico is without doubt one of the few Raspberry Pi merchandise that’s available and fairly low-cost. You may decide up a two-pack of the microcontrollers on Amazon for simply over $12.