openspace.spice

Functions overview

Name

Documentation

convertTLEtoSPK

This function converts a TLE file into SPK format and saves it at the provided path

kernels

Returns a list of all loaded kernels

loadKernel

Loads the provided SPICE kernel by name

position

Returns the position for a given body relative to another body, in a given frame of reference, at a specific time

rotationMatrix

Returns the rotationMatrix for a given body in a frame of reference at a specific time

spiceBodies

Returns a list of Spice Bodies loaded into the system

unloadKernel

Unloads the provided SPICE kernel

Functions

convertTLEtoSPK

This function converts a TLE file into SPK format and saves it at the provided path. The last parameter is only used if there are multiple craft specified in the provided TLE file and is selecting which (0-based index) of the list to create a kernel from.

This function returns the SPICE ID of the object for which the kernel was created

Parameters
  • tle Path

  • spk Path

  • elementToExtract Integer? - Default value: 0

Return type: Integer

Signature
openspace.spice.convertTLEtoSPK(tle, spk, elementToExtract)

kernels

Returns a list of all loaded kernels

Return type: Path[]

Signature
openspace.spice.kernels()

loadKernel

Loads the provided SPICE kernel by name. The name can contain path tokens, which are automatically resolved.

Parameters
  • kernel String | String[]

Return type: void

Signature
openspace.spice.loadKernel(kernel)

position

Returns the position for a given body relative to another body, in a given frame of reference, at a specific time. Example: openspace.spice.position(‘INSIGHT’, ‘MARS’,’ GALACTIC’, ‘2018 NOV 26 19:45:34’)

Parameters
  • target String

  • observer String

  • frame String

  • date String

Return type: vec3

Signature
openspace.spice.position(target, observer, frame, date)

rotationMatrix

Returns the rotationMatrix for a given body in a frame of reference at a specific time. Example: openspace.spice.rotationMatrix(‘INSIGHT_LANDER_CRUISE’,’MARS’, ‘2018 NOV 26 19:45:34’)

Parameters
  • body String

  • frame String

  • date String

Return type: mat3x3

Signature
openspace.spice.rotationMatrix(body, frame, date)

spiceBodies

Returns a list of Spice Bodies loaded into the system. Returns SPICE built in frames if builtInFrames. Returns User loaded frames if !builtInFrames.

Parameters
  • includeBuiltIn Boolean

Return type: String -> String

Signature
openspace.spice.spiceBodies(includeBuiltIn)

unloadKernel

Unloads the provided SPICE kernel. The name can contain path tokens, which are automatically resolved.

Parameters
  • kernel String | String[]

Return type: void

Signature
openspace.spice.unloadKernel(kernel)