Modern drones have A barometer on the circuit board of the drone that is used to control the flight height by detecting different changes in atmospheric pressure, while a GPS receiver is primarily used to determine the horizontal position of the drone. Since both a barometer and GPS can measure height, they are using different algorithms.