mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-28 07:59:37 -06:00
Artemis mission (#2597)
* First version of co revolving reference frame for Artemis trail * Add Orion model * Add Artemis profile * Add Moon trail and other small tweaks * Use NOAA20 cloud layer instead of VIIRS * Add some useful actions * Add event to toggle trails on Approach/Receding
This commit is contained in:
29
data/assets/scene/solarsystem/missions/artemis/actions.asset
Normal file
29
data/assets/scene/solarsystem/missions/artemis/actions.asset
Normal file
@@ -0,0 +1,29 @@
|
||||
local setup_launch = {
|
||||
Identifier = "os.missions.artemis.setup.launch",
|
||||
Name = "Set to Artemis-1 launch time",
|
||||
Command = [[
|
||||
openspace.time.setTime('2022-11-16T08:19:00.000');
|
||||
]],
|
||||
Documentation = "Set the time to the launch time of Artemis-1",
|
||||
GuiPath = "/Artemis",
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(setup_launch)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.action.removeAction(setup_launch)
|
||||
end)
|
||||
|
||||
asset.export("SetupLaunch", setup_launch)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Actions - Artemis",
|
||||
Version = "1.0",
|
||||
Description = "Actions related to the Artemis mission",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
asset.require("./trail")
|
||||
asset.require("./model")
|
||||
asset.require("./actions")
|
||||
57
data/assets/scene/solarsystem/missions/artemis/model.asset
Normal file
57
data/assets/scene/solarsystem/missions/artemis/model.asset
Normal file
@@ -0,0 +1,57 @@
|
||||
local sun = asset.require("scene/solarsystem/sun/sun")
|
||||
local transforms = asset.require("./transforms")
|
||||
|
||||
local models = asset.syncedResource({
|
||||
Name = "Artemis Models",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "artemis_1_models",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local ArtemisModel = {
|
||||
Identifier = "ArtemisModel",
|
||||
Parent = transforms.ArtemisPosition.Identifier,
|
||||
ApproachFactor = 2700,
|
||||
Transform = {
|
||||
Rotation = {
|
||||
Type = "FixedRotation",
|
||||
Attached = "ArtemisModel",
|
||||
XAxis = { 1.0, 0.0, 0.0 },
|
||||
XAxisOrthogonal = true,
|
||||
YAxis = "Sun",
|
||||
YAxisInvert = true
|
||||
},
|
||||
},
|
||||
Renderable = {
|
||||
Type = "RenderableModel",
|
||||
GeometryFile = models .. "artemis.glb",
|
||||
LightSources = {
|
||||
sun.LightSource
|
||||
},
|
||||
AmbientIntensity = 0.05
|
||||
},
|
||||
GUI = {
|
||||
Name = "Orion (Artemis-1) Model",
|
||||
Path = "/Solar System/Missions/Artemis",
|
||||
Description = "Model of the Orion capsule for the Artemis-1 mission",
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(ArtemisModel)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(ArtemisModel)
|
||||
end)
|
||||
|
||||
asset.export(ArtemisModel)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Artemis-1 Model",
|
||||
Version = "1.0",
|
||||
Description = "Orion capsule model for the Artemis-1 mission",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
local toggle_trail = {
|
||||
Identifier = "event.artemis.toggle_trail",
|
||||
Name = "Toggle Artemis trails (auto)",
|
||||
Command = [[
|
||||
local node
|
||||
if is_declared("args") then
|
||||
node = args.Node
|
||||
else
|
||||
node = openspace.navigation.getNavigationState().Anchor
|
||||
end
|
||||
|
||||
if node ~= "ArtemisModel" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local earthTrail = "ArtemisEarthTrail"
|
||||
local moonTrail = "ArtemisMoonTrail"
|
||||
|
||||
local visibility
|
||||
if is_declared("args") then
|
||||
if args.Transition == "Approaching" then
|
||||
visibility = false
|
||||
elseif args.Transition == "Exiting" then
|
||||
visibility = true
|
||||
else
|
||||
return
|
||||
end
|
||||
else
|
||||
visibility = not (
|
||||
openspace.getPropertyValue("Scene." .. earthTrail .. ".Renderable.Enabled") or
|
||||
openspace.getPropertyValue("Scene." .. moonTrail .. ".Renderable.Enabled")
|
||||
)
|
||||
end
|
||||
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene." .. earthTrail .. ".Renderable.Enabled",
|
||||
visibility
|
||||
)
|
||||
openspace.setPropertyValueSingle(
|
||||
"Scene." .. moonTrail .. ".Renderable.Enabled",
|
||||
visibility
|
||||
)
|
||||
]],
|
||||
Documentation = [[Toggles the visibility of the Artemis trails with an
|
||||
approaching/exiting event. This action takes optional arguments to 1) determine which
|
||||
node is currently in focus and only hide Artemis trails if it is in focus (as the
|
||||
'Node') and 2) the transition direction (as 'Approaching' or 'Exiting')]],
|
||||
GuiPath = "/Artemis/Events",
|
||||
IsLocal = true
|
||||
}
|
||||
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(toggle_trail)
|
||||
|
||||
openspace.event.registerEventAction(
|
||||
"CameraFocusTransition",
|
||||
toggle_trail.Identifier,
|
||||
{ Transition = "Exiting" }
|
||||
)
|
||||
openspace.event.registerEventAction(
|
||||
"CameraFocusTransition",
|
||||
toggle_trail.Identifier,
|
||||
{ Transition = "Approaching" }
|
||||
)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.event.unregisterEventAction(
|
||||
"CameraFocusTransition",
|
||||
toggle_trail.Identifier,
|
||||
{ Transition = "Exiting" }
|
||||
)
|
||||
openspace.event.unregisterEventAction(
|
||||
"CameraFocusTransition",
|
||||
toggle_trail.Identifier,
|
||||
{ Transition = "Approaching" }
|
||||
)
|
||||
|
||||
openspace.action.removeAction(toggle_trail)
|
||||
end)
|
||||
|
||||
asset.export("artemis.toggle_trail", toggle_trail.Identifier)
|
||||
83
data/assets/scene/solarsystem/missions/artemis/trail.asset
Normal file
83
data/assets/scene/solarsystem/missions/artemis/trail.asset
Normal file
@@ -0,0 +1,83 @@
|
||||
local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
|
||||
local moonTransforms = asset.require("scene/solarsystem/planets/earth/moon/moon")
|
||||
asset.require("spice/base")
|
||||
local artemisSpiceId = "-1023"
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Artemis Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "artemis_1_kernels",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local ArtemisEarthTrail = {
|
||||
Identifier = "ArtemisEarthTrail",
|
||||
Parent = earthTransforms.EarthCenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = artemisSpiceId,
|
||||
Observer = "EARTH",
|
||||
Frame = "GALACTIC",
|
||||
Kernels = kernels .. "artemis.bsp"
|
||||
},
|
||||
Color = { 0.2, 0.78, 0.635 },
|
||||
Fade = 7.0,
|
||||
StartTime = "2022 NOV 16 08:19:00.000",
|
||||
EndTime = "2022 DEC 11 17:20:45.065",
|
||||
SampleInterval = 60 -- Sample rate of once per minute
|
||||
},
|
||||
GUI = {
|
||||
Name = "Artemis-1 Earth Trail",
|
||||
Path = "/Solar System/Missions/Artemis/Trails",
|
||||
Description = "Artemis-1 trail relative to Earth",
|
||||
}
|
||||
}
|
||||
|
||||
local ArtemisMoonTrail= {
|
||||
Identifier = "ArtemisMoonTrail",
|
||||
Parent = moonTransforms.Moon.Identifier,
|
||||
Renderable = {
|
||||
Type = "RenderableTrailTrajectory",
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = artemisSpiceId,
|
||||
Observer = "MOON",
|
||||
Frame = "IAU_MOON",
|
||||
Kernels = kernels .. "artemis.bsp"
|
||||
},
|
||||
Color = { 0.78, 0.43, 0.20 },
|
||||
Fade = 7.0,
|
||||
StartTime = "2022 NOV 16 08:19:00.000",
|
||||
EndTime = "2022 DEC 11 17:20:45.065",
|
||||
SampleInterval = 60 -- Sample rate of once per minute
|
||||
},
|
||||
GUI = {
|
||||
Name = "Artemis-1 Moon Trail",
|
||||
Path = "/Solar System/Missions/Artemis/Trails",
|
||||
Description = "Artemis-1 trail relative to the Moon",
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(ArtemisEarthTrail)
|
||||
openspace.addSceneGraphNode(ArtemisMoonTrail)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(ArtemisMoonTrail)
|
||||
openspace.removeSceneGraphNode(ArtemisEarthTrail)
|
||||
end)
|
||||
|
||||
asset.export(ArtemisEarthTrail)
|
||||
asset.export(ArtemisMoonTrail)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Artemis-1 Trails",
|
||||
Version = "1.0",
|
||||
Description = "Trail of Artemis-1 in respect to Earth and the Moon",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
local earthTransforms = asset.require("scene/solarsystem/planets/earth/transforms")
|
||||
asset.require("spice/base")
|
||||
local artemisSpiceId = "-1023"
|
||||
|
||||
local kernels = asset.syncedResource({
|
||||
Name = "Artemis Kernels",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "artemis_1_kernels",
|
||||
Version = 1
|
||||
})
|
||||
|
||||
local ArtemisPosition = {
|
||||
Identifier = "ArtemisPosition",
|
||||
Parent = earthTransforms.EarthCenter.Identifier,
|
||||
Transform = {
|
||||
Translation = {
|
||||
Type = "SpiceTranslation",
|
||||
Target = artemisSpiceId,
|
||||
Observer = "EARTH",
|
||||
Frame = "GALACTIC",
|
||||
Kernels = kernels .. "artemis.bsp"
|
||||
},
|
||||
},
|
||||
GUI = {
|
||||
Name = "Artemis-1 Position",
|
||||
Path = "/Solar System/Missions/Artemis",
|
||||
Hidden = true,
|
||||
Description = "Artemis-1 position relative to Earth",
|
||||
}
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.addSceneGraphNode(ArtemisPosition)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.removeSceneGraphNode(ArtemisPosition)
|
||||
end)
|
||||
|
||||
asset.export(ArtemisPosition)
|
||||
|
||||
asset.meta = {
|
||||
Name = "Artemis-1 Transforms",
|
||||
Version = "1.0",
|
||||
Description = "Artemis-1 transforms, position relative to Earth",
|
||||
Author = "OpenSpace Team",
|
||||
URL = "http://openspaceproject.com",
|
||||
License = "MIT license"
|
||||
}
|
||||
119
data/profiles/artemis.profile
Normal file
119
data/profiles/artemis.profile
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"assets": [
|
||||
"base",
|
||||
"events/toggle_sun",
|
||||
"scene/solarsystem/planets/earth/earth",
|
||||
"scene/solarsystem/planets/earth/satellites/satellites",
|
||||
"scene/solarsystem/missions/artemis/artemis",
|
||||
"scene/solarsystem/missions/artemis/toggle_trail"
|
||||
],
|
||||
"camera": {
|
||||
"aim": "",
|
||||
"anchor": "ArtemisModel",
|
||||
"frame": "Root",
|
||||
"yaw": -0.003474,
|
||||
"pitch": 0.008681,
|
||||
"type": "setNavigationState",
|
||||
"position": {
|
||||
"x": 364.907409,
|
||||
"y": -65.898746,
|
||||
"z": 361.510673
|
||||
},
|
||||
"up": {
|
||||
"x": -0.128611,
|
||||
"y": 0.944590,
|
||||
"z": 0.302006
|
||||
}
|
||||
},
|
||||
"delta_times": [
|
||||
1.0,
|
||||
5.0,
|
||||
30.0,
|
||||
60.0,
|
||||
300.0,
|
||||
1800.0,
|
||||
3600.0,
|
||||
43200.0,
|
||||
86400.0,
|
||||
604800.0,
|
||||
1209600.0,
|
||||
2592000.0,
|
||||
5184000.0,
|
||||
7776000.0,
|
||||
15552000.0,
|
||||
31536000.0,
|
||||
63072000.0,
|
||||
157680000.0,
|
||||
315360000.0,
|
||||
630720000.0
|
||||
],
|
||||
"mark_nodes": [
|
||||
"ArtemisModel",
|
||||
"Earth",
|
||||
"Moon",
|
||||
"Sun"
|
||||
],
|
||||
"meta": {
|
||||
"author": "OpenSpace Team",
|
||||
"description": "Artemis Profile. Adds the Orion capsule (Artemis-1) model with an estimated trajectery",
|
||||
"license": "MIT License",
|
||||
"name": "Artemis",
|
||||
"url": "https://www.openspaceproject.com",
|
||||
"version": "1.0"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"name": "{earth_satellites}.Renderable.Enabled",
|
||||
"type": "setPropertyValue",
|
||||
"value": "false"
|
||||
},
|
||||
{
|
||||
"name": "Scene.MoonTrail.Renderable.Appearance.Color",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "{0.5, 0.5, 0.5}"
|
||||
},
|
||||
{
|
||||
"name": "Scene.MoonTrail.Renderable.Appearance.Fade",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "4.0"
|
||||
},
|
||||
{
|
||||
"name": "Scene.Earth.Renderable.Layers.ColorLayers.ESRI_NOAA20_Combo.Enabled",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "true"
|
||||
},
|
||||
{
|
||||
"name": "Scene.Earth.Renderable.Layers.ColorLayers.ESRI_VIIRS_Combo.Enabled",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "false"
|
||||
},
|
||||
{
|
||||
"name": "Scene.ISSModel.Renderable.Enabled",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "false"
|
||||
},
|
||||
{
|
||||
"name": "Scene.ISS_trail.Renderable.Enabled",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "false"
|
||||
},
|
||||
{
|
||||
"name": "Scene.ArtemisEarthTrail.Renderable.Enabled",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "false"
|
||||
},
|
||||
{
|
||||
"name": "Scene.ArtemisMoonTrail.Renderable.Enabled",
|
||||
"type": "setPropertyValueSingle",
|
||||
"value": "false"
|
||||
}
|
||||
],
|
||||
"time": {
|
||||
"type": "absolute",
|
||||
"value": "2022-11-21T12:00:00"
|
||||
},
|
||||
"version": {
|
||||
"major": 1,
|
||||
"minor": 1
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,7 @@ Profile = "default"
|
||||
ReadOnlyProfiles = {
|
||||
"apollo",
|
||||
"asteroids",
|
||||
"artemis",
|
||||
"bastilleday2000",
|
||||
"dawn",
|
||||
"default",
|
||||
|
||||
Reference in New Issue
Block a user