1. BUGFIX: Fixed bug where Capture Route would stop when it temporarily lost control of the GPS.
2. BUGFIX: FixOpenHelper should no-longer accidentally leave any cursors open.
3. FEATURE: Display Route now shows far fewer GPS fixes in order to reduce jagged lines caused by inaccuracy.
4. FEATURE: Display Route now calculates distance travelled and average speed and displays them.
5. FEATURE: Display Route now spreads it’s RouteItemizedOverlay by distance instead of by number of fixes, this should even them out better.
Download Version 0.0.11
1. Although it was meant to be persistent when the LocationService lost control of the gps system (for example when another application used the GPS while it was running) then it would be automatically restarted but it would not know which route it was recording to. I worked-around this by storing the current route in SharedPreferences and pulling it out again if the service was restarted.
2. I was seeing some warnings about cursors being left open, these were not causing errors because I was closing the Open Helper that created them. I changed how some of my functions in FixOpenHelper were written to stop this by using DatabaseUtils and closing unneeded cursors.
3. I wanted to start measuring distance and the best way I could think of was to measure the distances between the points and add them up. Before I could do that I had to get rid of points which were scattered all over the place, if I measured those the distance would seem much greater than it was. My solution to this was to edit DisplayRoutesActivity to reject any point that was less than 3 times it’s accuracy away from another point. This straightened the points out nicely.
4. The distance is now measured while the route is being processed to the screen, this is why the full length is only displayed on the final point. The average speed is calculated in FixOpenHelper by using an SQLite function to average all the speed values recorded for the route, because of this it is unlikely that the average speed will match up with the distance and time displayed.
5. Because I now have a measurement of distance I was able to change how my itemspreader (which spreads the clickable dots along the routes) works, previously it placed an Overlay Item every 25 accepted fixes, now it instead places a point whenever it is more than 300m from the last point.