Skip to content

Instantly share code, notes, and snippets.

@translunar
Created April 25, 2019 17:55
Show Gist options
  • Save translunar/c07dadb637cb96c1c858e7dc54def923 to your computer and use it in GitHub Desktop.
Save translunar/c07dadb637cb96c1c858e7dc54def923 to your computer and use it in GitHub Desktop.
# -3700: NOVA-C (for 3700 Bay Area Blvd)
# 399: Earth
# J2000: inertial frame
x_eci = spice.spkez(-3700, et, 'J2000', 'NONE', 399)[0]
x_lci = spice.spkez(-3700, et, 'J2000', 'NONE', 301)[0]
# contains position and velocity information in an np array
# Get 3x3 DCM for position only
Tr_inrtl_to_body = spice.pxform('J2000', 'NOVAC_SPACECRAFT', et)
# Get 6x6 for position and velocity
Tx_inrtl_to_body = spice.sxform('J2000', 'NOVAC_SPACECRAFT', et)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment