New feature launch for #FormaK: a managed runtime!
I'd been stuck trying to simplify complexity of managing a process and multiple sensor models since I introduced calibration (which added more complexity... not helping...). In the end I landed on a single tick function call with a dose of #SFINAE that can handle sensor readings of any type and takes care of the rest under the hood.
As always, it comes in #Python and #Cpp flavors
Blog: https://buckbaskin.com/blog/formak-runtime-new-formak-feature.html
Github: https://github.com/buckbaskin/formak/pull/17
New feature launch for #FormaK: Calibration!
This feature started with a straightforward idea: use FormaK to model a #rocket launch based on #NASA data. Unfortunately, FormaK was missing support for orienting the IMU in the rocket's frame. To fix this, I added calibration support for sensor and process models with the same syntax that supports states and control inputs.
New features coming soon!
NASA data: https://data.nasa.gov/Aerospace/Deorbit-Descent-and-Landing-Flight-1-DDL-F1-/vicw-ivgd
Blog: https://buckbaskin.com/blog/calibration-new-formak-feature.html
Github: https://github.com/buckbaskin/formak/pull/12
There’s also the persnickety thing about the build time that I’d missed in the first version. The existing Sympy tooling slowed way down for a larger model, but it wasn’t clear where the slow down was coming from and I assumed it was in the compile stage. In the end after much debugging it turned out that calling simplify on a large expression didn’t scale well and took 100s of seconds.
Is there a #Python tool to profile function calls as the program is running?
#FormaK #OpenSource
A new feature has landed for #FormaK ! The original models only supported time varying state estimates and control inputs, now it’s easy to include fixed calibration parameters into the models at runtime. This unlocks new models, like the rocket model I referenced in my last feature release
Check out the “What’s New” page for more
https://github.com/buckbaskin/formak/blob/master/docs/whats-new.md#2023-05-05-calibration
Working on something new for #FormaK. First order of business is writing out the kinematics math and sensor models, then it’s going to be a two step process to apply it to the data from a 2020 #NASA rocket launch.
1. `model.fit` to match params from data based on the scikit-learn interface
2. `cpp.compile` to generate the C++ for the optimized model
One of the things I learned that I didn’t know while developing this feature: #Bazel. First and foremost, I don’t have a good mental model of how it works, especially when it comes to looking up compilers and setting options for compilers. #FormaK benefits by being able to easily zip together Python, C++ and generated C++ in Bazel, but working on improving the C++ integration feels like stumbling in the dark hoping I find a light switch
A new feature has landed for #FormaK ! Compiling Python to C++ is as easy as switching `python.compile` to `cpp.compile` https://github.com/buckbaskin/formak/pull/9 #python #cpp
A little #introduction if I may:
I'm Buck, by day I work on self driving cars and by night I work on open source. I'm currently focused on #FormaK to magically translate Python to high performance C++. You can read more about FormaK here https://buckbaskin.com/blog/tag/formak.html