Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: GPS tracking with Perl

by stevieb (Canon)
on May 17, 2017 at 19:40 UTC ( [id://1190496]=note: print w/replies, xml ) Need Help??


in reply to Re: GPS tracking with Perl
in thread GPS tracking with Perl

Very nice, as usual!

Thanks, as usual! :)

Is there a minimum number of birds for lock? Is this checked and reported?

Minimum is have signal and locked to at least three birds for proper triangulation (at least with this unit). Even at three, I sometimes get sporadic values (very low values mind you) for speed and climb, even if I'm still. As soon as I'm locked onto four or more with this particular GPS unit, everything stabilizes and as I said, it's accurate across the board, from location (pinpoints my front door), elevation (I'm acutely aware of elevation in my area, plus I have other equipment that lines up perfectly.

Aside: Check out the Amateur Packet Reporting System(APRS).

Looks very interesting at a cursory look. Will definitely read more when I get home!

ps. I just did a sweeping update today to add further features... metric/imperial for measurements, signed/unsigned option for lat/lon (ie. -114.xxxxxx to 114.xxxxxW), full testing without needing gpsd installed, direction() to convert the decimal heading into direction (NNE, SW etc), and updates to the docs. (v0.02, should be indexed shortly).

Replies are listed 'Best First'.
Re^3: GPS tracking with Perl
by stevieb (Canon) on May 17, 2017 at 22:09 UTC

    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190496]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found