can you please explain how to get altitude measurement from pressure data from the sensor
The altitude in meters can be calculated with the international barometric formula:
H = 44330 * [1 - (P/p0)^(1/5.255) ]
H = altitude (m)P = measured pressure (Pa) from the sensorp0 = reference pressure at sea level (e.g. 1013.25hPa)
Also there is a bit different formula in ISA model in this publication: https://www.eurocontrol.int/publication/revision-atmosphere-model-bada-aircraft-performance-modelsee page 22.
these formuals gives different reasult in comparision to one provided in this answer on the top of discussion