Answer the question
In order to leave comments, you need to log in
How to determine if the coordinates are included in the circle?
Good afternoon! The question does not seem to exist. In general, you need to implement the following:
There is a previously known route that the car should drive. The tracker sends data about the current location every second. And when the car leaves the route, then the system should notify the owner of the car.
Now questions:
1. How to save route data?
2. How to find out that the car has left the route?
Answer the question
In order to leave comments, you need to log in
1. Write the route to the database, for example MySQL can work with geographic data.
2. Determine the deviation from the route ( ST_Distance ), if more than the specified - notify.
The occurrence of a coordinate in a circle is a simple formula:
You probably need to calculate the distance from a point to the segments that make up the route:
Just control that the perpendicular falls on the segment, and not on the straight line.
Or make it easier.
Generate division of segments into points with a distance of no more than N meters and compare with the first simple word.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question