# LocationSimulator v1.1.0 - Table of Contents

> A pluggable GPS location simulator for Elixir. Generate synthetic GPS data or replay GPX tracks for dev/test.

## Pages

- [README](readme.md)
- [Getting Started](getting_started.md)
- [Architecture](architecture.md)
- [Writing Plugs](writing_plugs.md)
- [GPX Replay](gpx_replay.md)

## Modules

- [LocationSimulator](LocationSimulator.md): Entry-point API for the LocationSimulator library.

- Pipeline
  - [LocationSimulator.Dsl](LocationSimulator.Dsl.md): Spark DSL extension defining `source` and `plug` entities for GPS pipelines.
  - [LocationSimulator.Dsl.Plugin](LocationSimulator.Dsl.Plugin.md): DSL entity representing a plug module in the pipeline.
  - [LocationSimulator.Dsl.Source](LocationSimulator.Dsl.Source.md): DSL entity representing a GPS data source.
  - [LocationSimulator.Pipeline](LocationSimulator.Pipeline.md): Declares a composable GPS simulation pipeline using Spark DSL.
  - [LocationSimulator.Plug](LocationSimulator.Plug.md): A plug transforms a pipeline. Inspired by `Plug` from Phoenix.

- Built-in Plugs
  - [LocationSimulator.Plug.Callback](LocationSimulator.Plug.Callback.md): Dispatches GPS events to the user's callback module.
  - [LocationSimulator.Plug.GpxReplay](LocationSimulator.Plug.GpxReplay.md): Replays GPS points from a GPX track file.
  - [LocationSimulator.Plug.Sleep](LocationSimulator.Plug.Sleep.md): Sleeps for `config.interval` milliseconds (plus optional `config.random_range` jitter).
  - [LocationSimulator.Plug.SyntheticGps](LocationSimulator.Plug.SyntheticGps.md): Generates the next synthetic GPS point in the current direction.

- Worker &amp; Supervisor
  - [LocationSimulator.DynamicSupervisor](LocationSimulator.DynamicSupervisor.md): DynamicSupervisor, uses for add worker in runtime.
  - [LocationSimulator.Worker](LocationSimulator.Worker.md): Runs a GPS simulation loop using a plug pipeline.

- GPS &amp; GPX
  - [LocationSimulator.Gps](LocationSimulator.Gps.md): Generate a random location. Get next gps from a location.

  - [LocationSimulator.Gpx](LocationSimulator.Gpx.md): `Gpx` is a module that provides functions for parsing GPX file.

  - [LocationSimulator.Gpx.GpsPoint](LocationSimulator.Gpx.GpsPoint.md): `GpsPoint` is a struct that represents a GPS point load from GPX file.

- Callbacks
  - [LocationSimulator.Event](LocationSimulator.Event.md): Callback behaviour that bridges the worker and your application code.
  - [LocationSimulator.LoggerEvent](LocationSimulator.LoggerEvent.md): Default callback for demo & develop.

