Previous   Next

Which Way Did He Go ?

1

Which Way Did He Go ?

Fulko Hew

Toronto Perl Mongers

Lightning Talks
September 29, 2005

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

2

GPS - Global Positioning System

  • A constellation of 27 Earth-orbiting satellites (24 in operation and three extras in case one fails)

  • 1-2 ton solar-powered satellites circle the globe at about 12,000 miles (19,300 km)

  • There are at least four satellites "visible" in the sky at any time

  • Works by calculating the intersection of a number of spheres.

  • Galileo (Europe's version)

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

3

Why ?

  • Find your location anywhere on the world...


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

3

Why ?

  • Find your location anywhere on the world...

  • within 150 feet

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

4

Accuracy

  • Selective Availabilty


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

4

Accuracy

  • Selective Availabilty

    • +- 45 meters


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

4

Accuracy

  • Selective Availabilty

    • +- 45 meters

  • Selective Availabilty was turned off May 1, 2000 (by President Clinton)


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

4

Accuracy

  • Selective Availabilty

    • +- 45 meters

  • Selective Availabilty was turned off May 1, 2000 (by President Clinton)

    • +- 6.3 meters (without SA)


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

4

Accuracy

  • Selective Availabilty

    • +- 45 meters

  • Selective Availabilty was turned off May 1, 2000 (by President Clinton)

    • +- 6.3 meters (without SA)

  • WAAS - Wide Area Augmentation System


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

4

Accuracy

  • Selective Availabilty

    • +- 45 meters

  • Selective Availabilty was turned off May 1, 2000 (by President Clinton)

    • +- 6.3 meters (without SA)

  • WAAS - Wide Area Augmentation System

    • +- 2 meters

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

5

Thus begat GeoCaching!


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

5

Thus begat GeoCaching!

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

6

Seen on a Tee Shirt:

"I use multi-billion dollar military technology to look for Tupperware in forests."

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

7

Perl Modules

  • GPS::Garmin

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

8

Sample Code

use GPS::Garmin;
$gps = new GPS::Garmin( 'Port' => '/dev/ttyUSB0' );


continued...

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

8

Sample Code

use GPS::Garmin;
$gps = new GPS::Garmin( 'Port' => '/dev/ttyUSB0' );

print "Protocol: ",            $gps->protocol,            "\n";
print "Product ID: ",          $gps->product_id,          "\n";
print "Software Version: ",    $gps->software_version,    "\n";
print "Product Description: ", $gps->product_description, "\n";


continued...

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

8

Sample Code

use GPS::Garmin;
$gps = new GPS::Garmin( 'Port' => '/dev/ttyUSB0' );

print "Protocol: ",            $gps->protocol,            "\n";
print "Product ID: ",          $gps->product_id,          "\n";
print "Software Version: ",    $gps->software_version,    "\n";
print "Product Description: ", $gps->product_description, "\n";

($sec,$min,$hour,$mday,$mon,$year) = $gps->get_time;
print "$year-$mon-$mday $hour:$min:$sec\n";

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

9

More Code

($latsign,$lat,$lnsign,$lon) = $gps->get_position;
print "$latsign $lat\n$lnsign $lon\n";


continued...

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

9

More Code

($latsign,$lat,$lnsign,$lon) = $gps->get_position;
print "$latsign $lat\n$lnsign $lon\n";

$gps->prepare_transfer("trk");
while($gps->records) {
	($lat,$lon,$time) = $gps->grab;
	print "$lat $lon, $time\n";
}


continued...

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

9

More Code

($latsign,$lat,$lnsign,$lon) = $gps->get_position;
print "$latsign $lat\n$lnsign $lon\n";

$gps->prepare_transfer("trk");
while($gps->records) {
	($lat,$lon,$time) = $gps->grab;
	print "$lat $lon, $time\n";
}

$gps->prepare_transfer("wpt");
while($gps->records) {
	($title,$lat,$lon,$desc) = $gps->grab;
	print "$title\n $lat\n $lon\n $time\n";
}
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

10

Results

[root@localhost gps]# ./t.f
Unknown product id 291, fallback to generic handler.

2005-09-29 04:01:22

Protocol: GRMN
Product ID: 291
Software Version: 360
Product Description: GPSMap60C Software Version 3.60

N 43.2591795146466
W 79.5598080590368

p
 0
 -0.0054931640625

...

 ,

GPS Device has timed out
[root@localhost gps]#                     

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

11

GPSBable


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

11

GPSBable

  • www.gpsbabel.org

  • To get track data:

    ./gpsbabel -t -i garmin -f /dev/ttyUSB0 -o csv -F t.f
    


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

11

GPSBable

  • www.gpsbabel.org

  • To get track data:

    ./gpsbabel -t -i garmin -f /dev/ttyUSB0 -o csv -F t.f
    

  • Results in:

    3.36222, -79.78067,
    43.36219, -79.78084,
    43.36218, -79.78119,
    43.36247, -79.78157,
    ...
    


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

11

GPSBable

  • www.gpsbabel.org

  • To get track data:

    ./gpsbabel -t -i garmin -f /dev/ttyUSB0 -o csv -F t.f
    

  • Results in:

    3.36222, -79.78067,
    43.36219, -79.78084,
    43.36218, -79.78119,
    43.36247, -79.78157,
    ...
    

  • Note that the altitude and timestamp information is missing.

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?


continued...

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?

  • Get GPS::Garmin to work with my GPS


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?

  • Get GPS::Garmin to work with my GPS

  • Get the timestamp and altitude info


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?

  • Get GPS::Garmin to work with my GPS

  • Get the timestamp and altitude info

  • Archive the data (because I'm an info junky)


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?

  • Get GPS::Garmin to work with my GPS

  • Get the timestamp and altitude info

  • Archive the data (because I'm an info junky)

  • Plot the data


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?

  • Get GPS::Garmin to work with my GPS

  • Get the timestamp and altitude info

  • Archive the data (because I'm an info junky)

  • Plot the data

  • Integrate with maps.google.com and satellite views ?


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?

  • Get GPS::Garmin to work with my GPS

  • Get the timestamp and altitude info

  • Archive the data (because I'm an info junky)

  • Plot the data

  • Integrate with maps.google.com and satellite views ?

  • APRS - Automatic Position Reporting System


continued...
Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

12

What Next ?

  • Get GPS::Garmin to work with my GPS

  • Get the timestamp and altitude info

  • Archive the data (because I'm an info junky)

  • Plot the data

  • Integrate with maps.google.com and satellite views ?

  • APRS - Automatic Position Reporting System

  • ???

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Previous   Next

Which Way Did He Go ?

13

Thank You

Index

Copyright © 2005, Fulko Hew

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table of Contents

1. Which Way Did He Go ?
2. GPS - Global Positioning System
3. Why ?
4. Accuracy
5. Thus begat GeoCaching!
6. Seen on a Tee Shirt:
7. Perl Modules
8. Sample Code
9. More Code
10. Results
11. GPSBable
12. What Next ?
13. Thank You