-
Notifications
You must be signed in to change notification settings - Fork 1
Add moon scripts #14
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
Open
ylvaselling
wants to merge
1
commit into
master
Choose a base branch
from
feature/add-moon-scripts
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add moon scripts #14
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Generate Moon Assets | ||
|
|
||
| Python scripts that generate [OpenSpace](https://www.openspaceproject.com/) `.asset` files for Saturn's minor moons, using SPICE kernel data from JPL. | ||
|
|
||
| ## Scripts | ||
|
|
||
| ### `generatemoonassets.py` | ||
|
|
||
| Generates OpenSpace asset files for recently discovered Saturn moons. For each moon it creates: | ||
|
|
||
| - A **RenderableGlobe** scene graph node (body) | ||
| - A **RenderableTrailOrbit** (orbital trail) | ||
| - A **RenderableLabel** (text label, disabled by default) | ||
|
|
||
| All objects are parented to `SaturnBarycenter` and placed under `/Solar System/Planets/Saturn/Minor Moons/<Group> Group/` in the GUI. | ||
|
|
||
| The script contains two ID blocks mapping provisional moon designations to SPICE kernel IDs: | ||
|
|
||
| | Block | IDs | SPICE Kernel | Description | | ||
| |-------|-----|--------------|-------------| | ||
| | `id_block2` | 65094 -- 65157 | `kernels454` (SAT453) | May 2023 discoveries | | ||
| | `id_block` | 65158 -- 65285 | `kernels455` | March 2025 discoveries | | ||
|
|
||
| The active block (`id_block`, parsed on line 225) is split into two output files to keep asset sizes manageable (e.g. `march_2025_discoveries-1.asset` and `march_2025_discoveries-2.asset`). To switch batches, change line 225 to parse `id_block2` instead. | ||
|
|
||
| ### `lookuptable.py` | ||
|
|
||
| A data module exporting a `saturn_moons` dictionary with physical and orbital properties for ~288 Saturn moons. Each entry contains: | ||
|
|
||
| - **group** -- dynamical family (e.g. Norse (Mundilfari), Inuit (Kiviuq), Gallic, inner ring) | ||
| - **orbital_period_days** -- orbital period in days (negative values indicate retrograde orbits) | ||
| - **diameter_km** -- approximate diameter in km | ||
|
|
||
| Groups covered: inner/regular moons, co-orbital, ring-embedded, trojans, Inuit, Gallic, and Norse (with sub-groups Mundilfari, Phoebe, Kari, low-inclination). | ||
|
|
||
| When run standalone it prints a summary table of all moons sorted by orbital period. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| python generatemoonassets.py | ||
| ``` | ||
|
|
||
| This writes two `.asset` files in the current directory. Place them in the appropriate OpenSpace data folder alongside the referenced SPICE kernel and transforms assets. | ||
|
|
||
| ## Dependencies | ||
|
|
||
| - Python 3.6+ (f-strings) | ||
| - No external packages | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This README hard-codes a source line number ("parsed on line 225") as part of the usage instructions. Line numbers are very likely to drift and will make the docs inaccurate; describe the switch in terms of the
ids = ...assignment (or theid_block/id_block2variable names) rather than a specific line number.