Is it possible for latitude and longitude to know the direction?

0

Please forgive me if the question is not right!

It will be possible by the latitude, longitude coordinate to know the direction of the vehicle example if it is north or south or east or west example with php or javascript!

    
asked by anonymous 29.12.2017 / 02:13

1 answer

5

What you want is a mixture of GPS with inertial navigation . Some applications like Google Maps and Waze do this to find out which direction a vehicle is heading, especially on non-compass devices.

The technique is simple: get the coordinates of the device at two different points. The direction the device follows is the vector connecting the two points and part of the first one obtained.

The difficulty is that this vector must be obtained in three dimensions, with geodesic calculation. I leave it to your discretion to research the mathematics involved, as well as the determination of the APIs to be used. Javascript can be used to obtain geolocation data in the browser. I do not know if PHP has native API for this, but I believe there are libraries to work with GPS.

And if you have a more specific question, feel free to open a new question.

    
29.12.2017 / 02:30