# Reading GPS data from iphone and save data into computer?

I would like to use my iphone for navigation. I want to read GPS data (latitude and longitude) from iphone and save the data into my computer to use it for navigation.

I am using Matlab in my computer.

Any one can give suggestion/ solution?

• You want to do this "live"? So the iPhone is streaming GPS coordinate data to the computer? There are apps that seem to do this, search for "iphone NMEA output" and that will find things that use the NMEA standard. Perhaps Matlab can read that in real time via a network stream? – Spacedman Sep 15 '16 at 6:42
• I use a program called exiftool and a custom batch script to get coordinates in a file. Would something like that potentially work for you? I'll post the batch script and a download link as an answer if you think it will help you. – jbchurchill Sep 15 '16 at 12:50

So the tool I mentioned in my comment is called exiftool by Phil Harvey. I probably didn't think this through thoroughly because looking at your question, you didn't specify your data coming from photographs which is what I do with this. The data would be coming from iPhone photos. If you ARE taking photos with the phone, this solution may work for you.

Once I have a collection of photos, I use the following two batch scripts. The first script calls the other and passes in the photos.

The first script that you run runs the other script. so this code is in a file called "output_files.bat" and it runs the "run_tool.bat" script.

for %%a in (C:\path\to\photos\*.JPG) DO run_tool %%a


Here is the "run_tool.bat" file

echo %1 >> output2.txt
exiftool -s3 -C "%%+.6f" "-EXIF:GPSLatitude" %1 >> output2.txt
exiftool -s3 -C "-%%.6f" "-EXIF:GPSLongitude" %1 >> output2.txt