gpsd-users
[Top][All Lists]
Advanced

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

Information


From: Anton Strydom
Subject: Information
Date: Sat, 3 Sep 2022 16:42:30 +0200

Good day all

New here

I am busy finalizing the construction of a GNSS only navigated autonomous vehicle.

I am testing a number of GNSS single and dual frequency devices to establish their efficiency and accuracy

I need information that is according to documentation available with the TPV report

The information I require is the following:

Status which returns a numeric value related to the fix status ie 3 = RTK Fixed
Datum which returns a string value that should return WGS84
Track which I did manage to receive using the below Python script
EcefX which returns a numeric value in meters for ECEFX coordinates
EcefY which returns a numeric value in meters for ECEFY coordinates
EcefZ which returns a numeric value in meters for ECEFZ coordinates

Besides the above I would like to receive any information provided by the device that is related to heading or direction.

The commented out parts return either error messages or nothing at all

import os
from gps import *
from time import *
import time
import threading
import math

gpsd = None #seting the global variable

os.system('clear') #clear the terminal (optional)

class GpsPoller(threading.Thread):
  def __init__(self):
    threading.Thread.__init__(self)
    global gpsd #bring it in scope
    gpsd = gps(mode=WATCH_ENABLE) #starting the stream of info
    self.current_value = None
    self.running = True #setting the thread running to true

  def run(self):
    global gpsd
    while gpsp.running:
      gpsd.next() #this will continue to loop and grab EACH set of gpsd info to clear the buffer

if __name__ == '__main__':
  gpsp = GpsPoller() # create the thread
  try:
    gpsp.start() # start it up
    while True:
      #It may take a second or two to get good data
      #print gpsd.fix.latitude,', ',gpsd.fix.longitude,'  Time: ',gpsd.utc

os.system('clear')

    print
    print ' GPS Data'
    print '----------------------------------------'
    print 'latitude    ' , gpsd.fix.latitude
    print 'longitude   ' , gpsd.fix.longitude
    print 'time utc    ' , gpsd.utc
    print 'altitude (m)' , gpsd.fix.altitude
#      print 'eps         ' , gpsd.fix.eps
#      print 'epx         ' , gpsd.fix.epx
#      print 'epv         ' , gpsd.fix.epv
#      print 'ept         ' , gpsd.fix.ept
    print 'speed (m/s) ' , gpsd.fix.speed
#      print 'climb       ' , gpsd.fix.climb
    print 'track       ' , gpsd.fix.track
    print 'mode        ' , gpsd.fix.mode
    print 'status      ' , gpsd.fix.status
#      print 'datum       ' , gpsd.fix.datum  


  except (KeyboardInterrupt, SystemExit):
      print "\nKilling Thread..."
gpsp.running = False
gpsp.join()
print "Done.\nExiting."

Any assistance will be appreciated

Thank you in advance

Sincerely

Anton

reply via email to

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