/usr/bin/convert2gpx is in foxtrotgps 1.2.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #!/usr/bin/perl
#
# (c)2008 Marcus Bauer - License GPLv2
#
# Convert a tangoGPS logfile to GPX
#
# usage: ./convert2gpx.pl logfile*.log > outfile.gpx
#
print <<EOT
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0"
creator="convert2gpx.pl http://www.tangogps.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/0"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
<trk>
<trkseg>
EOT
;
while(<>)
{
@arr = split(',',$_);
chop @arr[6];
print <<EOT
<trkpt lat="@arr[0]" lon="@arr[1]">
<ele>@arr[2]</ele>
<time>@arr[6]</time>
<course>@arr[4]</course>
<speed>@arr[3]</speed>
<fix>3d</fix>
<hdop>@arr[5]</hdop>
</trkpt>
EOT
;
}
print <<EOT
</trkseg>
</trk>
</gpx>
EOT
;
|