AIM - AOL IM client
RoyalTek Log Converter
#!/usr/bin/perl
#
# PDOP = Percent Dilution of Position. Measure of the geometrical
# strength of the GPS satellite configuration. The amount of error
# in your position. PDOP less than 4 gives the best accuracy (under
# 1 meter). Between 4 and 8 gives acceptable accuracy. Greater than
# 8 gives poor accuracy.
#
# HDOP = If the HDOP value is higher than about 4 the latitude and
# longitude data is normally disregarded. As the altitude data is
# probably also inaccurate, this is normally disregarded also.
#
my @fieldNames = (
'Record', 'Event Type',
'Year', 'Month', 'Day', 'Hour', 'Minute', 'Second',
'Latitude', 'Longitude', 'Altitude', 'PDOP', 'HDOP',
'Satellite No', 'Speed\(KMs/hr\)', 'Direction');
print join(',',@fieldNames) . "\n";
while (<>) {
chop;
if (m#^==========#) {
if (defined($record{Record})) {
my @data;
for my $name (@fieldNames) { push (@data,$record{$name}); }
print join(",",@data) . "\n";
}
undef %record;
}
for my $name (@fieldNames) { $record{$name} = $1 if (m#$name:\s+(.*)#); }
}
Run it with something like: royaltek < raw_gps.log > raw_gps.csv