Commit e91bf78e authored by BenZr's avatar BenZr
Browse files

try gpx log

parent 6e6255c0
......@@ -16,6 +16,9 @@ class GpsIO:
def init_line(self,timeout=1.0):
self.ser = serial.Serial('/dev/ttyS0',timeout=timeout)
def init_line_devname_baudrate(self,devname,baudrate,timeout=1.0):
self.ser = serial.Serial(devname,baudrate=baudrate,timeout=timeout,xonxoff=False, rtscts=False, dsrdtr=False)
def close(self):
import time
import sys
import gps_driver_v2 as gpsdrv
def cvt_gll_ddmm_2_dd (st):
sts =st.split(" ")
stlat = sts[0]
stlon = sts[2]
stlats = stlat.split(".")
stlons = stlon.split(".")
lat = double(stlats[0][0:len(stlats[0])-2])
lon = double(stlons[0][0:len(stlons[0])-2])
print (lat,lon)
gps = gpsdrv.GpsIO()
# debug with USB GPS
tmax = 25.0
t0 = time.time()
while True:
print ("---------------------------------------------------")
# test GPS
gps_data_string = gps.read_gll()
print ("GPS:",gps_data_string)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment