Android – reorients the axis of the accelerometer to the axis of the car in the phonegap application

I am currently working on an application to detect potholes on the road through the accelerometer in my mobile phone. My problem is that I need to reorient the accelerometer axis to align it with the car axis

I found this explanation in the following online report, but I don't know how to use GPS to calculate the angle after rotation and how to monitor the angle before rotation

Online Description:

"The mobile phone can be placed arbitrarily, so the embedded accelerometer. Therefore, the signal must be oriented and analyzed along the vehicle axis first. The system uses the algorithm based on Euler angle to reposition. Through pre rotation, the sensor actually rotates along the vehicle axis, inclination angle and rear rotation angle (Euler angle) The GPS is used for the angle after rotation, so in order to avoid additional energy consumption, the pre rotation angle and tilt angle are continuously monitored, and as long as there are any significant changes in these angles, the GPS has been turned on and the relocation process has been completed. "

I've searched for ways to find device directions using phonegap, but all I can find is the title direction plug-in, which seems to be used to provide compass directions for phones

Any suggestion or even an alternative would be appreciated

resolvent:

I found the e-book "persistent Computing: 10th International Conference, persistent 2012, Newcastle, UK" very useful for understanding how to program the reorientation of accelerometer axis

Invalid Sign

I hope this will help others who try to do so

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>