I wander around with two tracking devices. I would like to merge the tracks into a single file.

"Solutions" I've read really aren't. Some merely append the tracks end to end. Another strips ALL data except lat/long (elevation and timestamps and anything else lost).

I can convert to CSV, load into spreadsheet, sort by timestamp, and convert back, but if someone else hasn't already automated this, I'd be surprised.

asked 04 Feb '17, 20:40

Happy%20Hobo's gravatar image

Happy Hobo
41128
accept rate: 0%


GPSBabel is the Swiss Army knife of GPX editors. I found this in the manual:

Merge multiple tracks for the same way. This option puts all track points from all tracks into a single track and sorts them by time stamp. Points with identical time stamps will be dropped.

Example 4.9. Merging tracks with the track filter

Suppose you want to merge tracks recorded with two different GPS devices at the same time. To do that, use this command line:

gpsbabel -t -i gpx -f john.gpx -i gpx -f doe.gpx -x track,merge,title="COMBINED LOG" -o gpx -F john_doe.gpx

This example shows the command line version but it also has a GUI one can use if you prefer. The site is here:

https://www.gpsbabel.org

Cheers,

Dave

permanent link

answered 04 Feb '17, 22:28

AlaskaDave's gravatar image

AlaskaDave
3.9k7093141
accept rate: 12%

Yes, that worked. One of the things I read suggested gpsbabel, but their method was the one that discarded all data but lat/lon. Interesting that this command for whatever reason arbitrarily split the track into several trkseg. The amusing result shows that the two devices are constantly on opposite sides of the street from each other. :-). http://www.gpsvisualizer.com/display/20170204145114-03119-map.html

(04 Feb '17, 22:49) Happy Hobo
2

If you intent to upload your tracks to OSM then don't upload this merged version. Instead upload a separate track for each of your device.

(05 Feb '17, 09:05) scai ♦

@scai - It's all data that might be useful for determining imagery offsets so whether it's loaded as one track or two, isn't the end result the same?

(05 Feb '17, 10:00) AlaskaDave
2

@AlaskaDave No, see the track visualization. At several locations the merged track jumps continuously from one side of the road to the other. The merged track is just a large mess. Uploading both tracks individually would be much better.

(05 Feb '17, 10:32) scai ♦
1

The positional quality of one or both of these traces is low but after they're uploaded to OSM they are merely a bunch of nodes with lat/lon coordinates. GPS visualizer and even the JOSM displays show them as being "connected" but that is artificial. No such connecting lines exist in the actual data.

That said, the quality issue might convince me to not upload those tracks at all. How much help can such poor data actually offer to users looking to correct an imagery offset?

(05 Feb '17, 10:39) AlaskaDave

I have also used two track recording devices at the same time. I have uploaded both ( to OSM traces as public ) on some occasions which works as a second opinion, or more when using all public traces are viewed. Currently i prefer to use GPS Prune to display both traces at the same time overlaid onto current OSM data. GPS Prune gives me the ability to delete bad points or detours into poor reception areas that are useless and "birds nest" tangles that are generated when stationary for a while. Prune also gives me the chance to edit the traces so i the only upload useful data and also avoid uploading data when I'm a little lost and drifted off a public rights of way, this iffy data could get used by mappers that haven't surveyed the area themselves, and think "someone as been there, it must be a path". I realise this isn't exactly what you asked for but hopefully it is another way to use your data.

permanent link

answered 05 Feb '17, 12:43

andy%20mackey's gravatar image

andy mackey
11.8k74126260
accept rate: 4%

Yes, the merged result looks bad. But the problem with either track alone is that while it looks good, it is seriously wrong! The next step after merging is to do some smoothing. There's no point in uploading a track that is completely wrong, whether it looks good or not.

(05 Feb '17, 13:56) Happy Hobo

I did try to smooth the track but probably not the best algorithm. The results still sucked.

(05 Feb '17, 20:29) Happy Hobo

I looked at them http://www.gpsvisualizer.com/display/20170204145114-03119-map.html and would just delete some sections of the traces, the gps wasn't getting a good signal. Seeing that the area is a city I assume there are lots of good traces available already??. I don't think using averaging the obviously wrong points serve any purpose at all, it will just corrupt the better stuff, Human input needed in a case such as this.

(06 Feb '17, 06:15) andy mackey

The thought was that with one device erring northwest and one northeast that a five-point weighted average would partially cancel the errors. And it did, but the weighting I used wasn't the best. But even where the errors were smaller, along the river, the trace is consistently not on the path.

(06 Feb '17, 08:21) Happy Hobo

alt textalt text

Having seen the traces http://www.gpsvisualizer.com/display/20170204145114-03119-map.html
I would guess that one device didn't have good signal all the time, was it in a pocket or a bag? high rise building can also cause problems. see http://wiki.openstreetmap.org/wiki/Accuracy_of_GPS_data I believe some devices now discard obviously faulty points, by seeing the average speed they calculate the large jumps of speed the zig zags would induce aren't likely and disregard them. It's possible this could be done with clever spread sheet, (the distance between consecutive, once a second points can't > 6 km/h ( if walking) then ignore it) For me it's just easier to delete rogue points by looking at them with GPS Prune, which does display the speed between consecutive points by the way.

permanent link

answered 06 Feb '17, 07:06

andy%20mackey's gravatar image

andy mackey
11.8k74126260
accept rate: 4%

edited 06 Feb '17, 07:44

1

The buildings are undoubtedly part, as it is slightly better along the river. But looking at the two traces separately, one is consistently northwest of the truth and the other consistently southeast. I wasn't trying to improve the map but to have something decent for a few relatives who want to see where I wander. I knew human input would be necessary; I just want to minimize it. These are so bad that it would be more efficient to pull up a map and draw the tracks freehand. One of them, the eTrex-30, once told me its accuracy was three meters as I went out on a footpath and four meters when I came back. But the map showed the two paths fairly straight but twelve meters apart! Same device told me on another occasion after a five minute walk away from buildings that my average speed was 18 KPH.

(06 Feb '17, 08:14) Happy Hobo

I usually get very good results with my Garmins but i have had High rise building shadowing problems in the past. I agree, do a screen grab of OSM draw on it and send that to them.

(06 Feb '17, 08:32) andy mackey
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×27

question asked: 04 Feb '17, 20:40

question was seen: 2,767 times

last updated: 06 Feb '17, 08:32

powered by OSQA