mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Added apollo 11 CSM orbits and mock LEM decent (#901)
This commit is contained in:
committed by
Alexander Bock
parent
56cdf560a5
commit
9b1c3efeb2
@@ -6,6 +6,7 @@ local sceneHelper = asset.require('util/scene_helper')
|
||||
-- local station2 = asset.require('scene/solarsystem/missions/apollo/bouldersstation2')
|
||||
-- local station6 = asset.require('scene/solarsystem/missions/apollo/bouldersstation6')
|
||||
-- local station7 = asset.require('scene/solarsystem/missions/apollo/bouldersstation7')
|
||||
asset.require('scene/solarsystem/missions/apollo/apollo11')
|
||||
asset.require('scene/solarsystem/missions/apollo/a11_lem')
|
||||
asset.require('scene/solarsystem/missions/apollo/a17_lem')
|
||||
asset.require('scene/solarsystem/missions/apollo/apollo_globebrowsing')
|
||||
@@ -26,6 +27,8 @@ local Keybindings = {
|
||||
Command = "openspace.setPropertyValue('Scene.Moon.Renderable.Layers.ColorLayers.A17_*.Enabled', false);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', false);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', false);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Apollo11MoonTrail.Renderable.Enabled', false);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Apollo11LemTrail.Renderable.Enabled', false);"..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', false);",
|
||||
Documentation = "Disable apollo site on moon when switching",
|
||||
Name = "Disable Apollo site",
|
||||
@@ -39,7 +42,9 @@ local Keybindings = {
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', true);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.11);" ..
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo11LemModel');" ..
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);",
|
||||
"openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Apollo11MoonTrail.Renderable.Enabled', true);" ..
|
||||
"openspace.setPropertyValueSingle('Scene.Apollo11LemTrail.Renderable.Enabled', true);",
|
||||
Documentation = "Setup for A11 site",
|
||||
Name = "Setup A11 site",
|
||||
GuiPath = "/Missions/Apollo/11",
|
||||
@@ -77,7 +82,7 @@ asset.onInitialize(function ()
|
||||
|
||||
sceneHelper.bindKeys(Keybindings)
|
||||
|
||||
openspace.markInterestingNodes({ "Apollo11LemModel", "Apollo17LemModel" })
|
||||
openspace.markInterestingNodes({ "Moon", "Apollo11LemModel", "Apollo17LemModel", "Apollo11", "Apollo11LunarLander" })
|
||||
|
||||
-- To enable both sites by default, uncomment these lines
|
||||
-- openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode', 0.000000);
|
||||
@@ -102,5 +107,5 @@ asset.onInitialize(function ()
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
openspace.removeInterestingNodes({ "Apollo11Lem", "Apollo17Lem" })
|
||||
openspace.removeInterestingNodes({ "Moon", "Apollo11Lem", "Apollo17Lem", "Apollo11", "Apollo11LunarLander" })
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
|
||||
|
||||
asset.require('spice/base')
|
||||
|
||||
local kernelsFolder = asset.syncedResource({
|
||||
Name = "Apollo Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_11_spice",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local modelFolder = asset.syncedResource({
|
||||
Name = "Apollo Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "apollo_11_models",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local kernels = {
|
||||
kernelsFolder .. "/moon_080317.tf",
|
||||
kernelsFolder .. "/apollo_naif_ids.tf",
|
||||
kernelsFolder .. "/moon_pa_de421_1900-2050.bpc",
|
||||
kernelsFolder .. '/apollo11_orbits_full9km.bsp',
|
||||
kernelsFolder .. '/apollo11_orbits_lm9km.bsp',
|
||||
}
|
||||
|
||||
local apolloSpiceId = "-911"
|
||||
local apolloLemSpiceId = "-911500"
|
||||
|
||||
local Apollo11Position = {
|
||||
Identifier = "Apollo11Position",
|
||||
Parent = "Moon",
|
||||
TimeFrame = {
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "1969 JUL 19 19:38:29.183",
|
||||
End = "1969 JUL 22 04:55:35.183"
|
||||
},
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloSpiceId,
|
||||
Observer = "MOON",
|
||||
Frame = "MOON_ME",
|
||||
Kernels = kernels
|
||||
},
|
||||
},
|
||||
GUI = {
|
||||
Hidden = true,
|
||||
Name = "Apollo 11",
|
||||
Path = "/Solar System/Missions/Apollo/11"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo11Model = {
|
||||
Identifier = "Apollo11",
|
||||
Parent = Apollo11Position.Identifier,
|
||||
Transform = {
|
||||
Scale = {
|
||||
Type = "StaticScale",
|
||||
Scale = 20.0
|
||||
}
|
||||
},
|
||||
TimeFrame = {
|
||||
Type = "TimeFrameInterval",
|
||||
Start = "1969 JUL 19 19:38:29.183",
|
||||
End = "1969 JUL 22 04:55:35.183"
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
Geometry = {
|
||||
Type = "MultiModelGeometry",
|
||||
GeometryFile = modelFolder .. "/Apollo_CSM_shrunk_rotated_xy_double_size.obj"
|
||||
},
|
||||
ColorTexture = modelFolder .. "/gray.png",
|
||||
LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
|
||||
},
|
||||
GUI = {
|
||||
Hidden = false,
|
||||
Name = "Apollo 11 CSM",
|
||||
Path = "/Solar System/Missions/Apollo/11"
|
||||
}
|
||||
}
|
||||
|
||||
local Apollo11MoonTrail = {
|
||||
Identifier = "Apollo11MoonTrail",
|
||||
Parent = "Moon",
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloSpiceId,
|
||||
Observer = "MOON",
|
||||
Frame = "IAU_MOON",
|
||||
Kernels = kernels
|
||||
},
|
||||
Color = { 0.180000,0.510000,0.750000 },
|
||||
StartTime = "1969 JUL 19 19:38:29.183",
|
||||
EndTime = "1969 JUL 22 04:55:35.183",
|
||||
SampleInterval = 60,
|
||||
EnableFade = false,
|
||||
Enabled = false,
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 11 Moon Orbits",
|
||||
Path = "/Solar System/Missions/Apollo/11"
|
||||
}
|
||||
}
|
||||
|
||||
-- Uncomment if you want to follow the mock decent
|
||||
-- local Apollo11LemPosition = {
|
||||
-- Identifier = "Apollo11LemPosition",
|
||||
-- Parent = "Moon",
|
||||
-- TimeFrame = {
|
||||
-- Type = "TimeFrameInterval",
|
||||
-- Start = "1969 JUL 20 19:10:25.183",
|
||||
-- End = "1969 JUL 20 20:17:46.183"
|
||||
-- },
|
||||
-- Transform = {
|
||||
-- Translation = {
|
||||
-- Type = "SpiceTranslation",
|
||||
-- Target = apolloLemSpiceId,
|
||||
-- Observer = "MOON",
|
||||
-- Frame = "MOON_ME",
|
||||
-- Kernels = kernels
|
||||
-- },
|
||||
-- },
|
||||
-- GUI = {
|
||||
-- Hidden = true,
|
||||
-- Name = "Apollo 11 Lunar Lander Position",
|
||||
-- Path = "/Solar System/Missions/Apollo/11"
|
||||
-- }
|
||||
-- }
|
||||
|
||||
-- local Apollo11LunarLanderModel = {
|
||||
-- Identifier = "Apollo11LunarLander",
|
||||
-- Parent = Apollo11LemPosition.Identifier,
|
||||
-- Transform = {
|
||||
-- Rotation = {
|
||||
-- Type = "StaticRotation",
|
||||
-- Rotation = {0.0, 0.0, -3.1415/2}
|
||||
-- },
|
||||
-- Scale = {
|
||||
-- Type = "StaticScale",
|
||||
-- Scale = 100.0
|
||||
-- }
|
||||
-- },
|
||||
-- TimeFrame = {
|
||||
-- Type = "TimeFrameInterval",
|
||||
-- Start = "1969 JUL 20 19:10:25.183",
|
||||
-- End = "1969 JUL 20 20:17:46.183"
|
||||
-- },
|
||||
-- Renderable = {
|
||||
-- Type = "RenderableModel",
|
||||
-- Geometry = {
|
||||
-- Type = "MultiModelGeometry",
|
||||
-- GeometryFile = modelFolder .. "/lem_nasa.obj"
|
||||
-- },
|
||||
-- ColorTexture = modelFolder .. "/gray.png",
|
||||
-- LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier)
|
||||
-- },
|
||||
-- GUI = {
|
||||
-- Hidden = false,
|
||||
-- Name = "Apollo 11 Lunar Lander",
|
||||
-- Path = "/Solar System/Missions/Apollo/11"
|
||||
-- }
|
||||
-- }
|
||||
|
||||
local Apollo11LemTrail = {
|
||||
Identifier = "Apollo11LemTrail",
|
||||
Parent = "Moon",
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = apolloLemSpiceId,
|
||||
Observer = "MOON",
|
||||
Frame = "IAU_MOON",
|
||||
Kernels = kernels
|
||||
},
|
||||
Color = {0.780000,0.940000,0.340000 },
|
||||
StartTime = "1969 JUL 20 19:10:25.183",
|
||||
EndTime = "1969 JUL 20 20:17:46.183",
|
||||
SampleInterval = 60,
|
||||
EnableFade = false,
|
||||
Enabled = false,
|
||||
},
|
||||
GUI = {
|
||||
Name = "Apollo 11 Lunar Lander Trail",
|
||||
Path = "/Solar System/Missions/Apollo/11"
|
||||
}
|
||||
}
|
||||
|
||||
local exportList = {
|
||||
Apollo11Position,
|
||||
-- Apollo11LemPosition,
|
||||
Apollo11Model,
|
||||
-- Apollo11LunarLanderModel,
|
||||
Apollo11MoonTrail,
|
||||
Apollo11LemTrail,
|
||||
}
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, exportList)
|
||||
Reference in New Issue
Block a user