I am discovering the Julia community after a presentation from a colleagues and it looks amazing.
I discovered that there exist a Satellite Toolbox.
Is there already an initiative for building a flight dynamics model toolbox that will enable to model various aircrafts from their definitions ? (a bit similar to what jsbsim is doing)
Although, it uses Euler angles, which could be replaced with the rotational algebras from my package Grassmann.jl, which provides an alternative to Euler angles using bivectors. Euler angles are subject to gimbal lock, while the algebras in my package are not.
Quaternions are a bivector subalgebra in Grassmann and don’t need to be considered separately, since it unifies vector algebra with quaternions (bivectors).
We have this project: https://github.com/byuflowlab/FLOWFVS although currently it is perhaps more aerodynamics focused than what you’re asking about. We also have a dynamic SixDOF in another repo, that will be integrated with this project in the near future. It’s available in another repo already, but is not really ready for public use (I gave existing code to one of my grad students to translate as a way to help her get up to speed in Julia. Methods were verified, but until now hasn’t been needed except as a learning exercise, so will soon undergo a rewrite+docs). Also uses Euler angles.
It has still a lot to implement: for example, it is not able of integrating the system equations yet, although I plan to implement it soon. I have tried to focus more on validation than in new implementations. I do not have much time to advance as fast as I would like. But I would be glad receiving contributions and new ideas
During this week I am not available, but I would like to make a contribution to your repository with a pull request in the future, then we can discuss it further from there. There are a few more optimizations remaining on Grassmann.jl to make quaternion subalgebras as efficient as possible. However, overall the advantage it provides is that you would be able to combine vector algebra and quaternion algebra very easily without relying on matrices. I will send you some more info in the near future.
I am very interested in this (Grassman.jl usage) as well. I’ve been very intrigued by your work, but haven’t had the time to educate myself on how to apply it to problems like this.
I’m pretty interested in this as well. I think another killer application in the flight dynamics world (especially for us in the launch vehicle domain) would be a 3DOF trajectory optimization package in the vein of POST that could take advantage of Julia’s autodiff capabilities. Also, having a domain-specific language around trajectory optimization would be way better than the input deck method. Most of the release updates to POST are just adding in capabilities could have easily been handled by users if there was a DSL around it rather than an inflexible input deck.
As it turns out, the Grassmann.jl approach I mentioned also supports automatic differentiation, since mathematically speaking, the higher order tangent algebras are also a sub algebra of Grassmann, which includes vector algebra, quaternions, dual quaternions, and also higher order tensor algebra generalizations of those. So, I’m very excited about what Grassmann will be able to do for these kind of applications. This is all just differential geometric algebra, and Grassmann.jl is my DSL work in progress for such things.
Not familiar with POST though, what is that acronym?
I do think the geometric algebra approach is pretty neat. I’ll give it some thought. This trajectory optimization project has been in the back of my mind for a little while now.
POST stands for Program to Optimize Simulated Trajectories. It’s a pretty standard trajectory optimization software in the aerospace world.
See this notebook to see how to use this model: find trim points, linearize about trim, design a controller from a linear model, and simulate the nonlinear system.
You have all the tools to convert between Euler angles, Euler angle and axis, DCM, and Quaternions (modified Rodrigues parameters are coming!). We also have functions to compute the time derivative of Quaternions and DCM to propagate the attitude.