diff --git a/data/assets/scene/solarsystem/sssb/neo_pha.asset b/data/assets/scene/solarsystem/sssb/neo_pha.asset deleted file mode 100644 index 1651a9930b..0000000000 --- a/data/assets/scene/solarsystem/sssb/neo_pha.asset +++ /dev/null @@ -1,7 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local sharedSssb = asset.require('./sssb_shared') - -local filename = 'sample.csv' - -local telem = asset.localResource(filename) -sharedSssb.registerSssbGroupObjects(asset, filename, telem, true) diff --git a/data/assets/scene/solarsystem/sssb/pha.asset b/data/assets/scene/solarsystem/sssb/pha.asset new file mode 100644 index 0000000000..788907ec48 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/pha.asset @@ -0,0 +1,6 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, "pha") + +sharedSssb.registerSssbGroupObjects(asset, "sssb_data_pha.csv", filepath, true) diff --git a/data/assets/scene/solarsystem/sssb/sssb_shared.asset b/data/assets/scene/solarsystem/sssb/sssb_shared.asset index a660fd3087..e9af41067f 100644 --- a/data/assets/scene/solarsystem/sssb/sssb_shared.asset +++ b/data/assets/scene/solarsystem/sssb/sssb_shared.asset @@ -1,23 +1,16 @@ local transforms = asset.require('scene/solarsystem/sun/transforms') local assetHelper = asset.require('util/asset_helper') ---local satImageFolder = asset.syncedResource({ --- Name = "Satellite Image Files", --- Type = "HttpSynchronization", --- Identifier = "tle_satellites_images", --- Version = 1 ---}) - -function downloadSssbDatabaseFile(sceneAsset, url, name) +function downloadSssbDatabaseFile(sceneAsset, name) local identifier = name identifier = identifier:gsub(" ", "") identifier = identifier:gsub("&", "") identifier = identifier:gsub("-", "") return sceneAsset.syncedResource({ Name = "Small SolarSystem Body Data (" .. name .. ")", - Type = "UrlSynchronization", - Identifier = "sssb_data_" .. identifier, - Url = url + Type = "HttpSynchronization", + Identifier = "sssb_data_pha", + Version = 1 }) end @@ -31,13 +24,13 @@ local registerSssbGroupObjects = function(containingAsset, filename, sssbFolder, return ctr end - function sssBodies(title, file, color) + function sssBodies(title, folder, file, color) return { Identifier = title, Parent = transforms.SunECLIPJ2000.Identifier, Renderable = { Type = "RenderableSmallBody", - Path = file, + Path = folder.."/"..file, Segments = 200, Color = trailColor, Fade = 0.5, @@ -48,7 +41,7 @@ local registerSssbGroupObjects = function(containingAsset, filename, sssbFolder, } end - local SssbBatch = sssBodies('sssb_'..filenameSansExt, sssbFolder, trailColor) + local SssbBatch = sssBodies('sssb_'..filenameSansExt, sssbFolder, filename, trailColor) assetHelper.registerSceneGraphNodesAndExport(containingAsset, { SssbBatch }) end