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:
Don Cross
2022-05-05 12:39:39 -04:00
parent af63d1520f
commit 66eeb3e0a0
6 changed files with 146 additions and 27 deletions

View File

@@ -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. |
---