Fixed #5847: The gravity sensing numerical inversion in html5