mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-05-19 14:27:52 -04:00
Python: Jupiter's moons returned by name
It makes more sense to report Jupiter's moons with individually named structure fields rather than an array. It reduces the overall code and documentation size, and outside of unit testing, there are few cases where iterating over an array of moons is more lucid than using the names of the moons. This is a breaking change, but hopefully very few developers are using this function yet. Fixing the breakage is very simple. Also added operator overloads for adding and subtracting StateVector, just like we already had for Vector.
This commit is contained in:
@@ -507,7 +507,10 @@ and the velocities in AU/day.
|
||||
|
||||
| Type | Attribute | Description |
|
||||
| --- | --- | --- |
|
||||
| [`StateVector[4]`](#StateVector[4]) | `moon` | An array of state vectors, one for each of the four major moons of Jupiter, in the following order: 0=Io, 1=Europa, 2=Ganymede, 3=Callisto. |
|
||||
| [`StateVector`](#StateVector) | `io` | The position and velocity of Jupiter's moon Io. |
|
||||
| [`StateVector`](#StateVector) | `europa` | The position and velocity of Jupiter's moon Europa. |
|
||||
| [`StateVector`](#StateVector) | `ganymede` | The position and velocity of Jupiter's moon Ganymede. |
|
||||
| [`StateVector`](#StateVector) | `callisto` | The position and velocity of Jupiter's moon Callisto. |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user