mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-20 20:40:26 -05:00
Modifying satellite files for asset architecture
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
local SatDataPath = asset.syncedResource({
|
||||
Name = "Satellite Data",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "satellite_data",
|
||||
Version = 2
|
||||
Name = "Satellite TLE Data",
|
||||
Type = "UrlSynchronization",
|
||||
Identifier = "satellite_tle_data",
|
||||
Url = {
|
||||
"http://celestrak.com/NORAD/elements/stations.txt",
|
||||
"http://celestrak.com/NORAD/elements/gps-ops.txt"
|
||||
}
|
||||
})
|
||||
asset.export("SatDataPath", SatDataPath)
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
local satImageFolder = asset.syncedResource({
|
||||
Name = "Satellite Image Files",
|
||||
Type = "HttpSynchronization",
|
||||
Identifier = "tle_satellites_images",
|
||||
Version = 1
|
||||
})
|
||||
asset.export("SatImageFolder", satImageFolder)
|
||||
@@ -1,9 +1,10 @@
|
||||
local assetHelper = asset.require('util/asset_helper')
|
||||
local transforms = asset.require('scene/solarsystem/planets/earth/transforms')
|
||||
|
||||
local satImageFolder = asset.require('./satellite_image').SatImageFolder
|
||||
--local satDataPath = asset.require('./satellite_data').SatDataPath
|
||||
local satDataPath = asset.request('./satellite_data').SatDataPath
|
||||
satDataPath = "C:\\Users\\openspace\\Desktop\\OpenSpace_20180207\\sync\\http\\satellite_data\\2"
|
||||
local satDataPath = asset.require('./satellite_data').SatDataPath
|
||||
--satDataPath = "C:\\Users\\openspace\\Desktop\\OpenSpace_20180207\\sync\\http\\satellite_data\\2"
|
||||
|
||||
|
||||
-- Waiting for URL based download
|
||||
@@ -184,8 +185,9 @@ for sOrbit in values(satelliteGroups) do
|
||||
filename = sOrbit.url:match("([^/]+)$")
|
||||
filenameSansExt = filename:gsub(filename:match "(%.%w+)$", "")
|
||||
|
||||
sOrbit.path = satDataPath .. "/tle/" .. filename
|
||||
sOrbit.texturePath = satDataPath .. "/" .. "satB.png"
|
||||
-- sOrbit.path = satDataPath .. "/tle/" .. filename
|
||||
sOrbit.path = satDataPath .. filename
|
||||
sOrbit.texturePath = satImageFolder .. "/" .. "satB.png"
|
||||
|
||||
if DOWNLOAD then
|
||||
openspace.downloadFile(sOrbit.url, sOrbit.path)
|
||||
|
||||
Reference in New Issue
Block a user