Originally Posted by digi_pixel
A g-sensor (Gyrometer) determines where a device is on an axis (eg to see where the device is tilted and by how much).
The g-sensor is the accelerometer, not the gyroscope. The accelerometer measures the device's acceleration compared to the free fall vector (the direction of the g-force), and the gyroscope measures it to a fixed axis of the phone itself.
If you are somewhat handy at flight dynamics, you should know that a plane has three dimensions of rotation: the roll, the pitch and the yaw. An accelerometer can only measure roll and pitch because the axis he yaw is measured to is the orientation of the gravitational pull. Because of he gyroscope has an independent reference axis it can measure all three dimensions which is needed not just keeping a plane safely in the air, but for the photosphere feature too.