• 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
  


Messages In This Thread
MAC program to read NMEA data - by - June 20, 2006 10:25
[No subject] - by - June 20, 2006 13:51

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

Forum Jump:


Browsing: 2 Guest(s)