User:Goldfndr

From OpenStreetMap Wiki
Jump to: navigation, search
Userboxes
OSM Logo This user submits data to OpenStreetMap under the name goldfndr.
Go Do Some Mapping.png Goldfndr uses a Garmin iQue 3600 and is willing to answer questions on it from OSM users.


Android icon Goldfndr uses an Android phone or tablet.
OsmAnd icon Goldfndr uses OsmAnd, mobile map viewing & navigation app.


Babel
en This user is a native speaker of English.

Converting Kismet .gps files to gpx

For other wardrivers, wanting to convert their kismet.gps logs to gpx format, I'm posting the converter I wrote, which was inspired by Christopher Schmidt's code at User:Dutch. Why did I write it?

  • I have many GPS files to convert, and I didn't want to have many GPX files as a side-effect.
  • I'm somewhat of a Perl beginner, and this was a fun exercise.
  • Platform variety is a good thing.
#!/usr/bin/perl
$#ARGV+1 or die "Usage: kismet2gpx.pl *.gps > kismet.gpx\n";
use POSIX qw(strftime);

print '<?xml version="1.0"?>
<gpx creator="kismet2gpx.pl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/0">';

while ($ARGV = shift @ARGV) {
	open FILE, $ARGV or die("Can't open $ARGV: $!\n");
	print "\n    <trk>\n\t<name>$ARGV</name>\n    <trkseg>\n\n";
	while ($_ = <FILE>) {
		if (/ bssid="GP:SD:TR:AC:KL:OG" /) {
			$_ =~ / time-sec="([^"]*)" .* lat="([^"]*)" lon="([^"]*)" alt="([^"]*)"/;
			$t = strftime "%Y-%m-%dT%H:%M:%SZ", gmtime $1;
			print "<trkpt lat=\"$2\" lon=\"$3\"><ele>$4</ele><time>$t</time></trkpt>\n";
		}
	}
	close $FILE;
	print "\n    </trkseg></trk>";
}
print "</gpx>\n";

Copy the above to a file or download a copy from my web site, save as kismet2gpx.pl, set execute permission. Note that it'll put the names of each .gps file as the track name. Like crshmidt's, it does not do sanity checking on the values in the file. If you have feedback, please see me in the #osm IRC channel.

Voice recordings for georeferencing

For other mappers, wanting to record POIs (Nodes), here's some code I threw together. Requirements:

  • Computer with audio out and microphone in running Microsoft Windows XP (other versions might also work)
  • NetStumbler and Master script for NetStumbler or equivalents (something to make GPS information available)
  • Audacity with saving hotkey set (Edit>Preferences>Keyboard, Export As Ogg Vorbis... = Ctrl+Shift+S)
  • AutoHotkey

Optional:

  • Non-optical mouse or trackball with ball removed (some locales require any large displays to be unseen by the driver, so an open laptop might not be legal)
  • External microphone
;Georef.ahk

;Mute all sound
SoundSet, 1,, mute

;Read current latitude and longitude; requires ns04digle.vbs or equivalent
RegRead, lat, HKCU, Volatile Environment, DiGLELatitude
RegRead, lon, HKCU, Volatile Environment, DiGLELongitude

;Run Audacity and wait for it to show up
Run, C:\Program Files\Audacity\Audacity.exe
WinWaitActive, Audacity

;Record for a few seconds (e.g. 7 seconds or 7000 milliseconds)
Send r
Sleep 7000
Send {space}

;Unmute, and play default sound so we know we're no longer muted
SoundSet, 0,, mute
Sleep 300
SoundPlay, *-1

;Save the recorded file from Audacity; requires a defined keystroke
Send ^S
WinWaitActive, Save
Send, {home}geo_%lat%_%lon%_{enter}

;Exit Audacity
WinWaitActive, Audacity
Send !{F4}n

Copy the above to a file, save as Georef.ahk, and try it out. It reads coordinates from the locations that DiGLE uses, so with NetStumbler and the Master Script you'd set UseDiGLE = True. Of course, you should also use UseGPX = True if you don't have some other GPS tracer.

Use a mouse button or equivalent to launch it, then say the POI's name. An audio recording will be saved with the GPS coordinates as part of the file's name.