Answer the question
In order to leave comments, you need to log in
How to determine the direction (N/S/W/E) of movement using two GPS coordinates?
There are two GPS coordinates (lat,lon,timestamp).
a 45.0677975, 41.9269341, 1523639370
b 45.0688700, 41.9279653, 1523639381
How to calculate the heading azimuth (vector, direction) from these data?
The bottom line is this, there is a GPS track with an array of coordinates and a timestamp - it is necessary to determine from it when the source turned (left from the previous direction to another direction).
Answer the question
In order to leave comments, you need to log in
As an angle between vectors it is considered. a unit vector along the y-axis and a vector formed by two points.
For example like this:
double res_1 = /* Направление */ 45.132982 - 45.117557, res_2 = /* Направление */ 41.946420 - 41.946270;
output = atan2( res_2, res_1 );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question