OpenStreetMap 로고 OpenStreetMap

Hiding home location with GPSBabel

ArtyCarty479831님이 English로 2008년 4월 1일에 게시함.

It's easy to collect GPS track logs when driving around running errands. Since I'm in the US, I don't need to gather street names for most streets; I just need tracks to align the Tiger data.

The easy thing to do is turn on my GPS logger, set it on the car dashboard, and drive around. When I get home, pick it up off the dashboard and turn it off. Easy to do, but only one problem: I am paranoid, and I don't want every public tracklog showing my driveway. Yes, it is probably silly, but there it is.

One choice is to not turn on track logging until I am a block or two away from home, and then turn it off a block or two before getting home. It works, but it can be distracting while driving. I could also edit the GPX file with a text or xml editor, but that is repetitive and boring.

The best solution is GPSBabel, which is made just for this type of thing. It has a processing filter which can include or exclude points that lie within a boundary which you define.

I'm already using GPSBabel to translate my GPS tracks from the Coto Palm GPS software into GPX format, so I figured this would be an easy addition to the process. It took more work than I expected, because of an obscure detail in the processing. GPSBabel only wants to apply the filtering to defined waypoints, and not to tracks. Fortunately, GPSBabel itself can solve this problem, too. I told it to translate the tracks into waypoints, filter, then translate back to tracks. It added waypoint names for every track point, but I could easily delete those.

The end result is a shell script looking something like this:

F=$1

NewFileName=` echo $F | sed -e 's/\.pdb$//i' | tr ' ' '_' `.gpx

#Convert trackpoints to waypoints, for exclusion to work,
# then convert back

gpsbabel \
-i coto -f "$F" \
-x discard,hdop=6 \
-x transform,wpt=trk,del \
-x polygon,file=$ExcludeFile,exclude \
-x transform,trk=wpt,del \
-o gpx -F - \
| grep -v -e '' -e '' -e '' \
>"$NewFileName"

이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

2008년 4월 3일 12:51Steve Hill님의 의견

See my diary entry: osm.org/user/Steve Hill/diary/1272

댓글을 남기려면 로그인하세요