Merge branch 'master' into thesis/2021/skybrowser

# Conflicts:
#	modules/webbrowser/CMakeLists.txt
This commit is contained in:
Ylva Selling
2022-04-04 16:14:50 -04:00
69 changed files with 3276 additions and 131 deletions

View File

@@ -0,0 +1,61 @@
local toggle_sun = {
Identifier = "os.toggle_sun",
Name = "Toggle Sun",
Command = [[
if not is_declared("args") then
openspace.printError("Cannot execute 'os.toggle_sun' manually")
return
end
if args.Transition == "Approaching" then
openspace.setPropertyValueSingle("Scene.SunGlare.Renderable.Enabled", false)
openspace.setPropertyValueSingle("Scene.Sun.Renderable.Enabled", true)
else -- "Exiting"
openspace.setPropertyValueSingle("Scene.SunGlare.Renderable.Enabled", true)
openspace.setPropertyValueSingle("Scene.Sun.Renderable.Enabled", false)
end
]],
Documentation = [[Toggles the visibility of the Sun glare and the Sun globe when the
camera is approaching either so that from far away the Sun Glare is rendered and when
close up, the globe is rendered instead.]],
GuiPath = "/Sun",
IsLocal = false
}
asset.onInitialize(function()
openspace.action.registerAction(toggle_sun)
openspace.event.registerEventAction(
"CameraFocusTransition",
toggle_sun.Identifier,
{ Node = "Sun", Transition = "Approaching" }
)
openspace.event.registerEventAction(
"CameraFocusTransition",
toggle_sun.Identifier,
{ Node = "Sun", Transition = "Exiting" }
)
end)
asset.onDeinitialize(function()
openspace.event.unregisterEventAction(
"CameraFocusTransition",
toggle_sun.Identifier,
{ Node = "Sun", Transition = "Exiting" }
)
openspace.event.unregisterEventAction(
"CameraFocusTransition",
toggle_sun.Identifier,
{ Node = "Sun", Transition = "Approaching" }
)
openspace.action.removeAction(toggle_sun)
end)
asset.meta = {
Name = "Actions - Toggle current Trails",
Version = "1.0",
Description = [[ Asset providing actions to toggle trails]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"
}

View File

@@ -5,12 +5,12 @@ asset.onInitialize(function()
"CameraFocusTransition",
action.show_trail,
{ Transition = "Exiting" }
);
)
openspace.event.registerEventAction(
"CameraFocusTransition",
action.hide_trail,
{ Transition = "Approaching" }
);
)
end)
asset.onDeinitialize(function()
@@ -18,10 +18,10 @@ asset.onDeinitialize(function()
"CameraFocusTransition",
action.show_trail,
{ Transition = "Exiting" }
);
)
openspace.event.unregisterEventAction(
"CameraFocusTransition",
action.hide_trail,
{ Transition = "Approaching" }
);
)
end)

View File

@@ -1,3 +1,9 @@
local fullOS = openspace.systemCapabilities.fullOperatingSystem()
if string.find(fullOS, "Darwin") then
openspace.printWarning("Gaia module (RenderableGaiaStars) not supported on mac")
return
end
-- Download a preprocessed binary octree of Radial Velocity subset values per star (preprocessed into 8 binary files).
local starsFolder = asset.syncedResource({
Name = "Gaia Stars RV",

View File

@@ -27,7 +27,7 @@ local images = asset.syncedResource({
Name = "Pluto Images",
Type = "HttpSynchronization",
Identifier = "newhorizons_plutoencounter_pluto_images",
Version = 1
Version = 2
})
local plutoRadius = 1.173E6

View File

@@ -7,9 +7,7 @@ asset.require("./jupiter/europa/default_layers")
asset.require("./jupiter/ganymede/default_layers")
asset.require("./jupiter/io/default_layers")
asset.require("./mars/default_layers")
asset.require("./mars/moons/layers/colorlayers/deimos_viking")
asset.require("./mars/moons/layers/colorlayers/phobos_viking")
asset.require('./mars/default_layers')
asset.require("./mercury/default_layers")

View File

@@ -0,0 +1,23 @@
local shared = asset.require("util/tle_helper")
local group = {
Title = "Starlink",
Url = "http://www.celestrak.com/NORAD/elements/starlink.txt",
TrailColor = { 0.65, 0.55, 0.55 },
Description = [[LEO satellite constellation launched by SpaceX to provide
broadband internet access.]]
}
local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
shared.registerSatelliteGroupObjects(asset, group, tle, true)
asset.meta = {
Name = "Satellites Communications - Starlink",
Version = "1.0",
Description = [[ Satellites asset for Communications - Starlink. Data from
Celestrak]],
Author = "OpenSpace Team",
URL = "https://celestrak.com/NORAD/elements/",
License = "Celestrak"
}

View File

@@ -0,0 +1,21 @@
local shared = asset.require("util/tle_helper")
local group = {
Title = "Active",
Url = "http://www.celestrak.com/NORAD/elements/active.txt",
TrailColor = { 0.45, 0.25, 0.45 },
Description = [[Satellites that employ active communication.]]
}
local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
shared.registerSatelliteGroupObjects(asset, group, tle, true)
asset.meta = {
Name = "Satellites Active",
Version = "1.0",
Description = [[ Satellites that employ active communication. Data from Celestrak]],
Author = "OpenSpace Team",
URL = "https://celestrak.com/NORAD/elements/",
License = "Celestrak"
}

View File

@@ -11,6 +11,7 @@ asset.require("./communications/other_comm")
asset.require("./communications/gorizont")
asset.require("./communications/raduga")
asset.require("./communications/molniya")
asset.require("./communications/starlink")
asset.meta = {

View File

@@ -2,6 +2,7 @@ asset.require("./misc/military")
asset.require("./misc/radar")
asset.require("./misc/cubesats")
asset.require("./misc/other")
asset.require("./misc/active")
asset.meta = {

View File

@@ -3,7 +3,7 @@ local globeIdentifier = asset.require("../../mars").Mars.Identifier
local layer = {
Identifier = "Themis_IR_Night_Sweden",
Name = "Themis IR Night [Sweden]",
FilePath = asset.localResource("themis_ir_night_sweden.wms"),
FilePath = asset.localResource("themis_ir_night_sweden.vrt"),
BlendMode = "Color",
Description = [[This mosaic represents the Thermal Emission Imaging System (THEMIS)
-nighttime infrared (IR) 100 meter/pixel mosaic (version 12) released in the

View File

@@ -0,0 +1,26 @@
<VRTDataset rasterXSize="213388" rasterYSize="106695">
<SRS>GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]</SRS>
<GeoTransform> -1.8000000000000000e+02, 1.6870676889047182e-03, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -1.6870518768452129e-03</GeoTransform>
<VRTRasterBand dataType="Byte" band="1">
<ColorInterp>Gray</ColorInterp>
<SimpleSource>
<SourceFilename relativeToVRT="1">themis_ir_night_sweden.wms</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="213388" RasterYSize="71130" DataType="Byte" BlockXSize="256" BlockYSize="256" />
<SrcRect xOff="0" yOff="0" xSize="213388" ySize="71130" />
<DstRect xOff="0" yOff="17782.5" xSize="213388" ySize="71130" />
</SimpleSource>
</VRTRasterBand>
<VRTRasterBand dataType="Byte" band="2">
<ColorInterp>Alpha</ColorInterp>
<ComplexSource>
<SourceFilename relativeToVRT="1">themis_ir_night_sweden.wms</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="213388" RasterYSize="71130" DataType="Byte" BlockXSize="256" BlockYSize="256" />
<SrcRect xOff="0" yOff="0" xSize="213388" ySize="71130" />
<DstRect xOff="0" yOff="17782.5" xSize="213388" ySize="71130" />
<ScaleRatio>255</ScaleRatio>
<NODATA>0</NODATA>
</ComplexSource>
</VRTRasterBand>
</VRTDataset>

View File

@@ -4,9 +4,9 @@
</Service>
<DataWindow>
<UpperLeftX>-180.0</UpperLeftX>
<UpperLeftY>90.0</UpperLeftY>
<UpperLeftY>60.0</UpperLeftY>
<LowerRightX>180.0</LowerRightX>
<LowerRightY>-90.0</LowerRightY>
<LowerRightY>-60.0</LowerRightY>
<SizeX>213388</SizeX>
<SizeY>71130</SizeY>
<TileLevel>9</TileLevel>

View File

@@ -3,7 +3,7 @@ local globeIdentifier = asset.require("../../mars").Mars.Identifier
local layer = {
Identifier = "Themis_IR_Night_Utah",
Name = "Themis IR Night [Utah]",
FilePath = asset.localResource("themis_ir_night_utah.wms"),
FilePath = asset.localResource("themis_ir_night_utah.vrt"),
BlendMode = "Color",
Description = [[This mosaic represents the Thermal Emission Imaging System (THEMIS)
-nighttime infrared (IR) 100 meter/pixel mosaic (version 12) released in the

View File

@@ -0,0 +1,26 @@
<VRTDataset rasterXSize="213388" rasterYSize="106695">
<SRS>GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]</SRS>
<GeoTransform> -1.8000000000000000e+02, 1.6870676889047182e-03, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -1.6870518768452129e-03</GeoTransform>
<VRTRasterBand dataType="Byte" band="1">
<ColorInterp>Gray</ColorInterp>
<SimpleSource>
<SourceFilename relativeToVRT="1">themis_ir_night_utah.wms</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="213388" RasterYSize="71130" DataType="Byte" BlockXSize="256" BlockYSize="256" />
<SrcRect xOff="0" yOff="0" xSize="213388" ySize="71130" />
<DstRect xOff="0" yOff="17782.5" xSize="213388" ySize="71130" />
</SimpleSource>
</VRTRasterBand>
<VRTRasterBand dataType="Byte" band="2">
<ColorInterp>Alpha</ColorInterp>
<ComplexSource>
<SourceFilename relativeToVRT="1">themis_ir_night_utah.wms</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="213388" RasterYSize="71130" DataType="Byte" BlockXSize="256" BlockYSize="256" />
<SrcRect xOff="0" yOff="0" xSize="213388" ySize="71130" />
<DstRect xOff="0" yOff="17782.5" xSize="213388" ySize="71130" />
<ScaleRatio>255</ScaleRatio>
<NODATA>0</NODATA>
</ComplexSource>
</VRTRasterBand>
</VRTDataset>

View File

@@ -4,9 +4,9 @@
</Service>
<DataWindow>
<UpperLeftX>-180.0</UpperLeftX>
<UpperLeftY>90.0</UpperLeftY>
<UpperLeftY>60.0</UpperLeftY>
<LowerRightX>180.0</LowerRightX>
<LowerRightY>-90.0</LowerRightY>
<LowerRightY>-60.0</LowerRightY>
<SizeX>213388</SizeX>
<SizeY>71130</SizeY>
<TileLevel>9</TileLevel>

View File

@@ -1,4 +1,13 @@
local transforms = asset.require("../transforms")
local transforms = asset.require('scene/solarsystem/planets/mars/transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local sun = asset.require("scene/solarsystem/sun/sun")
local model = asset.syncedResource({
Name = "Deimos Model",
Type = "HttpSynchronization",
Identifier = "deimos_model",
Version = 1
})
local kernels = asset.syncedResource({
Name = "Mars Spice Kernels",
@@ -25,10 +34,17 @@ local Deimos = {
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 15000, 12200, 11000 },
SegmentsPerPatch = 90,
Layers = {}
Type = "RenderableModel",
GeometryFile = model .. "/Deimos_1_1000.glb",
ModelScale = 'Kilometer',
RotationVector = { 180, 0, 180 },
AmbientIntensity = 0.02,
SpecularIntensity = 0.0,
LightSources = {
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
},
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
GUI = {
@@ -74,11 +90,10 @@ asset.export(Deimos)
asset.export(DeimosTrail)
asset.meta = {
Name = "Deimos",
Version = "1.1",
Description = [[ RenderableGlobe and Trail for Deimos.]],
Version = "1.0",
Description = [[ RenderableModel and Trail for Deimos.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"

View File

@@ -0,0 +1,63 @@
local transforms = asset.require('../transforms')
local kernels = asset.syncedResource({
Name = "Mars Spice Kernels",
Type = "HttpSynchronization",
Identifier = "mars_kernels",
Version = 1
})
local DeimosGlobe = {
Identifier = "Deimos_Globe",
Parent = transforms.MarsBarycenter.Identifier,
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_DEIMOS",
DestinationFrame = "GALACTIC",
Kernels = kernels .. "mar097.bsp"
},
Translation = {
Type = "SpiceTranslation",
Target = "DEIMOS",
Observer = "MARS BARYCENTER",
Kernels = kernels .. "mar097.bsp"
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 7500, 6100, 5200 },
--Radius source
--https://sci.esa.int/documents/35171/36506/1567259108230-5-ESLAB46-Day2-Rosenblatt.pdf
SegmentsPerPatch = 90,
Layers = {}
},
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
GUI = {
Name = "Deimos_Globe",
Path = "/Solar System/Planets/Mars",
Description = [[One of two moons of Mars.]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(DeimosGlobe)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(DeimosGlobe)
end)
asset.export(DeimosGlobe)
asset.meta = {
Name = "Deimos Globe",
Version = "1.0",
Description = [[ RenderableGlobe for Deimos.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"Deimos"}
}

View File

@@ -1,4 +1,4 @@
local globeIdentifier = asset.require("../../deimos").Deimos.Identifier
local globeIdentifier = asset.require("./../../deimos_globe").Deimos_Globe.Identifier
local layer = {
Identifier = "Deimos_Global_Mosaic_USGS",

View File

@@ -1,4 +1,4 @@
local globeIdentifier = asset.require("../../phobos").Phobos.Identifier
local globeIdentifier = asset.require("./../../phobos_globe").Phobos_Globe.Identifier
local layer = {
Identifier = "Phobos_Global_Shaded_Relief_USGS",

View File

@@ -1,4 +1,13 @@
local transforms = asset.require("../transforms")
local transforms = asset.require('scene/solarsystem/planets/mars/transforms')
local sunTransforms = asset.require('scene/solarsystem/sun/transforms')
local sun = asset.require("scene/solarsystem/sun/sun")
local model = asset.syncedResource({
Name = "Phobos Model",
Type = "HttpSynchronization",
Identifier = "phobos_model",
Version = 1
})
local kernels = asset.syncedResource({
Name = "Mars Spice Kernels",
@@ -7,6 +16,7 @@ local kernels = asset.syncedResource({
Version = 1
})
local Phobos = {
Identifier = "Phobos",
Parent = transforms.MarsBarycenter.Identifier,
@@ -25,10 +35,17 @@ local Phobos = {
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 27000, 22000, 18000 },
SegmentsPerPatch = 90,
Layers = {}
Type = "RenderableModel",
GeometryFile = model .. "/Phobos_1_1000.glb",
ModelScale = 'Kilometer',
RotationVector = { 90, 0, 90 },
AmbientIntensity = 0.02,
SpecularIntensity = 0.0,
LightSources = {
sun.LightSource
},
PerformShading = true,
DisableFaceCulling = true
},
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
GUI = {
@@ -46,7 +63,8 @@ local PhobosTrail = {
Translation = {
Type = "SpiceTranslation",
Target = "PHOBOS",
Observer = "MARS BARYCENTER"
Observer = "MARS BARYCENTER",
Kernels = kernels .. "mar097.bsp"
},
Color = { 1.0, 0.605, 0.420 },
Period = 0.31891023,
@@ -77,8 +95,8 @@ asset.export(PhobosTrail)
asset.meta = {
Name = "Phobos",
Version = "1.1",
Description = [[ RenderableGlobe and Trail for Phobos.]],
Version = "1.0",
Description = [[ RenderableModel and Trail for Phobos.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license"

View File

@@ -0,0 +1,63 @@
local transforms = asset.require('../transforms')
local kernels = asset.syncedResource({
Name = "Mars Spice Kernels",
Type = "HttpSynchronization",
Identifier = "mars_kernels",
Version = 1
})
local PhobosGlobe = {
Identifier = "Phobos_Globe",
Parent = transforms.MarsBarycenter.Identifier,
Transform = {
Rotation = {
Type = "SpiceRotation",
SourceFrame = "IAU_PHOBOS",
DestinationFrame = "GALACTIC",
Kernels = kernels .. "mar097.bsp"
},
Translation = {
Type = "SpiceTranslation",
Target = "PHOBOS",
Observer = "MARS BARYCENTER",
Kernels = kernels .. "mar097.bsp"
}
},
Renderable = {
Type = "RenderableGlobe",
Radii = { 13030, 11400, 9140 },
--Radius source
--https://naif.jpl.nasa.gov/pub/naif/generic_kernels/dsk/satellites/willner_etal_phobos.pdf
SegmentsPerPatch = 90,
Layers = {}
},
Tag = { "moon_solarSystem", "moon_terrestrial", "moon_mars" },
GUI = {
Name = "Phobos_Globe",
Path = "/Solar System/Planets/Mars",
Description = [[One of two moons of Mars.]]
}
}
asset.onInitialize(function()
openspace.addSceneGraphNode(PhobosGlobe)
end)
asset.onDeinitialize(function()
openspace.removeSceneGraphNode(PhobosGlobe)
end)
asset.export(PhobosGlobe)
asset.meta = {
Name = "Phobos Globe",
Version = "1.0",
Description = [[ RenderableGlobe for Phobos.]],
Author = "OpenSpace Team",
URL = "http://openspaceproject.com",
License = "MIT license",
Identifiers = {"Phobos"}
}

View File

@@ -33,13 +33,15 @@ asset.require("./layers/colorlayers/fesimap_02122015")
asset.require("./layers/colorlayers/mgsimap_02122015")
asset.require("./layers/colorlayers/ssimap_02122015")
asset.require("./layers/heightlayers/messenger_dem_utah")
local heightLayer = asset.require("./layers/heightlayers/messenger_dem_utah")
-- Set enabled layers (temporary solution)
-- @TODO: do this using a boolean that's passed to the 'asset.require' instead
asset.onInitialize(function ()
openspace.setPropertyValueSingle("Scene.Mercury.Renderable.Layers.ColorLayers." ..
colorLayer.layer.Identifier .. ".Enabled", true)
openspace.setPropertyValueSingle("Scene.Mercury.Renderable.Layers.HeightLayers." ..
heightLayer.layer.Identifier .. ".Enabled", true)
end)

View File

@@ -4,6 +4,10 @@ local layer = {
Identifier = "Messenger_DEM_Utah",
Name = "Messenger DEM [Utah]",
FilePath = asset.localResource("messenger_dem_utah.wms"),
Settings = {
Gamma = 1.59,
Multiplier = 1.38
},
TilePixelSize = 64
}

View File

@@ -27,7 +27,7 @@ local Mimas = {
},
Renderable = {
Type = "RenderableGlobe",
Radii = 198000,
Radii = { 207000, 197000, 191000 },
SegmentsPerPatch = 64,
Layers = { },
Labels = {

View File

@@ -12,6 +12,7 @@ local Sun = {
Layers = {},
PerformShading = false
},
ApproachFactor = 15.0,
GUI = {
Name = "Sun",
Path = "/Solar System/Sun",

View File

@@ -27,6 +27,7 @@
],
"assets": [
"base",
"events/toggle_sun",
"scene/solarsystem/planets/earth/earth",
"scene/solarsystem/planets/earth/satellites/satellites"
],
@@ -104,4 +105,4 @@
"major": 1,
"minor": 1
}
}
}

View File

@@ -35,6 +35,7 @@
],
"assets": [
"base",
"events/toggle_sun",
"scene/solarsystem/planets/earth/earth",
"scene/solarsystem/planets/earth/satellites/satellites",
"scene/solarsystem/planets/jupiter/major_moons",
@@ -130,4 +131,4 @@
"major": 1,
"minor": 1
}
}
}