Nowadays, I changed my specialty, became an astrodynamicist. That was a result of long way of studying and step by step changing my life. But my knowledge from Unity is still useful in my work.
Problem
Working with SpaceLab space startup (#1 space startup of Kazakhstan) I faced a need to help them in development of an algorithm allowing detect rotation of pipeline valve. This algorithm should work on a physical gadget, attaching to a valve handle. Gadget should be «plug and play» (just stick it to handle, calibrate, and let it work), should use an off-the-shelf electronic components and should be cheap. So, I need to get information about rotation valve from standard 9-axis IMU. Also this algorithm must use different physical principles and math, than algorithms of company Aloxy (that was request of my partners from SpaceLab).
Solution
As an astrodynamicist, I understood that I need to use quaternion math in this case. But same time, as a flight control systems developer, I knew amount of pain I would face with this quats if I would try to deal with this task «hurriedly». So, as experienced game developer, I used Unity to create digital twin of real pipeline valve, and developed algorithm using this twin as a test installation.
And that was extremely good decision! Unity is great to create digital twins of such stuff. It is game development tool, but it is powerful, simple and fast enough when you need to focus on a problem and make a prototype rapidly!
Results
- Example of working digital twin (as Unity WebGL app) is here.
- Source code of algorithm is here on GitHub (distributing with modified MIT License).
- Technical information available here in README.md on GitHub.
Feel free to use it in your solutions!