An accelerometer is used to determine the position and orientation of a drone during flight. The accelerometer is used to provide the acceleration force the drone is subjected to in all three axes, X, Y, and Z. It also determines the tilt angle of the drone in a stationary position. The accelerometer also gives linear acceleration in the horizontal and vertical directions. This data can be used to calculate the velocity, movement, and even rate of change of altitude of the drone.
Reference- Sensors Used in Drones