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.
- PubNub C SDK
- libjson-c
- libcurl
- libcrypto
- libevent
install dependencies on Ubuntu host:
$ sudo apt-get install libjson-c-dev libcurl4-openssl-dev libevent-dev
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 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
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
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.
This software is licensed under GPL Version 2.0