How to load the JUICE orbit and attitude

Loading orbit

  1. Setup the SpiceyPy.

pip install "git+https://github.com/AndrewAnnex/SpiceyPy.git"
  1. Prepare kernels.

Needed kernels are

  • ‘de421.bsp’

  • ‘jse_111130.tf’

  • ‘jup230l.bsp’

  • ‘mantra_juice_jup_a5d_141a_lau_c5e_016.bsp’

  • ‘naif0009.tls’

  • ‘pck00010.tpc’

  1. Newly create a file by text editor as follows, and save it as “juice.mk”.

KPL/MK
\begindata
  PATH_VALUES = ( '.' )
  PATH_SYMBOLS = ( 'KERNELS' )
  KERNELS_TO_LOAD = (
        '$KERNELS/de421.bsp'
        '$KERNELS/jse_111130.tf'
        '$KERNELS/jup230l.bsp'
        '$KERNELS/mantra_juice_jup_a5d_141a_lau_c5e_016.bsp'
        '$KERNELS/naif0009.tls'
        '$KERNELS/pck00010.tpc'
  )
  1. Start python!

ipython
  1. Initialize the JUICE spice kernels.

>>> from irfpy.juice import jspice as js
>>> js.init(mkkernel='./juice.mk')

6. To get the spacecraft position seen from some body in a specific frame can be retrieved by irfpy.juice.jspice.get_position() function.

>>> import datetime
>>> t = datetime.datetime(2031, 5, 10, 1, 20, 0)    # 2031-05-10T01:20:00
>>> js.get_position(t, target='JUICE', origin='JUPITER', frame='JSE')
array([ 753430.83362161, -790039.59240909,   17587.96798178])
  1. To get the spacecraft velocity vector seen from some body, use irfpy.juice.jspice.get_velocity() function.

>>> js.get_velocity(t, target='JUICE', origin='JUPITER', frame='JSE')
array([  4.98295226,  11.23419393,   3.6634433 ])
  1. To get the conversion matrix, use irfpy.juice.jspice.get_conversion_matrix() function.

>>> js.get_conversion_matrix(t, from_frame='JSE', to_frame='IAU_JUPITER')
array([[ 0.26772223,  0.96334943, -0.01681298],
       [-0.96242748,  0.26656293, -0.05174498],
       [-0.04536678,  0.03003456,  0.99851879]])