Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-16 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found