QuickTimeStream.pl (Image-ExifTool-12.57) | : | QuickTimeStream.pl (Image-ExifTool-12.58) | ||
---|---|---|---|---|
skipping to change at line 1491 | skipping to change at line 1491 | |||
# 0020: 09 00 00 00 1b 00 00 00 41 4e 57 00 25 d1 99 45 [........ANW.%.. E] | # 0020: 09 00 00 00 1b 00 00 00 41 4e 57 00 25 d1 99 45 [........ANW.%.. E] | |||
# 0030: f1 47 40 46 66 66 d2 41 85 eb 83 41 00 00 00 00 [.G@Fff.A...A... .] | # 0030: f1 47 40 46 66 66 d2 41 85 eb 83 41 00 00 00 00 [.G@Fff.A...A... .] | |||
($latRef, $lonRef) = ($1, $2); | ($latRef, $lonRef) = ($1, $2); | |||
($hr,$min,$sec,$yr,$mon,$day) = unpack('x16V6', $$dataPt); | ($hr,$min,$sec,$yr,$mon,$day) = unpack('x16V6', $$dataPt); | |||
if ($yr < 2000) { | if ($yr < 2000) { | |||
$yr += 2000; | $yr += 2000; | |||
} else { | } else { | |||
# Kenwood dashcam sometimes stores absolute year and local time | # Kenwood dashcam sometimes stores absolute year and local time | |||
# (but sometimes year since 2000 and UTC time in same video!) | # (but sometimes year since 2000 and UTC time in same video!) | |||
require Time::Local; | require Time::Local; | |||
my $time = Image::ExifTool::TimeLocal($sec,$min,$hr,$day,$mon-1,$yr- 1900); | my $time = Image::ExifTool::TimeLocal($sec,$min,$hr,$day,$mon-1,$yr) ; | |||
($sec,$min,$hr,$day,$mon,$yr) = gmtime($time); | ($sec,$min,$hr,$day,$mon,$yr) = gmtime($time); | |||
$yr += 1900; | $yr += 1900; | |||
++$mon; | ++$mon; | |||
$et->WarnOnce('Converting GPSDateTime to UTC based on local time zon e',1); | $et->WarnOnce('Converting GPSDateTime to UTC based on local time zon e',1); | |||
} | } | |||
SetByteOrder('II'); | SetByteOrder('II'); | |||
$lat = GetFloat($dataPt, 0x2c); | $lat = GetFloat($dataPt, 0x2c); | |||
$lon = GetFloat($dataPt, 0x30); | $lon = GetFloat($dataPt, 0x30); | |||
$spd = GetFloat($dataPt, 0x34) * $knotsToKph; # (convert knots to km/h) | $spd = GetFloat($dataPt, 0x34) * $knotsToKph; # (convert knots to km/h) | |||
$trk = GetFloat($dataPt, 0x38); | $trk = GetFloat($dataPt, 0x38); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |