May I have the formula for direction of rotation always pointing to gravity, using gyro / accelerometer expressions? I do not understand the detail of the gyro xy / accelerometer xy readings.
Thanks to lucky.andrei and I worked out a formula, which still have space of improvement.
Rotation:
$accelerometerRawX()>=0?(360-(deg(acos(accelerometerRawY()/-10)))):(deg(acos(accelerometerRawY()/-10)))$