It measures pressure and temperature.Check the manual of the library you use to find out what they mean with "altitude" and "real altitude".If you know your elevation (altitude) you can calculate the "pressure at sealevel" (your local meteo service will give this number normally for air pressure) from your measured pressure.Likewise, if you know the pressure at sealevel and measure the pressure at your location, you can calculate your elevation.