Simply put, Accelerometers, gyros and compasses all contribute to the flight controllers <<~~>> spatial information, such as movements like drift, dropping and ascending. They work in unison to guide and control the flight of the drone, and are the key sensors in the fight against gravity.
Accelerometers work by measuring the rate of change of movement. Take for example an accelerometer sitting on a flat, stationary surface. This sensor would read zero, because it’s not moving. If you then move this sensor, it will return a value (according to the plane it is oriented to), telling you it is moving. What’s interesting though is that if you put this sensor on something that is moving at a constant speed, it will return a zero, since the sensor isn’t detecting a *change* in movement, or acceleration. Strange huh?
Now imagine two sensors, facing away from one another, but in the same alignment. If you move them away from you, one will read a positive value, and the other a negative value. If these values match (in equal measure, cancel out) then you know you’re sensors are nicely calibrated. Pairing Accelerometers like this can increase accuracy of measurements, whilst also (to a certain extent) allow redundancy in the system. Pairing Accelerator sensors in different planes (X, Y and Z) provides information about movement in any direction. Additional sensors can be added in 45degree angles around these core planes, but they are somewhat unnecessary if the initial 6 are calibrated correctly, as any angle can be measured from them without the need for any more.
Gyroscopes also measure angles, but not through movement, but rather through straightforward angle measurement.