mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 04:30:09 -05:00
TLETranslation errer, File and Type missing key
This commit is contained in:
@@ -16,8 +16,8 @@ asset.onInitialize(function ()
|
||||
objectNames = shared.addSatelliteGroupObjects(group, tle, true)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function ()
|
||||
for _, n in ipairs(objectNames) do
|
||||
openspace.removeSceneGraphNode(n)
|
||||
end
|
||||
end)
|
||||
--asset.onDeinitialize(function ()
|
||||
-- for _, n in ipairs(objectNames) do
|
||||
-- openspace.removeSceneGraphNode(n)
|
||||
-- end
|
||||
--end)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
asset.request('./debris/debris_breezem')
|
||||
asset.request('./debris/debris_fengyun')
|
||||
asset.request('./debris/debris_iridium33')
|
||||
asset.request('./debris/debris_kosmos2251')
|
||||
--asset.request('./debris/debris_fengyun')
|
||||
--asset.request('./debris/debris_iridium33')
|
||||
--asset.request('./debris/debris_kosmos2251')
|
||||
|
||||
@@ -22,6 +22,11 @@ function downloadTLEFile(sceneAsset, url, name)
|
||||
end
|
||||
|
||||
local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
local filename = group.Url:match("([^/]+)$")
|
||||
local filenameSansExt = filename:gsub(filename:match("(%.%w+)$"), "")
|
||||
|
||||
local path = tleFolder .. "/" .. filename
|
||||
|
||||
function numLinesInFile(filename)
|
||||
local ctr = 0
|
||||
for _ in io.lines(filename) do ctr = ctr + 1 end
|
||||
@@ -44,13 +49,20 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
return true
|
||||
end
|
||||
|
||||
function test(title, file, per, color, group)
|
||||
function test(title, file)
|
||||
return {
|
||||
Identifier = title,
|
||||
Parent = transforms.EarthInertial.Identifier,
|
||||
Renderable = {
|
||||
Type = "ElonsTest",
|
||||
|
||||
--Translation = {
|
||||
|
||||
-- Type = "TLETranslation",
|
||||
-- Body = title,
|
||||
-- Observer = transforms.EarthInertial.Identifier,
|
||||
-- File = file
|
||||
-- },
|
||||
|
||||
PathInfo = "bubbis",
|
||||
SegmentsInfo = 1,
|
||||
EccentricityColumnInfo = "bubbis",
|
||||
@@ -61,23 +73,23 @@ local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates)
|
||||
ArgumentOfPeriapsisColumnInfo = "bubbis",
|
||||
MeanAnomalyAtEpochColumnInfo = "bubbis",
|
||||
EpochColumnInfo = "bubbis",
|
||||
|
||||
Translation = {
|
||||
Type = "TLETranslation",
|
||||
Body = title,
|
||||
Observer = transforms.EarthInertial.Identifier,
|
||||
File = file
|
||||
},
|
||||
|
||||
},
|
||||
GUI = {
|
||||
Path = "/Solar System/Planets/Earth/Satellites"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
local Debris = test(filenameSansExt, path)
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { Debris })
|
||||
|
||||
-- asset.export("satImageFolder", satImageFolder)
|
||||
|
||||
end
|
||||
|
||||
assetHelper.registerSceneGraphNodesAndExport(asset, { Debris })
|
||||
|
||||
-- asset.export("satImageFolder", satImageFolder)
|
||||
asset.export("downloadTLEFile", downloadTLEFile)
|
||||
asset.export("addSatelliteGroupObjects", addSatelliteGroupObjects)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user