0
Guys, I’m sorry if you don’t mean the question !
It will be possible by the latitude coordinate, longitude know the direction of the example vehicle if it is to the north or south or east or west example with php or javascript !
0
Guys, I’m sorry if you don’t mean the question !
It will be possible by the latitude coordinate, longitude know the direction of the example vehicle if it is to the north or south or east or west example with php or javascript !
5
What you want is a mix of GPS with inertial navigation. Some apps like Google Maps and Waze do this to know the direction a vehicle takes, especially on devices without a compass.
The technique is simple: get the device coordinates at two different points. The direction that the device follows is the vector that connects the two points and part of the first obtained.
The difficulty is that this vector must be obtained in three dimensions, with geodesic calculation. I leave it up to you to research the mathematics involved, as well as the mimation of the Apis to be used. Javascript can be used to obtain geolocation data in the browser. I don’t know if PHP has native API for this, but I think there are libraries to work with GPS.
And if you have a more specific question, please feel free to open a new question.
Pretty cool the answer.
Browser other questions tagged php javascript
You are not signed in. Login or sign up in order to post.
North, south, east or west in relation to what? null island?
– Jefferson Quesado
I meant by the example coordinate -4.3141, -69.5711 if you put this coordinate in Google Maps it will be in the Amazon river more precise know if it is going up the river or down the river
– Hemerson Prestes
You want to know movement?
– Jefferson Quesado
You need at least two points obtained at different times to know in which direction you are going.
– Oralista de Sistemas
hi @renan have the two coordinates yes I will receive every 5 minutes each coordinated
– Hemerson Prestes
I have latitude and longitude every 5 minutes then the next one has point A and point B more between the points I receive every 5 minutes the most accurate coordinate to know if it is going to point A or going to point B
– Hemerson Prestes
Cara is a valid doubt, but gives a better deal on geographical coordinates
– Sveen