• Welcome to MacSailing.net!
  • Dedicated to sailing!
  • Be Jolly!
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Title: MAC program to read NMEA data
#1
The following can be used to read the NMEA sentance (all of them) that come down the wire - it read 1000, displays them, and write them to a file.

use Device::SerialPort;
$port="/dev/cu.KeySerial1";
$ob= Device::SerialPort -> new ($port);
$ob-> baudrate(4800);
$ob-> parity("none");
$ob-> databits( 8 );
$ob-> handshake("none");
$ob->write_settings;

unlink "data.txt";
open (INPUT, "/dev/cu.KeySerial1");
open (OUTPUT, "> data.txt");

$time = localtime(time ());
print "Start Reading NMEA Data ".$time."\n";

$w=0;
while ($w < 1000){
$text=readline INPUT;
print $text;
print OUTPUT $text."\t\n";
$w=$w+1;
}

If you do not have Device::SerialPort on you MAC, you can download it from
www.DarwinPorts.org
 
Reply
#2
Thanks. For those not programatically inclined you can download GPSUtility and just copy and paste the NMEA output in the monitor window.

http://www.versiontracker.com/dyn/moreinfo/macosx/24559
Scott Dillon
Sydney Australia
North Shore 38
CYCA
 
Reply
  


Possibly Related Threads…
Thread Author Replies Views Last Post
  NMEA data plotter/graph mrgnstrn 20 17,774 June 14, 2009 05:28
Last Post: iquik
  Celestial Navigation program for OS X auren 3 5,072 March 2, 2006 08:19
Last Post: jagasail

Forum Jump:


Browsing: 1 Guest(s)