What is this?

This uses your device's gyroscope to find the angle α, and then uses simple trigonometrics to find the height, using:

tan(α) * d = h

h d α