This logic is purely personal fantasy, for reference only, hope that everyone is not hesitate to enlighten.
One, 1.0
Get the coordinates directly with GPS positioning
Two, 2.0
GPS positioning, in the case of a usable satellite greater than 3, every 2 seconds to take 1 points, a continuous only 10 points, and take the 10 points between two points the smallest two points, one point as the center point, and with the pedometer function, if 10 points have more than 3 points of the steps of 0 to re-fetch points.
Three, 3.0
In order to meet the indoor positioning, we need to join Baidu or other base station-based positioning, On the basis of 2.0, if the number of available satellites is less than 3, then use Baidu or other base station-based positioning, you need to take 2 points per second speed to take 20 points, 20 points to take the most central point, if the number of available satellites is greater than 3, then the use of v2.0 rules; Pedometer function is mainly to prevent the mobile phone after a long time to place, causing The points taken were scattered around the phenomenon. Can be used to join the trajectory of angular smoothing processing.
On the algorithm logic of mobile location trajectory