Code Monkey home page Code Monkey logo

gpsd-fake's Introduction

gpsd-fake

This tool emulates a running instance of gpsd. It generates random movements based on a simple algorithm. Primary use case for it is testing of software which uses gpsd, but it can also be used for demonstration purposes. It is implemented in Javascript using nodejs.

Usage as CLI

npm install -g gpsd-fake

Run it as follows:

gpsd-fake --port [port] --config-file [config-file] --tmp-file [tmp-file]
  • -port: Is the port to bind to, if not supplied it defaults to 2947
  • -config-file: Supply minimum and maximum values for latitude and longitude. You can configure the speed in kilometers per hour, also. See https://github.com/loewexy/gpsd-fake/blob/master/config.json for an example. Might be a just a filename, a relative or an absolute path.
  • -tmp-file: Is a file in which gpsd-fake will regulary save its state, so you can restart the tool and proceed at the same position. Might be a just a filename, a relative or an absolute path. This feature is disabled by default.

Display the help screen via:

gpsd-fake --help

Usage as library

npm install --save gpsd-fake
var gpsdFake = require('gpsd-fake')

gpsdFake({
  port: 1234,
  tmpFile: 'gpsd-fake-last-session.json', // might be relative or absolute
  configFile: 'custom-config.json' // might be relative or absolute
})

Contribute

If you are looking for a new feature or you found a bug, feel free to create a pull request or open a issue. If you do a pull request make shure that eslint is running without errors. You can run eslint using:

npm run-script lint

gpsd-fake's People

Contributors

loewexy avatar axe312ger avatar mattes-bru avatar

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.