Files
OpenSpace/data/scene/satellites.scene
T
Gene Payne be1b211dfb Feature/satellites (#325)
* Initial commit of satellites test branch

* Modified code to work with batch TLE files from online links specified in .mod file. Does not yet auto-download the files.

* Added debug function to mod file for testing static points in orbit

* Fixed time offset bug that was corrupting satellite positions

* Minor changes for debug output and camera position.

* Changed to circle billboard for rendering satellite position

* Added satellite group name to each renderable title, and keyboard shortcuts for toggling visibility

* Added support for using ghoul luasocket lib to download latest satellite TLE files from celestrak.com

* Adding reference to updated Ghoul submodule containing luasocket changes

* Updating reference to latest Ghoul submodule in feature/satellites

* Updated reference to new ghoul version

* Updated reference to new ghoul submodule version for satellites

* Updated reference to new ghoul submodule version for satellits

* Updated versions of TLE files

* Added new Lua-accessible downloader available for scene loading

* Improved error handling for TLE files

* Updated submodule reference for ext/ghoul prior to luasocket addition

* Update SGCT reference
2017-06-06 13:42:38 -04:00

72 lines
2.4 KiB
Plaintext

function preInitialization()
--[[
The scripts in this function are executed after the scene is loaded but before the
scene elements have been initialized, thus they should be used to set the time at
which the scene should start and other settings that might determine initialization
critical objects.
]]--
openspace.spice.loadKernel("${SPICE}/naif0011.tls")
openspace.spice.loadKernel("${SPICE}/pck00010.tpc")
-- openspace.spice.loadKernel("${OPENSPACE_DATA}/spice/de430_1850-2150.bsp")
openspace.time.setTime(openspace.time.currentWallTime())
--Test for vernal equinox time 2017
--openspace.time.setTime("2017 MAR 20 10:28:30.500")
dofile(openspace.absPath('${SCRIPTS}/bind_keys_satellites.lua'))
end
function postInitialization()
--[[
The scripts in this function are executed after all objects in the scene have been
created and initialized, but before the first render call. This is the place to set
graphical settings for the renderables.
]]--
openspace.printInfo("Setting default values")
openspace.setPropertyValue("SunMarker.renderable.enabled", false)
openspace.setPropertyValue("SunGlare.renderable.enabled", false)
openspace.setPropertyValue("MilkyWay.renderable.enabled", false)
openspace.setPropertyValue("EarthMarker.renderable.enabled", false)
openspace.setPropertyValue("EarthTrail.renderable.enabled", false)
openspace.setPropertyValue("Earth.renderable.performShading", false)
openspace.resetCameraDirection()
openspace.printInfo("Done setting default values")
if openspace.modules.isLoaded("ISWA") then
openspace.iswa.addCdfFiles("${OPENSPACE_DATA}/cdflist.json");
--openspace.iswa.addCygnet(7);
--openspace.iswa.addCygnet(-4,"Data","Gm");
--openspace.iswa.addCygnet(-5,"Data","Gm");
--openspace.iswa.addCygnet(-6,"Data","Gm");
--openspace.iswa.addCygnet(-7,"Data","Gm");
--openspace.iswa.addCygnet(-8,"Data","Gm");
--openspace.iswa.addCygnet(-9,"Data","Gm");
end
end
return {
ScenePath = ".",
CommonFolder = "common",
Camera = {
Focus = "Earth",
Position = {-54343425747.129051, -73298476295.934555, 116584089130.590012},
Rotation = {-0.078983, 0.830093, 0.014241, -0.551819},
},
Modules = {
--"satellites/earth",
"sun",
"earth",
-- "stars",
-- "milkyway",
"satellites"
}
}