问题
By any way can I find whether my device is moving forward or backward. Consider if I have kept my device on a moving object say a rc toy car facing front to take movie where all it goes. Can I detect whether the car is going forward or backward.
Is it possible possible with map sdk for movement about 10meter? How long it should move to get the result with map sdk ?
回答1:
With the accelerometer sensor, you know the position of the phone in relation with the car, you absolutely can detect the direction during accelaration. If your device is "looking forward", then you just need to monitor the changes of the x and z axis to create a direction vector.
If you use GPS data, you can also know the direction at any moment..
来源:https://stackoverflow.com/questions/44659888/detect-device-forward-backward-movement