fyi, although it can be done more cleanly (both code and output), I flip off my GPS and back on again, and within three seconds (literally), I achieve lock on four sats:

use warnings; use strict; use GPSD::Parse; my $gps = GPSD::Parse->new; $gps->poll; my $sats = $gps->satellites; for my $sat (keys %$sats){ if (! $gps->satellites($sat, 'used')){ print "$sat: unused\n"; } else { print "$sat used:\n"; for (keys %{ $sats->{$sat} }){ print "\t$_: $sats->{$sat}{$_}\n"; } } }

Output:

17: used az: 67 el: 74 used: 1 ss: 15 3: unused 11: unused 19: unused 22: unused 24: unused 28: used az: 99 ss: 14 el: 36 used: 1 30: unused 13: used el: 6 used: 1 ss: 13 az: 220 12: unused 6: used az: 165 used: 1 el: 30 ss: 23 15: unused 1: unused

I have 100% test coverage between the cases that I'm using a socket (actual GPS), or replaying with a saved output file. I've got the docs in order, and have added a couple of examples. Usually it takes me a bit more time for a v1.00 release, but this was a very quick turnaround and I'm very happy with the results. I've tested the code on four machines; two Pi's one with a GPS, the other without, and same with two laptops (one with, one without). I'm just cleaning things up, and then I'm ready to move on to the video camera project. After that, I may consider actually constructing something.


In reply to Re^3: GPS tracking with Perl by stevieb
in thread GPS tracking with Perl by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.