# sbp-synthetic-stream

Construct synthetic SBP position solution streams. Plays the stream(s) over a readable stream or HTTP.

You may specify points to interpolate between, to simulate a path. The paths will be randomly jittered and playback at the rate
that you specify. It uses nanosecond-accurate timers to attempt to align messages to second and millisecond boundaries. Technically speaking 
this should work well up to 900hz, although practically speaking you will probably use something in the range of 1-20hz
to test realistic-looking streams.

## Install
Install as a dependency to a project:

```shell
npm install --save sbp-synthetic-stream
```

Install CLI tool globally:

```shell
npm install --global sbp-synthetic-stream
```

## Using the command-line tool
```shell
sbp-synthetic-stream --path "37.7755898502N,-122.511541278E,60;37.886690N,-121.155E,61" --num-streams 3 --ports 8080,8081,8082 --duration 10m --hz 2
```

Test with curl:

```shell
curl -vN http://localhost:8080 | sbp2json
curl -vN http://localhost:8081 | sbp2json
curl -vN http://localhost:8082 | sbp2json
```

You can install [`sbp2json` here](https://github.com/swift-nav/libsbp) via the Haskell project.

## Programmatic Use

TBD

## License
MIT license. See `LICENSE` file.
