Closed SandyWare closed 7 years ago
I have actually no idea but if I would take a guess, you seem to be on the right track. However, you may want to think about how a turn looks like in the terms of time and movement. Is it wide or narrow? How much time will it take to perform the turn? I think it depends a lot on the application. A more straight forward approach would be to just compare two azimuth values at different points in time, lets say 10 seconds apart, and then make a decision. But what if the user drives in a roundabout or makes a turn that takes more than 10 seconds to finish? Is it the end result that matters or do you have to track all kinds of turns, even in roundabouts etc?
How can I detect if device has taken a turn using GPS location. Is comparing previous & current azimuth value will give me a result ? Ex: int precision = 10; if ( (nmeaMathRadianToDegree(azimuth[it][0]) - nmeaMathRadianToDegree(azimuth[it][1]) ) < precision * -1) cout<<"Taken -> RIGHT"<<endl; else if ( (nmeaMathRadianToDegree(azimuth[it][0]) - nmeaMathRadianToDegree(azimuth[it][1]) ) > precision) cout<<"Taken -> LEFT"<<endl;