Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move, rename and update tudatpy example applications #1

Closed
FilippoOggionni opened this issue Oct 23, 2021 · 22 comments
Closed

Move, rename and update tudatpy example applications #1

FilippoOggionni opened this issue Oct 23, 2021 · 22 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@FilippoOggionni
Copy link
Member

FilippoOggionni commented Oct 23, 2021

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 FilippoOggionni added the documentation Improvements or additions to documentation label Oct 23, 2021
@FilippoOggionni
Copy link
Member Author

Update: point 1 is completed (see here).

@FilippoOggionni
Copy link
Member Author

I am taking care of points 2 and 3

@FilippoOggionni
Copy link
Member Author

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
Copy link
Member

DominicDirkx commented Oct 25, 2021

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

@FilippoOggionni
Copy link
Member Author

Thank you!

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

@jo11he
Copy link
Collaborator

jo11he commented Oct 25, 2021

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.

  • keplerian_satellite_orbit.py
    demonstrates: setup most basic propagation in two-body system
  • perturbed_satellite_orbit.py
    demonstrates: use of extensive acceleration models incl natural perturbers
  • linear_sensitivity_analysis.py
    demonstrates: use of Variational Equations and Sensitivity Analysis
  • solar_system_propagation.py
    demonstrates: multi-body propagation & propagation variants
  • reentry_trajectory.py
    demonstrates: use of aerodynamic vehicle interface with environment

I will make these presentable and push them tonight.

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

  • earth_moon_transfer.py
    demonstrates: implement simple thrust acceleration and basic guidance laws
  • earth_moon_transfer_custom_environment_settings.py
    demonstrates: implement a custom environment

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
Copy link
Member

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
Copy link
Collaborator

jo11he commented Oct 25, 2021

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.

@DominicDirkx
Copy link
Member

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
Copy link
Member

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
Copy link
Collaborator

jo11he commented Oct 25, 2021

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

@jo11he
Copy link
Collaborator

jo11he commented Oct 25, 2021

I have worked over

  • keplerian_satellite_orbit.py
  • perturbed_satellite_orbit.py
  • linear_sensitivity_analysis.py
  • solar_system_propagation.py

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
Copy link
Member

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
Copy link
Member

DominicDirkx commented Oct 26, 2021

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
Copy link
Member Author

FilippoOggionni commented Oct 26, 2021

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
Copy link
Member Author

FilippoOggionni commented Oct 26, 2021

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

  • Merge (and possibly delete) the develop branch

@FilippoOggionni FilippoOggionni removed their assignment Nov 5, 2021
@FilippoOggionni
Copy link
Member Author

FilippoOggionni commented Nov 5, 2021

New tasks:

  • delete develop branch, if necessary (@DominicDirkx could you do it if you deem necessary? I see you have merged it)
  • document multibody example and add it to the tudat-space, it will be useful for Numerical Astrodynamics (do you want to do it @jo11he? We did not assign this during the meeting)

@jo11he
Copy link
Collaborator

jo11he commented Nov 8, 2021

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

@FilippoOggionni
Copy link
Member Author

@jo11he what is the status on this?

@jo11he
Copy link
Collaborator

jo11he commented Dec 27, 2021

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

To Summarise:
I have worked over

  • keplerian_satellite_orbit.py
  • perturbed_satellite_orbit.py
  • linear_sensitivity_analysis.py
  • solar_system_propagation.py

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:

  • an estimation script , which is ready to be formatted in the same style as the example scripts listed above and even incorporated as a guided estimation example on tudat-space
  • a thrust (orbit raising) script, which is ready to be formatted in the same style as the example scripts listed above
  • a reentry script, which has an issue with the guidance scheme and is therefore not ready for publishing ( but could still be styled)

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
Copy link
Collaborator

jo11he commented Dec 27, 2021

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

@FilippoOggionni
Copy link
Member Author

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 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants