Go to file
bert hubert d47d61ee5f missing files 2019-09-22 18:04:46 +02:00
.github/workflows and libwslay 2019-09-05 09:21:22 +02:00
ext add TLEs 2019-09-02 16:13:49 +02:00
html missing files 2019-09-22 18:04:46 +02:00
.gitignore too much to mention 2019-08-13 01:15:25 +02:00
.gitmodules add TLEs 2019-09-02 16:13:49 +02:00
LICENSE Initial commit 2019-07-21 16:09:11 +02:00
Makefile Merge pull request #1 from omoerbeek/openbsd-fixes 2019-09-05 10:51:57 +02:00
README.md update document locations, add --wait 2019-09-16 13:55:47 +02:00
beidou.cc interim 2019-09-03 20:05:40 +02:00
beidou.hh a ton of changes 2019-09-09 20:49:31 +02:00
bits.cc glonass special sign support 2019-08-26 00:17:41 +02:00
bits.hh glonass special sign support 2019-08-26 00:17:41 +02:00
ephemeris.cc just too much progess 2019-09-16 14:33:06 +02:00
ephemeris.hh just too much progess 2019-09-16 14:33:06 +02:00
galileo.cc move to protobuf 2019-08-09 15:58:52 +02:00
galileo.hh add the ephemeris adaptors to the main galileomessage class 2019-09-22 16:30:55 +02:00
glonass.cc a ton of changes 2019-09-09 20:49:31 +02:00
glonass.hh a ton of changes 2019-09-09 20:49:31 +02:00
gps.cc gps yolo 2019-08-12 15:54:16 +02:00
gps.hh a ton of changes 2019-09-09 20:49:31 +02:00
minicurl.cc lots 2019-08-30 17:56:41 +02:00
minicurl.hh more bits 2019-08-06 12:57:06 +02:00
minivec.hh split out ephemeris ephAge & fix it, add delta-Hz to html, add gps-utc offset to json & show it in html, fix compilation 2019-08-18 10:56:22 +02:00
minread.cc yolo 2019-07-24 13:24:48 +02:00
navdisplay.cc interim 2019-09-03 20:05:40 +02:00
navdump.cc add checkboxes so you can select what you want to see 2019-09-22 17:48:02 +02:00
navmon.cc a ton of changes 2019-09-09 20:49:31 +02:00
navmon.hh a ton of changes 2019-09-09 20:49:31 +02:00
navmon.proto add SARResponse protobuf object 2019-09-22 16:31:46 +02:00
navnexus.cc make navnexus replay a configurable number of hours 2019-09-09 20:44:15 +02:00
navparse.cc partial commit of changes that should not break things in master 2019-09-22 16:42:23 +02:00
navrecv.cc lots 2019-08-30 17:56:41 +02:00
storage.cc lots 2019-08-30 17:56:41 +02:00
storage.hh gps yolo 2019-08-12 15:54:16 +02:00
testrunner.cc interim 2019-09-03 20:05:40 +02:00
tle.cc make us robust against missing TLE files 2019-09-05 09:44:45 +02:00
tle.hh make us robust against missing TLE files 2019-09-05 09:44:45 +02:00
tlecatch.cc tlecatch 2019-09-02 16:56:03 +02:00
ubx.cc ubx infra for glonass/beidou 2019-08-26 00:19:23 +02:00
ubx.hh ubx infra for glonass/beidou 2019-08-26 00:19:23 +02:00
ubxparse.cc move to protobuf 2019-08-09 15:58:52 +02:00
ubxtool.cc partial commit of changes that should not break things in master 2019-09-22 16:42:23 +02:00
update-tles add TLEs 2019-09-02 16:13:49 +02:00

README.md

galmon

galileo/GPS/GLONASS/BeiDou open source monitoring. GPL3 licensed. (C) AHU Holding BV - bert@hubertnet.nl - https://ds9a.nl/

Live website: https://galmon.eu/

Theoretically multi-vendor, although currently only the U-blox 8 chipset is supported. Navilock NL-8012U receiver works really well, as does the U-blox evaluation kit for the 8MT.

Highlights:

  • Processes raw frames/strings/words from GPS, GLONASS, BeiDou and Galileo
  • Calculate ephemeris positions
  • Record discontinuities between subsequent ephemerides
  • Compare doppler shift as reported by receiver with that expected from ephemeris
  • Track atomic clock & report jumps
  • Compare orbit to TLE, match up to best matching satellite
  • Tear out every bit that tells us how well an SV is doing
  • Full almanac processing to see what should be transmitting
  • Distributed receivers, combined into a single source of all messages

Goals:

  1. Support multiple wildly distributed receivers
  2. Combine these into a forensic archive of all Galileo/GPS NAV messages
  3. Make this archive available, offline and as a stream
  4. Consume this stream and turn it into an attractive live website (https://galmon.eu/). As part of this, perform higher-level calculations to determine ephemeris discontinuities, live gst/gps/galileo time offsets, atomic clock jumps etc.
  5. Populate an InfluxDB timeseries database with raw measurements and higher order calculations

Works on Linux (including Raspbian on Pi Zero W), OSX and OpenBSD.

To get started, make sure you have a C++17 compiler, git, protobuf-compiler. Then run 'make ubxtool navdump' to build the receiver-only tools.

To also run the webserver locally, intall libh2o-dev and run 'make'.

To build everything, try:

apt-get install protobuf-compiler libh2o-dev libcurl4-openssl-dev libssl-dev libprotobuf-dev libh2o-evloop-dev libwslay-dev
git clone https://github.com/ahupowerdns/galmon.git --recursive
cd galmon
make

If this doesn't succeed with an error about h2o, make sure you have this library installed. If you get an error about 'wslay', do the following, and run make again:

echo WSLAY=-lwslay > Makefile.local

Once compiled, run for example ./ubxtool --wait /dev/ttyACM0 1 | ./ubxparse 10000 html null

Next up, browse to http://[::1]:10000 (or try http://localhost:10000/ and you should be in business. ubxtool changes (non-permanently) the configuration of your u-blox receiver so it emits the required frames for GPS and Galileo. If you have a u-blox timing receiver it will also enable the doppler frames.

To see what is going on, try:

./ubxtool --wait /dev/ttyACM0 1 | ./navdump

Setting up a distributed setup is slightly more complicated & may still change.

Tooling:

  • ubxtool: can configure a u-blox 8 chipset, parses its output & will convert it into a protbuf stream of GNSS NAV frames + metadata Adds 64-bit timestamps plus origin information to each message
  • xtool: if you have another chipset, build something that extracts NAV frames & metadata. Not done yet.
  • navrecv: receives GNSS NAV frames and stores them on disk, split out per sender.
  • navnexus: tails the files stored by navrecv, makes them available over TCP
  • navparse: consumes these ordered nav updates for a nice website and puts "ready to graph" data in influxdb - this is the first step that breaks "store everything in native format". Also does computations on ephemerides.
  • grafana dashboard: makes pretty graphs

Distributed setup

Run navrecv :: ./storage to receive frames on port 29603 of ::, aka all your IPv6 addresses (and IPv4 too on Linux). This allows anyone to send you frames, so be aware.

Next up, run navnexus ./storage ::, which will serve your recorded data from port 29601. It will merge messages coming in from all sources and serve them in time order.

Finally, you can do nv 127.0.0.1 29601 | ./navdump, which will give you all messages over the past 24 hours, and stream you more. This also works for navparse for the pretty website and influx storage, nc 127.0.0.1 29601 | ./navparse 127.0.0.0:10000 html galileo, if you have an influxdb running on localhost with a galileo database in there.

Internals

The transport format consists of repeats of:

  1. Four byte magic value
  2. Two-byte frame length
  3. A protobuf frame

The magic value is there to help us resync from partially written data.

The whole goal is that we can continue to rebuild the database by rerunning 'navstore' and 'navinflux'.

Documents

Big TODO

  • Dual goals: completeness, liveness, not the same For forensics, great if the packet is there For display, not that bad if we missed a message

  • In general, consider refeed strategy Raw serial Protobuf Influxdb ".csv files"

  • Delivery needs to be bit more stateful (queue)

  • Semantics definition for output of Navnexus "we'll never surprise you with old data"

ubxtool

  • Will also spool raw serial data to disk (in a filename that includes the start date)
  • Can also read from disk
  • Careful to add the right timestamps