mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Add new TimeFrame that parses Spice kernels (#3600)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
-- 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.
|
||||
|
||||
-- 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_Multiple",
|
||||
TimeFrame = {
|
||||
Type = "TimeFrameKernel",
|
||||
CK = {
|
||||
Kernels = {
|
||||
data .. "nh_apf_20150404_20150420_001.bc",
|
||||
data .. "nh_apf_20150420_20150504_001.bc",
|
||||
data .. "new-horizons_1121.tsc"
|
||||
},
|
||||
Reference = "-98000"
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableCartesianAxes"
|
||||
},
|
||||
GUI = {
|
||||
Name = "TimeFrameKernel - Basic (CK, Multiple)",
|
||||
Path = "/Examples"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Node)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(Node)
|
||||
end)
|
||||
@@ -0,0 +1,42 @@
|
||||
-- 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)
|
||||
@@ -0,0 +1,48 @@
|
||||
-- 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)
|
||||
@@ -0,0 +1,42 @@
|
||||
-- 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".
|
||||
|
||||
-- We need a SPICE kernel to work with in this example
|
||||
local data = asset.resource({
|
||||
Name = "Voyager 1 Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "voyager1_spice",
|
||||
Version = 2
|
||||
})
|
||||
|
||||
local Node = {
|
||||
Identifier = "TimeFrameKernel_Example_SPK_Multiple",
|
||||
TimeFrame = {
|
||||
Type = "TimeFrameKernel",
|
||||
SPK = {
|
||||
Kernels = {
|
||||
data .. "vgr1_jup230.bsp",
|
||||
data .. "vgr1_sat337.bsp"
|
||||
},
|
||||
Object = "VOYAGER 1"
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableCartesianAxes"
|
||||
},
|
||||
GUI = {
|
||||
Name = "TimeFrameKernel - Basic (SPK, Multiple)",
|
||||
Path = "/Examples"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Node)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(Node)
|
||||
end)
|
||||
@@ -0,0 +1,40 @@
|
||||
-- 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.
|
||||
|
||||
-- We need a SPICE kernel to work with in this example
|
||||
local data = asset.resource({
|
||||
Name = "Apollo Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_spice",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local Node = {
|
||||
Identifier = "TimeFrameKernel_Example_SPK",
|
||||
TimeFrame = {
|
||||
Type = "TimeFrameKernel",
|
||||
SPK = {
|
||||
Kernels = data .. "apollo15-1.bsp",
|
||||
Object = "-915"
|
||||
}
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableCartesianAxes"
|
||||
},
|
||||
GUI = {
|
||||
Name = "TimeFrameKernel - Basic (SPK)",
|
||||
Path = "/Examples"
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(Node)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(Node)
|
||||
end)
|
||||
Reference in New Issue
Block a user