Detect GPS hardware in iDevice?

Discussion in 'iPhone/iPad Programming' started by xArtx, Aug 6, 2012.

  1. macrumors 6502a

    #1
    Hi Guys,
    Particularly the iPad...
    The version with the cellular radio has a real hardware GPS,
    The wifi only version does not.
    Is there some easy way to tell whether or not the idevice has real GPS hardware?

    It appears the wifi only version of iPad will not tell you the speed it is doing
    (speed is constantly 0 no matter what the actual speed is).

    Cheers, Art.
     
  2. macrumors 6502a

    Duncan C

    #2
    You can add the gps key to your app's UIRequiredDeviceCapabilities array/dictionary in your app's plist. That will make the app require the GPS. Finding out if the device has a GPS at runtime is harder. I'll have to do some digging for that.
     
  3. macrumors 6502a

    #3
    Hi,
    I do want the app to run on all iPads, but want to ignore the speed reading
    if the unit has no GPS.
    I can think of a dodgy way.. if the location changes significantly, but the speed stays zero, the unit does not have GPS hardware... but I think there would be a better way..
     
  4. macrumors 6502a

    Duncan C

    #4
    A slightly less "dodgy" way would be to check the vertical accuracy reading on location updates. If it is -1 (invalid) then the reading did not come from a GPS. You only get vertical location data from an actual GPS.
     
  5. macrumors 65816

    #5
    You may want to include a toggle or some other override method for those who have hardware like the iPad wifi, but use a 30 pin or bluetooth GPS (Dual xgps150, bad elf gps, Garmin GLO) for example.
     
  6. macrumors 6502a

    Duncan C

    #6
    But the location manager won't work with an external GPS, will it?
     
  7. macrumors 65816

    #7
    All I know is that you have to use either a 30 pin or bluetooth receiver made for iOS devices. Once hooked up, it is just like using the native GPS on those devices that have it, and it adds GPS to those devices that don't have them. The GPS works with all apps, the apps don't know that an external GPS position is being used vs the internal system.

    Links to some of the units:

    http://bad-elf.com/products/be-gps-1000/
    http://xgps150.dualav.com
    https://buy.garmin.com/shop/shop.do?pID=109827
    http://www.gns-gmbh.com/index.php?id=194&L=1
     
  8. macrumors 6502a

    #8
  9. macrumors 65816

    #9
    The external GPS units have WAAS to increase the accuracy, and work places that the internal units gps does not, such as a jet aircraft in flight above 18,000' (which is why I have one.)

    My understanding is that they are also popular with boaters.

    Only downside it that an external unit doesn't use the cell network to help with the initial position fix, so the initial position can take slightly longer than the built in GPS.
     
  10. macrumors 6502a

    Duncan C

    #10


    Really? That's very odd. Which specific device, (e.g. second generation WiFi only iPad) and what OS version & subversion?
     
  11. macrumors 6502a

    #11
    16Gb new ipad wifi only iOS 5.1.1, dev kit in the late 5s.

    The vertical accuracy seems to settle on 10m, but I have seen it jump to 12 and back.
    Don't know if this could be reliable though.
     

Share This Page