+ Reply
Results 1 to 4 of 4

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Get GPS location using a command line utility

is a discussion within the

General iPhone Chat

forums, a part of the

iPhone Modding

section;
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
...
  1. #1
    What's Jailbreak?
    Join Date
    Jan 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Get 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?

  2. #2
    King Kong ain't got nothing on me! King_O_Hill's Avatar
    Join Date
    Apr 2011
    Location
    USA
    Posts
    9,347
    Thanks
    41,405
    Thanked 17,499 Times in 6,398 Posts

    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:

    Lat 12.34567
    Long 12.34567
    Widget-Weather App Now Available! Also with MyLocation Support!
    Check out the thread here - Widget-Weather
    To install the Widget-Weather app, just go to Cydia and install. This will also remove MyLocation, as it is built in!
    Want to protect your JailBreak! Add this repo http://cydia.myrepospace.com/iLEXiNFO/ & Install "iLEX R.A.T."
    It will allow you to bring your phone back to a fresh jailbroken state!

  3. #3
    What's Jailbreak?
    Join Date
    Jan 2013
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is there any way that I can run it once via a shell script so it doesn't run continuously in the background?

  4. #4
    King Kong ain't got nothing on me! King_O_Hill's Avatar
    Join Date
    Apr 2011
    Location
    USA
    Posts
    9,347
    Thanks
    41,405
    Thanked 17,499 Times in 6,398 Posts

    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.
    Widget-Weather App Now Available! Also with MyLocation Support!
    Check out the thread here - Widget-Weather
    To install the Widget-Weather app, just go to Cydia and install. This will also remove MyLocation, as it is built in!
    Want to protect your JailBreak! Add this repo http://cydia.myrepospace.com/iLEXiNFO/ & Install "iLEX R.A.T."
    It will allow you to bring your phone back to a fresh jailbroken state!

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts