New ideas for the object hierarchy - poliastro/poliastro GitHub Wiki

Proposal

  • Body: namedtuple("Body", ["parent", "k", "name", "symbol", "R", ...]) (validity: Universe)
    • Current issues:
      • Notice that many of these properties are optional, but used here and there
      • In fact, in #235 we added **kwargs support for arbitrary properties, and in #763 I dropped them without alternative ☹️
      • Also, not entirely satisfied with that parent that can be None
    • Child classes:
      • SolarSystemPlanet: bodies that are present in the Astropy default ephemeris and other common systems (we should enumerate which ones!) (validity: Solar System)
  • Plane: one of "Earth Equator" or "Earth Ecliptic" (validity: Solar System)
    • Current issues:
      • There's "Body Fixed" as a plane as well, but this doesn't make any sense! I could have a rotating frame with any fundamental plane, we should remove it
  • BaseElementSet: a tuple of 6 elements that determine position and velocity
    • Child classes:
      • ClassicalElementSet
      • CartesianElementSet (or should be RVElementSet?)
      • ...
  • BaseState: Body + ElementSet (validity: Universe)
    • Child classes:
      • ClassicalState
      • RVState (or should be CartesianState?)
      • ...
    • Current issues:
      • In #827 we moved plane to BaseState, but in retrospect this was a mistake because it makes _validity: Solar System_, so we should remove it

In progress

  • FramelessOrbit (can we find a better name?): BaseState + epoch (validity: Universe)
    • Or should this be Orbit?
  • Orbit: FramelessOrbit + "frame" (validity: wherever the frame is defined)
    • Or should this be ReferencedOrbit/FramedOrbit? (I am getting very bad at names)
    • This does not exist yet, as the current Plane system is not flexible enough
    • The main limitation is that we could not pass arbitrary frames that are not inertial
    • Should we allow custom metadata?
  • SolarSystemOrbit: FramelessOrbit + Plane
    • This is what current Orbit objects do
  • EarthOrbit: FramelessOrbit(BaseState(attractor=Earth)) + "frame"
    • Some classmethods from current Orbit do not work, under discussion
    • How to use specific models like atmospheric drag, gravity models, geomagnetic models as outlined in #791?
    • Where do TLEs fit here?

Despite the blurriness of this latest list, it's clear that we would benefit from a "frameless orbit" and using it under composition for other objects.