Giter VIP home page Giter VIP logo

gpstracker-node's Introduction

gpstracker-node

A simple Live GPS Tracker for Node.js and OsmAnd clients.

Installation

To install, use npm:

$ npm install -g gpstracker-node

Usage

This simple program tracks a collection of OsmAnd GPS clients and allows for real-time live display of them into a Google Maps interactive display. The program accepts two optional arguments:

$ gpstracker -p <portNumber> -c <clientsConfig>
  • portNumber is the HTTP port to use for both static and web socket connections (default: 2223).
  • clientsConfig is the GPS clients meta-data configuration file in JSON format (default: clients.json).

Example:

$ gpstracker -p 2227 -c examples/clients.json
[2014-11-15 23:57:01.077] [INFO] app - started app server on http://0.0.0.0:2227

Then you start your OsmAnd clients and allow for some updates to be sent via the Internet first. Afterwards you point your favourite HTML5 browser to the server address above and you can watch a real-time live display of all your tracked clients. You can click on any client marker in the map to see detailed tracking data such as position, speed and HDOP.

GPS Clients Configuration

OsmAnd GPS clients can have meta-data associated such as a name. For this, you must create a JSON file with the following format (see the included examples/clients.json example file):

{
  "hugo": {"name": "Hugo"},
  "mario": {"name": "Mario"},
  "erik": {"name": "Erik"}
}

In this configuration object, the keys correspond to client Ids that you use later when configuring OsmAnd.

OsmAnd Configuration

You must configure your OsmAnd clients to provide real-time location information via network (Wi-Fi or mobile data) to the tracking server as follows.

  1. Go to "Settings" -> "Plugins".
  2. Activate the "Record your trips" plugin.
  3. Go to "Settings" -> "Trip recording" (should appear after activating the above plugin).
  4. In "Online tracking web address" enter the following URL: http://yourserver:port/update?cid=YOURCLIENTID&lat={0}&lon={1}&timestamp={2}&hdop={3}&altitude={4}&speed={5}&bearing={6}.
  5. Configure the update interval to your taste.

After you configure OsmAnd with the above settings, you are ready to go. In the map view (either browsing or navigating) you will see a "GPX" widget. Touch it and select "Start GPX recording", then click the widget again and select "Start online tracking".

gpstracker-node's People

Contributors

hhromic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jafo2128 ngaing12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.