SpiceTranslation

Inherits Translation

Members

Name

Documentation

Type

Description

Optional

Observer

This is the SPICE NAIF name for the parent of the body whose translation is to be computed by the SpiceTranslation. It can either be a fully qualified name (such as ‘SOLAR SYSTEM BARYCENTER’) or a NAIF integer id code (such as ‘0’).

String, or Integer

Value of type ‘String’, or Value of type ‘Integer’

No

Target

This is the SPICE NAIF name for the body whose translation is to be computed by the SpiceTranslation. It can either be a fully qualified name (such as ‘EARTH’) or a NAIF integer id code (such as ‘399’).

String, or Integer

Value of type ‘String’, or Value of type ‘Integer’

No

FixedDate

String

A date to lock the position to

Yes

Frame

String

A valid SPICE NAIF name for a reference frame

Yes

Inherited members from Translation

Name

Documentation

Type

Description

Optional

Type

The type of translation that is described in this element. The available types of translations depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation

String

Must name a valid Translation type

No

Asset Examples

Basic

This asset creates a time-varying translation with information from a SPICE kernel and applies it to a SceneGraphNode that only displays coordinate axes. The position of the coordinate axes are determined by SPICE, in this case pretending that the axes are orbiting the same way the Moon does around Earth. For more information about SPICE see: https://naif.jpl.nasa.gov/naif/

 1-- Load the default SPICE kernels, which are the planetary constants and the DE430 kernel
 2asset.require("spice/core")
 3
 4local Node = {
 5  Identifier = "SpiceTranslation_Example",
 6  Transform = {
 7    Translation = {
 8      Type = "SpiceTranslation",
 9      Target = "MOON",
10      Observer = "EARTH"
11    }
12  },
13  Renderable = {
14    Type = "RenderableCartesianAxes"
15  },
16  GUI = {
17    Name = "SpiceTranslation - Basic",
18    Path = "/Examples"
19  }
20}
21
22asset.onInitialize(function()
23  openspace.addSceneGraphNode(Node)
24end)
25
26asset.onDeinitialize(function()
27  openspace.removeSceneGraphNode(Node)
28end)
Reference Frame

This asset creates a time-varying translation with information from a SPICE kernel and applies it to a SceneGraphNode that only displays coordinate axes. The position of the coordinate axes are determined by SPICE, in this case pretending that the axes are orbiting the same way the Moon does around Earth. The calculated position will be provided in the rotating coordinate system of Earth itself. For more information about SPICE see: https://naif.jpl.nasa.gov/naif/

 1-- Load the default SPICE kernels, which are the planetary constants and the DE430 kernel
 2asset.require("spice/core")
 3
 4local Node = {
 5  Identifier = "SpiceTranslation_Example_ReferenceFrame",
 6  Transform = {
 7    Translation = {
 8      Type = "SpiceTranslation",
 9      Target = "MOON",
10      Observer = "EARTH",
11      Frame = "IAU_EARTH"
12    }
13  },
14  Renderable = {
15    Type = "RenderableCartesianAxes"
16  },
17  GUI = {
18    Name = "SpiceTranslation - Reference Frame",
19    Path = "/Examples"
20  }
21}
22
23asset.onInitialize(function()
24  openspace.addSceneGraphNode(Node)
25end)
26
27asset.onDeinitialize(function()
28  openspace.removeSceneGraphNode(Node)
29end)
Fixed Date

This asset creates a time-varying translation with information from a SPICE kernel and applies it to a SceneGraphNode that only displays coordinate axes. The position of the coordinate axes are determined by SPICE, in this case pretending that the axes are orbiting the same way the Moon does around Earth. In this specific example, the position is independent of the actual in-game time in OpenSpace and only uses a fixed date of 2000 JAN 01 instead. For more information about SPICE see: https://naif.jpl.nasa.gov/naif/

 1-- Load the default SPICE kernels, which are the planetary constants and the DE430 kernel
 2asset.require("spice/core")
 3
 4local Node = {
 5  Identifier = "SpiceTranslation_Example_FixedDate",
 6  Transform = {
 7    Translation = {
 8      Type = "SpiceTranslation",
 9      Target = "MOON",
10      Observer = "EARTH",
11      FixedDate = "2000 JAN 01 00:00:00.000"
12    }
13  },
14  Renderable = {
15    Type = "RenderableCartesianAxes"
16  },
17  GUI = {
18    Name = "SpiceTranslation - Fixed Date",
19    Path = "/Examples"
20  }
21}
22
23asset.onInitialize(function()
24  openspace.addSceneGraphNode(Node)
25end)
26
27asset.onDeinitialize(function()
28  openspace.removeSceneGraphNode(Node)
29end)