Skip to content

Commit 69bcaaa

Browse files
committed
Allow fractional seconds in --photooffset
Now that we interpolate on a subsecond basis, it makes sense to allow subsecond resolution in the photo offset.
1 parent eac36e7 commit 69bcaaa

21 files changed

+232
-29
lines changed

RELEASES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Release History:
33
v2.x: X
44
- Use subsecond times in an image for better interpolation
55
- When interpolation is disabled, round up when exactly half way
6+
- Allow fractional times in --photooffset
67

78
v2.2: 17 October 2024
89
- Fix metainfo nits

correlate.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,21 @@ struct timespec ConvertTimeToUnixTime(const char *Time, const char *TimeFormat,
8989
Options->TimeZoneHours, Options->TimeZoneMins);
9090

9191
/* Add the PhotoOffset time. This is to make the Photo time match
92-
* the GPS time - ie, it is (GPS - Photo). */
93-
PhotoTime.tv_sec += Options->PhotoOffset;
92+
* the GPS time - i.e., it is (GPS - Photo). */
93+
double IntPart;
94+
double FracPart = modf(Options->PhotoOffset, &IntPart);
95+
PhotoTime.tv_sec += (long)IntPart;
96+
long NewNs = PhotoTime.tv_nsec + (long)round(FracPart * 1e9);
97+
/* Handle over/underflow out of the nanoseconds part which must be
98+
* 0 <= nsec <= 999999999 */
99+
if (NewNs < 0) {
100+
PhotoTime.tv_sec -= 1;
101+
NewNs += 1000000000L;
102+
} else if (NewNs >= 1000000000L) {
103+
PhotoTime.tv_sec += 1;
104+
NewNs -= 1000000000L;
105+
}
106+
PhotoTime.tv_nsec = NewNs;
94107
return PhotoTime;
95108
}
96109

correlate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct CorrelateOptions {
4646

4747
int Result;
4848

49-
int PhotoOffset; /* Offset applied to Photo time. This is ADDED to PHOTO TIME
49+
double PhotoOffset; /* Offset applied to Photo time. This is ADDED to PHOTO TIME
5050
to make it match GPS time. In seconds.
5151
This is (GPS - Photo) */
5252

doc/fr/gui.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h3>Étape 3: Établir les options</h3>
4242

4343
<p>La zone <b>«&nbsp;Fuseau horaire&nbsp;»</b> spécifie le fuseau horaire utilisé lors de la prise des photos, de sorte que les données de temps de celles-ci puissent être ajustées pour correspondre aux données GPS.</p>
4444

45-
<p>La zone <b>«&nbsp;Décalage des photos&nbsp;»</b> spécifie un décalage en nombre de secondes à ajouter aux photos pour les faire correspondre aux données GPS (synchronisation). Voir la page <a href="concepts.html">Documentation de GPS Correlate&nbsp;: les concepts</a> pour comprendre l’intérêt de ce paramètre.</p>
45+
<p>La zone <b>«&nbsp;Décalage des photos&nbsp;»</b> spécifie un décalage en nombre de secondes à ajouter aux photos pour les faire correspondre aux données GPS (synchronisation) (des secondes fractionnées sont autorisées). Voir la page <a href="concepts.html">Documentation de GPS Correlate&nbsp;: les concepts</a> pour comprendre l’intérêt de ce paramètre.</p>
4646

4747
<p>La zone <b>«&nbsp;Datum du GPS&nbsp;»</b> spécifie le système de référence de la source de données GPS et fait l’objet d’un tag EXIF. Par défaut il s'agit du «&nbsp;WGS-84&nbsp;», et ne devrait pas être changé, dans la mesure où le format GPX n’est pas censé contenir autre chose. N’utilisez cette option qu’en toute connaissance de cause.</p>
4848

doc/gpscorrelate-manpage.xml.in

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,12 @@
358358
<replaceable>seconds</replaceable>
359359
</term>
360360
<listitem>
361-
<para>Time in seconds to add to the photo timestamp to make it match
362-
the GPS timestamp. To determine the number of seconds needed, just
363-
create a photograph of your GPS device showing the current time and
364-
compare it with the timestamp of your photo file. The EXIF time
365-
tags in the image are not modified based on this value.</para>
361+
<para>Time in seconds (fractional seconds are allowed) to add to the
362+
photo timestamp to make it match the GPS timestamp. To determine
363+
the number of seconds needed, just create a photograph of your GPS
364+
device showing the current time and compare it with the timestamp of
365+
your photo file. The EXIF time tags in the image are not modified
366+
based on this value.</para>
366367
</listitem>
367368
</varlistentry>
368369

@@ -680,10 +681,10 @@
680681

681682
<para>
682683
Correlate a photo taken from a camera with a fast clock (i.e., the clock
683-
was 77 seconds ahead of GPS time):
684+
was 77.5 seconds ahead of GPS time):
684685
</para>
685686
<para>
686-
<userinput>gpscorrelate -g Test.gpx -O -77 photo.jpg</userinput>
687+
<userinput>gpscorrelate -g Test.gpx -O -77.5 photo.jpg</userinput>
687688
</para>
688689

689690
<para>

doc/gui.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h3>Step 3: Set options</h3>
5454

5555
<p>The <b>"Time Zone"</b> box specifies the time zone that the photos were taken in so that the times of the photos can be adjusted to match the GPS data. The format is hours from UTC or HH:MM and may be negative. This can only be specified if "Auto time zone" is unset.</p>
5656

57-
<p>The <b>"Photo Offset"</b> box specifies the number of seconds to add to the photos time to match the GPS data. See the <a href="concepts.html">GPS Correlate Concepts</a> documentation to understand this value.</p>
57+
<p>The <b>"Photo Offset"</b> box specifies the number of seconds to add to the photos time to match the GPS data (fractional seconds are allowed). See the <a href="concepts.html">GPS Correlate Concepts</a> documentation to understand this value.</p>
5858

5959
<p>The <b>"GPS Datum"</b> box specifies the Datum of the source GPS data, which is written into the GPS EXIF tags. By default this is "WGS-84", but really should not be changed, as the GPX format is only supposed to store WGS-84 data. However, you can change this if you wish.</p>
6060

gui.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -683,12 +683,12 @@ GtkWidget* CreateMatchWindow (void)
683683
gtk_widget_set_tooltip_text (PhotoOffsetEntry,
684684
_("The number of seconds to add to the photo's time to make it match "
685685
"the GPS data. Calculate this with (GPS - Photo). "
686-
"Can be negative or positive."));
686+
"Can be negative or positive and fractional seconds are allowed."));
687687
#else
688688
gtk_tooltips_set_tip (tooltips, PhotoOffsetEntry,
689689
_("The number of seconds to add to the photo's time to make it match "
690690
"the GPS data. Calculate this with (GPS - Photo). "
691-
"Can be negative or positive."), NULL);
691+
"Can be negative or positive and fractional seconds are allowed."), NULL);
692692
#endif
693693
gtk_entry_set_text (GTK_ENTRY (PhotoOffsetEntry), g_key_file_get_value(GUISettings, "default", "photooffset", NULL));
694694
gtk_entry_set_width_chars (GTK_ENTRY (PhotoOffsetEntry), 7);
@@ -1597,7 +1597,7 @@ void CorrelateButtonPress( GtkWidget *Widget, gpointer Data )
15971597
}
15981598

15991599
/* Photo Offset time */
1600-
Options.PhotoOffset = atoi(gtk_entry_get_text(GTK_ENTRY(PhotoOffsetEntry)));
1600+
Options.PhotoOffset = atof(gtk_entry_get_text(GTK_ENTRY(PhotoOffsetEntry)));
16011601

16021602
/* Write heading */
16031603
Options.WriteHeading = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(HeadingCheck));

main-command.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ int main(int argc, char** argv)
396396
int NoChangeMtime = 0;
397397
int FixDatestamps = 0;
398398
int DegMinSecs = 1;
399-
int PhotoOffset = 0;
399+
double PhotoOffset = 0;
400400
int WriteHeading = 0;
401401
int HeadingOffset = -1; /* Negative means disabled */
402402
int MaxHeadingDelta = -1; /* Negative means disabled */
@@ -491,7 +491,7 @@ int main(int argc, char** argv)
491491
case 'O':
492492
if (optarg)
493493
{
494-
PhotoOffset = atoi(optarg);
494+
PhotoOffset = atof(optarg);
495495
}
496496
break;
497497
case 'i':

po/de.po

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: gpscorrelate 2.2\n"
1010
"Report-Msgid-Bugs-To: [email protected]\n"
11-
"POT-Creation-Date: 2024-10-17 21:41-0700\n"
11+
"POT-Creation-Date: 2024-12-19 16:48-0800\n"
1212
"PO-Revision-Date: 2024-10-17 21:41-0700\n"
1313
"Last-Translator: Dan Fandrich <[email protected]>\n"
1414
"Language-Team: deutsch\n"
@@ -260,11 +260,12 @@ msgstr ""
260260
#: gui.c:684 gui.c:689
261261
msgid ""
262262
"The number of seconds to add to the photo's time to make it match the GPS "
263-
"data. Calculate this with (GPS - Photo). Can be negative or positive."
263+
"data. Calculate this with (GPS - Photo). Can be negative or positive and "
264+
"fractional seconds are allowed."
264265
msgstr ""
265266
"Die Sekundenanzahl, die zur Fotozeit addiert werden muss, damit es mit den "
266267
"GPS-Daten übereinstimmt. Rechne es als (GPS-Zeit - Fotozeit). Es kann "
267-
"negativ oder positiv sein."
268+
"negativ oder positiv sein und fraktionale Sekunden sind erlaubt."
268269

269270
#: gui.c:704 gui.c:708
270271
msgid ""
@@ -857,6 +858,6 @@ msgstr ""
857858
"Diensten (z.B. Google Photos) verwendet, um eine Karte des Aufnahmeortes des "
858859
"Fotos anzuzeigen."
859860

860-
#: io.github.dfandrich.gpscorrelate.metainfo.xml.in:39
861+
#: io.github.dfandrich.gpscorrelate.metainfo.xml.in:44
861862
msgid "Daniel Fandrich"
862863
msgstr "Daniel Fandrich"

po/fr.po

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: gpscorrelate 2.2\n"
1010
"Report-Msgid-Bugs-To: [email protected]\n"
11-
"POT-Creation-Date: 2024-10-17 21:41-0700\n"
11+
"POT-Creation-Date: 2024-12-19 16:48-0800\n"
1212
"PO-Revision-Date: 2024-04-03 11:24+0100\n"
1313
"Last-Translator: jybz, papoteur\n"
1414
"Language-Team: français\n"
@@ -263,11 +263,12 @@ msgstr ""
263263
#: gui.c:684 gui.c:689
264264
msgid ""
265265
"The number of seconds to add to the photo's time to make it match the GPS "
266-
"data. Calculate this with (GPS - Photo). Can be negative or positive."
266+
"data. Calculate this with (GPS - Photo). Can be negative or positive and "
267+
"fractional seconds are allowed."
267268
msgstr ""
268269
"Le nombre de secondes à ajouter au temps des photos pour les faire "
269270
"correspondre aux données GPS. Égal à (GPS - Photo). Peut être négatif ou "
270-
"positif."
271+
"positif et des secondes fractionnelles sont autorisées."
271272

272273
#: gui.c:704 gui.c:708
273274
msgid ""
@@ -863,6 +864,6 @@ msgstr ""
863864
"alors utilisée par différentes applications et services (tels que Google "
864865
"Photos) pour afficher une carte de l'endroit où la photo a été prise."
865866

866-
#: io.github.dfandrich.gpscorrelate.metainfo.xml.in:39
867+
#: io.github.dfandrich.gpscorrelate.metainfo.xml.in:44
867868
msgid "Daniel Fandrich"
868869
msgstr "Daniel Fandrich"

po/ru.po

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: gpscorrelate 2.2\n"
1010
"Report-Msgid-Bugs-To: [email protected]\n"
11-
"POT-Creation-Date: 2024-10-17 21:41-0700\n"
11+
"POT-Creation-Date: 2024-12-19 16:48-0800\n"
1212
"PO-Revision-Date: 2019-03-18 10:12+0300\n"
1313
"Last-Translator: Nikolay Korotkiy <[email protected]>\n"
1414
"Language-Team: russian\n"
@@ -248,11 +248,12 @@ msgstr ""
248248
#: gui.c:684 gui.c:689
249249
msgid ""
250250
"The number of seconds to add to the photo's time to make it match the GPS "
251-
"data. Calculate this with (GPS - Photo). Can be negative or positive."
251+
"data. Calculate this with (GPS - Photo). Can be negative or positive and "
252+
"fractional seconds are allowed."
252253
msgstr ""
253254
"Количество секунд, добавляемых к времени фотографии, чтобы оно "
254255
"соответствовало GPS данным. Рассчитывается с помощью (GPS - Фото). Может "
255-
"быть отрицательным или положительным."
256+
"быть отрицательным или положительным, и разрешены дробные секунды."
256257

257258
#: gui.c:704 gui.c:708
258259
msgid ""
@@ -789,6 +790,6 @@ msgid ""
789790
"taken."
790791
msgstr ""
791792

792-
#: io.github.dfandrich.gpscorrelate.metainfo.xml.in:39
793+
#: io.github.dfandrich.gpscorrelate.metainfo.xml.in:44
793794
msgid "Daniel Fandrich"
794795
msgstr "Daniel Fandrich"

tests/data/test177.param

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# End result is same as test 29
2+
TITLE='Correlate a file with subsecond interpolation and fractional photooffset'
3+
PRECOMMAND='cat "$STAGINGDIR/point1-4.jpg" >"$LOGDIR/test.jpg"'
4+
# Run in C locale to correctly parse these decimal numbers
5+
COMMAND='env LC_NUMERIC=C $PROGRAM --photooffset -14.91 -z 0 -g "$STAGINGDIR/track2.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1'
6+
POSTCOMMAND='rm -f "$LOGDIR/test.jpg"'
7+
RESULTCODE=0

tests/data/test177.result

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Reading GPS Data...
2+
Legend: . = Ok, / = Interpolated, < = Rounded, - = No match, ^ = Too far
3+
w = Write Fail, ? = No EXIF date, ! = GPS already present
4+
5+
Correlate: /
6+
7+
Completed correlation process.
8+
Matched: 1 (0 Exact, 1 Interpolated, 0 Rounded).
9+
Failed: 0 (0 Not matched, 0 Write failure, 0 Too Far,
10+
0 No Date, 0 GPS Already Present.)
11+
0x011a Image XResolution Rational 1 72/1
12+
0x011b Image YResolution Rational 1 72/1
13+
0x0128 Image ResolutionUnit Short 1 2
14+
0x0132 Image DateTime Ascii 20 2012:11:22 12:35:10
15+
0x0213 Image YCbCrPositioning Short 1 1
16+
0x8769 Image ExifTag Long 1 134
17+
0x9000 Photo ExifVersion Undefined 4 48 50 49 48
18+
0x9003 Photo DateTimeOriginal Ascii 20 2012:11:22 12:35:10
19+
0x9004 Photo DateTimeDigitized Ascii 20 2012:11:22 12:35:10
20+
0x9101 Photo ComponentsConfiguration Undefined 4 1 2 3 0
21+
0x9291 Photo SubSecTimeOriginal Ascii 3 91
22+
0xa000 Photo FlashpixVersion Undefined 4 48 49 48 48
23+
0xa001 Photo ColorSpace Short 1 65535
24+
0xa002 Photo PixelXDimension Long 1 64
25+
0xa003 Photo PixelYDimension Long 1 64
26+
0x8825 Image GPSTag Long 1 288
27+
0x0000 GPSInfo GPSVersionID Byte 4 2 2 0 0
28+
0x0001 GPSInfo GPSLatitudeRef Ascii 2 N
29+
0x0002 GPSInfo GPSLatitude Rational 3 47/1 25/1 16449600/1000000
30+
0x0003 GPSInfo GPSLongitudeRef Ascii 2 E
31+
0x0004 GPSInfo GPSLongitude Rational 3 10/1 59/1 6888000/1000000
32+
0x0005 GPSInfo GPSAltitudeRef Byte 1 0
33+
0x0006 GPSInfo GPSAltitude Rational 1 2959867/1000
34+
0x0007 GPSInfo GPSTimeStamp Rational 3 12/1 34/1 56/1
35+
0x0012 GPSInfo GPSMapDatum Ascii 7 WGS-84
36+
0x001d GPSInfo GPSDateStamp Ascii 11 2012:11:22

tests/data/test178.param

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# End result is the same as test 71
2+
TITLE='Correlate a file with subsecond interpolation and fractional photooffset overflow'
3+
PRECOMMAND='cat "$STAGINGDIR/point1-4.jpg" >"$LOGDIR/test.jpg"'
4+
# Run in C locale to correctly parse these decimal numbers
5+
COMMAND='env LC_NUMERIC=C $PROGRAM --photooffset 9.09 -z -7 -g "$STAGINGDIR/track10.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1'
6+
POSTCOMMAND='rm -f "$LOGDIR/test.jpg"'
7+
RESULTCODE=0

tests/data/test178.result

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Reading GPS Data...
2+
Legend: . = Ok, / = Interpolated, < = Rounded, - = No match, ^ = Too far
3+
w = Write Fail, ? = No EXIF date, ! = GPS already present
4+
5+
Correlate: .
6+
7+
Completed correlation process.
8+
Matched: 1 (1 Exact, 0 Interpolated, 0 Rounded).
9+
Failed: 0 (0 Not matched, 0 Write failure, 0 Too Far,
10+
0 No Date, 0 GPS Already Present.)
11+
0x011a Image XResolution Rational 1 72/1
12+
0x011b Image YResolution Rational 1 72/1
13+
0x0128 Image ResolutionUnit Short 1 2
14+
0x0132 Image DateTime Ascii 20 2012:11:22 12:35:10
15+
0x0213 Image YCbCrPositioning Short 1 1
16+
0x8769 Image ExifTag Long 1 134
17+
0x9000 Photo ExifVersion Undefined 4 48 50 49 48
18+
0x9003 Photo DateTimeOriginal Ascii 20 2012:11:22 12:35:10
19+
0x9004 Photo DateTimeDigitized Ascii 20 2012:11:22 12:35:10
20+
0x9101 Photo ComponentsConfiguration Undefined 4 1 2 3 0
21+
0x9291 Photo SubSecTimeOriginal Ascii 3 91
22+
0xa000 Photo FlashpixVersion Undefined 4 48 49 48 48
23+
0xa001 Photo ColorSpace Short 1 65535
24+
0xa002 Photo PixelXDimension Long 1 64
25+
0xa003 Photo PixelYDimension Long 1 64
26+
0x8825 Image GPSTag Long 1 288
27+
0x0000 GPSInfo GPSVersionID Byte 4 2 2 0 0
28+
0x0001 GPSInfo GPSLatitudeRef Ascii 2 N
29+
0x0002 GPSInfo GPSLatitude Rational 3 38/1 35/1 54874/1000
30+
0x0003 GPSInfo GPSLongitudeRef Ascii 2 W
31+
0x0004 GPSInfo GPSLongitude Rational 3 109/1 34/1 24506/1000
32+
0x0005 GPSInfo GPSAltitudeRef Byte 1 0
33+
0x0006 GPSInfo GPSAltitude Rational 1 1180156/1000
34+
0x0007 GPSInfo GPSTimeStamp Rational 3 19/1 35/1 20/1
35+
0x0012 GPSInfo GPSMapDatum Ascii 7 WGS-84
36+
0x001d GPSInfo GPSDateStamp Ascii 11 2012:11:22

tests/data/test179.param

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
TITLE='Correlate a file with subsecond interpolation and fractional photooffset negative overflow'
2+
PRECOMMAND='cat "$STAGINGDIR/point1-4.jpg" >"$LOGDIR/test.jpg"'
3+
# Run in C locale to correctly parse these decimal numbers
4+
COMMAND='env LC_NUMERIC=C $PROGRAM --photooffset -10.95 -z 0 -g "$STAGINGDIR/track2.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1'
5+
POSTCOMMAND='rm -f "$LOGDIR/test.jpg"'
6+
RESULTCODE=0

tests/data/test179.result

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Reading GPS Data...
2+
Legend: . = Ok, / = Interpolated, < = Rounded, - = No match, ^ = Too far
3+
w = Write Fail, ? = No EXIF date, ! = GPS already present
4+
5+
Correlate: /
6+
7+
Completed correlation process.
8+
Matched: 1 (0 Exact, 1 Interpolated, 0 Rounded).
9+
Failed: 0 (0 Not matched, 0 Write failure, 0 Too Far,
10+
0 No Date, 0 GPS Already Present.)
11+
0x011a Image XResolution Rational 1 72/1
12+
0x011b Image YResolution Rational 1 72/1
13+
0x0128 Image ResolutionUnit Short 1 2
14+
0x0132 Image DateTime Ascii 20 2012:11:22 12:35:10
15+
0x0213 Image YCbCrPositioning Short 1 1
16+
0x8769 Image ExifTag Long 1 134
17+
0x9000 Photo ExifVersion Undefined 4 48 50 49 48
18+
0x9003 Photo DateTimeOriginal Ascii 20 2012:11:22 12:35:10
19+
0x9004 Photo DateTimeDigitized Ascii 20 2012:11:22 12:35:10
20+
0x9101 Photo ComponentsConfiguration Undefined 4 1 2 3 0
21+
0x9291 Photo SubSecTimeOriginal Ascii 3 91
22+
0xa000 Photo FlashpixVersion Undefined 4 48 49 48 48
23+
0xa001 Photo ColorSpace Short 1 65535
24+
0xa002 Photo PixelXDimension Long 1 64
25+
0xa003 Photo PixelYDimension Long 1 64
26+
0x8825 Image GPSTag Long 1 288
27+
0x0000 GPSInfo GPSVersionID Byte 4 2 2 0 0
28+
0x0001 GPSInfo GPSLatitudeRef Ascii 2 N
29+
0x0002 GPSInfo GPSLatitude Rational 3 47/1 25/1 16463856/1000000
30+
0x0003 GPSInfo GPSLongitudeRef Ascii 2 E
31+
0x0004 GPSInfo GPSLongitude Rational 3 10/1 59/1 6721680/1000000
32+
0x0005 GPSInfo GPSAltitudeRef Byte 1 0
33+
0x0006 GPSInfo GPSAltitude Rational 1 2961979/1000
34+
0x0007 GPSInfo GPSTimeStamp Rational 3 12/1 34/1 59/1
35+
0x0012 GPSInfo GPSMapDatum Ascii 7 WGS-84
36+
0x001d GPSInfo GPSDateStamp Ascii 11 2012:11:22

tests/data/test180.param

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
TITLE='Correlate a file with subsecond photooffset barely outside track range'
2+
PRECOMMAND='cat "$STAGINGDIR/point1-4.jpg" >"$LOGDIR/test.jpg"'
3+
COMMAND='$PROGRAM --photooffset -9.95 -z 0 -g "$STAGINGDIR/track2.gpx" "$LOGDIR/test.jpg" > "$OUTFILE" 2>&1 && exiv2 -pv pr "$LOGDIR/test.jpg" >> "$OUTFILE" 2>&1'
4+
POSTCOMMAND='rm -f "$LOGDIR/test.jpg"'
5+
RESULTCODE=2

tests/data/test180.result

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Reading GPS Data...
2+
Legend: . = Ok, / = Interpolated, < = Rounded, - = No match, ^ = Too far
3+
w = Write Fail, ? = No EXIF date, ! = GPS already present
4+
5+
Correlate: -
6+
7+
Completed correlation process.
8+
Matched: 0 (0 Exact, 0 Interpolated, 0 Rounded).
9+
Failed: 1 (1 Not matched, 0 Write failure, 0 Too Far,
10+
0 No Date, 0 GPS Already Present.)

0 commit comments

Comments
 (0)