• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: serial comm with GPS, not quite an NMEA sentence
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: serial comm with GPS, not quite an NMEA sentence


  • Subject: Re: serial comm with GPS, not quite an NMEA sentence
  • From: Sherm Pendley <email@hidden>
  • Date: Tue, 3 Oct 2006 12:21:36 -0400

On Oct 2, 2006, at 11:58 PM, Gonzalo Castro wrote:

I'm learning how to get data from a serial device, specifically a GPS set to use NMEA protocol. I came across the following sample code, at http://www.harmless.de/cocoa.html#serialport.

The method below seems to be called when receiving data. Should I expect the NSData *data to contain an NMEA formatted string? Eg, "RMC,225446,A,4916.45,N,12311.12,W, 000.5,054.7,191194,020.3,E*68" (clipped from http://www.eoss.org/ pubs/nmeafaq.htm). If so, then I'm not getting such a string. Instead, dataStr looks like garbage.

From the docs link above:

	3.2   "Complex" data format

        	The complex format consists of a data block of 37 bytes of
	        (mostly) readable ASCII text giving cross-track error, bearing
        	to waypoint, present Lat/Long, and a binary status byte.  The
	        data block shall be sent at intervals of 2 to 8 sec. All bytes
        	in the complex format have bit 7 = 1 to distinguish them from
        	the simple format.

Note that last sentence - what you get is almost but not quite ASCII text, although it looks like it can be easily converted to ASCII. You'll need to look for, and strip out if necessary, the high bits.

sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >serial comm with GPS, not quite an NMEA sentence (From: Gonzalo Castro <email@hidden>)

  • Prev by Date: Re: NSLayoutManager - measuring text with trailing space
  • Next by Date: Problem with Multiple Level Bindings
  • Previous by thread: serial comm with GPS, not quite an NMEA sentence
  • Next by thread: Re: serial comm with GPS, not quite an NMEA sentence
  • Index(es):
    • Date
    • Thread