gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-users] Help for python next()


From: bruno suarez
Subject: [gpsd-users] Help for python next()
Date: Thu, 17 Mar 2016 23:31:14 +0100
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

Hello,

I made my
first very simple test program in python:

mongps=gps(mode=WATCH_ENABLE) 
while True:
  os.system('clear')
  mongps.next()  # recupeation de la phrase suivante
  print "Mode" , mongps.fix.mode
  print "Latitude       " , mongps.fix.latitude
  print "Longitude    " , mongps.fix.longitude
  #....
  print "DateTime GPS    " , mongps.utc   # time  GPS
  print "DateTime Sys    " ,
datetime.datetime.now()  # time system 
  time.sleep(1)


I understand that the next() function allows to unstack a sentence gpsd respecting the order of arrival.
So
after a few secondes there is a gap between the system time and GPS time displayed.
Is it possible, without using thread (I saw examples) to recover the last sentence of GPSD and therefore have the latest GPS information ?

Thanks

Bruno Suarez

START :
Mode 1
Latitude        0.0
Longitude       0.0
DateTime GPS
DateTime Sys    2016-03-17 23:18:16.074113
Mode 3
Latitude        47.213430255
Longitude       -0.738763992
DateTime GPS    2016-03-17T22:18:15.000Z
DateTime Sys    2016-03-17 23:18:17.075002  (+1 UTC)
....
After few minutes
Mode 3
Latitude        47.21337999
Longitude       -0.738750282
DateTime GPS    2016-03-17T22:24:02.000Z
DateTime Sys    2016-03-17 23:25:48.494798   (+1UTC)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]