This commit is contained in:
Agnes Heppich
2018-11-13 18:32:59 -05:00
43 changed files with 935 additions and 282 deletions
+1
View File
@@ -15,6 +15,7 @@ asset.require('scene/solarsystem/missions/dawn/vesta')
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/webgui')
local DawnAsset = asset.require('scene/solarsystem/missions/dawn/dawn')
+4 -3
View File
@@ -14,14 +14,15 @@ asset.request('scene/digitaluniverse/grids')
asset.require('scene/solarsystem/missions/voyager1/voyager1')
asset.require('scene/solarsystem/missions/voyager2/voyager2')
asset.require('scene/solarsystem/missions/voyager1/trails')
asset.require('scene/solarsystem/dsn/testRADEC')
-- Stations
asset.require('scene/solarsystem/dsn/stations')
--Communication
--Signals
--assetHelper.requestAll(asset, 'scene/solarsystem/dsn')
asset.require('scene/solarsystem/dsn/communicationlines/communicationlines')
asset.require('scene/solarsystem/dsn/testRADEC')
asset.require('scene/solarsystem/dsn/communicationlines/signals')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
@@ -0,0 +1,19 @@
local transforms = asset.require('scene/solarsystem/planets/earth/transforms')
local debugHelper = asset.require('util/debug_helper')
local earthRadius = 6.371E6
debugHelper.registerCartesianAxes(asset, {
Parent = transforms.EarthBarycenter.Identifier,
Scale = earthRadius * 3.5
})
debugHelper.registerCartesianAxes(asset, {
Parent = transforms.EarthInertial.Identifier,
Scale = earthRadius * 2.5
})
debugHelper.registerCartesianAxes(asset, {
Parent = transforms.EarthIAU.Identifier,
Scale = earthRadius * 1.5
})
+2
View File
@@ -14,6 +14,8 @@ asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
local junoAsset = asset.require('scene/solarsystem/missions/juno/juno')
asset.onInitialize(function ()
+2
View File
@@ -13,6 +13,8 @@ asset.request('scene/digitaluniverse/milkyway')
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/webgui')
local MessengerAsset = asset.require('scene/solarsystem/missions/messenger/messengerSC')
if not openspace.modules.isLoaded("Volume") then
+2
View File
@@ -16,6 +16,8 @@ asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
-- Custom Keybindings
local Keybindings = {
{
+2
View File
@@ -15,6 +15,8 @@ asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
-- Custom Keybindings
local Keybindings = {
{
+2
View File
@@ -17,6 +17,8 @@ asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
asset.require('util/webgui')
-- Custom Keybindings
local Keybindings = {
{
@@ -1,27 +0,0 @@
local assetHelper = asset.require('util/asset_helper')
local kernels = asset.require('scene/solarsystem/missions/voyager1/kernels')
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
--Communicationline data
local dataFolder = openspace.absPath("../../../sync/http/dsn_data/1/json")
local Signals = {
Identifier = "Signals",
Renderable = {
Translation = {
Type = "StaticTranslation",
Position = {0.0, 0.0, 0.0} --no parent, sun center is 0, 0, 0
},
Type = "RenderableSignals",
DataFolder = dataFolder,
DataFileType = "json",
MadridColor = {1.0, 0.0, 0.0},
GoldstoneColor = {0.0, 0.0, 1.0},
CanberraColor = {0.0, 1.0, 0.0}
},
GUI = {
Name = "Signals",
Path = "/Solar System"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {Signals})
@@ -0,0 +1,22 @@
local assetHelper = asset.require('util/asset_helper')
local stationsAsset = asset.require('scene/solarsystem/dsn/stations')
--Signals data
local dataFolder = openspace.absPath("../../../sync/http/dsn_data/1/json")
local Signals = {
Identifier = "Signals",
Renderable = {
Type = "RenderableSignals",
DataFolder = dataFolder,
DataFileType = "json",
SiteColors = stationsAsset.siteColorMap,
StationSites = stationsAsset.stationSiteMap
},
GUI = {
Name = "Signals",
Path = "/Solar System"
}
}
assetHelper.registerSceneGraphNodesAndExport(asset, {Signals})
@@ -27,6 +27,31 @@ local LightSources = {
}
}
-- Colormap for the different sites
local siteColorMap = {
Goldstone = {0.0, 0.0, 1.0},
Canberra = {0.0, 1.0, 0.0},
Madrid = {1.0, 0.0, 0.0}
}
-- Map to the site locations above, this will determine the signal colors
local stationSiteMap = {
DSS14 = "Goldstone",
DSS15 = "Goldstone",
DSS24 = "Goldstone",
DSS25 = "Goldstone",
DSS26 = "Goldstone",
DSS43 = "Canberra",
DSS34 = "Canberra",
DSS35 = "Canberra",
DSS36 = "Canberra",
DSS45 = "Canberra",
DSS63 = "Madrid",
DSS65 = "Madrid",
DSS54 = "Madrid",
DSS55 = "Madrid"
}
--------------------- Goldstone ------------------------
local DSS14 = {
Identifier = "DSS14",
@@ -375,6 +400,10 @@ local DSS55 = {
assetHelper.registerSceneGraphNodesAndExport(asset, {
DSS14, DSS15, DSS24, DSS25, DSS26, DSS43, DSS34, DSS35, DSS36, DSS45, DSS63, DSS65, DSS54, DSS55
})
asset.export("siteColorMap", siteColorMap)
asset.export("stationSiteMap", stationSiteMap)
+133
View File
@@ -0,0 +1,133 @@
local identifierGeneratorFunction = function (suffix)
local nextIndex = 0
return function (specification)
nextIndex = nextIndex + 1
return specification.Identifier or
(specification.Parent .. suffix .. nextIndex)
end
end
local generateGridIdentifier = identifierGeneratorFunction("Grid")
local addGrid = function (specification)
local identifier = specification.Identifier or
generateGridIdentifier(specification)
local name = specification.Name
local color = specification.Color
local parent = specification.Parent
local scale = specification.Scale
local position = specification.Position
local rotation = specification.Rotation
local grid = {
Identifier = identifier,
Parent = parent,
Transform = {
Scale = {
Type = "StaticScale",
Scale = scale;
},
Translation = {
Type = "StaticTranslation",
Position = position
},
Rotation = {
Type = "StaticRotation",
Rotation = rotation
}
},
Renderable = {
Type = "RenderableSphericalGrid",
Enabled = true,
LineWidth = 2.0,
GridColor = color
},
GUI = {
Name = name,
Path = "/Other/Grids"
}
}
openspace.addSceneGraphNode(grid)
return identifier;
end
local generateAxesIdentifier = identifierGeneratorFunction("Axes")
local addCartesianAxes = function (specification)
local identifier = specification.Identifier or
generateAxesIdentifier(specification)
local name = specification.Name or specification.Identifier
local parent = specification.Parent or "Root"
local scale = specification.Scale or 1.0
local position = specification.Position or {0.0, 0.0, 0.0}
local rotation = specification.Rotation or {0.0, 0.0, 0.0}
local axes = {
Identifier = identifier,
Parent = parent,
Transform = {
Scale = {
Type = "StaticScale",
Scale = scale;
},
Translation = {
Type = "StaticTranslation",
Position = position
},
Rotation = {
Type = "StaticRotation",
Rotation = rotation
}
},
Renderable = {
Type = "RenderableCartesianAxes",
Enabled = true,
XColor = {1.0, 0.0, 0.0, 1.0},
YColor = {0.0, 1.0, 0.0, 1.0},
ZColor = {0.0, 0.0, 1.0, 1.0}
},
GUI = {
Name = name,
Path = "/Other/Coordinate Systems"
}
}
openspace.addSceneGraphNode(axes)
return identifier;
end
local registerNode = function(
containerAsset,
nodeCreationFunction,
identifierGeneratorFunction,
specification
)
local identifier = specification.Identifier or
identifierGeneratorFunction(specification)
specification.Identifier = identifier
containerAsset.onInitialize(function ()
nodeCreationFunction(specification)
end)
containerAsset.onDeinitialize(function ()
openspace.removeSceneGraphNode(identifier)
end)
end
local registerGrid = function(gridAsset, specification)
registerNode(gridAsset, addGrid, generateGridIdentifier, specification)
end
local registerCartesianAxes = function(axesAsset, specification)
registerNode(axesAsset, addCartesianAxes, generateAxesIdentifier, specification)
end
asset.export("addGrid", addGrid)
asset.export("registerGrid", registerGrid)
asset.export("addCartesianAxes", addGrid)
asset.export("registerCartesianAxes", registerCartesianAxes)
@@ -127,6 +127,14 @@ openspace.setPropertyValueSingle("RenderEngine.ShowCamera", not isEnabled)]],
Documentation = "Toggles the dashboard and overlays",
GuiPath = "/GUI",
Local = false
},
{
Key = "Alt+Tab",
Name = "Toggle rendering on master",
Command = propertyHelper.invert('RenderEngine.DisableMasterRendering'),
Documentation = "Toggles the rendering on master",
GuiPath = "/Rendering",
Local = false
}
}
+4 -2
View File
@@ -18,13 +18,15 @@ asset.require('scene/solarsystem/missions/voyager1/trails')
asset.require('scene/solarsystem/missions/voyager2/voyager2')
asset.require('scene/solarsystem/missions/voyager2/trails')
-- Load default key bindings applicable to most scenes
asset.require('util/default_keybindings')
asset.require('util/default_dashboard')
asset.require('util/default_joystick')
local VoyagerAsset = asset.require('scene/solarsystem/missions/voyager1/voyager1')
asset.require('util/webgui')
local VoyagerAsset = asset.require('scene/solarsystem/missions/voyager/voyager1')
assetHelper.registerDashboardItems(asset, {
{