Add Phobos and Deimos

This commit is contained in:
Alexander Bock
2017-12-26 18:19:15 +01:00
parent dd689b6ac1
commit 5fc297cdcf
4 changed files with 134 additions and 0 deletions

View File

@@ -5,6 +5,8 @@ local sceneHelper = asset.require('util/scene_helper')
asset.require('spice/base')
assetHelper.requestAll(asset, 'scene/solarsystem/sun')
asset.require('scene/solarsystem/planets')
-- asset.require('scene/solarsystem/planets/mars/moons/phobos')
-- asset.require('scene/solarsystem/planets/mars/moons/deimos')
-- asset.require('scene/solarsystem/planets/jupiter/minor_moons')
-- asset.require('scene/solarsystem/planets/saturn/minor_moons')
-- asset.require('scene/solarsystem/planets/uranus/minor_moons')

View File

@@ -0,0 +1,8 @@
local Kernels = asset.syncedResource({
Name = "Mars Spice Kernels",
Type = "TorrentSynchronization",
Identifier = "mat097",
Magnet = "magnet:?xt=urn:btih:308F326B9AF864294D73042FBBED33B17291E27E&dn=mar097.bsp&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.publicbt.com%3a80%2fannounce&tr=udp%3a%2f%2ftracker.ccc.de%3a80%2fannounce"
})
asset.export("Kernels", Kernels .. '/mar097.bsp')

View File

@@ -0,0 +1,62 @@
local transforms = asset.require('../transforms')
local assetHelper = asset.require('util/asset_helper')
local kernels = asset.require('../mar097').Kernels
-- local textures = asset.syncedResource({
-- Name = "Mars Textures",
-- Type = "HttpSynchronization",
-- Identifier = "mars_textures",
-- Version = 1
-- })
local Deimos = {
Name = "Deimos",
Parent = transforms.MarsBarycenter.Name,
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_DEIMOS",
DestinationFrame = "GALACTIC",
Kernels = kernels
},
Translation = {
Type = "SpiceTranslation",
Target = "DEIMOS",
Observer = "MARS BARYCENTER",
Kernels = kernels
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 15, 12.2, 11 },
SegmentsPerPatch = 90,
Layers = {
}
},
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
GuiPath = "/Solar System/Planets/Mars"
}
local DeimosTrail = {
Name = "DeimosTrail",
Parent = transforms.MarsBarycenter.Name,
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Target = "DEIMOS",
Observer = "MARS BARYCENTER"
},
Color = { 1.0, 0.605, 0.420 },
Period = 1.263,
Resolution = 1000
},
Tag = { "moonTrail_solarSystem", "moonTrail_terrestrial", "moonTrail_mars" },
GuiPath = "/Solar System/Planets/Mars"
}
assetHelper.registerSceneGraphNodesAndExport(asset, { Deimos, DeimosTrail })

View File

@@ -0,0 +1,62 @@
local transforms = asset.require('../transforms')
local assetHelper = asset.require('util/asset_helper')
local kernels = asset.require('../mar097').Kernels
-- local textures = asset.syncedResource({
-- Name = "Mars Textures",
-- Type = "HttpSynchronization",
-- Identifier = "mars_textures",
-- Version = 1
-- })
local Phobos = {
Name = "Phobos",
Parent = transforms.MarsBarycenter.Name,
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_PHOBOS",
DestinationFrame = "GALACTIC",
Kernels = kernels
},
Translation = {
Type = "SpiceTranslation",
Target = "PHOBOS",
Observer = "MARS BARYCENTER",
Kernels = kernels
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 27, 22, 18 },
SegmentsPerPatch = 90,
Layers = {
}
},
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
GuiPath = "/Solar System/Planets/Mars"
}
local PhobosTrail = {
Name = "PhobosTrail",
Parent = transforms.MarsBarycenter.Name,
Renderable = {
Type = "RenderableTrailOrbit",
Translation = {
Type = "SpiceTranslation",
Target = "PHOBOS",
Observer = "MARS BARYCENTER"
},
Color = { 1.0, 0.605, 0.420 },
Period = 0.31891023,
Resolution = 1000
},
Tag = { "moonTrail_solarSystem", "moonTrail_terrestrial", "moonTrail_mars" },
GuiPath = "/Solar System/Planets/Mars"
}
assetHelper.registerSceneGraphNodesAndExport(asset, { Phobos, PhobosTrail })