TimeFrameKernel
Inherits TimeFrame
Members
Inherited members from TimeFrame
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
The type of the time frame that is described in this element. The available types of scaling depend on the configuration of the application and can be written to disk on application startup into the FactoryDocumentation |
|
Must name a valid TimeFrame type |
No |
Asset Examples
SPK Basic
This example creates a time frame based on the information provided by a single SPICE kernel file. The created scene graph node will only be valid whenever the provided kernel contains information about object “-915”, which is Apollo 15. In this specific case, the Apollo15 kernel contains two windows of valid data, both of which are used by this time frame.
1-- We need a SPICE kernel to work with in this example
2local data = asset.resource({
3 Name = "Apollo Kernels",
4 Type = "HttpSynchronization",
5 Identifier = "apollo_spice",
6 Version = 1
7})
8
9local Node = {
10 Identifier = "TimeFrameKernel_Example_SPK",
11 TimeFrame = {
12 Type = "TimeFrameKernel",
13 SPK = {
14 Kernels = data .. "apollo15-1.bsp",
15 Object = "-915"
16 }
17 },
18 Renderable = {
19 Type = "RenderableCartesianAxes"
20 },
21 GUI = {
22 Name = "TimeFrameKernel - Basic (SPK)",
23 Path = "/Examples"
24 }
25}
26
27asset.onInitialize(function()
28 openspace.addSceneGraphNode(Node)
29end)
30
31asset.onDeinitialize(function()
32 openspace.removeSceneGraphNode(Node)
33end)
CK Basic
This example creates a time frame based on the information provided by a single SPICE kernel file. The created scene graph node will only be valid whenever the provided kernel contains information about about the reference frame “-98000”, which is the interial orientation frame for the New Horizons spacecraft.
1-- We need a SPICE kernel to work with in this example
2local data = asset.resource({
3 Name = "New Horizons Kernels",
4 Type = "HttpSynchronization",
5 Identifier = "newhorizons_kernels",
6 Version = 1
7})
8
9local Node = {
10 Identifier = "TimeFrameKernel_Example_CK",
11 TimeFrame = {
12 Type = "TimeFrameKernel",
13 CK = {
14 Kernels = {
15 data .. "nh_apf_20150404_20150420_001.bc",
16 data .. "new-horizons_1121.tsc",
17 },
18 Reference = "-98000"
19 }
20 },
21 Renderable = {
22 Type = "RenderableCartesianAxes"
23 },
24 GUI = {
25 Name = "TimeFrameKernel - Basic (CK)",
26 Path = "/Examples"
27 }
28}
29
30asset.onInitialize(function()
31 openspace.addSceneGraphNode(Node)
32end)
33
34asset.onDeinitialize(function()
35 openspace.removeSceneGraphNode(Node)
36end)
Combined example
This example creates a time frame based on the information provided by multiple SPICE kernel files. The created scene graph node will only be valid whenever the provided kernels contain information positional information about the object “JUICE” as well as orientation information for the reference frame “-28002” which is the measured attitude for the JUICE spacecraft. The time frame will only be valid if both pieces of data are available.
1-- We need a SPICE kernel to work with in this example
2local data = asset.resource({
3 Name = "JUICE Kernels",
4 Type = "HttpSynchronization",
5 Identifier = "juice_kernels",
6 Version = 2
7})
8
9local Node = {
10 Identifier = "TimeFrameKernel_Example_Combined_SPK-CK",
11 TimeFrame = {
12 Type = "TimeFrameKernel",
13 SPK = {
14 Kernels = data .. "juice_orbc_000031_230414_310721_v03.bsp",
15 Object = "JUICE"
16 },
17 CK = {
18 Kernels = {
19 data .. "juice_sc_meas_230413_230415_s230414_v01.bc",
20 data .. "juice_step_230414_v01.tsc"
21 },
22 Reference = "-28002"
23 }
24 },
25 Renderable = {
26 Type = "RenderableCartesianAxes"
27 },
28 GUI = {
29 Name = "TimeFrameKernel - Combined (SPK+CK)",
30 Path = "/Examples"
31 }
32}
33
34asset.onInitialize(function()
35 openspace.addSceneGraphNode(Node)
36end)
37
38asset.onDeinitialize(function()
39 openspace.removeSceneGraphNode(Node)
40end)
CK Multiple
This example creates a time frame based on the information provided by multiple SPICE kernel files that contain orientation information about the same object. The created scene graph node will only be valid whenever any window in any of the provided kernels contains information about refernence frame “-98000”, which is the intertial orientation frame for the New Horizons spacecraft.
1-- We need a SPICE kernel to work with in this example
2local data = asset.resource({
3 Name = "New Horizons Kernels",
4 Type = "HttpSynchronization",
5 Identifier = "newhorizons_kernels",
6 Version = 1
7})
8
9local Node = {
10 Identifier = "TimeFrameKernel_Example_CK_Multiple",
11 TimeFrame = {
12 Type = "TimeFrameKernel",
13 CK = {
14 Kernels = {
15 data .. "nh_apf_20150404_20150420_001.bc",
16 data .. "nh_apf_20150420_20150504_001.bc",
17 data .. "new-horizons_1121.tsc"
18 },
19 Reference = "-98000"
20 }
21 },
22 Renderable = {
23 Type = "RenderableCartesianAxes"
24 },
25 GUI = {
26 Name = "TimeFrameKernel - Basic (CK, Multiple)",
27 Path = "/Examples"
28 }
29}
30
31asset.onInitialize(function()
32 openspace.addSceneGraphNode(Node)
33end)
34
35asset.onDeinitialize(function()
36 openspace.removeSceneGraphNode(Node)
37end)
SPK Multiple
This example creates a time frame based on the information provided by multiple SPICE kernel files that contain position information about the same object. The created scene graph node will only be valid whenever any window in any of the provided kernels contains information about object “VOYAGER 1”.
1-- We need a SPICE kernel to work with in this example
2local data = asset.resource({
3 Name = "Voyager 1 Kernels",
4 Type = "HttpSynchronization",
5 Identifier = "voyager1_spice",
6 Version = 2
7})
8
9local Node = {
10 Identifier = "TimeFrameKernel_Example_SPK_Multiple",
11 TimeFrame = {
12 Type = "TimeFrameKernel",
13 SPK = {
14 Kernels = {
15 data .. "vgr1_jup230.bsp",
16 data .. "vgr1_sat337.bsp"
17 },
18 Object = "VOYAGER 1"
19 }
20 },
21 Renderable = {
22 Type = "RenderableCartesianAxes"
23 },
24 GUI = {
25 Name = "TimeFrameKernel - Basic (SPK, Multiple)",
26 Path = "/Examples"
27 }
28}
29
30asset.onInitialize(function()
31 openspace.addSceneGraphNode(Node)
32end)
33
34asset.onDeinitialize(function()
35 openspace.removeSceneGraphNode(Node)
36end)