Extract a GPS track (as .gpx) from a series of jpg photos
exiftool itself can now also generate GPX files. You can download the gpx.fmt template from the exiftool website, then run
exiftool -p ./gpx.fmt *JPG &gt; output.gpx

Some useful options:

-if makes exiftool only process files with a gps tag,
-fileOrder allows processing in a forced order,
-d allows formatting the datatime string.

For example:
exiftool -if '$gpsdatetime' -fileOrder gpsdatetime -p ./gpx.fmt -d %Y-%m-%dT%H:%M:%SZ *JPG &gt; output.gpx