User:Goldfndr

From OpenStreetMap Wiki
Jump to: navigation, search
Babel
en This user is a native speaker of English.



Goldfndr submits data to OpenStreetMap under the name goldfndr.

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?

#!/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:

Optional:

;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.

Personal tools
Namespaces
Variants
Actions
site
Toolbox