Rohmad Hidayat's Blog

Icon

My Notes on Mobile Technology, Python GUI, Python Web Framework, Software Development, Database, Server, Embedded System, Mini Computer

GPS programming with Python

JIka kita merencakana sebuah aplikasi berbasis GPS, tidak perlu pusing lagi. Python memiliki beberapa modul yang bisa anda gunakan.

1. Pygarmin.

modul ini bisa digunakan untuk mengakses data dari GPS Receiver Garmin.

sampel code:

#! /usr/local/bin/python
# Load the module

import garmin

# Create a 'physical layer' connection using serial port

phys = garmin.UnixSerialLink("/dev/ttyS0")

# Create a Garmin object using this connection

gps = garmin.Garmin(phys)

# Get the waypoints from the GPS
# (This may take a little while)

waypoints = gps.getWaypoints()

# Print the waypoints
for w in waypoints:
print w.ident,
lat = garmin.degrees(w.slat)
lon = garmin.degrees(w.slon)
print lat, lon, w.cmnt
selain Pygarmin, masih ada PyGIS, Pyton modul untuk mengakses GPS di HP Nokia. menarik bukan?. besok kita coba Bluetooth Programming dengan Python

Advertisements

Filed under: Computer, Programming, Python

One Response

  1. cssentosa3 says:

    GPS Garmin harga murah hanya di Sentosa Elektrindo
    Sentosa Elektrindo dealer resmi Garmin Indonesia, produk yang kami jual : GPS Automotive , GPS Autopilots , GPS Aviation , GPS Basic Handhelds , GPS Chartplotter , GPS Fishfinder , GPS Mapping , GPS Maps , GPS Marine , GPS Motorcycles , GPS Networking , GPS Portable , GPS Sounder , Garmin Mobile , Radar , EPIRB , Outboard Motor , Rubber Boats , Marine Radio
    Hubungi kami di 021-7308089, 71458381, 71500714 . website : http://www.sentosaelektrindo.com , email : cssentosa3@yahoo.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s