We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:c1_usb_gps [2015/03/04 20:04]
odroid
en:c1_usb_gps [2015/03/04 20:04] (current)
odroid
Line 1: Line 1:
 +===== Usage of USB GPS On Linux =====
  
 +
 +  * Install GPSD <​code>​sudo apt-get install gpsd gpsd-clients</​code>​
 +  * Install foxtrotgps (X11 for a Graphical View) <​code>​sudo apt-get install foxtrotgps</​code>​
 +
 +
 +=== Configure gpsd ===
 +  * Run: <​code>​sudo dpkg-reconfigure gpsd</​code>​
 +  * Configure as follows:
 +
 +Set **NO** to start automatically.
 +
 +{{:​en:​gpsd_start.png|}}
 +
 +
 +Should gpsd handle attached USB GPS receivers automatically?​
 +Set **YES** here.
 +
 +{{:​en:​gpsd_usb.png|}}
 +
 +Set the USB Serial port of the GPS.
 +Common is **/​dev/​ttyACM0**
 +
 +{{:​en:​gpsd_usbport.png|}}
 +
 +GPSD Options.. Leave **BLANK**
 +
 +{{:​en:​gpsd_options.png|}}
 +
 +GPSD Control socket. Leave it as it is..
 +**/​var/​run/​gpsd.sock**
 +
 +{{:​en:​gpsd_socket.png|}}
 +
 +
 +  * Reboot the board now.
 +
 +
 +=== Using the GPS ===
 +== Method 1: Console Graphical ==
 +  * You can use <​code>​cgps -s</​code>​ It will show a nice interface with all the relative GPS Data
 +  * Or You can use <​code>​gpsmon</​code>​
 +{{:​en:​gps2.png|}}
 +== Method 2: Console Text (Python) ==
 +  * Run: <​code>​sudo apt-get install python-gps</​code>​
 +<file py testgps.py>​
 +import gps
 +
 +# Listen on port 2947 (gpsd) of localhost
 +session = gps.gps("​localhost",​ "​2947"​)
 +session.stream(gps.WATCH_ENABLE | gps.WATCH_NEWSTYLE)
 +
 +while True:
 +    try:
 +    report = session.next()
 + # Wait for a '​TPV'​ report and display the current time
 + # To see all report data, uncomment the line below
 + # print report
 +        if report['​class'​] == '​TPV':​
 +                print report.time
 +    except KeyError:
 + pass
 +    except KeyboardInterrupt:​
 + quit()
 +    except StopIteration:​
 + session = None
 + print "GPSD has terminated"​
 +</​file>​
 +
 +== Method 3: X11 FoxtrotGPS ==
 +  * Just open a terminal and run: <​code>​foxtrotgps</​code> ​
 +  * or Menu -> Accessories -> FoxtrotGPS
 +
 +{{:​en:​gps1.png|}}
 +
 +
 +
 +
 +  ​
en/c1_usb_gps.txt ยท Last modified: 2015/03/04 20:04 by odroid
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0