AlexS12 / FlightMechanics.jl

Flight mechanics utils
Other
35 stars 11 forks source link

Setup equations of motion with DifferentialEquations.jl? #46

Open ChrisRackauckas opened 4 years ago

ChrisRackauckas commented 4 years ago

Hey, found this repository from the discourse. Looks nice! It looks like a very small modification would need to be done for something like:

https://github.com/AlexS12/FlightMechanics.jl/blob/master/src/dynamics/sixdof_quaternion_fixed_mass.jl

to call the DifferentialEquations.jl ODE solvers. I think it would lead to some nice demos to have that setup. Note that in terms of the package, you can directly depend on the ODE solvers (OrdinaryDiffEq.jl) to reduce the dependency size.

AlexS12 commented 4 years ago

Absolutely agree! I have not implemented the integration of the ODEs yet but I had DifferentialEquations.jl in mind.

I think I won't have any time for the project until Christmas, but when I finish a small refactor that is on course, that's for sure the next step.

Would you mind giving me some indications on what the right way of interfacing with DifferentialEquations.jl is?

ChrisRackauckas commented 4 years ago

Would you mind giving me some indications on what the right way of interfacing with DifferentialEquations.jl is?

Depend directly on DiffEqBase here and have the interface spit out an ODEProblem (or maybe just the dynamics). Then in your tests just depend on OrdinaryDiffEq, and you can choose to solve with something like Tsit5. In this style, you won't take on very many dependencies, but then any possible ODE solver can be used to solve the resulting dynamical system.