Gpsd: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
mNo edit summary
Line 85: Line 85:


I want a short python script here...
I want a short python script here...
[[Category: GPS]]

Revision as of 04:50, 8 December 2016

Where

gpsd home: http://gpsd.berlios.de/

Current version: 2.94

The Mac port: version 2.38 http://gpsd.darwinports.com/

My Mac: MacBookPro running 10.6.3 (Snow Leopard).

What and why

gpsd is a service that listens to one or more gps receivers and makes the received data available over a network connection. It understands a wide variety of binary protocols.

The reason to run it on a Mac laptop is to make the signal available to programs needing time and location services in a way that is flexible and device independent.

I use virtual machines, so I should be able to let a program running on any virtual machine connect to the gpsd host running on the Mac.

Receivers

All the receivers I have currently are covered:

  • DeLorme Earthmate
  • Garmin
  • NMEA
  • SiRF
  • Trimble TSIP
  • UBX

How

In my case on my Mac, I will be plugging in usb devices or possibly using a bluetooth connection. I already know I can listen to BT devices using things that appear on ports /dev/tty.BT* when the devices are paired with the Mac so I won't go into that here.

Down the slippery slope.

Download, build, install in order

  1. libusb - required to talk to usb devices
  2. libemul - required to talk to DeLorme LT40 usb device
  3. gpsd-emul - required to connect together emul and gpsd
  4. gpsd - the thing that we wanted back in chapter 1. Remember?

Download libusb from http://sourceforge.net/projects/libusb/develop

./configure; make; sudo make install

To get the DeLorme LT40 going I seem to need gpsd-emul (emul = Earthmate userland). Trying to ./configure that, it tells me I need libemul. That's in the separate emul tarball. They are on the berlios.de site.

emul:

env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure 
make
sudo make install

Now that the dependencies are out of the way...

At version 2.94, gpsd builds out of the box on Snow Leopard.

unpack tarball
./configure
make
sudo make install

Starting it up

  1. Plug in a USB gps receiver, let's see, here's a DeLorme Earthmate LT40
  2. /usr/local/gpsd

What you get

Besides the daemon "gpsd", of course...

In /usr/local/bin, you will find

  • lcdgps
  • gpxlogger
  • gpspipe
  • gpsmon
  • gpsdecode
  • gpsctl
  • cgps

Position

Time

Python integration

I want a short python script here...