labexp / osmtracker-android

GPS tracking tool for OpenStreetMap
GNU General Public License v3.0
503 stars 237 forks source link

Add accuracy and GPSImgDirection in exported GPX #173

Open rideearthtom opened 6 years ago

rideearthtom commented 6 years ago

I use OSMTracker extensively for surveying work. Two bits of data that would be hugely useful to me are GPS accuracy of tracks (which I guess can be saved in a trackpoint field, similarly to how point accuracy is saved?) and the GPSImgDirection (ie: compass bearing) EXIF tag added to photos or saved in the corresponding GPX file. This would help greatly in visualising track accuracy and also understanding which direction the camera was pointing when a photo was taken.

I've never helped with app development before but I do know the basics of software development so am happy to try and implement this if you can help me figure out where to start!

icrf2000 commented 5 years ago

For the trackpoint accuracy feature: Actually relatively simple, the accuracy of the trackpoints is already stored in the database, it only needs to be exported into the GPX. Adding one line of code in ExportTrackTask.java does the trick:

buff += "\t\t\t\t\t<accuracy>" + String.valueOf(c.getDouble(c.getColumnIndex(TrackContentProvider.Schema.COL_ACCURACY))) + "</accuracy>\n";

If you want, you can pull the branch hz_gpx_all_enhancements from my fork of the repository and compile it. It contains this change and also a few others:

(I was too lazy to provide the "add accuracy" feature as a separate (and annoying for me to merge) separate branch or pull request)

alexkemp9 commented 5 years ago

This is a MeToo fto ask for compass bearing to be added into the EXIF of photos. The reason is that Mapillary makes direct use of GPSImgDirection in processing photos and that is where all photos that I take are stored, as to use with OSM