Files
OpenSpace/assets/sun/transforms.asset
2017-11-17 00:15:54 +01:00

34 lines
868 B
Plaintext

local assetHelper = asset.require("assethelper")
asset.require("spice/base")
-- Barycenter of the solar system, expressed in the Galactic frame
local SolarSystemBarycenter = {
Name = "SolarSystemBarycenter"
-- No parent; this node is attached to the scene graph root
}
-- Spice frame for the Sun
local SunIau = {
Name = "SunIau",
Parent = SolarSystemBarycenter.Name,
Transform = {
Translation = {
Type = "SpiceTranslation",
Target = "SUN",
Observer = "SSB",
},
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_SUN",
DestinationFrame = "GALACTIC"
}
}
}
assetHelper.registerSceneGraphNodes(asset, {
SolarSystemBarycenter,
SunIau
})
asset.export("SolarSystemBarycenter", SolarSystemBarycenter)
asset.export("SunIau", SunIau)