heliopy.spice.
Trajectory
(target)¶Bases: object
A generic class for the trajectory of a single body.
Objects are initially created using only the body. To perform
the actual trajectory calculation run generate_positions()
.
The generated positions are then available via. the attributes
times
, x
, y
, and z
.
spacecraft (str) – Name of the target. The name must be present in the loaded kernels.
Notes
When an instance of this class is created, a leapseconds kernel and a planets kernel are both automatically loaded.
See also
furnish
for loading in local spice kernels.
Attributes Summary
|
|
Observing body. |
|
Magnitude of position vectors. |
|
Speed (magnitude of velocity vectors). |
|
The body whose coordinates are being calculated. |
|
The list of datetime at which positions were last sampled. |
|
x component of velocity. |
|
y component of velocity. |
|
z component of velocity. |
|
x coordinates of position. |
|
y coordinates of position. |
|
z coordinates of position. |
Methods Summary
|
Convert the positions to different units. |
|
Generate positions from a spice kernel. |
Attributes Documentation
generated
¶True
if positions have been generated, False
otherwise.
observing_body
¶Observing body. The position vectors are all specified relative to this body.
r
¶Magnitude of position vectors.
speed
¶Speed (magnitude of velocity vectors).
target
¶The body whose coordinates are being calculated.
times
¶The list of datetime at which positions were last sampled.
vx
¶x component of velocity.
vy
¶y component of velocity.
vz
¶z component of velocity.
x
¶x coordinates of position.
y
¶y coordinates of position.
z
¶z coordinates of position.
Methods Documentation
change_units
(unit)¶Convert the positions to different units.
unit (astropy.units.Quantity) – Must be a unit of length (e.g. km, m, AU).
generate_positions
(times, observing_body, frame)¶Generate positions from a spice kernel.
times (iterable of datetime) – An iterable (e.g. a list) of datetime objects at which the positions are calculated.
observing_body (str or int) – The observing body. Output position vectors are given relative to the position of this body. See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/naif_ids.html for a list of bodies.
frame (str) – The coordinate system to return the positions in. See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/frames.html for a list of frames.