mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-29 23:39:26 -05:00
Merge branch 'master' into feature/iss-asset
Fix the rotation used for TLE elements by removing a factor of 2 Add interesting satellites to the default scene/profile
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
|
||||
#Asset
|
||||
scene/solarsystem/planets/earth/earth required
|
||||
scene/solarsystem/planets/earth/satellites/satellites required
|
||||
|
||||
#Property
|
||||
setPropertyValue {earth_satellites}.Renderable.Enabled false
|
||||
|
||||
#Time
|
||||
relative -1d
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
asset.require('./base')
|
||||
|
||||
local earthAsset = asset.require('scene/solarsystem/planets/earth/earth')
|
||||
asset.request('scene/solarsystem/planets/earth/satellites/satellites.asset')
|
||||
|
||||
asset.onInitialize(function ()
|
||||
local now = openspace.time.currentWallTime()
|
||||
@@ -10,6 +11,8 @@ asset.onInitialize(function ()
|
||||
openspace.globebrowsing.goToGeo("Earth", 58.5877, 16.1924, 20000000)
|
||||
|
||||
openspace.markInterestingNodes({ "Earth", "Mars", "Moon", "Sun" })
|
||||
|
||||
openspace.setPropertyValue("{earth_satellites}.Renderable.Enabled", false)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
|
||||
@@ -6,7 +6,7 @@ local localFolder = asset.syncedResource({
|
||||
Name = "Mercury Magnetosphere",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "mercury_magnetosphere",
|
||||
Version = 1
|
||||
Version = 2
|
||||
})
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ local Magnetosphere = {
|
||||
SourceDirectory = localFolder,
|
||||
TransferFunction = localFolder .. "/transferfunction.txt",
|
||||
Variable = "rho",
|
||||
StepSize = "0.003",
|
||||
StepSize = 0.003,
|
||||
Dimensions = {64, 64, 64},
|
||||
GridType = "Cartesian",
|
||||
SecondsBefore = 24*60*60*365*100,
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
OpenSpace ecliptic frames:
|
||||
Mercury-centric Solar Ecliptic (MERCURYSE) frame
|
||||
|
||||
These frames are only defined as helper frames for OpenSpace.
|
||||
|
||||
+X is parallel to the geometric planet-sun position vector.
|
||||
|
||||
-Y axis is the normalized component of the planet's orbital vector
|
||||
|
||||
+Z axis is parallel to the cross product of the frame's +X axis
|
||||
and the frame's +Y axis.
|
||||
|
||||
\begindata
|
||||
|
||||
FRAME_MERCURYSE = 4600199
|
||||
FRAME_4600199_NAME = 'MERCURYSE'
|
||||
FRAME_4600199_CLASS = 5
|
||||
FRAME_4600199_CLASS_ID = 4600199
|
||||
FRAME_4600199_CENTER = 199
|
||||
FRAME_4600199_RELATIVE = 'J2000'
|
||||
FRAME_4600199_DEF_STYLE = 'PARAMETERIZED'
|
||||
FRAME_4600199_FAMILY = 'TWO-VECTOR'
|
||||
FRAME_4600199_PRI_AXIS = 'X'
|
||||
FRAME_4600199_PRI_VECTOR_DEF = 'OBSERVER_TARGET_POSITION'
|
||||
FRAME_4600199_PRI_OBSERVER = 'MERCURY'
|
||||
FRAME_4600199_PRI_TARGET = 'SUN'
|
||||
FRAME_4600199_PRI_ABCORR = 'NONE'
|
||||
FRAME_4600199_SEC_AXIS = 'Y'
|
||||
FRAME_4600199_SEC_VECTOR_DEF = 'OBSERVER_TARGET_VELOCITY'
|
||||
FRAME_4600199_SEC_OBSERVER = 'MERCURY'
|
||||
FRAME_4600199_SEC_TARGET = 'SUN'
|
||||
FRAME_4600199_SEC_ABCORR = 'NONE'
|
||||
FRAME_4600199_SEC_FRAME = 'J2000'
|
||||
@@ -1,8 +0,0 @@
|
||||
width 1024
|
||||
lower 0.0
|
||||
upper 0.1
|
||||
mappingkey 0.0 255 0 0 0
|
||||
mappingkey 0.01 255 0 0 0
|
||||
mappingkey 0.1 255 255 0 100
|
||||
|
||||
mappingkey 0.5 255 255 0 255
|
||||
@@ -73,7 +73,7 @@ local initializeAndAddNodes = function()
|
||||
},
|
||||
Tag = { "earth_satellite", "ISS" },
|
||||
GUI = {
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS/ISS"
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,13 +89,14 @@ local initializeAndAddNodes = function()
|
||||
File = path,
|
||||
LineNumber = 1
|
||||
},
|
||||
Color = { 0.9, 0.0, 0.0 },
|
||||
Color = { 0.9, 0.6715, 0.0 },
|
||||
Fade = 1.5,
|
||||
Period = period,
|
||||
Resolution = 160
|
||||
Resolution = 320
|
||||
},
|
||||
Tag = { "earth_satellite", "ISS" },
|
||||
GUI = {
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS/Trail"
|
||||
Path = "/Solar System/Planets/Earth/Satellites/ISS"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@ asset.request('./misc/brightest')
|
||||
asset.request('./communications/geostationary')
|
||||
asset.request('./navigation/gps')
|
||||
asset.request('./misc/spacestations')
|
||||
asset.request('./misc/iss')
|
||||
asset.request('./misc/tle-new')
|
||||
|
||||
@@ -69,7 +69,7 @@ local getPeriodFromElement = function(element)
|
||||
-- Get period from correct location of the string
|
||||
local per = tonumber(string.sub(element[3], 53, 63))
|
||||
-- Trail for 2x a single revolution
|
||||
per = 1.0 / per * 2.0
|
||||
per = 1.0 / per
|
||||
|
||||
return per
|
||||
end
|
||||
@@ -83,9 +83,9 @@ function satellites(title, file, color, group)
|
||||
Path = file,
|
||||
Segments = 120,
|
||||
Color = color,
|
||||
Fade = 0.5
|
||||
Fade = 1.5
|
||||
},
|
||||
Tag = { "earth_satellite_" .. group, "earth_satellite_" .. group .. "_trail"},
|
||||
Tag = { "earth_satellites" },
|
||||
GUI = {
|
||||
Path = "/Solar System/Planets/Earth/Satellites"
|
||||
}
|
||||
@@ -93,10 +93,10 @@ function satellites(title, file, color, group)
|
||||
end
|
||||
|
||||
local registerSatelliteGroupObjects = function(containingAsset, group, tleFolder, shouldAddDuplicates)
|
||||
local filename = group.Url:match("([^/]+)$")
|
||||
local filenameSansExt = filename:gsub(filename:match("(%.%w+)$"), "")
|
||||
local filename = group.Url:match("([^/]+)$")
|
||||
local filenameSansExt = filename:gsub(filename:match("(%.%w+)$"), "")
|
||||
|
||||
local path = tleFolder .. "/" .. filename
|
||||
local path = tleFolder .. "/" .. filename
|
||||
|
||||
local SatelliteBatch = satellites(filenameSansExt, path, group.TrailColor, group)
|
||||
assetHelper.registerSceneGraphNodesAndExport(containingAsset, { SatelliteBatch })
|
||||
|
||||
Reference in New Issue
Block a user