I want to implement a program which tells if car driver took a fast turn when my device is upright in holder.
I am getting speed from GPS and am currently using compass.
Whenever angle changes in same direction as previous it adds up the angle difference, but when it changes in opposite direction i set angle difference = 0 and so on.
It moves very swiftly in hand but in car it works 60 70% of times.
Due to error of sensors and style of driving.
Is there any other method like if i pass lat long and get back that its a turn or not..
Or am i implementing right or there's any better way to do it.
Please help me out.
Have you tried using Bearing ? Instead of using compass use the bearing that Location class offers:
loc.getBearing();
more info: http://developer.android.com/reference/android/location/Location.html