Files
OpenSpace/data/assets/examples/timeframe/timeframekernel/kernel_ck.asset
2025-04-22 20:47:17 +02:00

43 lines
1.1 KiB
Lua

-- 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.
-- We need a SPICE kernel to work with in this example
local data = asset.resource({
Name = "New Horizons Kernels",
Type = "HttpSynchronization",
Identifier = "newhorizons_kernels",
Version = 1
})
local Node = {
Identifier = "TimeFrameKernel_Example_CK",
TimeFrame = {
Type = "TimeFrameKernel",
CK = {
Kernels = {
data .. "nh_apf_20150404_20150420_001.bc",
data .. "new-horizons_1121.tsc",
},
Reference = "-98000"
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "TimeFrameKernel - Basic (CK)",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)