mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-06 20:38:44 -06:00
New debris data
This commit is contained in:
committed by
ElonOlsson
parent
1ed3bdadbe
commit
2895df2144
@@ -0,0 +1,23 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local shared = asset.require('../satellites_shared')
|
||||
|
||||
local group = {
|
||||
Title = "Indian ASAT test Debris",
|
||||
Url = "http://www.celestrak.com/NORAD/elements/2019-006.txt",
|
||||
TrailColor = { 0.0, 0.0, 1.0 }
|
||||
}
|
||||
|
||||
local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
|
||||
|
||||
|
||||
local objectNames = {}
|
||||
|
||||
asset.onInitialize(function ()
|
||||
objectNames = shared.addSatelliteGroupObjects(group, tle, true)
|
||||
end)
|
||||
|
||||
--asset.onDeinitialize(function ()
|
||||
-- for _, n in ipairs(objectNames) do
|
||||
-- openspace.removeSceneGraphNode(n)
|
||||
-- end
|
||||
--end)
|
||||
@@ -4,7 +4,7 @@ local shared = asset.require('../satellites_shared')
|
||||
local group = {
|
||||
Title = "Breeze-M Breakup",
|
||||
Url = "http://www.celestrak.com/NORAD/elements/2012-044.txt",
|
||||
TrailColor = { 1.0, 0.98, 0.984 }
|
||||
TrailColor = { 0.0, 0.0, 1.0 }
|
||||
}
|
||||
|
||||
local tle = shared.downloadTLEFile(asset, group.Url, group.Title)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
asset.request('./debris/debris_breezem')
|
||||
asset.request('./debris/debris_asat')
|
||||
--asset.request('./debris/debris_breezem')
|
||||
--asset.request('./debris/debris_fengyun')
|
||||
--asset.request('./debris/debris_iridium33')
|
||||
--asset.request('./debris/debris_kosmos2251')
|
||||
|
||||
@@ -49,7 +49,7 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
return true
|
||||
end
|
||||
|
||||
function debris(title, file)
|
||||
function debris(title, file, color)
|
||||
return {
|
||||
Identifier = title,
|
||||
Parent = transforms.EarthInertial.Identifier,
|
||||
@@ -68,15 +68,16 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
ArgumentOfPeriapsisColumn = "-",
|
||||
MeanAnomalyAtEpochColumn = "-",
|
||||
EpochColumn = "-",
|
||||
|
||||
Color = color
|
||||
},
|
||||
|
||||
GUI = {
|
||||
Path = "/Solar System/Planets/Earth/Satellites"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
local Debris = debris(filenameSansExt, path)
|
||||
local Debris = debris(filenameSansExt, path, group.TrailColor)
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { Debris })
|
||||
|
||||
-- asset.export("satImageFolder", satImageFolder)
|
||||
|
||||
Reference in New Issue
Block a user