How to Set EXIF GPS Coordinates Manually

Usually I use a GPS tracker on my phone when taking pictures so that I can sync up the GPS data later. Every so often I for get to start the tracker and need to manually set the GPS data by hand. The easiest way I found was by using the exiftool. This is a command line tool often considered the swiss army knife of EXIF data. Below is the command on how to set the GPS data on some files. I also added -overwrite_original parameter to not have the tool create a backup file. To actually get the GPS coordinate data you can choose yout favorite online tool.

>  exiftool -XMP:GPSLatitude="XX.XXXXX" -XMP:GPSLongitude="YY.YYYYYY" -overwrite_original <IMAGE_FILES>