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

Creating Ephemerides settings using JPL Horizons #112

Merged
merged 23 commits into from
Oct 30, 2023

Conversation

tristandijkstra
Copy link
Contributor

This PR adds an interface to JPL's Horizons System. For now, the vectors API has been implemented, building upon the features of Astroqueries' implementation. Other Horizons features will be added in future. An issue will be opened soon where planned features will be listed. For now, the new HorizonsQuery (single-body) and HorizonsBatch (multi-body) classes feature:

  • Retrieval of Horizons System generated state vectors for any time and any body (including spacecraft) available in the Horizons System.
  • Creation of tabulated ephemeris settings for any of these bodies for use in Tudat.
  • An extended query option which bypasses Horizon's output limit by automatically creating subqueries.
  • Extensive input handling and processing to enable simple addition of future features.

This PR is related to the new MPC interface (#110), both included in Tudat's new data submodule. A future PR in the examples repository covering the advanced use of the MPC interface will showcase the features of this PR.

@tristandijkstra tristandijkstra marked this pull request as draft September 28, 2023 20:01
@DominicDirkx
Copy link
Member

Small comment on this, there's an open pull request:

#116

which allows for the merging of native Python and C++ code into a single submodule. Once this is merged and tested, I'd like to extend this pull request with one additional function in this submodule: https://py.api.tudat.space/en/stable/ephemeris.html#functions (named, for instance jpl_horizons), which then calls the HorizonsQuery.create_ephemeris_tabulated function.


return raw

def carthesian(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> cartesian :)

@DominicDirkx
Copy link
Member

This all looks very good! I found one spelling error in a function name, but other than that, I think this can be merged (once #110 is merged)!

When this and #116 are succesfully merged, we can add the function to https://py.api.tudat.space/en/stable/ephemeris.html that I mentioned in my previous post (but we can merge this PR before doing so).

@alopezrivera
Copy link
Contributor

Hi! Nice feature! When performing optimizations with many propagations it would be convenient to avoid re-downloading the JPL Horizons ephemerides as many times.
Would it be possible to serialize/save in some other way the data obtained from JPL Horizons to load it back when running further simulations using the same ephemerides?

@tristandijkstra
Copy link
Contributor Author

Hi Antonio,

This would indeed be a useful feature. The first thing that comes to mind is saving it to a csv/parquet/etc and then having a query.load method. But this feels a bit cheap. Maybe it would be best to do this at the ephemeris level?

It could work to directly cache start, end, timestep queries, for other types of queries this might be difficult. I'm open to suggestions on the format of saving the cached files, maybe you have some ideas? Also, this would be in a subsequent PR.

@alopezrivera
Copy link
Contributor

Hi Tristan, I agree it would be best to do it at the pehemeris level. As to file formats, in ml it's pretty common to pickle data and I really like that way of doing things. I haven't worked with more specific file formats for this case. Maybe @DominicDirkx would have a suggestion?

@DominicDirkx DominicDirkx merged commit 58b5770 into tudat-team:develop Oct 30, 2023
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants