SpiceRotation

Inherits Rotation

Members

Name

Documentation

Type

Description

Optional

SourceFrame

This value specifies the source frame that is used as the basis for the coordinate transformation. This has to be a valid SPICE name

String

A valid SPICE NAIF name or integer

No

DestinationFrame

This value specifies the destination frame that is used for the coordinate transformation. This has to be a valid SPICE name. If this value is not specified, a reference frame of ‘GALACTIC’ is used instead

String

Value of type ‘String’

Yes

FixedDate

A time to lock the rotation to. Setting this to an empty string will unlock the time and return to rotation based on current simulation time

String

A time to lock the rotation to

Yes

TimeFrame

The time frame in which the spice kernels are valid

Table

TimeFrame

Yes

Inherited members from Rotation

Name

Documentation

Type

Description

Optional

Type

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

String

Must name a valid Rotation type

No

Asset Examples

 1local transforms = asset.require("./transforms")
 2local sun = asset.require("scene/solarsystem/sun/transforms")
 3local kernels = asset.require("./kernels")
 4local coreKernels = asset.require("spice/core")
 5
 6
 7
 8local models = asset.resource({
 9  Name = "Bennu Models",
10  Type = "HttpSynchronization",
11  Identifier = "bennu_models",
12  Version = 2
13})
14
15
16local Bennu = {
17  Identifier = "Bennu",
18  Parent = transforms.BennuBarycenter.Identifier,
19  Transform = {
20    Rotation = {
21      Type = "SpiceRotation",
22      SourceFrame = kernels.Frame.Bennu,
23      DestinationFrame = coreKernels.Frame.Galactic
24    }
25  },
26  Renderable = {
27    Type = "RenderableModel",
28    Enabled = false,
29    GeometryFile = models .. "Bennu_v20_200k_an.obj",
30    LightSources = {
31      sun.LightSource
32    },
33    SpecularIntensity = 0.0
34  },
35  GUI = {
36    Path = "/Solar System/Asteroid"
37  }
38}
39
40
41asset.onInitialize(function()
42  openspace.addSceneGraphNode(Bennu)
43end)
44
45asset.onDeinitialize(function()
46  openspace.removeSceneGraphNode(Bennu)
47end)
48
49asset.export(Bennu)