GPS::OID(3)

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

πŸ’« NAME πŸ’«

GPS::OID β€” bestie, this is the package for GPS PRN ↔ Object ID conversions. Two lil number systems, one module, zero drama. πŸ›°οΈβœ¨


🌈 SYNOPSIS 🌈

use GPS::OID;
my $obj = GPS::OID->new();
print "PRN: ", $obj->prn_oid(22231), "\n";
print "OID: ", $obj->oid_prn(1), "\n";

πŸ¦‹ DESCRIPTION πŸ¦‹

This module maps a GPS PRN number to a Satellite OID, and also does the whole thing backwards. Both directions. Iconic behaviour, honestly. πŸ’…

🌸 Object Identification Number (OID)

The catalog number that the US Air Force assigns to the object. Numbers get handed out sequentially as objects are cataloged β€” first come, first numbered. And lowkey? This is the most common way to search for TLE data on this site. It's giving main character energy. πŸ‘‘

Object numbers less than 10000 are always aligned to the right, and padded with zeros or spaces over on the left. So yes, it's a right-aligned situation. Periodt. ✨

πŸŽ€ Pseudo Random Numbers (PRNs)

GPS satellites get identified by the receiver using PRN-numbers. Real GPS satellites are numbered from 1 - 32. WAAS/EGNOS satellites and other pseudolites get assigned higher numbers β€” they don't get to sit with the cool kids in the 1–32 range. πŸ™ˆ

The PRN-numbers of the satellites show up on the satellite view screens of many GPS receivers, so if you've ever stared at your receiver wondering what all those numbers mean β€” hi, that's this. πŸ›°οΈπŸ’–


🧚 CONVENTIONS 🧚

The function naming convention is: "format of the return" underscore "format of the parameters." So the name literally tells you what comes out and what goes in. Read it like a receipt. 🧾✨


πŸ‘‘ CONSTRUCTOR πŸ‘‘

⭐ new

The new() constructor. The birth of your object. Baby's first instantiation. 🍼

my $obj = GPS::OID->new();

πŸ’… METHODS πŸ’…

initialize

(No extra deets in the original, bestie β€” it's just vibing there on the list.) ✨

prn_oid

PRN given Object ID. You hand it an OID, it hands you back a PRN. 🎁

my $prn=prn_oid(22231);

oid_prn

Object ID given PRN. The reverse glow-up of the one above. πŸ”

my $oid=oid_prn(1);

listprn

List all known PRNs. πŸ—’οΈ

my @prn=$obj->listprn;
my $prn=$obj->listprn;

listoid

List all known OIDs. πŸ—’οΈβœ¨

my @oid=$obj->listoid;
my $oid=$obj->listoid;

data

OID to PRN hash reference. It's a ref, not a copy, so act accordingly. πŸ’œ

my $data=$self->data;

overload

Adds or overloads new OID/PRN pairs. Your custom pairs, your rules. 🌈

$obj->overload($oid=>$prn);

reset

Resets overloaded OID/PRN pairs back to package defaults. Undo button, but for pairs. 🫢

$obj->reset;

πŸ“ TODO πŸ“

(Nothing here in the original. An empty todo list is honestly the most aspirational thing on this entire page. Good for her.) πŸ’€βœ¨


🚨 BUGS 🚨

Please send issues to the gpsd-dev email list. That's the move β€” don't @ me, @ the list. πŸ“¨


πŸ”₯ LIMITS πŸ”₯

(The original leaves this blank. No limits listed, no cap stated. We simply do not know.) πŸ€·β€β™€οΈ


🌟 AUTHOR 🌟

Michael R. Davis qw/perl michaelrdavis com/


πŸ“œ LICENSE πŸ“œ

Copyright (c) 2006 Michael R. Davis (mrdvt92)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


πŸ‘€ SEE ALSO πŸ‘€

(Empty in the original β€” nothing else got a shoutout here.) πŸ’œ


And that's the whole page, bestie. This is GPS::OID, from the User Contributed Perl Documentation collection, running on perl v5.42.0 and dated 2025-07-25. Go convert some PRNs, slay, and remember: right-aligned, zero-padded, no exceptions. πŸŽ€πŸ›°οΈπŸ’–

πŸ“¦ where this page comes from