Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
01-12-2013, 07:36 PM #1Get GPS location using a command line utility
Is there a way to get the current GPS coordinates on the command line? I'm trying to write a simple shell script to do stuff based on my location.
I'm aware of "erica's utilities", but it doesn't seem to work (I get a segfault). Are there any other ways?
01-12-2013, 10:27 PM #2
Most people use the "myLocation" app.
You can find it in my signature.
There are ways to do it through a server, but I think this will work out for you. Just let me know if this doesn't work for you. It will create a txt file in the documents folder with just 2 lines in it:
01-14-2013, 01:58 PM #3
Is there any way that I can run it once via a shell script so it doesn't run continuously in the background?
01-14-2013, 02:21 PM #4
If it doesn't run continuously, then what's the purpose? It is very light on battery and resources if you only have "sig change" turned on. It needs to run so that as you change location, it will update your position.
There is another way to do it by setting up a GPS web server. This method is a little involved and would require some software DL from Cydia.
Let me know what you are interested in, and I will point you in the right direction.