diff --git a/data/assets/bastille_test.scene b/data/assets/test.scene similarity index 75% rename from data/assets/bastille_test.scene rename to data/assets/test.scene index 7748e2c720..8f2a8e9f61 100644 --- a/data/assets/bastille_test.scene +++ b/data/assets/test.scene @@ -6,19 +6,19 @@ local propertyHelper = asset.require('util/property_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/dwarf_planets/pluto/system') -assetHelper.requestAll(asset, 'scene/digitaluniverse') +--asset.require('scene/solarsystem/planets/mars/moons/phobos') +--asset.require('scene/solarsystem/planets/mars/moons/deimos') +--asset.require('scene/solarsystem/dwarf_planets/pluto/system') +--assetHelper.requestAll(asset, 'scene/digitaluniverse') -- Load default key bindings applicable to most scenes asset.require('util/default_keybindings') asset.require('util/default_dashboard') -asset.require('util/default_joystick') +--asset.require('util/default_joystick') -- asset.require('util/webgui') -asset.request('customization/globebrowsing') +--asset.request('customization/globebrowsing') local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') local sunAsset = asset.require('scene/solarsystem/sun/sun') @@ -27,6 +27,9 @@ local sunRadius = 695508000 -- The actual fieldlines -- asset.require('./bastille_day/fieldlines') +asset.require('./testwsa/scs_oi') +asset.require('./testwsa/pfss_oi') +asset.require('./testwsa/pfss_io') asset.onInitialize(function () @@ -34,14 +37,15 @@ asset.onInitialize(function () -- Jump to bastille day -- openspace.time.setTime("2000 JUL 14 08:33:37.100") + -- Sun magnetogram texture testing openspace.time.setTime("2019 MAY 11 14:15:30.000") openspace.setDefaultGuiSorting() - openspace.globebrowsing.loadWMSServersFromFile( - openspace.absPath("${DATA}/globebrowsing_servers.lua") - ) + --openspace.globebrowsing.loadWMSServersFromFile( + -- openspace.absPath("${DATA}/globebrowsing_servers.lua") + --) openspace.addVirtualProperty( "BoolProperty", diff --git a/data/assets/testwsa/kernels/GSM.ti b/data/assets/testwsa/kernels/GSM.ti new file mode 100755 index 0000000000..28cf175a5a --- /dev/null +++ b/data/assets/testwsa/kernels/GSM.ti @@ -0,0 +1,33 @@ +Geocentric Solar Magnetospheric (GSM) frame: +Used by the BATSRUS model +This Kernel's ID is not a valid ID! + + +X is parallel to the geometric earth-sun position vector. + + +Z axis is normalized component of north centered geomagnetic dipole + vector orthogonal to GSM +X axis. + + +Y completes the right-handed frame. + +\begindata + + FRAME_GSM = 13371333 + FRAME_13371333_NAME = 'GSM' + FRAME_13371333_CLASS = 5 + FRAME_13371333_CLASS_ID = 13371333 + FRAME_13371333_CENTER = 399 + FRAME_13371333_RELATIVE = 'GALACTIC' + FRAME_13371333_DEF_STYLE = 'PARAMETERIZED' + FRAME_13371333_FAMILY = 'TWO-VECTOR' + FRAME_13371333_PRI_AXIS = 'X' + FRAME_13371333_PRI_VECTOR_DEF = 'OBSERVER_TARGET_POSITION' + FRAME_13371333_PRI_OBSERVER = 'EARTH' + FRAME_13371333_PRI_TARGET = 'SUN' + FRAME_13371333_PRI_ABCORR = 'NONE' + FRAME_13371333_SEC_AXIS = 'Z' + FRAME_13371333_SEC_VECTOR_DEF = 'CONSTANT' + FRAME_13371333_SEC_FRAME = 'ECLIPJ2000' + FRAME_13371333_SEC_SPEC = 'LATITUDINAL' + FRAME_13371333_SEC_UNITS = 'DEGREES' + FRAME_13371333_SEC_LONGITUDE = 288.43 + FRAME_13371333_SEC_LATITUDE = 79.54 diff --git a/data/assets/testwsa/kernels/HNM.tf b/data/assets/testwsa/kernels/HNM.tf new file mode 100755 index 0000000000..6363f4a521 --- /dev/null +++ b/data/assets/testwsa/kernels/HNM.tf @@ -0,0 +1,42 @@ +\begintext + +Heliocentric Earth Equatorial (HEEQ+180) Frame +Used by the BATSRUS model +This Kernel's ID is not a valid ID! + Definition of the Heliocentric Earth Equatorial frame: + + All vectors are geometric: no aberration corrections are + used. + + The solar rotation axis is the primary vector: the Z axis points + in the solar north direction. + + The position of the sun relative to the earth is the secondary + vector: the X axis is the component of this position vector + orthogonal to the Z axis. + + The Y axis is Z cross X, completing the right-handed + reference frame. + +\begindata + + FRAME_HEEQ180 = 6666666 + FRAME_6666666_NAME = 'HEEQ180' + FRAME_6666666_CLASS = 5 + FRAME_6666666_CLASS_ID = 6666666 + FRAME_6666666_CENTER = 10 + FRAME_6666666_RELATIVE = 'J2000' + FRAME_6666666_DEF_STYLE = 'PARAMETERIZED' + FRAME_6666666_FAMILY = 'TWO-VECTOR' + FRAME_6666666_PRI_AXIS = 'Z' + FRAME_6666666_PRI_VECTOR_DEF = 'CONSTANT' + FRAME_6666666_PRI_FRAME = 'IAU_SUN' + FRAME_6666666_PRI_SPEC = 'RECTANGULAR' + FRAME_6666666_PRI_VECTOR = ( 0, 0, 1 ) + FRAME_6666666_SEC_AXIS = 'X' + FRAME_6666666_SEC_VECTOR_DEF = 'OBSERVER_TARGET_POSITION' + FRAME_6666666_SEC_OBSERVER = 'EARTH' + FRAME_6666666_SEC_TARGET = 'SUN' + FRAME_6666666_SEC_ABCORR = 'NONE' + FRAME_6666666_SEC_FRAME = 'IAU_SUN' + diff --git a/data/assets/testwsa/pfss_io.asset b/data/assets/testwsa/pfss_io.asset new file mode 100755 index 0000000000..74841eb153 --- /dev/null +++ b/data/assets/testwsa/pfss_io.asset @@ -0,0 +1,43 @@ +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require('./transforms') + +local fieldlinesDirectory = asset.localResource("fl_pfss_io") + +local sunRadius = 695508000 + +-- Fieldlies from json +local fieldlines = { + Identifier = "WSA_Fieldlines_PFSS_IO", + Parent = transforms.HNMReferenceFrame.Identifier, + Renderable = { + Type = "RenderableFieldlinesSequence", + SourceFolder = fieldlinesDirectory, + FlowEnabled = false, + AlphaBlendlingEnabled = false, + InputFileType = "json", + ColorTableMinMax = { + { 0, 1000000 }, + { 100, 2000 } + }, + LoadAtRuntime = true, + ScaleToMeters = 1.0, + SecondsBefore = 24*60*60, + SecondsAfter = 24*60*60, + SimulationModel = "wsa", + Color = { + Uniform = {0.1, 0.725, 0, 1} + } + }, + GUI = { + Path = "/Solar System/Heliosphere", + Name = "WSA Fieldlines PFSS In to Out" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = sunRadius + }, + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { fieldlines }) diff --git a/data/assets/testwsa/pfss_oi.asset b/data/assets/testwsa/pfss_oi.asset new file mode 100755 index 0000000000..59b79311bb --- /dev/null +++ b/data/assets/testwsa/pfss_oi.asset @@ -0,0 +1,43 @@ +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require('./transforms') + +local fieldlinesDirectory = asset.localResource("fl_pfss_oi") + +local sunRadius = 695508000 + +-- Fieldlies from json +local fieldlines = { + Identifier = "WSA_Fieldlines_PFSS_OI", + Parent = transforms.HNMReferenceFrame.Identifier, + Renderable = { + Type = "RenderableFieldlinesSequence", + SourceFolder = fieldlinesDirectory, + FlowEnabled = false, + AlphaBlendlingEnabled = false, + InputFileType = "json", + ColorTableMinMax = { + { 0, 1000000 }, + { 100, 2000 } + }, + LoadAtRuntime = true, + ScaleToMeters = 1.0, + SecondsBefore = 24*60*60, + SecondsAfter = 24*60*60, + SimulationModel = "wsa", + Color = { + Uniform = {0.725, 0.1, 0, 1} + } + }, + GUI = { + Path = "/Solar System/Heliosphere", + Name = "WSA Fieldlines PFSS Out to In" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = sunRadius + }, + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { fieldlines }) diff --git a/data/assets/testwsa/scs_oi.asset b/data/assets/testwsa/scs_oi.asset new file mode 100755 index 0000000000..ba223c461c --- /dev/null +++ b/data/assets/testwsa/scs_oi.asset @@ -0,0 +1,43 @@ +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require('./transforms') + +local fieldlinesDirectory = asset.localResource("fl_scs_oi") + +local sunRadius = 695508000 + +-- Fieldlies from json +local fieldlines = { + Identifier = "WSA_Fieldlines_SCS_OI", + Parent = transforms.HNMReferenceFrame.Identifier, + Renderable = { + Type = "RenderableFieldlinesSequence", + SourceFolder = fieldlinesDirectory, + FlowEnabled = false, + AlphaBlendlingEnabled = false, + InputFileType = "json", + ColorTableMinMax = { + { 0, 1000000 }, + { 100, 2000 } + }, + LoadAtRuntime = true, + ScaleToMeters = 1.0, + SecondsBefore = 24*60*60, + SecondsAfter = 24*60*60, + SimulationModel = "wsa", + Color = { + Uniform = {0, 0.725, 0.75, 1} + } + }, + GUI = { + Path = "/Solar System/Heliosphere", + Name = "WSA Fieldlines SCS Out to In" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = sunRadius + }, + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { fieldlines }) diff --git a/data/assets/testwsa/transforms.asset b/data/assets/testwsa/transforms.asset new file mode 100755 index 0000000000..ebdacde22a --- /dev/null +++ b/data/assets/testwsa/transforms.asset @@ -0,0 +1,41 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') +local earthTransforms = asset.require('scene/solarsystem/planets/earth/transforms') + +local HNMKernel = asset.localResource("kernels/HNM.tf") +local GSMKernel = asset.localResource("kernels/GSM.ti") + +local HNMReferenceFrame = { + Identifier = "HNMReferenceFrame", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Rotation = { + Type = "SpiceRotation", + SourceFrame = "HEEQ180", + DestinationFrame = "GALACTIC", + Kernels = HNMKernel + } + }, + GUI = { + Name = "HNM Reference Frame" + } +} + +local GSMReferenceFrame = { + Identifier = "GSMReferenceFrame", + Parent = earthTransforms.EarthBarycenter.Identifier, + Transform = { + Rotation = { + Type = "SpiceRotation", + SourceFrame = "GSM", + DestinationFrame = "GALACTIC", + Kernels = GSMKernel + } + }, + GUI = { + Name = "GSM Reference Frame" + } +} + +local objects = { HNMReferenceFrame, GSMReferenceFrame } +assetHelper.registerSceneGraphNodesAndExport(asset, objects) diff --git a/openspace.cfg b/openspace.cfg index 5a1565aba0..bfb5d3d423 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -46,7 +46,7 @@ SGCTConfig = sgct.config.single{} -- Asset = "gaia" -- Asset = "juno" -- Asset = "messenger" -Asset = "bastille_test" +Asset = "test" -- These scripts are executed after the initialization of each scene, thus making -- it possible to have global overrides to default values or execute other scripts