Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

GPS::NMEA
Perl interface to GPS equipment using the NMEA Protocol

GPS::NMEA - Perl interface to GPS equipment using the NMEA Protocol


NAME

GPS::NMEA - Perl interface to GPS equipment using the NMEA Protocol


SYNOPSIS


  use GPS::NMEA;

  $gps = new GPS::NMEA(  'Port'      => '/dev/ttyS0',

                         'Baud'      => 9600,

                );


DESCRIPTION

GPS::NMEA allows the connection and use of of a GPS receiver in perl scripts.


GETTING STARTED


KNOWN LIMITATIONS


BUGS


EXAMPLES

Get the position periodically:


    #!/usr/bin/perl

    use GPS::NMEA;

    

    my $gps = GPS::NMEA->new(Port => '/dev/cuaa0', # or COM5: or /dev/ttyS0

                             Baud => 4800);

    while(1) {

        my($ns,$lat,$ew,$lon) = $gps->get_position;

        print "($ns,$lat,$ew,$lon)\n";

    }

Get the internal NMEA dump:


    #!/usr/bin/perl

    use GPS::NMEA;

    use Data::Dumper;

    

    my $gps = GPS::NMEA->new(Port => '/dev/cuaa0', # or COM5: or /dev/ttyS0

                             Baud => 4800);

    while(1) {

        $gps->parse;

    

        # Dump internal NMEA data:

        $gps->nmea_data_dump;

    

        # Alternative to look at the internal NMEA data:

        require Data::Dumper;

        print Data::Dumper->new([$gps->{NMEADATA}],[])->Indent(1)->Useqq(1)->Dump;

    }

    __END__


AUTHOR

Joao Pedro B Gonçalves , joaop@iscsp.utl.pt


SEE ALSO

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy