Flight Dynamic Models

Hi All

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)

Cheers
Guillaume

5 Likes

There isn’t that I know of. I do however, know of many people who would be VERY interested in this! Maybe I will try to point some of them here.

Also very interested in this, I do know of this package:

https://github.com/AlexS12/FlightMechanics.jl

Seems to be based on jsbsim also.

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.

Why not using quaternions?

2 Likes

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.

2 Likes

Hi, it’s Alex, the creator of FlightMechanics.jl. Although it is a humble project with not a lot of functionalities yet, it does provide a couple of models using quaternions: https://github.com/AlexS12/FlightMechanics.jl/tree/master/src/dynamics

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 :slight_smile:

3 Likes

Sounds interesting! Do you have a concrete example of how could I use Grassmann.jl here?
https://github.com/AlexS12/FlightMechanics.jl/blob/master/src/coordinates.jl

2 Likes

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.

3 Likes

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.

1 Like

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.

2 Likes

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?

1 Like

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.

1 Like

I just developed several aircraft and rotorcraft flight simulation models using Julia. They can be downloaded at https://umbertosaetti.com. More detail here: AIAA Aerospace Research Central

4 Likes

You can check out https://github.com/isrlab/F16Model.jl

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.

Thanks.

-Raktim

1 Like

Hi @tog!

Welcome :smiley:

For the kind of reference frame rotation used in those applications, I highly suggest using the package https://github.com/JuliaSpace/ReferenceFrameRotations.jl

I use it in SatelliteToolbox.jl and in the AOCS simulator built at INPE as reported here: Julia and the satellite Amazonia-1

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.