Currently only implements the Unscented Kalman Filter: This is an almost line-by-line reimplementation of UnscentedKalmanFilter
from FilterPy in C++17. For documentation, please refer to those references (for now, at least).
The runtime dependencies are:
If you want to build and run the tests, you also need:
The library uses Conan for package management, which resolves all of the dependencies automatically.
The build instructions below mainly concern package building and running the tests, since all library code is
contained in include/filter
.
-
Manual Installation.
You can just add
include
to your project's include directories. Remember to also install the dependencies (i.e., Eigen and {fmt}). -
Install using Conan.
The commands below are meant to be executed from the libary's root directory.
-
Normal installation:
$ conan create . -s compiler.cppstd=17 --build missing
-
Editable install:
Install the dependencies using
$ conan install .
and then run
$ conan editable add .
To remove the editable install, use
$ conan editable remove --refs=filter/0.1
-
In your C++ file, add
#include "filter/ukf.h"
#include "filter/sigma_points.h"
By default, this uses 64-bit double precision matrices/vectors. For 32-bit single precision matrices/vectors, use
#define FILTER_USE_FP32
#include "filter/ukf.h"
#include "filter/sigma_points.h"
Note: This setting only affects the linear algebra types. Further, some tests will currently fail if they are run with single precision.
The library defines a general namespace filter
and the namespace filter::ukf
for the Unscented
Kalman Filter. See the tests for usage examples.
Run
$ conan build .
to build using the build type set in your Conan profile, or
$ conan build . --settings=build_type=BUILD_TYPE
with BUILD_TYPE
substituted by your desired build type (e.g. Debug
or Release
).
The tests run automatically after building. If the package is already installed, run
$ conan test test filter/0.1
The library is licensed under the MIT license.
[1] FilterPy