TwoBodyKeplerElements¶
- class twobody.TwoBodyKeplerElements(*, P=None, a=None, m1=None, m2=None, e=0, omega=None, i=None, Omega=None, M0=None, t0=None, units=None)[source]¶
Bases:
twobody.elements.BaseKeplerElements
Keplerian orbital elements for a two-body system.
You can either specify period,
P
and the massesm1
,m2
, or the separationa
and the two masses.- Parameters
- Pquantity_like [time]
Orbital period.
- aquantity_like [length]
Semi-major axis of the fictitious particle
- enumeric (optional)
Orbital eccentricity. Default is circular,
e=0
.- omegaquantity_like,
Angle
[angle] Argument of pericenter.
- iquantity_like,
Angle
[angle] Inclination of the orbit.
- Omegaquantity_like,
Angle
[angle] Longitude of the ascending node of the fictitious particle.
- M0quantity_like,
Angle
[angle] (optional) Mean anomaly at epoch
t0
. Default is 0º if not specified.- t0quantity-like, numeric,
Time
(optional) Reference epoch. Default is J2000 if not specified.
- units
UnitSystem
, iterable (optional) The unit system to represent quantities in. The default unit system is accessible as
KeplerElements.default_units
.
Attributes Summary
Shorthand for
.get_body('1')
.Shorthand for
.get_body('2')
.Methods Summary
get_body
(num)Get the orbital elements for the specified body.
Attributes Documentation
- M0¶
- Omega¶
- P¶
- a¶
- e¶
- i¶
- m1¶
- m2¶
- names = ['P', 'a', 'e', 'm1', 'm2', 'omega', 'i', 'Omega', 'M0']¶
- omega¶
- primary¶
Shorthand for
.get_body('1')
. Returns the orbital elements for the primary body, which corresponds tom1
(not the more massive of the two).
- secondary¶
Shorthand for
.get_body('2')
. Returns the orbital elements for the secondary body, which corresponds tom2
(not the less massive of the two).
Methods Documentation
- get_body(num)[source]¶
Get the orbital elements for the specified body.
- Parameters
- numstr (‘1’ or ‘2’)
Get the orbital elements of the primary
'1'
or secondary'2'
.
- Returns
- elements
twobody.KeplerElements
- elements