tudat-team / tudatpy-examples

Collection of examples showcasing Tudatpy functionalities. They can be run on mybinder.org as well.
https://tudat-space.readthedocs.io/en/latest/
4 stars 17 forks source link

Move, rename and update tudatpy example applications #1

Closed FilippoOggionni closed 2 years ago

FilippoOggionni commented 2 years ago

Steps needed

  1. Move example applications from here to this repository;
  2. Rename examples with more descriptive names;
  3. Update examples with new tudatpy module names/structure;
  4. Go through examples, add a better initial description and improve inline comments.
  5. Add this repository as a git submodule of tudatpy repo.

Note @DominicDirkx has already updated examples 1, 2 and 10 (.py files) in tudatpy to the new setup, where examples 2 and 10 correspond to the two example applications on the website. Example 2 was renamed to "perturbed_satellite_orbit" (here on the website), example 10 was renamed to "linear_sensitivity_analysis" (here on the website).

FilippoOggionni commented 2 years ago

Update: point 1 is completed (see here).

FilippoOggionni commented 2 years ago

I am taking care of points 2 and 3

FilippoOggionni commented 2 years ago

Update: point 2 and 3 have been completed. I am not very sure about the correctness of the title for the two examples named "Earth-Moon transfer", so if @DominicDirkx and @jo11he can check it would be great. The main priority I had is to make the examples work with the new code, which is the case now.

I would ask @jo11he to take care of step 4 by adding a better description at the top of the file, explaining what this example achieves and how it does it. Some inline comments could also be updated/adjusted/written in a more standard form, but this is lower priority. A good initial description is more important because it lets the user understand what the example application actually does. This is especially critical for the examples that are not presented on the tudat-space website.

I have tried to work on point 5 by adding this file (I followed the tudat-multidoc submodule structure), but for now I was not successful... Could you please help me out @DominicDirkx?

DominicDirkx commented 2 years ago

I've added the examples as a submodule to tudatpy. See, for instance: https://devconnected.com/how-to-add-and-update-git-submodules/

FilippoOggionni commented 2 years ago

Thank you!

@jo11he, could you please close the issue when you complete point 4? It is the only one left.

jo11he commented 2 years ago

Update from me.

In an attempt to pimp the examples with a bit of context and some simple analysis/visualisation of the results I found that it is not really obvious (even to me) what each individual examples is supposed to demonstrate. @DominicDirkx please confirm that I identified the purpose of the individual examples correctly.

I will make these presentable and push them tonight.

The following examples don't seem to produce presentable results:

In particular, in none of the two examples does the s/c get close to the moon. I pushed an updated version of earth_moon_transfer.py (added visualisation of Vehicle and moon trajectories), @DominicDirkx please have a look and let me know how we will go about these examples. Will we try to make them an actual transfer or will we choose a different setting for demonstrating the points of " simple thrust acceleration and basic guidance laws" and "implement a custom environment".

DominicDirkx commented 2 years ago

Hi Jonas,

The list of the first five is entirely correct, although I've been playing around with the re-entry one today, modifying it into a space shuttle example with the guidance we discussed some time ago. It seems to be going ok, and I'll fix it up in the near future. Of the two 'earth-moon transfers', I'm not sure, why they got named like this, nor why there are two of them. I'm working on modifying the first one into an example for orbit-raising using continuous thrust.

jo11he commented 2 years ago

I uploaded the basic keplerian example, which I tried to enrich with a figure and some context. please have a look and tell me what you think.

https://github.com/tudat-team/tudatpy-examples/blob/173779f93261d15404cdbc0c0770f518e7017f17/propagation/keplerian_satellite_orbit.py#L19

DominicDirkx commented 2 years ago

Note that the original (C++) example description was here: http://tudat.tudelft.nl/tutorials/applicationWalkthroughs/index.html The solar system one could stay mostly the same, for the thrust example I have added some additional functionality to showcase the flexible termination conditions

Many of the other examples are yet-to-be-translated

DominicDirkx commented 2 years ago

Looks good, I like the style with the abstract at the beginning. If you could also add some brief lines to the visualizaion part (just some comments on what is plotted), this one can be finalized :) Note that this example is not (yet) shown as an example on teh website. For now, this can stay like this, as it's very similar to the existing introductory example. But, I do think it's nice to have this really basic example in there

jo11he commented 2 years ago

If you allow, I will reformat the example files to adhere to PEP 8 Style Guidelines for Python Code.

jo11he commented 2 years ago

I have worked over

and pushed the finalised versions. I am waiting for @DominicDirkx to give me a "Go" on the example scripts that are currently under reconstruction. :)

DominicDirkx commented 2 years ago

Really nice! I'll be pushing some changes to tudat and tudatpy which are needed for the modifications I made to the entry and thrust examples. I'll let you know when everything is pushed (and the new tudat conda package built) for you to use.

DominicDirkx commented 2 years ago

Hi Jonas, I've pushed the code I wrote for the thrust and entry example, as well as a basic estimation example, to the develop branch of the examples. The thrust one is, I think, ready to be incorporated into website. For the entry one, I'm still making a mistake in the guidance somewhere.

For the solar systemd dynamics one, could you make the plots such that the scale on each axis is the same? Other than that, I think that one's also ready to go. The two existing examples on the website can be updated with any modifications you made, and are then finalized!

FilippoOggionni commented 2 years ago

From my side, I have updated the example page on tudat-space, making clear that the example applications explained thoroughly on the website are only a selection of a broader suite of example applications (available from the dedicated tudatpy-examples repo).

It will be online on tudat-space soon.

FilippoOggionni commented 2 years ago

Also, let's not forget, once the examples are ready, to:

FilippoOggionni commented 2 years ago

New tasks:

jo11he commented 2 years ago

I will do it, it's on my todo list

FilippoOggionni commented 2 years ago

@jo11he what is the status on this?

jo11he commented 2 years ago

Sorry, I did this a while ago but didn't update this here.

To Summarise: I have worked over

meaning they all run on the latest tudatpy, have an "intro" ("abstract"), are properly commented (or what I consider properly) and follow PEP 8 more or less. Furthermore, solar_system_propagation.py is on tudat-space as a documented example showcasing multi-body propagation.

Dominic was working on three more example scripts, which should all be in the example repo:

I don't really insist on finishing these off, meaning I would transfer them to you, @FilippoOggionni or @gaffarelj - if you don't want to dig into estimation, I can take care of that one and its presentation on tudat-space.

jo11he commented 2 years ago

we can coordinate the transition here and then you can assign/unassign yourselves as you please :)

FilippoOggionni commented 2 years ago

Since the original purpose of this issue was to move and rename example applications, I will close this and open a new one. Let's pick it up from there 🙂