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

49 lines
1.3 KiB
Lua

-- 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.
-- We need a SPICE kernel to work with in this example
local data = asset.resource({
Name = "JUICE Kernels",
Type = "HttpSynchronization",
Identifier = "juice_kernels",
Version = 2
})
local Node = {
Identifier = "TimeFrameKernel_Example_Combined_SPK-CK",
TimeFrame = {
Type = "TimeFrameKernel",
SPK = {
Kernels = data .. "juice_orbc_000031_230414_310721_v03.bsp",
Object = "JUICE"
},
CK = {
Kernels = {
data .. "juice_sc_meas_230413_230415_s230414_v01.bc",
data .. "juice_step_230414_v01.tsc"
},
Reference = "-28002"
}
},
Renderable = {
Type = "RenderableCartesianAxes"
},
GUI = {
Name = "TimeFrameKernel - Combined (SPK+CK)",
Path = "/Examples"
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(Node)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(Node)
end)