Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Timestep propagator #65

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Timestep propagator #65

wants to merge 10 commits into from

Conversation

AlexS12
Copy link
Owner

@AlexS12 AlexS12 commented May 5, 2020

Rewriting of work in #48 with a cleaner history

Roadmap

@AlexS12 AlexS12 mentioned this pull request May 5, 2020
14 tasks
@AlexS12 AlexS12 added the enhancement New feature or request label May 5, 2020
@AlexS12 AlexS12 force-pushed the timestep_propagator branch 2 times, most recently from e6fed7b to 49f0089 Compare May 9, 2020 18:56
@zsunberg
Copy link

zsunberg commented May 9, 2020

Hi @AlexS12 , hope it isn't rude to jump in like this! I'm an aerospace engineering professor who uses julia - so it seems likely that I will use this code one day if it turns out to be flexible and fast enough :)

First I wanted to say that I am really glad to see that you're separating the state from the dynamics. In some of my previous codes, I have put the state and dynamics in the same object and it has turned into a huge headache, so I think this was a good choice!

Second, I wanted to ask if it's possible to make ResultsStore an AbstractVector, for example, an AbstractVector{NamedTuple{...}} or maybe even just consider using Vector{NamedTuple{...}} instead of making a ResultsStore type. In this case, if you want a vector of times or states is easy enough to run

times = [r.t for r in results]
states = [r.state for r in results]

or you can still allow access to the vectors with some dataframe-like syntax, e.g., results[!,:states] returns the vector of states.

I have worked with other packages that have introduced their own non-vector types to store trajectories, and they have always been a huge pain to work with.

Also, why is there a vector of Aircraft objects in a ResultsStore? Can the aircraft change over time?

Happy to talk more about this if you are looking for input!

@AlexS12
Copy link
Owner Author

AlexS12 commented May 10, 2020

Hi @AlexS12 , hope it isn't rude to jump in like this! I'm an aerospace engineering professor who uses julia - so it seems likely that I will use this code one day if it turns out to be flexible and fast enough :)

Hi @zsunberg! I am glad that you found this repository and found it interesting. Thanks for your suggestions. I am sure they will help to make this package more flexible and useful 😃

First I wanted to say that I am really glad to see that you're separating the state from the dynamics. In some of my previous codes, I have put the state and dynamics in the same object and it has turned into a huge headache, so I think this was a good choice!

Yes, I had some previous experience with a similar project in python https://github.com/AeroPython/PyFME and this was one of the lessons learnt there. I still have some concerns with some of the types, but I think time, use cases and user insights will make it clearer with time.

Second, I wanted to ask if it's possible to make ResultsStore an AbstractVector, for example, an AbstractVector{NamedTuple{...}} or maybe even just consider using Vector{NamedTuple{...}} instead of making a ResultsStore type. In this case, if you want a vector of times or states is easy enough to run

times = [r.t for r in results]
states = [r.state for r in results]

or you can still allow access to the vectors with some dataframe-like syntax, e.g., results[!,:states] returns the vector of states.

I have worked with other packages that have introduced their own non-vector types to store trajectories, and they have always been a huge pain to work with.

Yes, I had some doubts with this type. I had in mind implementing the array interface interface, but it is simpler just to use an array. My idea was to implement some plotting, save, load... methods on that type. However, I think that could be accomplished on the Vector also...

In this PR I was concerned with a basic version of the propagator. I will open an issue with some ideas for the results storing soon and will take your advice into account.

Also, why is there a vector of Aircraft objects in a ResultsStore? Can the aircraft change over time?

Well, the aircraft type is still messy. It is used to dispatch on different methods depending on the aircraft type itself and also, it is composed of other types that store current value variables and are also used for dispatch in some cases:

  • total forces and moments
  • the flight control system: I would like to implement autopilots, stability augmentation systems... here in the future. It also stores control values and aerodynamic surfaces deflections.
  • Propulsion system
  • Aerodynamics

In my opinion, a good first step would be to document the aircraft and aircraft related types properly to make this clearer. I think that a clear interface is also necessary. The aircraft implementation was done a t the very beginning of the project and things have evolved a lot, as well as my Julia knowledge.

Happy to talk more about this if you are looking for input!

Really happy to continue talking and getting your insights!

@zsunberg
Copy link

(I added a couple thoughts related to the discussion above in #70 and #71)

@AlexS12 AlexS12 marked this pull request as ready for review July 27, 2020 15:40
@AlexS12 AlexS12 marked this pull request as draft July 27, 2020 15:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants