Skip to content

embetrix/gpstrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpstrack

gpstrack is a geo-localization application written in C intended for Embedded-Linux platforms with a GPS module or dongle.

gpstrack uses minmnea library for parsing GPS/NMEA sentences. GPS information (position, speed, time) are formated as JSON data and streamed in real-time to PubNub cloud.

Dependencies

install dependencies on Ubuntu host:

$ sudo apt-get install libjson-c-dev libcurl4-openssl-dev libevent-dev

PubNub/MapBox accounts

To be able to upload data on PubNub cloud you need to have an account, create an application and add a channel to be used to stream the GPS data feed.

Mapbox account is also required for Map Live visualization.

Build

build and install first PubNub C SDK:

$ git clone https://github.com/embexus/pubnub-c-sdk.git
$ cd pubnub-c-sdk 
$ make 
$ sudo make install

clone gpstrack repository:

$ git clone https://github.com/embexus/gpstrack.git

change PubNub Channel, Publish Key and Subscribe Key in gpstrack.h

build it:

$ make

Usage

GPS Module or Dongle need to be connected to your device over Serial or USB to get GPS data:

$ ./gpstrack /dev/ttyACM0

If you don't have a GPS device you can fake it by using test.nmea data file

$ gzip -dc test.nmea.gz > test.nmea
$ ./gpstrack test.nmea

Map live view

EON real-time map dashboard is used to visualize the position on the map in realtime. To use change gpstrack.html to input:

  • PubNub subcription key
  • PubNub Channel
  • MapBox Id

Finally you can then open the html file locally with a browser or upload it to a webserver.

Licensing

This software is licensed under GPL Version 2.0+