Using GPS Class in Python for getting location information

We have developed a gps_class library in Python for reliably get GPS updates, which includes CRC checking for any data mismatch. GPS data can be obtained from any NMEA based GPS module with no more than 2 lines of code..!!!




Below is the link for the source code for the GPS Class.

The usage of GPS Class is as follows.

__author__ = 'Elementz_Engineers_Guild_Pvt_Ltd'

import serial
from gps_class import gps

serGPS = serial.Serial(port='/dev/ttyUSB0', baudrate=9600, bytesize=serial.EIGHTBITS,
                    stopbits=serial.STOPBITS_ONE, timeout=None,
                    xonxoff=False, rtscts=False,
                    writeTimeout=None, dsrdtr=False,

gps_ser = gps(serGPS)
    print gps_ser.readGPS()  // returns lattitude, longitude, date and time

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s