kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
rs92,rs41,imet1ab,dfm,m10: output-log -> gpx,kml
rodzic
53cdc1ded5
commit
510ff20d20
|
@ -10,6 +10,7 @@ print "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n";
|
|||
print "<gpx version=\"1.1\" creator=\"me\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.topografix.com/GPX/1/1\" xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\">\n";
|
||||
|
||||
my $line;
|
||||
my $date;
|
||||
my $hms;
|
||||
my $lat; my $lon; my $alt;
|
||||
|
||||
|
@ -17,14 +18,20 @@ print "<trk>\n";
|
|||
print "<trkseg>\n";
|
||||
|
||||
while ($line = <$fh>) {
|
||||
if ($line =~ /(\d\d:\d\d:\d\d).*\ lat:\ *(-?\d*\.\d*)\ +lon:\ *(-?\d*\.\d*)\ +alt:\ *(-?\d*\.\d*).*/) {
|
||||
if ($line =~ /(\d\d:\d\d:\d\d\.?\d?\d?\d?).*\ +lat:\ *(-?\d*\.\d*)\ +lon:\ *(-?\d*\.\d*)\ +alt:\ *(-?\d*\.\d*).*/) {
|
||||
|
||||
$hms = $1;
|
||||
$lat = $2;
|
||||
$lon = $3;
|
||||
$alt = $4;
|
||||
|
||||
$date = "";
|
||||
if ($line =~ /(\d\d\d\d-\d\d-\d\d).*/) { $date = sprintf ("%sT", $1); }
|
||||
#if ($line =~ /(\d\d\d\d)-(\d\d)-(\d\d).*/) { $date = sprintf ("%04d-%02d-%02dT", $1, $2, $3); }
|
||||
|
||||
print " <trkpt lat=\"$lat\" lon=\"$lon\">\n";
|
||||
print " <ele>$alt<\/ele>\n";
|
||||
printf(" <time>%sZ</time>\n", $hms);
|
||||
printf(" <time>%s%sZ</time>\n", $date, $hms);
|
||||
print " </trkpt>\n";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ print " <altitudeMode>absolute</altitudeMode>\n";
|
|||
print " <coordinates>\n";
|
||||
print " ";
|
||||
while ($line = <$fh>) {
|
||||
if ($line =~ /(\d\d:\d\d:\d\d).*\ lat:\ *(-?\d*\.\d*)\ +lon:\ *(-?\d*\.\d*)\ +alt:\ *(-?\d*\.\d*).*/) {
|
||||
if ($line =~ /(\d\d:\d\d:\d\d).*\ +lat:\ *(-?\d*\.\d*)\ +lon:\ *(-?\d*\.\d*)\ +alt:\ *(-?\d*\.\d*).*/) {
|
||||
$hms = $1;
|
||||
$lat = $2;
|
||||
$lon = $3;
|
||||
|
|
Ładowanie…
Reference in New Issue