Serve static GPS information across the network
README.md

static-net-gps #

A small Go program that serves a static location using the NMEA 0183 protocol over the network. This enables you to provide a static location to all devices on your local network regardless of whether they have a GPS module or not.

Heavily inspired by the Broadcasting GPS on the local network blog post by Evert Pot, but written from scratch. Compared to that version, this one:

  • has no runtime dependencies (does not require a Python interpreter or an Avahi daemon running)
  • can be compiled into a minimal, statically linked Go binary
  • is packaged as a Nix flake

Also, if that matters to you for whatever reason, this is organic hand-made free-range software, and no clankers were involved in its production.

Usage #

The server needs a configuration file with the coordinates it is supposed to supply. Look at the config.example.toml file to get a sense of what it needs. The server will look for the configuration file first in /etc/static-net-gps/config.toml, then in ./config.toml.

Once you have the config file ready, simply run the static-net-gps binary.

Building #

You can use the provided Nix flake to build and hack on this project:

# compile and run the project
nix run .#static-net-gps

# drops you into a bash shell with the Go compiler, language server and extra tools available in your $PATH
nix develop .#static-net-gps

Contributing #

If you edit/update dependencies, make sure to update the hash in flake.nix.

License #

Licensed under the European Union Public License (EUPL) v1.2 or later.