NMEA(3)

πŸ“¦
version 0.17 Β· 2 versions
, in fedora 43

🌸 GPS::NMEA β€” the Perl NMEA page, bestie edition 🌸

okay so this is a section 3 page from the User Contributed Perl Documentation, and it's literally called NMEA(3). Yes the manual name is that long, no I will not be shortening it, it's giving ✨documentation✨ energy and we respect that.


πŸ’– NAME πŸ’–

GPS::NMEA β€” a Perl interface to GPS equipment using the NMEA Protocol. that's it, that's the whole name section, and it ate πŸ’…


✨ SYNOPSIS ✨

look at this gorgeous little snippet:

  use GPS::NMEA;
  $gps = new GPS::NMEA(  'Port'      => '/dev/ttyS0',
                         'Baud'      => 9600,
                );

that's the whole vibe. use it, new it, pass a Port and a Baud, go off πŸ¦‹


πŸ›°οΈ DESCRIPTION πŸ›°οΈ

GPS::NMEA lets you connect to a GPS receiver and actually use it inside your perl scripts. bestie you are literally talking to satellites, main character energy fr fr πŸ‘‘

note (and this one MATTERS): latitudes and longitudes come through in DMM format. not decimal degrees, DMM. write that down πŸ“

πŸš€ GETTING STARTED πŸš€

okay so this section exists in the original page and there is genuinely nothing under it. no cap. it's just a heading sitting there, empty, minding its own business. iconic honestly πŸŽ€


🚧 KNOWN LIMITATIONS 🚧

same situation bestie β€” heading present, contents empty. we love a mysterious queen πŸ’œ


πŸ› BUGS πŸ›

also empty. not me pointing at a bug section with zero bugs in it 😭 truly a moment.


πŸ“ EXAMPLES πŸ“

okay THIS is the good part, the examples, we love to see it.

1. get the position periodically β€” just vibing in a loop:

#!/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";
}

2. get the internal NMEA dump β€” when you wanna peek at the raw data, nosy queen behavior, we support it:

#!/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

(yes, that's the exact spelling from the page, non-ASCII character and all β€” more on that in a sec πŸ‘€)


πŸ” SEE ALSO πŸ”

heading is here. nothing is under it. the void is looking back. πŸ•³οΈ


πŸ’€ POD ERRORS πŸ’€

Hey! The above document had some coding errors, which are explained below. not me snitching on the original page but okay, here's what it says:

Around line 159:

You forgot a '=back' before '=head1'

Around line 204:

Non-ASCII character seen before =encoding in 'Gonçalves'. Assuming CP1252

see? told you the author line was a whole thing. it's fine, it's fine, we're all fine 🫢


and that's the whole page bestie!! sign-off time πŸ’– this gem was documented by perl v5.42.0, dated 2025-07-25, and the page itself is NMEA(3) β€” now go talk to a satellite, you absolute legend 🌈⭐

πŸ“¦ where this page comes from