The strait forward solution is to compare resulting acceleration (i.e. geometrical sum over all of axes) to the 1G
Let
Vx, Vy and Vz are proper values of axes X, Y and Z accordingly.
Thus
R^2 = Vx^2 + Vy^2 + Vz^2 , where R is resulting acceleration
Now if
(1 - eps) < |R| < (1 + eps), where eps is a tolerance,
then we may conclude our body does not experience additional acceleration.
The problem is heavy calculation:
R = sqrt( Vx*Vx + Vy*Vy + Vz*Vz )
- 3 multiplication
- 1 square root