Models since the iPhone 6 has a built in barometer. I believe it's primarily for measuring how many flights of stairs climbed. But the raw pressure measurements should be accessible:
To be honest, I'm fairly new to Pythoninsta, and am not entirely sure whether objCClass is for this purpose.
What I'm trying to do is to write a simple utility to map out a pressure and magnetic field variations in underground caves. The latter is possible with the motion module. I'm a caving hobbyist, and want to see whether sensors in phones can aid underground spatial orientation. (GPS obviously doesn't work underground!)