measure mobile device orientation