8 Replies Latest reply: Jun 29, 2009 9:14 AM by Haggardly
adnixon Level 1 Level 1 (140 points)
Is it possible to selectively read any value contained within a NMEA GPS Sentence using the SDK [iPhone 3G]

The following is two typical GPS NMEA Sentences streamed by a GPS Device.

$GPRMC,065824.000,A,3755.6946,S,14509.7500,E,95.00,,090807,,,A*64
$GPVTG,,T,,M,0.00,N,0.0,K,A*13

Ant..

IBM Core2 Duo 3Ghz
  • 1. Re: NMEA GPS Data
    Chuck Tee Level 1 Level 1 (80 points)
    Kinda hackey, but I would just write a little function that searches through the string for a comma, use NSRange and pull the string apart up to the comma, place that string in an array, then continue through.

    Look at NSRange and rangeOfString
  • 2. Re: NMEA GPS Data
    adnixon Level 1 Level 1 (140 points)
    Thanks for the prompt reply based on the information provided am I correct to conclude that the iPhone 3G GPS produces NMEA Sentences from which specific comma delimited data can be extracted. Ant..
  • 3. Re: NMEA GPS Data
    Chuck Tee Level 1 Level 1 (80 points)
    Yikes!

    That's not at all what I meant. The iPhone does NOT spit out NMEA sentences. I mean you could write something to do that, but you need to look at the Core Location Service if you are interested in getting location information out of the device. The math and formatting of the sentences is for you to code.

    C-
  • 4. Re: NMEA GPS Data
    adnixon Level 1 Level 1 (140 points)
    Sometimes its not the question I guess its how I ask it and for any misunderstanding I apologise.

    I am not currently running OS X Leopard or the SDK although I have an iPhone and some of the Apps Store applications that rely on the Location Device.

    I guess what I was trying to ask was did the iPhone GPS [Location Device] support appropriately written code which can be used to extract specific GPS type information like Lat or the Lon, N/S or E/W or Speed over the Ground that sort of thing. This information is contained within standard NMEA sentences generated by most other types of Task Specific GPS Devices.

    My experience has been with a Vista Desktop connected to a GPS Device like a Holux GPSSlim240 or QSTarzGPS Travel Recorder. Both these devices will stream NMEA sentences to a COM port which I can read with software that I have written for the Windows environment which embosses Lat/Lon Compass Headings and NMEA data onto a Digital Image.

    I was trying to establish if the iPhone Location Device [GPS] also streamed standard NMEA sentences or similar and if that was the case I guess with appropriate code your could extract and manipulate the data of interest.

    The knowledge I am not fixed with is whether or not the iPHones Location Data is different in that it only provides access to limited or Apple specific location information. Ant..
  • 5. Re: NMEA GPS Data
    Chuck Tee Level 1 Level 1 (80 points)
    Ah- much easier then.

    No-

  • 6. Re: NMEA GPS Data
    adnixon Level 1 Level 1 (140 points)
    I just watched the video entitled ‘Leveraging iPhone Location, Acceleration Orientation, and System Information’. So I am not a little better informed event though the video appears not to address the improvements that have been delivered in the 2.1 iPhone 3G device. Anyway on that note I guess that I am now able to delare these proceedings closed.
  • 7. Re: NMEA GPS Data
    Robin's Code Level 1 Level 1 (0 points)
    if it is impossible to got the NMEA string via SDK directly ?

    I have not find the relate method yet , anyone know it ?

    thanks
  • 8. Re: NMEA GPS Data
    Haggardly Level 1 Level 1 (5 points)
    So with 3.0 out any idea what sort of NMEA support there is?