Index of /python/simplegps

Icon  Name                    Last modified      Size  Description
[PARENTDIR] Parent Directory - [   ] Changes 2008-11-22 11:33 2.3K [   ] simplegps-1.0.tar.gz 2008-11-22 11:33 3.3K GZIP compressed docume> [   ] simplegps-1.1.tar.gz 2008-11-22 11:33 3.5K GZIP compressed docume> [   ] simplegps-1.2.tar.gz 2008-11-22 11:33 3.7K GZIP compressed docume>
NAME - Thin wrapper around the 'lightblue' Bluetooth library for
    doing GPS (GPRMS) functions.

        from simplegps import simplegps

        gps    = simplegps()
        coords = gps.poll(2)

        if not coords :
            print "Ack! Failed to make happy with your GPS device!!"

        else :

            lat = coords[0]
            lon = coords[1]
            print "%s %s" % (lat, lon)
            print gps.prettyprint_latlon(lat, lon)
            (swlat, swlon, nelat, nelon) = gps.mk_bounding_box(lat, lon, 5, 'km')
            print "%s %s / %s %s" % (swlat, swlon, nelat, nelon)

            ob_lat = float(37.769671)
            ob_lon = float(-122.511951)
            d1 = gps.calculate_distance(lat, lon, ob_lat, ob_lon, 'km')
            d2 = gps.calculate_distance(lat, lon, ob_lat, ob_lon, 'miles')    
            print "%s km to Ocean Beach, SF CA" % d1
            print "%s miles to Ocean Beach, SF CA" % d2    

DESCRIPTION is a very thin wrapper around the 'lightblue' Bluetooth
    library for doing a limited set of GPS-related (spefically $GPRMS)



    $Date: 2006/10/03 04:55:57 $

    Aaron Straup Cope <>

    Copyright (c) 2006 Aaron Straup Cope. All Rights Reserved.

    This is free software. You can redistribute it and/or modify it under
    the same terms as Perl Artistic License itself.