poliastro / validation

Validation of poliastro against external software.
Apache License 2.0
11 stars 6 forks source link

Orekit validation first approach #4

Closed jorgepiloto closed 3 years ago

jorgepiloto commented 3 years ago

This pull request is a first approach to poliastro's validation path. It makes use of the Orekit python wrapper and implements the following features:

:warning: Orekit does not provide functions like rv2coe or coe2rv, since conversion is done directly in each of the available constructors of the KeplerianOrbit class in the Orekit library :warning:

Also notice the addition of the orekit-data.zip file, which holds necessary data for Orekit to properly work: ephemeris, time files... We might discuss if this data should be included within this repo or final user is required to download it from official channels.

astrojuanlu commented 3 years ago

We might discuss if this data should be included within this repo or final user is required to download it from official channels.

Let's not put it in the repo :pray: Otherwise it will make the whole git history too sluggish. If it's a common Orekit thing we can point to the relevant documentation, or even provide a script to download it.

I'll take a look at this tomorrow!

jorgepiloto commented 3 years ago

I just saw that the Orekit wrapper provides a download data function.

On the other hand, if the setup_orekit_dir() does not find the orekit-data.zip file in the local directory, en error message is shown but no exception is raised. This is weird when trying to manage program workflow...

jorgepiloto commented 3 years ago

Some updates on this PR regarding previous suggestions and feedback

I came up with the following structure:

orekit/
├── README.md
├── requirements.txt
├── src/
└── tests/

The src/ directory holds all logical files while the tests/ one is devoted to validation unit tests. In addition, a pytest.ini and conftest.py files are placed under this last folder, so anyone can run the tests following the same configuration.

Regarding orekit-data.zip:

Let's not put it in the repo pray Otherwise it will make the whole git history too sluggish. If it's a common Orekit thing we can point to the relevant documentation, or even provide a script to download it.

Now, there exists a setup_orekit_env() function under src/utils.py which checks if data is available in local machine. If not, it automatically downloads it from official sources and points orekit internals to data location, which I selected to be within src/data/.

jorgepiloto commented 3 years ago

Sorry, I just forgot to update the README.md installation section guide. I will solve for this this night.

jorgepiloto commented 3 years ago

I just added a propagate() method and its corresponding validation test, which passes without any problem. I think with all these features, we are ready to start building more complex tests such us maneuvers validation.

astrojuanlu commented 3 years ago

Merging! Thanks @jorgepiloto for taking this up and the patience 💪🏽

astrojuanlu commented 3 years ago

Oh, my bad... I now see that we merged orekit-data.zip here.

astrojuanlu commented 3 years ago

:warning: HISTORY OF THIS PULL REQUEST HAS BEEN REWRITTEN :warning: