Cleanup ubloxd message parsing (#20664)

* use kaitai to generate parsers

* add scons flag to generate parsers

* add outer layer ephemeris parsing

* create ephemeris packet at the right time

* parse subframe 1 and 2

* add more fields

* add generated files to release

* fix signs

* no cast

* add unordered map include

* add exception handling

* small cleanup

* parse iono data

* cleanup
This commit is contained in:
Willem Melching
2021-04-14 16:17:30 +02:00
committed by GitHub
parent 343fea2bf9
commit eacacb8fba
18 changed files with 3404 additions and 547 deletions

View File

@@ -1,5 +1,12 @@
Import('env', 'common', 'cereal', 'messaging')
loc_libs = [cereal, messaging, 'zmq', common, 'capnp', 'kj', 'pthread']
loc_libs = [cereal, messaging, 'zmq', common, 'capnp', 'kj', 'kaitai', 'pthread']
env.Program("ubloxd", ["ubloxd.cc", "ublox_msg.cc"], LIBS=loc_libs)
if GetOption('kaitai'):
generated = Dir('generated').srcnode().abspath
cmd = f"kaitai-struct-compiler --target cpp_stl --outdir {generated} $SOURCES"
env.Command(['generated/ubx.cpp', 'generated/ubx.h'], 'ubx.ksy', cmd)
env.Command(['generated/gps.cpp', 'generated/gps.h'], 'gps.ksy', cmd)
env.Program("ubloxd", ["ubloxd.cc", "ublox_msg.cc", "generated/ubx.cpp", "generated/gps.cpp"], LIBS=loc_libs)