diff --git a/.editorconfig b/.editorconfig index 8ac26a431b..c1bf4823be 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,7 +6,6 @@ root = true # Unix-style newlines with a newline ending every file [*] charset = utf-8 -end_of_line = lf indent_style = space indent_size = 4 insert_final_newline = true diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 75% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index b025b07993..2366bc69ea 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,4 +1,4 @@ ## How to contribute The easiest way to contribute is through a separate fork of the repository and submitting a pull-request. One of the core developers will judge the pull request and integrate it into the main `master` branch. Preferably, there is an accompanying issue (created by you or not) which is solved by the PR. In this case, feel free to use the phrase "(closes #XXX)" in the text of the pull request, where `XXX` is the number of the issue that you have solved. The PR should be in its own separate branch following the naming `pr/feature`, where `feature` is a short, descripting name of the additional feature or bug contained in the PR. -For more information we refer to the [Wiki](https://github.com/OpenSpace/OpenSpace/wiki). If there are any questions, feel free to contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace: Contributing). \ No newline at end of file +For more information we refer to the [Wiki](https://openspace.github.io). If there are any questions, feel free to contact us via [email](mailto:mail@alexanderbock.eu?subject=OpenSpace: Contributing). \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000000..6a26096403 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,7 @@ +<< Description of the problem >> + +<< What did you expect to happen >> +<< What did happen? >> + + +<< Attach screenshots, if possible >> \ No newline at end of file diff --git a/.gitignore b/.gitignore index b0c8998a68..d80ea9cee9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,38 +1,40 @@ -.DS_Store -.vscode -/bin/ +# Build and editor thing /build/ -/cache/ -/doc -/documentation -/ext/SGCT -/logs -/sync/ -tmp/ -Thumbs.db +/build-ninja/ +/build-xcode/ +/build-make/ *~ -*.swp -*.gglsl -*.GhoulGenerated.glsl -*.OpenSpaceGenerated.glsl -shaders/generated/* -# CMake stuff -CMakeCache.txt -CMakeFiles -Makefile -cmake_install.cmake -install_manifest.txt -# Eclipse stuff +*.dir +*.idea/ +.build-vs/ .cproject .project -shaders/ABuffer/constants.hglsl -*.idea/ .vs/ -.build-vs/ -*.dir +.vscode +CMakeCache.txt +CMakeFiles +CMakeLists.txt.user cmake-build-* -x64/ +cmake_install.cmake +install_manifest.txt +Makefile + +# OS specific things +.DS_Store +Thumbs.db + +# OpenSpace-generated folders and files +/bin/ +/cache/ +/cache-*/ +/cache_gdal/ +/documentation/ +/logs/ +/screenshots/ +/recordings/ +/sync/ +/temp/ +# Customization is not supposed to be committed customization.lua +# The COMMIT info is generated everytime CMake is run COMMIT.md -screenshots -cache_gdal/ diff --git a/.gitmodules b/.gitmodules index 4311e7851a..516a853c2b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,19 +10,19 @@ [submodule "modules/touch/ext/libTUIO11"] path = modules/touch/ext/libTUIO11 url = https://github.com/mkalten/TUIO11_CPP -[submodule "modules/sync/ext/libtorrent"] - path = modules/sync/ext/libtorrent - url = https://github.com/OpenSpace/libtorrent.git [submodule "apps/OpenSpace-MinVR/ext/minvr"] path = apps/OpenSpace-MinVR/ext/minvr url = https://github.com/OpenSpace/minvr branch = OpenSpace [submodule "apps/OpenSpace/ext/sgct"] path = apps/OpenSpace/ext/sgct - url = https://github.com/opensgct/sgct + url = https://github.com/sgct/sgct [submodule "modules/fitsfilereader/ext/CCfits"] path = modules/fitsfilereader/ext/CCfits url = https://github.com/OpenSpace/CCfits.git [submodule "modules/fitsfilereader/ext/cfitsio"] path = modules/fitsfilereader/ext/cfitsio url = https://github.com/OpenSpace/cfitsio.git +[submodule "apps/OpenSpace-MinVR/ext/glfw"] + path = apps/OpenSpace-MinVR/ext/glfw + url = https://github.com/opensgct/glfw diff --git a/ACKNOWLEDGMENTS.md b/ACKNOWLEDGMENTS.md new file mode 100644 index 0000000000..a6db596dc7 --- /dev/null +++ b/ACKNOWLEDGMENTS.md @@ -0,0 +1,3 @@ +OpenSpace is funded in part by NASA under award No NNX16AB93A. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Aeronautics and Space Administration. + +OpenSpace is also funded in part by the Knut & Alice Wallenberg Foundation in Sweden and the Swedish e-Science Research Centre. diff --git a/CMakeLists.txt b/CMakeLists.txt index 238708027f..ac3c0cf925 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2018 # +# Copyright (c) 2014-2020 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -22,14 +22,14 @@ # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # ########################################################################################## -cmake_minimum_required(VERSION 3.8 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project(OpenSpace) set(OPENSPACE_VERSION_MAJOR 0) -set(OPENSPACE_VERSION_MINOR 13) -set(OPENSPACE_VERSION_PATCH 0) -set(OPENSPACE_VERSION_STRING "Beta-3") +set(OPENSPACE_VERSION_MINOR 15) +set(OPENSPACE_VERSION_PATCH 2) +set(OPENSPACE_VERSION_STRING "Beta-7") set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}") @@ -43,21 +43,34 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/handle_modules.cmake) include(${GHOUL_BASE_DIR}/support/cmake/copy_shared_libraries.cmake) include(${GHOUL_BASE_DIR}/support/cmake/handle_external_library.cmake) include(${GHOUL_BASE_DIR}/support/cmake/message_macros.cmake) -include(${GHOUL_BASE_DIR}/support/cmake/include_gtest.cmake) begin_header("Configuring OpenSpace project") +message(STATUS "CMake version: ${CMAKE_VERSION}") + +# Bail out if the user tries to generate a 32 bit project. +if (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8) + message(FATAL_ERROR "OpenSpace can only be generated for 64 bit architectures.") +endif () ########################################################################################## # Cleanup project # ########################################################################################## set(OPENSPACE_APPS_DIR "${OPENSPACE_BASE_DIR}/apps") set(OPENSPACE_EXT_DIR "${OPENSPACE_BASE_DIR}/ext") + +if (NOT EXISTS ${OPENSPACE_EXT_DIR}/ghoul/CMakeLists.txt) + message(FATAL_ERROR "Git submodules are missing. Please run \n" + "git submodule update --init --recursive \n" + "to download the missing dependencies." + ) +endif () + set_property(GLOBAL PROPERTY USE_FOLDERS On) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER CMake) mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY CMAKE_BUILD_TYPE CMAKE_DEBUG_POSTFIX - CMAKE_INSTALL_PREFIX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET - CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX) + CMAKE_INSTALL_PREFIX CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET + CMAKE_OSX_SYSROOT CMAKE_RELEASE_POSTFIX) # Set build output directories set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${OPENSPACE_CMAKE_EXT_DIR}) @@ -89,14 +102,38 @@ execute_process( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} RESULT_VARIABLE OPENSPACE_GIT_STATUS_RETURN ) -if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0) - set(OPENSPACE_GIT_STATUS "uncomitted changes") +if (NOT OPENSPACE_GIT_STATUS_RETURN EQUAL 0) + set(OPENSPACE_GIT_STATUS "uncommitted changes") else() - set(OPENSPACE_GIT_STATUS "") -endif() + set(OPENSPACE_GIT_STATUS "") +endif () option(OPENSPACE_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF) +if (MSVC) + option(OPENSPACE_OPTIMIZATION_ENABLE_AVX "Enable AVX instruction set for compilation" OFF) + option(OPENSPACE_OPTIMIZATION_ENABLE_AVX2 "Enable AVX2 instruction set for compilation" OFF) + option(OPENSPACE_OPTIMIZATION_ENABLE_AVX512 "Enable AVX2 instruction set for compilation" OFF) + option(OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS "Enable other optimizations, like LTCG, intrinsics, etc") + + if (OPENSPACE_OPTIMIZATION_ENABLE_AVX AND OPENSPACE_OPTIMIZATION_ENABLE_AVX2) + message(FATAL_ERROR "Cannot enable AVX and AVX2 instructions simultaneously") + endif () + + if (OPENSPACE_OPTIMIZATION_ENABLE_AVX AND OPENSPACE_OPTIMIZATION_ENABLE_AVX512) + message(FATAL_ERROR "Cannot enable AVX and AVX512 instructions simultaneously") + endif () + + if (OPENSPACE_OPTIMIZATION_ENABLE_AVX2 AND OPENSPACE_OPTIMIZATION_ENABLE_AVX512) + message(FATAL_ERROR "Cannot enable AVX2 and AVX512 instructions simultaneously") + endif () + + set(GHOUL_OPTIMIZATION_ENABLE_AVX ${OPENSPACE_OPTIMIZATION_ENABLE_AVX} CACHE BOOL "" FORCE) + set(GHOUL_OPTIMIZATION_ENABLE_AVX2 ${OPENSPACE_OPTIMIZATION_ENABLE_AVX2} CACHE BOOL "" FORCE) + set(GHOUL_OPTIMIZATION_ENABLE_AVX512 ${OPENSPACE_OPTIMIZATION_ENABLE_AVX512} CACHE BOOL "" FORCE) + set(GHOUL_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS ${OPENSPACE_OPTIMIZATION_ENABLE_OTHER_OPTIMIZATIONS} CACHE BOOL "" FORCE) +endif () + include(src/CMakeLists.txt) ########################################################################################## @@ -104,21 +141,22 @@ include(src/CMakeLists.txt) ########################################################################################## # System libraries if (APPLE) - begin_dependency("Core Libraries") - target_include_directories(openspace-core PUBLIC "/Developer/Headers/FlatCarbon") - find_library(COREFOUNDATION_LIBRARY CoreFoundation) - find_library(CARBON_LIBRARY Carbon) - find_library(COCOA_LIBRARY Carbon) - find_library(APP_SERVICES_LIBRARY ApplicationServices) - mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY) - target_link_libraries(openspace-core ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY} - ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY}) - end_dependency() -endif() + begin_dependency("Core Libraries") + target_include_directories(openspace-core PUBLIC "/Developer/Headers/FlatCarbon") + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CARBON_LIBRARY Carbon) + find_library(COCOA_LIBRARY Carbon) + find_library(APP_SERVICES_LIBRARY ApplicationServices) + mark_as_advanced(CARBON_LIBRARY COCOA_LIBRARY APP_SERVICES_LIBRARY) + target_link_libraries(openspace-core ${CARBON_LIBRARY} ${COREFOUNDATION_LIBRARY} + ${COCOA_LIBRARY} ${APP_SERVICES_LIBRARY}) + end_dependency() +endif () # Ghoul add_subdirectory(${OPENSPACE_EXT_DIR}/ghoul) -target_link_libraries(openspace-core Ghoul) +target_link_libraries(openspace-core PUBLIC Ghoul) +set_openspace_compile_settings(Ghoul) set_folder_location(Lua "External") set_folder_location(lz4 "External") set_folder_location(GhoulTest "Unit Tests") @@ -127,82 +165,53 @@ link_directories("${GHOUL_LIBRARY_DIRS}") # Spice begin_dependency("Spice") add_subdirectory(${OPENSPACE_EXT_DIR}/spice) -target_link_libraries(openspace-core Spice) +target_link_libraries(openspace-core PUBLIC Spice) set_folder_location(Spice "External") end_dependency() # Curl begin_dependency("CURL") if (WIN32) - set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl") - target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include) - target_link_libraries(openspace-core ${CURL_ROOT_DIR}/lib/libcurl.lib) - target_compile_definitions(openspace-core PUBLIC - "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB") + set(CURL_ROOT_DIR "${OPENSPACE_EXT_DIR}/curl") + target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_ROOT_DIR}/include) + target_link_libraries(openspace-core PUBLIC ${CURL_ROOT_DIR}/lib/libcurl.lib) + target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED" "CURL_STATICLIB") else () - find_package(CURL) - if (CURL_FOUND) - target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS}) - target_link_libraries(openspace-core ${CURL_LIBRARIES}) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED") - endif () -endif() + find_package(CURL) + if (CURL_FOUND) + target_include_directories(openspace-core SYSTEM PUBLIC ${CURL_INCLUDE_DIRS}) + target_link_libraries(openspace-core PUBLIC ${CURL_LIBRARIES}) + target_compile_definitions(openspace-core PUBLIC "OPENSPACE_CURL_ENABLED") + endif () +endif () end_dependency() # Qt # Unfortunately, we have to set this value manually; sigh # In the future, if the Qt version is updated, just add to this variable ---abock if (APPLE) - set(CMAKE_PREFIX_PATH - "~/Qt/5.6/clang_64/lib/cmake" - "~/Qt/5.7/clang_64/lib/cmake" - "~/Qt/5.8/clang_64/lib/cmake" - ) + set(CMAKE_PREFIX_PATH + "~/Qt/5.6/clang_64/lib/cmake" + "~/Qt/5.7/clang_64/lib/cmake" + "~/Qt/5.8/clang_64/lib/cmake" + "~/Qt/5.9/clang_64/lib/cmake" + "~/Qt/5.10/clang_64/lib/cmake" + "~/Qt/5.11/clang_64/lib/cmake" + "~/Qt/5.12/clang_64/lib/cmake" + ) endif () if (MSVC) - option(OPENSPACE_ENABLE_VLD "Enable the Visual Leak Detector" OFF) - if (OPENSPACE_ENABLE_VLD) - begin_dependency("Visual Leak Detector") - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_ENABLE_VLD") - target_link_libraries(openspace-core ${OPENSPACE_EXT_DIR}/vld/lib/vld.lib) - target_include_directories(openspace-core PUBLIC ${OPENSPACE_EXT_DIR}/vld) - end_dependency() - endif () + option(OPENSPACE_NVTOOLS_ENABLED "Include support for Nvidia Tools Extensions" OFF) + set(OPENSPACE_NVTOOLS_PATH "C:/Program Files/NVIDIA Corporation/NvToolsExt") + if (OPENSPACE_NVTOOLS_ENABLED) + begin_dependency("Nvidia Tools Extension") + target_compile_definitions(openspace-core PUBLIC "OPENSPACE_HAS_NVTOOLS") + target_include_directories(openspace-core PUBLIC "${OPENSPACE_NVTOOLS_PATH}/include") + end_dependency() + endif () endif () - -########################################################################################## -# Tests # -########################################################################################## -option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON) -if (OPENSPACE_HAVE_TESTS) - include_gtest("${GHOUL_BASE_DIR}/ext/googletest") - - file(GLOB_RECURSE OPENSPACE_TEST_FILES ${OPENSPACE_BASE_DIR}/tests/*.inl) - add_executable(OpenSpaceTest ${OPENSPACE_BASE_DIR}/tests/main.cpp ${OPENSPACE_TEST_FILES}) - - target_include_directories(OpenSpaceTest PUBLIC - "${OPENSPACE_BASE_DIR}/include" - "${OPENSPACE_BASE_DIR}/tests" - "${OPENSPACE_EXT_DIR}/ghoul/ext/googletest/googletest/include" - ) - target_compile_definitions(OpenSpaceTest PUBLIC - "GHL_THROW_ON_ASSERT" "GTEST_HAS_TR1_TUPLE=0" - ) - target_link_libraries(OpenSpaceTest gtest openspace-core) - - set_folder_location(OpenSpaceTest "Unit Tests") - - if (MSVC) - set_target_properties(OpenSpaceTest PROPERTIES LINK_FLAGS - "/NODEFAULTLIB:LIBCMTD.lib /NODEFAULTLIB:LIBCMT.lib" - ) - endif () - set_openspace_compile_settings(OpenSpaceTest) -endif (OPENSPACE_HAVE_TESTS) - - begin_header("Configuring Modules") set(OPENSPACE_EXTERNAL_MODULES_PATHS "" CACHE STRING "List of external modules") handle_modules("${OPENSPACE_BASE_DIR}/modules" "${OPENSPACE_EXTERNAL_MODULES_PATHS}") @@ -214,29 +223,33 @@ handle_applications() end_header("End: Configuring Applications") message(STATUS "") +option(OPENSPACE_HAVE_TESTS "Activate the OpenSpace unit tests" ON) +if (OPENSPACE_HAVE_TESTS) + begin_header("Generating OpenSpace unit test") + add_subdirectory("${OPENSPACE_BASE_DIR}/tests") + end_header() +endif (OPENSPACE_HAVE_TESTS) + # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the # target as of July 2017, which is needed. if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) - # wanted by CEF - set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE") + # wanted by CEF + set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE") - if (WIN32) - set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) - endif () + set(PROJECT_ARCH "x86_64") - # Add the CEF binary distribution's cmake/ directory to the module path and - # find CEF to initialize it properly. - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") - include(webbrowser_helpers) + if (WIN32) + set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) + endif () - if (TARGET OpenSpaceTest) - set_cef_targets("${CEF_ROOT}" OpenSpaceTest) - run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") - endif () + # Add the CEF binary distribution's cmake/ directory to the module path and + # find CEF to initialize it properly. + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") + include(webbrowser_helpers) elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () ########################################################################################## @@ -244,14 +257,19 @@ endif () ########################################################################################## option(OPENSPACE_WITH_ABUFFER_RENDERER "Compile ABuffer Renderer" OFF) if (OPENSPACE_WITH_ABUFFER_RENDERER) - target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_ABUFFER_RENDERER") + target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_ABUFFER_RENDERER") +endif () + +option(OPENSPACE_WITH_INSTRUMENTATION "Add instrumentation options" OFF) +if (OPENSPACE_WITH_INSTRUMENTATION) + target_compile_definitions(openspace-core PUBLIC "OPENSPACE_WITH_INSTRUMENTATION") endif () # Just in case, create the bin directory add_custom_command( - TARGET openspace-core - PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + TARGET openspace-core + PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) # Manage the CPack packaging diff --git a/CREDITS.md b/CREDITS.md index f5138ee08d..5e074cc2aa 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -1,30 +1,42 @@ +# Core Team Alexander Bock -Joakim Kilby Emil Axelsson -Eric Myers -Jonathas Costa -Matthew Territo -Gene Payne Kalle Bladin -Erik Sundén -Micah Acinapura - +Jonathas Costa Jonas Strandstedt -Hans-Christian Helltegen Michal Marcinkowski -Anton Arbring -Tomas Forsyth Rosin -Erik Broberg -Michael Nilsson +Joakim Kilby +Gene Payne +Micah Acinapura +Erik Sundén +Eric Myers + Sebastian Piwell +Erik Broberg +Jonathan Bosson +Michael Nilsson +Elon Olsson +Jonathan Franzen +Hans-Christian Helltegen +Anton Arbring +Oskar Carlbaum +Matthew Territo +Jonathan Grangien +Klas Eskilson +Tomas Forsyth Rosin Niclas Hultberg Rickard Lindtstedt Michael Sjöström Michael Novén -Oskar Carlbaum -Jonathan Bosson -Klas Eskilson Christoffer Särevall + +# Community Support Anteige +arfon +DavidLaidlaw +mik3caprio +mingenuity +nbartzokas +nealmcb noahdasanaike diff --git a/Jenkinsfile b/Jenkinsfile index 19ba20659e..20f10f29c0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,87 +1,166 @@ -def modules = [ - "base", - "debugging", - "fieldlines", - "galaxy", - "globebrowsing", - "imgui", - "iswa", - "kameleon", - "kameleonvolume", - "multiresvolume", - "spacecraftinstruments", - "space", - "toyvolume", - "volume" -]; +import groovy.io.FileType -def flags = "-DGHOUL_USE_DEVIL=OFF " +library('sharedSpace'); // jenkins-pipeline-lib -for (module in modules) { - flags += "-DOPENSPACE_MODULE_" + module.toUpperCase() + "=ON " -} -echo flags +def url = 'https://github.com/OpenSpace/OpenSpace'; +def branch = env.BRANCH_NAME; -stage('Build') { - parallel linux: { - node('linux') { - timeout(time: 90, unit: 'MINUTES') { - - deleteDir() - checkout scm - sh 'git submodule update --init --recursive' - sh ''' - mkdir -p build - cd build - cmake .. ''' + - flags + ''' .. - make -j4 OpenSpace - ''' - } - } - }, - windows: { - node('windows') { - timeout(time: 90, unit: 'MINUTES') { - // We specify the workspace directory manually to reduce the path length and thus try to avoid MSB3491 on Visual Studio - ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { - deleteDir() - checkout scm - bat ''' - git submodule update --init --recursive - if not exist "build" mkdir "build" - cd build - cmake -G "Visual Studio 15 2017 Win64" .. ''' + - flags + ''' .. - msbuild.exe OpenSpace.sln /nologo /verbosity:minimal /p:Configuration=Debug /target:OpenSpace - ''' - } - } - } - }, - osx: { - node('osx') { - timeout(time: 90, unit: 'MINUTES') { - deleteDir() - checkout scm - sh 'git submodule update --init --recursive' - sh ''' - export PATH=${PATH}:/usr/local/bin:/Applications/CMake.app/Contents/bin - export CMAKE_BUILD_TOOL=/Applications/CMake.app/Contents/bin/CMake - srcDir=$PWD - if [ ! -d ${srcDir} ]; then - mkdir ${srcDir} - fi - if [ ! -d ${srcDir}/build ]; then - mkdir ${srcDir}/build - fi - cd ${srcDir}/build - /Applications/CMake.app/Contents/bin/cmake -G Xcode ${srcDir} .. ''' + - flags + ''' - xcodebuild -parallelizeTargets -jobs 4 -target OpenSpace - ''' - } - } +@NonCPS +def readDir() { + def dirsl = []; + new File("${workspace}").eachDir() { + dirs -> println dirs.getName() + if (!dirs.getName().startsWith('.')) { + dirsl.add(dirs.getName()); } + } + return dirs; +} + +def moduleCMakeFlags() { + def modules = []; + // using new File doesn't work as it is not allowed in the sandbox + + if (isUnix()) { + modules = sh(returnStdout: true, script: 'ls -d modules/*').trim().split('\n'); + }; + else { + modules = bat(returnStdout: true, script: '@dir modules /b /ad /on').trim().split('\r\n'); + } + + // def dirs = readDir(); + // def currentDir = new File('.') + // def dirs = [] + // currentDir.eachFile FileType.DIRECTORIES, { + // dirs << it.name + // } + // def moduleFlags = [ + // 'atmosphere', + // 'base', + // // 'cefwebgui', + // 'debugging', + // 'digitaluniverse', + // 'fieldlines', + // 'fieldlinessequence', + // 'fitsfilereader', + // 'gaia', + // 'galaxy', + // 'globebrowsing', + // 'imgui', + // 'iswa', + // 'kameleon', + // 'kameleonvolume', + // 'multiresvolume', + // 'server', + // 'space', + // 'spacecraftinstruments', + // 'space', + // 'spout', + // 'sync', + // 'touch', + // 'toyvolume', + // 'volume', + // // 'webbrowser', + // // 'webgui' + // ]; + + def flags = ''; + for (module in modules) { + flags += "-D OPENSPACE_MODULE_${module.toUpperCase()}=ON " + } + return flags; +} + +// echo flags + +// +// Pipeline start +// + +parallel master: { + node('master') { + stage('master/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + helper.createDirectory('build'); + } + stage('master/cppcheck/create') { + sh 'cppcheck --enable=all --xml --xml-version=2 -i ext --suppressions-list=support/cppcheck/suppressions.txt include modules src tests 2> build/cppcheck.xml'; + } + stage('master/cloc/create') { + sh 'cloc --by-file --exclude-dir=build,data,ext --xml --out=build/cloc.xml --force-lang-def=support/cloc/langDef --quiet .'; + } + } +}, +linux: { + node('linux') { + stage('linux/scm') { + deleteDir() + gitHelper.checkoutGit(url, branch); + } + stage('linux/build') { + // Not sure why the linking of OpenSpaceTest takes so long + compileHelper.build(compileHelper.Make(), compileHelper.Gcc(), moduleCMakeFlags(), 'OpenSpace', 'build-all'); + } + stage('linux/warnings') { + // compileHelper.recordCompileIssues(compileHelper.Gcc()); + } + stage('linux/test') { + // testHelper.runUnitTests('build/OpenSpaceTest'); + } + } // node('linux') +}, +windows: { + node('windows') { + ws("${env.JENKINS_BASE}/O/${env.BRANCH_NAME}/${env.BUILD_ID}") { + stage('windows/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('windows/build') { + compileHelper.build(compileHelper.VisualStudio(), compileHelper.VisualStudio(), moduleCMakeFlags(), '', 'build-all'); + } + stage('windows/warnings') { + // compileHelper.recordCompileIssues(compileHelper.VisualStudio()); + } + stage('windows/test') { + // Currently, the unit tests are failing on Windows + // testHelper.runUnitTests('bin\\Debug\\OpenSpaceTest') + } + } // node('windows') + } +}, +osx: { + node('osx') { + stage('osx/scm') { + deleteDir(); + gitHelper.checkoutGit(url, branch); + } + stage('osx/build') { + compileHelper.build(compileHelper.Xcode(), compileHelper.Clang(), moduleCMakeFlags(), '', 'build-all'); + } + stage('osx/warnings') { + // compileHelper.recordCompileIssues(compileHelper.Clang()); + } + stage('osx/test') { + // Currently, the unit tests are crashing on OS X + // testHelper.runUnitTests('build/Debug/OpenSpaceTest') + } + } // node('osx') +} + +// +// Post-build actions +// +node('master') { + stage('master/cppcheck/publish') { + // publishCppcheck(pattern: 'build/cppcheck.xml'); + } + stage('master/cloc/publish') { + sloccountPublish(encoding: '', pattern: 'build/cloc.xml'); + } + stage('master/notifications') { + slackHelper.sendChangeSetSlackMessage(currentBuild); + } } diff --git a/LICENSE.md b/LICENSE.md index b82e897d9f..4e0881c01c 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2014-2018 +Copyright (c) 2014-2020 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software diff --git a/README.md b/README.md index afe029e051..76dbc82bb2 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ The project stems from the same academic collaboration between Sweden’s [Link - Utilization of NASA’s SPICE observational geometry system with its Planetary Data Service (PDS) to enable space mission visualization that reveal how missions are designed to gather science. - Globe browsing techniques across spatial and temporal scales to examine scientific campaigns on multiple planets, including close up surface exploration. -This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [Wiki](https://github.com/OpenSpace/OpenSpace/wiki) pages here on GitHub, specifically [building](https://github.com/OpenSpace/OpenSpace/wiki/General-Getting-Started-Guide%3A-Compiling-OpenSpace) for [Windows](https://github.com/OpenSpace/OpenSpace/wiki/Guides-Compile-OpenSpace-on-Windows), [Linux](https://github.com/OpenSpace/OpenSpace/wiki/Guides-Compile-OpenSpace-on-Linux), and [MacOS](https://github.com/OpenSpace/OpenSpace/wiki/Guides-Compile-OpenSpace-on-macOS). Required preexisting dependencies are: [Boost](http://www.boost.org/) and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:). +OpenSpace requires graphics support for [OpenGL](https://www.opengl.org/) version 3.3. + +This repository contains the source code and example scenes for OpenSpace, but does not contain any data. To build and install the client, we refer to the [OpenSpace Wiki](http://wiki.openspaceproject.com/), specifically [building](http://wiki.openspaceproject.com/docs/developers/compiling/general) for [Windows](http://wiki.openspaceproject.com/docs/developers/compiling/windows), [Linux (Ubuntu)](http://wiki.openspaceproject.com/docs/developers/compiling/ubuntu), and [MacOS](http://wiki.openspaceproject.com/docs/developers/compiling/macos). Required preexisting dependencies are: [Boost](http://www.boost.org/) and [Qt](http://www.qt.io/download). Feel free to create issues for missing features, bug reports, or compile problems or contact us via [email](mailto:alexander.bock@me.com?subject=OpenSpace:). Regarding any issues, you are very welcome on our [Slack support channel](https://openspacesupport.slack.com) to which you can freely [sign-up](https://join.slack.com/t/openspacesupport/shared_invite/enQtMjUxNzUyMTQ1ODQxLTI4YjNmMTY3ZDI1N2Q1NWM1ZjQ1NTQyNzAxM2YyMGQ5Y2NmYWJiNjI1NjU4YTkyNTc5ZDE5NzdhNGM2YmUzYTk). diff --git a/apps/OpenSpace-MinVR/CMakeLists.txt b/apps/OpenSpace-MinVR/CMakeLists.txt index f03a46e18f..a13829c550 100644 --- a/apps/OpenSpace-MinVR/CMakeLists.txt +++ b/apps/OpenSpace-MinVR/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2018 # +# Copyright (c) 2014-2020 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -32,14 +32,14 @@ set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT ON CACHE BOOL "" FORCE) add_subdirectory(ext/minvr) create_new_application(OpenSpace-MinVR - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns - PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" ) target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/minvr/src) @@ -50,40 +50,37 @@ target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ex target_include_directories(OpenSpace-MinVR PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/minvr/external/GLFW/src/include) -target_link_libraries(OpenSpace-MinVR libOpenSpace MinVR) +target_link_libraries(OpenSpace-MinVR openspace-core MinVR) # Web Browser and Web gui # Why not put these in the module's path? Because they do not have access to the # target as of July 2017, which is needed. if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) - # wanted by CEF - set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE") - - if (WIN32) - set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace-MinVR/openspace.rc) - endif () + if (WIN32) + set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace-MinVR/openspace.rc) + endif () - # Add the CEF binary distribution's cmake/ directory to the module path and - # find CEF to initialize it properly. - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") - include(webbrowser_helpers) + # Add the CEF binary distribution's cmake/ directory to the module path and + # find CEF to initialize it properly. + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") + include(webbrowser_helpers) - set_cef_targets("${CEF_ROOT}" OpenSpace-MinVR) - run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") + set_cef_targets("${CEF_ROOT}" OpenSpace-MinVR) + run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () if (OPENSPACE_MODULE_WEBGUI AND WEBGUI_MODULE_PATH) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBGUI_MODULE_PATH}/cmake") - include(webgui_helpers) - build_webgui_source(OpenSpace-MinVR) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBGUI_MODULE_PATH}/cmake") + include(webgui_helpers) + build_webgui_source(OpenSpace-MinVR) elseif(OPENSPACE_MODULE_WEBGUI) - message(WARNING "WebGui is configured to be included, but the web source could not be found. Try configuring CMake again.") + message(WARNING "WebGui is configured to be included, but the web source could not be found. Try configuring CMake again.") endif() # End Web Browser and Web gui if (MSVC) - # This library is used for being able to output the callstack if an exception escapes - target_link_libraries(OpenSpace-MinVR Dbghelp.lib) + # This library is used for being able to output the callstack if an exception escapes + target_link_libraries(OpenSpace-MinVR Dbghelp.lib) endif() diff --git a/apps/OpenSpace-MinVR/ext/glfw b/apps/OpenSpace-MinVR/ext/glfw new file mode 160000 index 0000000000..7ef34eb06d --- /dev/null +++ b/apps/OpenSpace-MinVR/ext/glfw @@ -0,0 +1 @@ +Subproject commit 7ef34eb06de54dd9186d3d21a401b2ef819b59e7 diff --git a/apps/OpenSpace-MinVR/main.cpp b/apps/OpenSpace-MinVR/main.cpp index 4351aebada..cd1191434b 100644 --- a/apps/OpenSpace-MinVR/main.cpp +++ b/apps/OpenSpace-MinVR/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2018 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -200,7 +200,14 @@ void Handler::onVREvent(const VRDataIndex& eventData) { if (button == MouseButton::Right && action == MouseAction::Press) { windowingGlobals.mouseButtons |= 1 << 2; } - global::openSpaceEngine.mouseButtonCallback(button, action); + + using KM = KeyModifier; + KM mod = KM::NoModifier; + mod |= keyboardState.modifierShift ? KM::Shift : KM::NoModifier; + mod |= keyboardState.modifierCtrl ? KM::Control : KM::NoModifier; + mod |= keyboardState.modifierAlt ? KM::Alt : KM::NoModifier; + + global::openSpaceEngine.mouseButtonCallback(button, action, mod); } } @@ -341,6 +348,14 @@ int main(int argc, char** argv) { ghoul::initialize(); + // Register the path of the executable, + // to make it possible to find other files in the same directory. + FileSys.registerPathToken( + "${BIN}", + ghoul::filesystem::File(absPath(argv[0])).directoryName(), + ghoul::filesystem::FileSystem::Override::Yes + ); + // Create the OpenSpace engine and get arguments for the SGCT engine std::string windowConfiguration; try { diff --git a/apps/OpenSpace/CMakeLists.txt b/apps/OpenSpace/CMakeLists.txt index 936ebb15b9..23d3ca787a 100644 --- a/apps/OpenSpace/CMakeLists.txt +++ b/apps/OpenSpace/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2018 # +# Copyright (c) 2014-2020 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -33,115 +33,102 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/global_variables.cmake) option(OPENSPACE_OPENVR_SUPPORT "Build OpenSpace application with OpenVR support" OFF) if (OPENSPACE_OPENVR_SUPPORT) - begin_header("Dependency: OpenVR") - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OPENSPACE_EXT_DIR}/sgct/cmake/modules/") + begin_header("Dependency: OpenVR") + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OPENSPACE_EXT_DIR}/sgct/cmake/modules/") - find_package(OpenVR REQUIRED) + find_package(OpenVR REQUIRED) - set(SGCT_OPENVR_DEFINITIONS OPENVR_SUPPORT) - if (NOT SGCT_OPENVR_INCLUDE_DIRECTORY) - if (WIN32) - find_path(SGCT_OPENVR_INCLUDE_DIRECTORY - NAMES SGCTOpenVR.h - PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr NO_DEFAULT_PATH - REQUIRED - ) - else () - find_path(SGCT_OPENVR_INCLUDE_DIRECTORY - NAMES SGCTOpenVR.h - PATH_SUFFIXES SGCTOpenVR - PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr - REQUIRED - ) - endif () + set(SGCT_OPENVR_DEFINITIONS OPENVR_SUPPORT) + if (NOT SGCT_OPENVR_INCLUDE_DIRECTORY) + if (WIN32) + find_path(SGCT_OPENVR_INCLUDE_DIRECTORY + NAMES SGCTOpenVR.h + PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr NO_DEFAULT_PATH + REQUIRED + ) else () - set(SGCT_OPENVR_FILES - ${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.h - ${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.cpp - ) + find_path(SGCT_OPENVR_INCLUDE_DIRECTORY + NAMES SGCTOpenVR.h + PATH_SUFFIXES SGCTOpenVR + PATHS ${OPENSPACE_EXT_DIR}/sgct/additional_includes/openvr + REQUIRED + ) endif () - end_header("Dependency: OpenVR") -endif() + else () + set(SGCT_OPENVR_FILES + ${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.h + ${SGCT_OPENVR_INCLUDE_DIRECTORY}/SGCTOpenVR.cpp + ) + endif () + end_header("Dependency: OpenVR") +endif () ##### # Spout ##### if (SGCT_SPOUT_SUPPORT AND NOT OPENSPACE_MODULE_SPOUT) - message(WARNING "Spout support from SGCT was requested, but OpenSpace Spout module was disabled") - message(STATUS "Enabling module as dependency") - set(OPENSPACE_MODULE_SPOUT ON CACHE BOOL "Build OPENSPACE_MODULE_SPOUTModule" FORCE) + message(WARNING "Spout support from SGCT was requested, but OpenSpace Spout module was disabled") + message(STATUS "Enabling module as dependency") + set(OPENSPACE_MODULE_SPOUT ON CACHE BOOL "Build OPENSPACE_MODULE_SPOUTModule" FORCE) endif () -set(MACOSX_BUNDLE_ICON_FILE openspace.icns) + +##### +# macos +##### +if (APPLE) + set(MACOSX_BUNDLE_ICON_FILE openspace.icns) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE) + set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--deep" CACHE STRING "Other Code Signing Flags" FORCE) +endif () create_new_application(OpenSpace - ${SGCT_OPENVR_FILES} - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + ${SGCT_OPENVR_FILES} + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns - PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" ) target_include_directories( - OpenSpace PRIVATE - ${OPENVR_INCLUDE_DIRS} - ${SGCT_OPENVR_INCLUDE_DIRECTORY} - ${SPOUT_INCLUDE_DIRS} + OpenSpace PRIVATE + ${OPENVR_INCLUDE_DIRS} + ${SGCT_OPENVR_INCLUDE_DIRECTORY} + ${SPOUT_INCLUDE_DIRS} ) target_link_libraries(OpenSpace openspace-core ${OPENVR_LIBRARY} ${SPOUT_LIBRARY}) target_compile_definitions(OpenSpace PRIVATE - ${SGCT_OPENVR_DEFINITIONS} - ${SPOUT_DEFINITIONS} + ${SGCT_OPENVR_DEFINITIONS} + ${SPOUT_DEFINITIONS} ) begin_header("Dependency: SGCT") set(SGCT_TEXT OFF CACHE BOOL "" FORCE) -set(SGCT_BUILD_CSHARP_PROJECTS OFF CACHE BOOL "" FORCE) -set(SGCT_LIGHT_ONLY ON CACHE BOOL "" FORCE) -set(SGCT_CUSTOMOUTPUTDIRS OFF CACHE BOOL "" FORCE) -set(JPEG_TURBO_WITH_SIMD OFF CACHE BOOL "" FORCE) +set(SGCT_DEP_INCLUDE_FREETYPE OFF CACHE BOOL "" FORCE) +set(SGCT_DEP_INCLUDE_FMT OFF CACHE BOOL "" FORCE) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct) target_include_directories(OpenSpace SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/ext/sgct/include) -target_link_libraries( - OpenSpace - sgct_light glew glfw png16_static quat tinyxml2static turbojpeg-static - vrpn - ${GLFW_LIBRARIES} -) +target_link_libraries(OpenSpace sgct) -mark_as_advanced(EXECUTABLE_OUTPUT_PATH GLFW_BUILD_DOCS GLFW_BUILD_EXAMPLES - GLFW_BUILD_TESTS GLFW_INSTALL GLFW_USE_HYBRID_HPG GLFW_USE_OSMESA GLFW_VULKAN_STATIC - INSTALL_BIN_DIR INSTALL_INC_DIR INSTALL_LIB_DIR INSTALL_MAN_DIR INSTALL_PKGCONFIG_DIR - IOKIT_LIBRARY JPEG_TURBO_FORCE32bit JPEG_TURBO_WITH_12BIT JPEG_TURBO_WITH_ARITH_DEC - JPEG_TURBO_WITH_ARITH_ENC JPEG_TURBO_WITH_JPEG7 JPEG_TURBO_WITH_JPEG8 - JPEG_TURBO_WITH_MEM_SRCDST JPEG_TURBO_WITH_SIMD JPEG_TURBO_WITH_TURBOJPEG LIB_SUFFIX - LIBRARY_OUTPUT_PATH M_LIBRARY SGCT_BUILD_ALUT SGCT_BUILD_CSHARP_PROJECTS - SGCT_CUSTOMOUTPUTDIRS SGCT_DOXYGEN SGCT_DOXYGEN_QUIET SGCT_EXAMPLES SGCT_INSTALL - SGCT_LIGHT_ONLY SGCT_NO_EXTERNAL_LIBRARIES SGCT_SPOUT_SUPPORT SGCT_TEXT - SGCT_USE_MSVC_RUNTIMES USE_MSVC_RUNTIME_LIBRARY_DLL) - -set_folder_location(sgct_light "External") -set_folder_location(glew "External/SGCT") +set_folder_location(sgct "External") set_folder_location(glfw "External/SGCT") +set_folder_location(miniziplibstatic "External/SGCT") set_folder_location(png16_static "External/SGCT") set_folder_location(quat "External/SGCT") -set_folder_location(simd "External/SGCT") set_folder_location(tinyxml2static "External/SGCT") -set_folder_location(turbojpeg-static "External/SGCT") set_folder_location(vrpn "External/SGCT") set_folder_location(zlibstatic "External/SGCT") -set_folder_location(miniziplibstatic "External/SGCT") if (UNIX AND (NOT APPLE)) - target_link_libraries(OpenSpace Xcursor Xinerama X11) + target_link_libraries(OpenSpace Xcursor Xinerama X11) endif () end_header("Dependency: SGCT") @@ -151,27 +138,31 @@ end_header("Dependency: SGCT") # Why not put these in the module's path? Because they do not have access to the # target as of July 2017, which is needed. if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) - # wanted by CEF - set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE") - - if (WIN32) - set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) - endif () + # wanted by CEF + set(PROJECT_ARCH "x86_64") - # Add the CEF binary distribution's cmake/ directory to the module path and - # find CEF to initialize it properly. - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") - include(webbrowser_helpers) + if (WIN32) + set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) + endif () - set_cef_targets("${CEF_ROOT}" OpenSpace) - run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") + # Add the CEF binary distribution's cmake/ directory to the module path and + # find CEF to initialize it properly. + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") + include(webbrowser_helpers) + + set_cef_targets("${CEF_ROOT}" OpenSpace) + run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () if (MSVC) - begin_header("Dependency: Dbghelp") - # This library is used for being able to output the callstack if an exception escapes - target_link_libraries(OpenSpace Dbghelp.lib) - end_header() + begin_header("Dependency: Dbghelp") + # This library is used for being able to output the callstack if an exception escapes + target_link_libraries(OpenSpace Dbghelp.lib) + end_header() +endif () + +if (OPENSPACE_NVTOOLS_ENABLED) + target_link_libraries(OpenSpace "${OPENSPACE_NVTOOLS_PATH}/lib/x64/nvToolsExt64_1.lib") endif () diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index a29d90e30c..b712e64848 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit a29d90e30cb15359a59179c57eecef0e8a23eec5 +Subproject commit b712e6484894d70a60277bdcf719613b217954a7 diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 845b9d7848..80e5ff01cb 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2018 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -41,7 +41,26 @@ #include #include #include -#include +//#include +#include +#ifdef _WIN32 +#define GLFW_EXPOSE_NATIVE_WIN32 +#else +#define GLFW_INCLUDE_NONE +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -49,10 +68,10 @@ #include #include #include +#include #include #include #include -#include #endif // WIN32 #ifdef OPENVR_SUPPORT @@ -63,17 +82,28 @@ #include "SpoutLibrary.h" #endif // OPENSPACE_HAS_SPOUT +#ifdef OPENSPACE_HAS_NVTOOLS +#include "nvToolsExt.h" +#endif // OPENSPACE_HAS_NVTOOLS + +using namespace openspace; +using namespace sgct; + namespace { constexpr const char* _loggerCat = "main"; constexpr const char* SpoutTag = "Spout"; constexpr const char* OpenVRTag = "OpenVR"; -sgct::Engine* SgctEngine; -sgct::SharedVector _synchronizationBuffer; +// @TODO (abock, 2020-04-09): These state variables should disappear +const Window* currentWindow = nullptr; +const BaseViewport* currentViewport = nullptr; +Frustum::Mode currentFrustumMode; +glm::mat4 currentModelViewProjectionMatrix; +glm::mat4 currentModelMatrix; #ifdef OPENVR_SUPPORT -sgct::SGCTWindow* FirstOpenVRWindow = nullptr; +Window* FirstOpenVRWindow = nullptr; #endif // @@ -107,6 +137,7 @@ std::vector SpoutWindows; #endif // OPENSPACE_HAS_SPOUT +} // // MiniDump generation @@ -124,9 +155,9 @@ LONG WINAPI generateMiniDump(EXCEPTION_POINTERS* exceptionPointers) { std::string dumpFile = fmt::format( "OpenSpace_{}_{}_{}-{}-{}-{}-{}-{}-{}--{}--{}.dmp", - openspace::OPENSPACE_VERSION_MAJOR, - openspace::OPENSPACE_VERSION_MINOR, - openspace::OPENSPACE_VERSION_PATCH, + OPENSPACE_VERSION_MAJOR, + OPENSPACE_VERSION_MINOR, + OPENSPACE_VERSION_PATCH, stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay, @@ -177,69 +208,57 @@ LONG WINAPI generateMiniDump(EXCEPTION_POINTERS* exceptionPointers) { } #endif // WIN32 -// -// Detect OpenGL version -// -std::pair supportedOpenGLVersion() { - // Just create a window in order to retrieve the available OpenGL version before we - // create the real window - glfwInit(); - - // On OS X we need to explicitly set the version and specify that we are using CORE - // profile to be able to use glGetIntegerv(GL_MAJOR_VERSION, &major) and - // glGetIntegerv(GL_MINOR_VERSION, &minor) explicitly setting to OGL 3.3 CORE works - // since all Mac's now support at least 3.3 -#ifdef __APPLE__ - glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); - glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); - glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); - glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); -#endif - - glfwWindowHint(GLFW_VISIBLE, GL_FALSE); - - // By creating an offscreen window, the user will not know that we created this window - GLFWwindow* offscreen = glfwCreateWindow(128, 128, "", nullptr, nullptr); - glfwMakeContextCurrent(offscreen); - - // Get the OpenGL version - int major, minor; - glGetIntegerv(GL_MAJOR_VERSION, &major); - glGetIntegerv(GL_MINOR_VERSION, &minor); - - // And get rid of the window again - glfwDestroyWindow(offscreen); - glfwWindowHint(GLFW_VISIBLE, GL_TRUE); - - return { major, minor }; -} - - // // Init function // -void mainInitFunc() { +void mainInitFunc(GLFWwindow*) { + ZoneScoped + LTRACE("main::mainInitFunc(begin)"); LDEBUG("Initializing OpenSpace Engine started"); - openspace::global::openSpaceEngine.initialize(); + global::openSpaceEngine.initialize(); LDEBUG("Initializing OpenSpace Engine finished"); + { + std::string path = absPath("${DATA}/openspace-icon.png"); + int x; + int y; + int n; + unsigned char* data = stbi_load(path.c_str(), &x, &y, &n, 0); + + GLFWimage icons[1]; + icons[0].pixels = data; + icons[0].width = x; + icons[0].height = y; + + for (const std::unique_ptr& window : Engine::instance().windows()) { + glfwSetWindowIcon(window->windowHandle(), 1, icons); + } + + stbi_image_free(icons[0].pixels); + } + + currentWindow = Engine::instance().windows().front().get(); + currentViewport = currentWindow->viewports().front().get(); LDEBUG("Initializing OpenGL in OpenSpace Engine started"); - openspace::global::openSpaceEngine.initializeGL(); + global::openSpaceEngine.initializeGL(); LDEBUG("Initializing OpenGL in OpenSpace Engine finished"); + + // Find if we have at least one OpenVR window // Save reference to first OpenVR window, which is the one we will copy to the HMD. - for (size_t i = 0; i < SgctEngine->getNumberOfWindows(); ++i) { - if (SgctEngine->getWindowPtr(i)->checkIfTagExists(OpenVRTag)) { + for (const std::unique_ptr& window : Engine::instance().windows()) { + if (window->hasTag(OpenVRTag)) { #ifdef OPENVR_SUPPORT - FirstOpenVRWindow = SgctEngine->getWindowPtr(i); + FirstOpenVRWindow = window.get(); // If we have an OpenVRWindow, initialize OpenVR. - sgct::SGCTOpenVR::initialize( - SgctEngine->getNearClippingPlane(), SgctEngine->getFarClippingPlane() + sgct::OpenVR::initialize( + Engine::instance().nearClippingPlane(), + Engine::instance().farClippingPlane() ); #else LWARNING("OpenVR was requested, but program was compiled without VR support"); @@ -249,11 +268,9 @@ void mainInitFunc() { } } - const size_t nWindows = SgctEngine->getNumberOfWindows(); - for (size_t i = 0; i < nWindows; ++i) { - const sgct::SGCTWindow* windowPtr = SgctEngine->getWindowPtr(i); - - if (!windowPtr->checkIfTagExists(SpoutTag)) { + for (size_t i = 0; i < Engine::instance().windows().size(); ++i) { + Window& window = *Engine::instance().windows()[i]; + if (!window.hasTag(SpoutTag)) { continue; } @@ -262,34 +279,34 @@ void mainInitFunc() { w.windowId = i; - const sgct::SGCTWindow::StereoMode sm = windowPtr->getStereoMode(); - const bool hasStereo = (sm != sgct::SGCTWindow::No_Stereo) && - (sm < sgct::SGCTWindow::Side_By_Side_Stereo); + const Window::StereoMode sm = window.stereoMode(); + const bool hasStereo = (sm != Window::StereoMode::NoStereo) && + (sm < Window::StereoMode::SideBySide); if (hasStereo) { SpoutWindow::SpoutData& left = w.leftOrMain; left.handle = GetSpout(); left.initialized = left.handle->CreateSender( - (windowPtr->getName() + "_left").c_str(), - windowPtr->getXFramebufferResolution(), - windowPtr->getYFramebufferResolution() + (window.name() + "_left").c_str(), + window.framebufferResolution().x, + window.framebufferResolution().y ); SpoutWindow::SpoutData& right = w.right; right.handle = GetSpout(); right.initialized = right.handle->CreateSender( - (windowPtr->getName() + "_right").c_str(), - windowPtr->getXFramebufferResolution(), - windowPtr->getYFramebufferResolution() + (window.name() + "_right").c_str(), + window.framebufferResolution().x, + window.framebufferResolution().y ); } else { SpoutWindow::SpoutData& main = w.leftOrMain; main.handle = GetSpout(); main.initialized = main.handle->CreateSender( - windowPtr->getName().c_str(), - windowPtr->getXFramebufferResolution(), - windowPtr->getYFramebufferResolution() + window.name().c_str(), + window.framebufferResolution().x, + window.framebufferResolution().y ); } @@ -303,9 +320,8 @@ void mainInitFunc() { // // Screenshots // - std::string screenshotPath = "${SCREENSHOTS}"; - if (openspace::global::configuration.shouldUseScreenshotDate) { + if (global::configuration.shouldUseScreenshotDate) { std::time_t now = std::time(nullptr); std::tm* nowTime = std::localtime(&now); char mbstr[128]; @@ -318,21 +334,8 @@ void mainInitFunc() { ); } + Settings::instance().setCapturePath(absPath(screenshotPath)); - for (size_t i = 0; i < nWindows; ++i) { - sgct::SGCTWindow* w = SgctEngine->getWindowPtr(i); - constexpr const char* screenshotNames = "OpenSpace"; - sgct_core::ScreenCapture* cpt0 = w->getScreenCapturePointer(0); - sgct_core::ScreenCapture* cpt1 = w->getScreenCapturePointer(1); - - if (cpt0) { - cpt0->setPathAndFileName(absPath(screenshotPath), screenshotNames); - } - - if (cpt1) { - cpt1->setPathAndFileName(absPath(screenshotPath), screenshotNames); - } - } LTRACE("main::mainInitFunc(end)"); } @@ -340,14 +343,24 @@ void mainInitFunc() { void mainPreSyncFunc() { + ZoneScoped LTRACE("main::mainPreSyncFunc(begin)"); - openspace::global::openSpaceEngine.preSynchronization(); + + try { + global::openSpaceEngine.preSynchronization(); + } + catch (const ghoul::RuntimeError& e) { + LFATALC(e.component, e.message); + Engine::instance().terminate(); + } // Query joystick status - using namespace openspace::interaction; + using namespace interaction; for (int i = GLFW_JOYSTICK_1; i <= GLFW_JOYSTICK_LAST; ++i) { - JoystickInputState& state = openspace::global::joystickInputStates[i]; + ZoneScopedN("Joystick state"); + + JoystickInputState& state = global::joystickInputStates[i]; int present = glfwJoystickPresent(i); if (present == GLFW_FALSE) { @@ -358,13 +371,13 @@ void mainPreSyncFunc() { if (!state.isConnected) { // Joystick was added state.isConnected = true; - state.name = sgct::Engine::getJoystickName(i); + state.name = glfwGetJoystickName(i); std::fill(state.axes.begin(), state.axes.end(), 0.f); std::fill(state.buttons.begin(), state.buttons.end(), JoystickAction::Idle); } - const float* axes = sgct::Engine::getJoystickAxes(i, &state.nAxes); + const float* axes = glfwGetJoystickAxes(i, &state.nAxes); if (state.nAxes > JoystickInputState::MaxAxes) { LWARNING(fmt::format( "Joystick/Gamepad {} has {} axes, but only {} axes are supported. " @@ -375,10 +388,7 @@ void mainPreSyncFunc() { } std::memcpy(state.axes.data(), axes, state.nAxes * sizeof(float)); - const unsigned char* buttons = sgct::Engine::getJoystickButtons( - i, - &state.nButtons - ); + const unsigned char* buttons = glfwGetJoystickButtons(i, &state.nButtons); if (state.nButtons > JoystickInputState::MaxButtons) { LWARNING(fmt::format( @@ -425,8 +435,14 @@ void mainPreSyncFunc() { void mainPostSyncPreDrawFunc() { + ZoneScoped + +#ifdef OPENSPACE_HAS_NVTOOLS + nvtxRangePush("postSyncPreDraw"); +#endif // OPENSPACE_HAS_NVTOOLS LTRACE("main::postSynchronizationPreDraw(begin)"); - openspace::global::openSpaceEngine.postSynchronizationPreDraw(); + + global::openSpaceEngine.postSynchronizationPreDraw(); #ifdef OPENVR_SUPPORT if (FirstOpenVRWindow) { @@ -436,17 +452,47 @@ void mainPostSyncPreDrawFunc() { #endif // OPENVR_SUPPORT LTRACE("main::postSynchronizationPreDraw(end)"); + +#ifdef OPENSPACE_HAS_NVTOOLS + nvtxRangePop(); +#endif // OPENSPACE_HAS_NVTOOLS } -void mainRenderFunc() { +void mainRenderFunc(const sgct::RenderData& data) { + ZoneScoped + +#ifdef OPENSPACE_HAS_NVTOOLS + nvtxRangePush("render"); +#endif // OPENSPACE_HAS_NVTOOLS LTRACE("main::mainRenderFunc(begin)"); - glm::mat4 viewMatrix = SgctEngine->getCurrentViewMatrix() * - glm::translate(glm::mat4(1.f), sgct::Engine::getDefaultUserPtr()->getPos()); + currentWindow = &data.window; + currentViewport = &data.viewport; + currentFrustumMode = data.frustumMode; - glm::mat4 projectionMatrix = SgctEngine->getCurrentProjectionMatrix(); + glm::vec3 pos; + std::memcpy( + glm::value_ptr(pos), + &Engine::instance().defaultUser().posMono().x, + sizeof(vec3) + ); + + glm::mat4 viewMatrix; + std::memcpy( + glm::value_ptr(viewMatrix), + data.viewMatrix.values, + sizeof(mat4) + ); + viewMatrix = viewMatrix * glm::translate(glm::mat4(1.f), pos); + + glm::mat4 projectionMatrix; + std::memcpy( + glm::value_ptr(projectionMatrix), + data.projectionMatrix.values, + sizeof(mat4) + ); #ifdef OPENVR_SUPPORT bool currentWindowIsHMD = FirstOpenVRWindow == SgctEngine->getCurrentWindowPtr(); if (sgct::SGCTOpenVR::isHMDActive() && currentWindowIsHMD) { @@ -457,25 +503,38 @@ void mainRenderFunc() { #endif try { - openspace::global::openSpaceEngine.render( - SgctEngine->getModelMatrix(), - viewMatrix, - projectionMatrix + glm::mat4 modelMatrix; + std::memcpy( + glm::value_ptr(modelMatrix), + data.modelMatrix.values, + sizeof(mat4) ); + currentModelMatrix = modelMatrix; + currentModelViewProjectionMatrix = modelMatrix * viewMatrix * projectionMatrix; + global::openSpaceEngine.render(modelMatrix, viewMatrix, projectionMatrix); } catch (const ghoul::RuntimeError& e) { LERRORC(e.component, e.message); } + LTRACE("main::mainRenderFunc(end)"); +#ifdef OPENSPACE_HAS_NVTOOLS + nvtxRangePop(); +#endif // OPENSPACE_HAS_NVTOOLS } -void mainDraw2DFunc() { +void mainDraw2DFunc(const sgct::RenderData& data) { + ZoneScoped LTRACE("main::mainDraw2DFunc(begin)"); + currentWindow = &data.window; + currentViewport = &data.viewport; + currentFrustumMode = data.frustumMode; + try { - openspace::global::openSpaceEngine.drawOverlays(); + global::openSpaceEngine.drawOverlays(); } catch (const ghoul::RuntimeError& e) { LERRORC(e.component, e.message); @@ -492,39 +551,40 @@ void mainDraw2DFunc() { void mainPostDrawFunc() { + ZoneScoped LTRACE("main::mainPostDrawFunc(begin)"); #ifdef OPENVR_SUPPORT if (FirstOpenVRWindow) { // Copy the first OpenVR window to the HMD - sgct::SGCTOpenVR::copyWindowToHMD(FirstOpenVRWindow); + sgct::OpenVR::copyWindowToHMD(FirstOpenVRWindow); } #endif // OPENVR_SUPPORT - openspace::global::openSpaceEngine.postDraw(); + global::openSpaceEngine.postDraw(); #ifdef OPENSPACE_HAS_SPOUT for (const SpoutWindow& w : SpoutWindows) { - sgct::SGCTWindow* window = SgctEngine->getWindowPtr(w.windowId); + sgct::Window& window = *Engine::instance().windows()[w.windowId]; if (w.leftOrMain.initialized) { - const GLuint texId = window->getFrameBufferTexture(sgct::Engine::LeftEye); + const GLuint texId = window.frameBufferTexture(Window::TextureIndex::LeftEye); glBindTexture(GL_TEXTURE_2D, texId); w.leftOrMain.handle->SendTexture( texId, GL_TEXTURE_2D, - window->getXFramebufferResolution(), - window->getYFramebufferResolution() + window.framebufferResolution().x, + window.framebufferResolution().y ); } if (w.right.initialized) { - const GLuint texId = window->getFrameBufferTexture(sgct::Engine::RightEye); + const GLuint texId = window.frameBufferTexture(Window::TextureIndex::RightEye); glBindTexture(GL_TEXTURE_2D, texId); w.right.handle->SendTexture( texId, GL_TEXTURE_2D, - window->getXFramebufferResolution(), - window->getYFramebufferResolution() + window.framebufferResolution().x, + window.framebufferResolution().y ); } } @@ -536,276 +596,332 @@ void mainPostDrawFunc() { -void mainKeyboardCallback(int key, int, int action, int mods) { +void mainKeyboardCallback(sgct::Key key, sgct::Modifier modifiers, sgct::Action action, + int) +{ + ZoneScoped LTRACE("main::mainKeyboardCallback(begin)"); - openspace::global::openSpaceEngine.keyboardCallback( - openspace::Key(key), - openspace::KeyModifier(mods), - openspace::KeyAction(action) - ); + + const openspace::Key k = openspace::Key(key); + const KeyModifier m = KeyModifier(modifiers); + const KeyAction a = KeyAction(action); + global::openSpaceEngine.keyboardCallback(k, m, a); + LTRACE("main::mainKeyboardCallback(begin)"); } -void mainMouseButtonCallback(int key, int action) { +void mainMouseButtonCallback(sgct::MouseButton key, sgct::Modifier modifiers, + sgct::Action action) +{ + ZoneScoped LTRACE("main::mainMouseButtonCallback(begin)"); - openspace::global::openSpaceEngine.mouseButtonCallback( - openspace::MouseButton(key), - openspace::MouseAction(action) - ); + + const openspace::MouseButton k = openspace::MouseButton(key); + const openspace::MouseAction a = openspace::MouseAction(action); + const openspace::KeyModifier m = openspace::KeyModifier(modifiers); + global::openSpaceEngine.mouseButtonCallback(k, a, m); + LTRACE("main::mainMouseButtonCallback(end)"); } void mainMousePosCallback(double x, double y) { - openspace::global::openSpaceEngine.mousePositionCallback(x, y); + ZoneScoped + global::openSpaceEngine.mousePositionCallback(x, y); } void mainMouseScrollCallback(double posX, double posY) { + ZoneScoped LTRACE("main::mainMouseScrollCallback(begin"); - openspace::global::openSpaceEngine.mouseScrollWheelCallback(posX, posY); + + global::openSpaceEngine.mouseScrollWheelCallback(posX, posY); + LTRACE("main::mainMouseScrollCallback(end)"); } -void mainCharCallback(unsigned int codepoint, int mods) { - openspace::global::openSpaceEngine.charCallback( - codepoint, - openspace::KeyModifier(mods) - ); +void mainCharCallback(unsigned int codepoint, int modifiers) { + ZoneScoped + + const KeyModifier m = KeyModifier(modifiers); + global::openSpaceEngine.charCallback(codepoint, m); } -void mainEncodeFun() { +std::vector mainEncodeFun() { + ZoneScoped LTRACE("main::mainEncodeFun(begin)"); - std::vector data = openspace::global::openSpaceEngine.encode(); - _synchronizationBuffer.setVal(std::move(data)); - sgct::SharedData::instance()->writeVector(&_synchronizationBuffer); + + std::vector data = global::openSpaceEngine.encode(); + LTRACE("main::mainEncodeFun(end)"); + return data; } -void mainDecodeFun() { +void mainDecodeFun(const std::vector& data, unsigned int) { + ZoneScoped LTRACE("main::mainDecodeFun(begin)"); - sgct::SharedData::instance()->readVector(&_synchronizationBuffer); - std::vector data = _synchronizationBuffer.getVal(); - openspace::global::openSpaceEngine.decode(std::move(data)); + + global::openSpaceEngine.decode(data); + LTRACE("main::mainDecodeFun(end)"); } -void mainLogCallback(const char* msg) { - std::string message = msg; - if (message.empty() || message == ".") { - // We don't want the empty '.' message that SGCT sends while it is waiting for - // connections from other network nodes - return; - } - // Remove the trailing \n that is passed along - LINFOC("SGCT", message.substr(0, message.size() - 1)); +void mainLogCallback(Log::Level level, const char* message) { + ZoneScoped + + std::string msg = message; + switch (level) { + case Log::Level::Debug: + LDEBUGC("SGCT", msg); + break; + case Log::Level::Info: + LINFOC("SGCT", msg); + break; + case Log::Level::Warning: + LWARNINGC("SGCT", msg); + break; + case Log::Level::Error: + LERRORC("SGCT", msg); + break; } } // namespace void setSgctDelegateFunctions() { - openspace::WindowDelegate& sgctDelegate = openspace::global::windowDelegate; - sgctDelegate.terminate = []() { sgct::Engine::instance()->terminate(); }; + WindowDelegate& sgctDelegate = global::windowDelegate; + sgctDelegate.terminate = []() { Engine::instance().terminate(); }; sgctDelegate.setBarrier = [](bool enabled) { - sgct::SGCTWindow::setBarrier(enabled); + ZoneScoped + + sgct::Window::setBarrier(enabled); }; sgctDelegate.setSynchronization = [](bool enabled) { - sgct_core::ClusterManager::instance()->setUseIgnoreSync(enabled); - }; - sgctDelegate.clearAllWindows = [](const glm::vec4& clearColor) { - size_t n = sgct::Engine::instance()->getNumberOfWindows(); - for (size_t i = 0; i < n; ++i) { - glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - GLFWwindow* w = sgct::Engine::instance()->getWindowPtr(i)->getWindowHandle(); - glfwSwapBuffers(w); - } + ZoneScoped + + sgct::ClusterManager::instance().setUseIgnoreSync(enabled); }; sgctDelegate.windowHasResized = []() { - return sgct::Engine::instance()->getCurrentWindowPtr()->isWindowResized(); + ZoneScoped + + return currentWindow->isWindowResized(); }; - sgctDelegate.averageDeltaTime = []() { return sgct::Engine::instance()->getAvgDt(); }; - sgctDelegate.deltaTime = []() { return sgct::Engine::instance()->getDt(); }; - sgctDelegate.applicationTime = []() { return sgct::Engine::getTime(); }; - sgctDelegate.mousePosition = []() { - int id = sgct::Engine::instance()->getCurrentWindowPtr()->getId(); - double posX, posY; - sgct::Engine::getMousePos(id, &posX, &posY); - return glm::vec2(posX, posY); + sgctDelegate.averageDeltaTime = []() { + ZoneScoped + + return Engine::instance().statistics().avgDt( + Engine::instance().currentFrameNumber() + ); }; - sgctDelegate.mouseButtons = [](int maxNumber) { - int id = sgct::Engine::instance()->getCurrentWindowPtr()->getId(); - uint32_t result = 0; - for (int i = 0; i < maxNumber; ++i) { - bool button = (sgct::Engine::getMouseButton(id, i) != 0); - if (button) { - result |= (1 << i); - } - } - return result; + sgctDelegate.minDeltaTime = []() { + ZoneScoped + + return Engine::instance().statistics().minDt(); + }; + sgctDelegate.maxDeltaTime = []() { + ZoneScoped + + return Engine::instance().statistics().maxDt(); + }; + sgctDelegate.deltaTime = []() { + ZoneScoped + + return Engine::instance().statistics().dt(); + }; + sgctDelegate.applicationTime = []() { + ZoneScoped + + return sgct::Engine::getTime(); }; sgctDelegate.currentWindowSize = []() { - return glm::ivec2( - sgct::Engine::instance()->getCurrentWindowPtr()->getXResolution(), - sgct::Engine::instance()->getCurrentWindowPtr()->getYResolution()); + ZoneScoped + + return glm::ivec2(currentWindow->resolution().x, currentWindow->resolution().y); }; sgctDelegate.currentSubwindowSize = []() { - auto window = sgct::Engine::instance()->getCurrentWindowPtr(); - switch (window->getStereoMode()) { - case sgct::SGCTWindow::Side_By_Side_Stereo: - case sgct::SGCTWindow::Side_By_Side_Inverted_Stereo: - return glm::ivec2(window->getXResolution() / 2, window->getYResolution()); - case sgct::SGCTWindow::Top_Bottom_Stereo: - case sgct::SGCTWindow::Top_Bottom_Inverted_Stereo: - return glm::ivec2(window->getXResolution(), window->getYResolution() / 2); + ZoneScoped + + if (currentWindow->viewports().size() > 1) { + const Viewport& viewport = *currentWindow->viewports().front(); + return glm::ivec2( + currentWindow->resolution().x * viewport.size().x, + currentWindow->resolution().y * viewport.size().y + ); + } + switch (currentWindow->stereoMode()) { + case Window::StereoMode::SideBySide: + case Window::StereoMode::SideBySideInverted: + return glm::ivec2( + currentWindow->resolution().x / 2, + currentWindow->resolution().y + ); + case Window::StereoMode::TopBottom: + case Window::StereoMode::TopBottomInverted: + return glm::ivec2( + currentWindow->resolution().x, + currentWindow->resolution().y / 2 + ); default: - return glm::ivec2(window->getXResolution(), window->getYResolution()); + return glm::ivec2( + currentWindow->resolution().x, + currentWindow->resolution().y + ); } }; - sgctDelegate.currentWindowResolution = []() { - int x, y; - auto window = sgct::Engine::instance()->getCurrentWindowPtr(); - window->getFinalFBODimensions(x, y); - return glm::ivec2(x, y); - }; sgctDelegate.currentDrawBufferResolution = []() { - sgct_core::Viewport* viewport = - sgct::Engine::instance()->getCurrentWindowPtr()->getViewport(0); + ZoneScoped + + Viewport* viewport = currentWindow->viewports().front().get(); if (viewport != nullptr) { - if (viewport->hasSubViewports() && viewport->getNonLinearProjectionPtr()) { - int res = viewport->getNonLinearProjectionPtr()->getCubemapResolution(); + if (viewport->hasSubViewports() && viewport->nonLinearProjection()) { + int res = viewport->nonLinearProjection()->cubemapResolution(); return glm::ivec2(res, res); } + else if (currentWindow->viewports().size() > 1) { + // @TODO (abock, 2020-04-09) This should probably be based on the current + // viewport? + ivec2 dim = currentWindow->finalFBODimensions(); + return glm::ivec2(dim.x * viewport->size().x, dim.y * viewport->size().y); + } else { - int x, y; - auto window = sgct::Engine::instance()->getCurrentWindowPtr(); - window->getFinalFBODimensions(x, y); - return glm::ivec2(x, y); + ivec2 dim = currentWindow->finalFBODimensions(); + return glm::ivec2(dim.x, dim.y); } } return glm::ivec2(-1, -1); }; sgctDelegate.currentViewportSize = []() { - sgct_core::Viewport* viewport = - sgct::Engine::instance()->getCurrentWindowPtr()->getViewport(0); - if (viewport != nullptr) { - int x = 0; - int y = 0; - sgct::Engine::instance()->getCurrentViewportSize(x, y); - return glm::ivec2(x, y); + ZoneScoped + + if (currentViewport != nullptr) { + vec2 size = currentViewport->size(); + return glm::ivec2(size.x, size.y); } return glm::ivec2(-1, -1); }; sgctDelegate.dpiScaling = []() { - return glm::vec2( - sgct::Engine::instance()->getCurrentWindowPtr()->getXScale(), - sgct::Engine::instance()->getCurrentWindowPtr()->getYScale() - ); - }; - sgctDelegate.currentNumberOfAaSamples = []() { - return sgct::Engine::instance()->getCurrentWindowPtr()->getNumberOfAASamples(); - }; - sgctDelegate.isRegularRendering = []() { - sgct::SGCTWindow* w = sgct::Engine::instance()->getCurrentWindowPtr(); - ghoul_assert( - w->getNumberOfViewports() > 0, - "At least one viewport must exist at this time" - ); - sgct_core::Viewport* vp = w->getViewport(0); - sgct_core::NonLinearProjection* nlp = vp->getNonLinearProjectionPtr(); - return nlp == nullptr; + ZoneScoped + + vec2 scale = currentWindow->scale(); + return glm::vec2(scale.x, scale.y); }; sgctDelegate.hasGuiWindow = []() { - auto engine = sgct::Engine::instance(); - for (size_t i = 0; i < engine->getNumberOfWindows(); ++i) { - if (engine->getWindowPtr(i)->checkIfTagExists("GUI")) { + ZoneScoped + + for (const std::unique_ptr& window : Engine::instance().windows()) { + if (window->hasTag("GUI")) { return true; } } return false; }; sgctDelegate.isGuiWindow = []() { - return sgct::Engine::instance()->getCurrentWindowPtr()->checkIfTagExists("GUI"); + ZoneScoped + + return currentWindow->hasTag("GUI"); }; - sgctDelegate.isMaster = []() { return sgct::Engine::instance()->isMaster(); }; - sgctDelegate.isUsingSwapGroups = []() { - return sgct::SGCTWindow::isUsingSwapGroups(); - }; - sgctDelegate.isSwapGroupMaster = []() { - return sgct::SGCTWindow::isSwapGroupMaster(); - }; - sgctDelegate.viewProjectionMatrix = []() { - return sgct::Engine::instance()->getCurrentModelViewProjectionMatrix(); + sgctDelegate.isMaster = []() { + ZoneScoped + + return Engine::instance().isMaster(); }; sgctDelegate.modelMatrix = []() { - return sgct::Engine::instance()->getModelMatrix(); + ZoneScoped + + return currentModelMatrix; }; sgctDelegate.setNearFarClippingPlane = [](float nearPlane, float farPlane) { - sgct::Engine::instance()->setNearAndFarClippingPlanes(nearPlane, farPlane); - }; - sgctDelegate.setEyeSeparationDistance = [](float distance) { - sgct::Engine::instance()->setEyeSeparation(distance); - }; - sgctDelegate.viewportPixelCoordinates = []() { - sgct::SGCTWindow* window = sgct::Engine::instance()->getCurrentWindowPtr(); - if (!window || !window->getCurrentViewport()) { - return glm::ivec4(0, 0, 0, 0); - } - else { - const int* data = sgct::Engine::instance()->getCurrentViewportPixelCoords(); - return glm::ivec4(data[0], data[2], data[1], data[3]); - } - }; - sgctDelegate.isExternalControlConnected = []() { - return sgct::Engine::instance()->isExternalControlConnected(); - }; - sgctDelegate.sendMessageToExternalControl = [](const std::vector& message) { - sgct::Engine::instance()->sendMessageToExternalControl( - message.data(), - static_cast(message.size()) - ); - }; - sgctDelegate.isSimpleRendering = []() { - return (sgct::Engine::instance()->getCurrentRenderTarget() != - sgct::Engine::NonLinearBuffer); + ZoneScoped + + Engine::instance().setNearAndFarClippingPlanes(nearPlane, farPlane); }; sgctDelegate.isFisheyeRendering = []() { - sgct::SGCTWindow* w = sgct::Engine::instance()->getCurrentWindowPtr(); - return dynamic_cast( - w->getViewport(0)->getNonLinearProjectionPtr() + ZoneScoped + + return dynamic_cast( + currentWindow->viewports().front()->nonLinearProjection() ) != nullptr; }; sgctDelegate.takeScreenshot = [](bool applyWarping) { - sgct::SGCTSettings::instance()->setCaptureFromBackBuffer(applyWarping); - sgct::Engine::instance()->takeScreenshot(); + ZoneScoped + + Settings::instance().setCaptureFromBackBuffer(applyWarping); + Engine::instance().takeScreenshot(); + return Engine::instance().screenShotNumber(); }; sgctDelegate.swapBuffer = []() { + ZoneScoped + GLFWwindow* w = glfwGetCurrentContext(); glfwSwapBuffers(w); glfwPollEvents(); }; sgctDelegate.nWindows = []() { - return static_cast(sgct::Engine::instance()->getNumberOfWindows()); + ZoneScoped + + return static_cast(Engine::instance().windows().size()); }; sgctDelegate.currentWindowId = []() { - return sgct::Engine::instance()->getCurrentWindowPtr()->getId(); + ZoneScoped + + return currentWindow->id(); }; sgctDelegate.openGLProcedureAddress = [](const char* func) { + ZoneScoped + return glfwGetProcAddress(func); }; + sgctDelegate.getHorizFieldOfView = []() { + ZoneScoped + + return static_cast( + Engine::instance().windows().front()->horizFieldOfViewDegrees() + ); + }; + sgctDelegate.setHorizFieldOfView = [](float hFovDeg) { + ZoneScoped + + Engine::instance().windows().front()->setHorizFieldOfView(hFovDeg); + }; + #ifdef WIN32 + sgctDelegate.getNativeWindowHandle = [](size_t windowIndex) -> void* { + ZoneScoped + + Window* w = Engine::instance().windows()[windowIndex].get(); + if (w) { + HWND hWnd = glfwGetWin32Window(w->windowHandle()); + return reinterpret_cast(hWnd); + } + return nullptr; + }; + #endif // WIN32 + sgctDelegate.frustumMode = []() { + ZoneScoped + + switch (currentFrustumMode) { + default: + case Frustum::Mode::MonoEye: return WindowDelegate::Frustum::Mono; + case Frustum::Mode::StereoLeftEye: return WindowDelegate::Frustum::LeftEye; + case Frustum::Mode::StereoRightEye: return WindowDelegate::Frustum::RightEye; + } + }; + sgctDelegate.swapGroupFrameNumber = []() -> uint64_t { + ZoneScoped + + return currentWindow->swapGroupFrameNumber(); + }; } int main(int argc, char** argv) { @@ -848,7 +964,7 @@ int main(int argc, char** argv) { ghoul::cmdparser::CommandlineParser::AllowUnknownCommands::Yes ); - openspace::CommandlineArguments commandlineArguments; + CommandlineArguments commandlineArguments; parser.addCommand(std::make_unique>( commandlineArguments.configurationName, "--file", "-f", "Provides the path to the OpenSpace configuration file. Only the '${TEMPORARY}' " @@ -867,7 +983,7 @@ int main(int argc, char** argv) { "evaluated before it is passed to OpenSpace." )); - // setCommandLine returns a referece to the vector that will be filled later + // setCommandLine returns a reference to the vector that will be filled later const std::vector& sgctArguments = parser.setCommandLine( { argv, argv + argc } ); @@ -888,8 +1004,6 @@ int main(int argc, char** argv) { // Create the OpenSpace engine and get arguments for the SGCT engine std::string windowConfiguration; try { - using namespace openspace; - // Find configuration std::string configurationFilePath = commandlineArguments.configurationName; if (commandlineArguments.configurationName.empty()) { @@ -910,7 +1024,7 @@ int main(int argc, char** argv) { configurationFilePath ); - // If the user requested a commandline-based configuation script that should + // If the user requested a commandline-based configuration script that should // overwrite some of the values, this is the time to do it if (!commandlineArguments.configurationOverride.empty()) { LDEBUG("Executing Lua script passed through the commandline:"); @@ -925,16 +1039,17 @@ int main(int argc, char** argv) { // Determining SGCT configuration file LDEBUG("SGCT Configuration file: " + global::configuration.windowConfiguration); - windowConfiguration = openspace::global::configuration.windowConfiguration; + windowConfiguration = global::configuration.windowConfiguration; } - catch (const openspace::documentation::SpecificationError& e) { + catch (const documentation::SpecificationError& e) { LFATALC("main", "Loading of configuration file failed"); - for (const openspace::documentation::TestResult::Offense& o : e.result.offenses) { + for (const documentation::TestResult::Offense& o : e.result.offenses) { LERRORC(o.offender, ghoul::to_string(o.reason)); } - for (const openspace::documentation::TestResult::Warning& w : e.result.warnings) { + for (const documentation::TestResult::Warning& w : e.result.warnings) { LWARNINGC(w.offender, ghoul::to_string(w.reason)); } + ghoul::deinitialize(); exit(EXIT_FAILURE); } catch (const ghoul::RuntimeError& e) { @@ -943,10 +1058,11 @@ int main(int argc, char** argv) { if (ghoul::logging::LogManager::isInitialized()) { LogMgr.flushLogs(); } + ghoul::deinitialize(); return EXIT_FAILURE; } - openspace::global::openSpaceEngine.registerPathTokens(); + global::openSpaceEngine.registerPathTokens(); // Prepend the outgoing sgctArguments with the program name // as well as the configuration file that sgct is supposed to use @@ -955,58 +1071,51 @@ int main(int argc, char** argv) { arguments.insert(arguments.begin() + 2, absPath(windowConfiguration)); // Need to set this before the creation of the sgct::Engine - sgct::MessageHandler::instance()->setLogToConsole(false); - sgct::MessageHandler::instance()->setShowTime(false); - sgct::MessageHandler::instance()->setLogToCallback(true); - sgct::MessageHandler::instance()->setLogCallback(mainLogCallback); + + Log::instance().setLogToConsole(false); + Log::instance().setShowTime(false); + Log::instance().setLogCallback(mainLogCallback); #ifdef __APPLE__ glfwWindowHint(GLFW_STENCIL_BITS, 8); #endif LDEBUG("Creating SGCT Engine"); - SgctEngine = new sgct::Engine(arguments); + std::vector arg(argv + 1, argv + argc); + Configuration config = parseArguments(arg); + config::Cluster cluster = loadCluster(absPath(windowConfiguration)); - // Bind functions - SgctEngine->setInitOGLFunction(mainInitFunc); - SgctEngine->setPreSyncFunction(mainPreSyncFunc); - SgctEngine->setPostSyncPreDrawFunction(mainPostSyncPreDrawFunc); - SgctEngine->setDrawFunction(mainRenderFunc); - SgctEngine->setDraw2DFunction(mainDraw2DFunc); - SgctEngine->setPostDrawFunction(mainPostDrawFunc); - SgctEngine->setKeyboardCallbackFunction(mainKeyboardCallback); - SgctEngine->setMouseButtonCallbackFunction(mainMouseButtonCallback); - SgctEngine->setMousePosCallbackFunction(mainMousePosCallback); - SgctEngine->setMouseScrollCallbackFunction(mainMouseScrollCallback); - SgctEngine->setCharCallbackFunction(mainCharCallback); + Engine::Callbacks callbacks; + callbacks.initOpenGL = mainInitFunc; + callbacks.preSync = mainPreSyncFunc; + callbacks.postSyncPreDraw = mainPostSyncPreDrawFunc; + callbacks.draw = mainRenderFunc; + callbacks.draw2D = mainDraw2DFunc; + callbacks.postDraw = mainPostDrawFunc; + callbacks.keyboard = mainKeyboardCallback; + callbacks.mouseButton = mainMouseButtonCallback; + callbacks.mousePos = mainMousePosCallback; + callbacks.mouseScroll = mainMouseScrollCallback; + callbacks.character = mainCharCallback; + callbacks.encode = mainEncodeFun; + callbacks.decode = mainDecodeFun; + Log::instance().setNotifyLevel(Log::Level::Debug); - // Disable the immediate exit of the application when the ESC key is pressed - SgctEngine->setExitKey(SGCT_KEY_UNKNOWN); - - sgct::MessageHandler::instance()->setNotifyLevel(sgct::MessageHandler::NOTIFY_ALL); - - // Set encode and decode functions - // NOTE: starts synchronizing before init functions - sgct::SharedData::instance()->setEncodeFunction(mainEncodeFun); - sgct::SharedData::instance()->setDecodeFunction(mainDecodeFun); - - // Try to open a window - LDEBUG("Initialize SGCT Engine"); - std::map, sgct::Engine::RunMode> versionMapping = { - { { 3, 3 }, sgct::Engine::RunMode::OpenGL_3_3_Core_Profile }, - { { 4, 0 }, sgct::Engine::RunMode::OpenGL_4_0_Core_Profile }, - { { 4, 1 }, sgct::Engine::RunMode::OpenGL_4_1_Core_Profile }, - { { 4, 2 }, sgct::Engine::RunMode::OpenGL_4_2_Core_Profile }, - { { 4, 3 }, sgct::Engine::RunMode::OpenGL_4_3_Core_Profile }, - { { 4, 4 }, sgct::Engine::RunMode::OpenGL_4_4_Core_Profile }, - { { 4, 5 }, sgct::Engine::RunMode::OpenGL_4_5_Core_Profile }, - { { 4, 6 }, sgct::Engine::RunMode::OpenGL_4_6_Core_Profile } - }; - - - std::pair version = supportedOpenGLVersion(); - LINFO(fmt::format("Detected OpenGL version: {}.{}", version.first, version.second)); - bool initSuccess = SgctEngine->init(versionMapping[version]); + try { + Engine::create(cluster, callbacks, config); + } + catch (const std::runtime_error& e) { + LFATALC("main", e.what()); + Engine::destroy(); + global::openSpaceEngine.deinitialize(); + ghoul::deinitialize(); + } + catch (...) { + global::openSpaceEngine.deinitialize(); + ghoul::deinitialize(); + Engine::destroy(); + throw; + } #ifdef __APPLE__ // Workaround for OpenGL bug that Apple introduced in 10.14 Mojave that prevents an @@ -1019,9 +1128,8 @@ int main(int argc, char** argv) { // machine. If the loading screen shows up without doing anything to the window, it // is fixed. With the bug, the rendering stays gray even well after the main render // loop has started -- 2018-10-28 abock - size_t n = sgct::Engine::instance()->getNumberOfWindows(); - for (size_t i = 0; i < n; ++i) { - GLFWwindow* w = sgct::Engine::instance()->getWindowPtr(i)->getWindowHandle(); + for (const std::unique_ptr& window : Engine::instance().windows()) { + GLFWwindow* w = window->windowHandle(); int x, y; glfwGetWindowPos(w, &x, &y); glfwSetWindowPos(w, x + 1, y + 1); @@ -1036,51 +1144,39 @@ int main(int argc, char** argv) { // Do not print message if slaves are waiting for the master // Only timeout after 15 minutes - SgctEngine->setSyncParameters(false, 15.f * 60.f); + Engine::instance().setSyncParameters(false, 15.f * 60.f); - auto cleanup = [&](bool isInitialized) { - if (isInitialized) { - openspace::global::openSpaceEngine.deinitializeGL(); - openspace::global::openSpaceEngine.deinitialize(); - } + LINFO("Starting rendering loop"); + Engine::instance().render(); + LINFO("Ending rendering loop"); - // Clear function bindings to avoid crash after destroying the OpenSpace Engine - sgct::MessageHandler::instance()->setLogToCallback(false); - sgct::MessageHandler::instance()->setLogCallback(nullptr); + global::openSpaceEngine.deinitializeGL(); + global::openSpaceEngine.deinitialize(); - LDEBUG("Destroying SGCT Engine"); - delete SgctEngine; + // Clear function bindings to avoid crash after destroying the OpenSpace Engine + Log::instance().setLogCallback(nullptr); + + LDEBUG("Destroying SGCT Engine"); + Engine::destroy(); #ifdef OPENVR_SUPPORT - // Clean up OpenVR - sgct::SGCTOpenVR::shutdown(); + // Clean up OpenVR + sgct::SGCTOpenVR::shutdown(); #endif #ifdef OPENSPACE_HAS_SPOUT - for (SpoutWindow& w : SpoutWindows) { - if (w.leftOrMain.handle) { - w.leftOrMain.handle->ReleaseReceiver(); - w.leftOrMain.handle->Release(); - } - if (w.right.handle) { - w.right.handle->ReleaseReceiver(); - w.right.handle->Release(); - } + for (SpoutWindow& w : SpoutWindows) { + if (w.leftOrMain.handle) { + w.leftOrMain.handle->ReleaseReceiver(); + w.leftOrMain.handle->Release(); + } + if (w.right.handle) { + w.right.handle->ReleaseReceiver(); + w.right.handle->Release(); } -#endif // OPENSPACE_HAS_SPOUT - }; - - if (!initSuccess) { - LFATAL("Initializing failed"); - cleanup(false); - return EXIT_FAILURE; } +#endif // OPENSPACE_HAS_SPOUT - LINFO("Starting rendering loop"); - SgctEngine->render(); - LINFO("Ending rendering loop"); - - cleanup(true); - + ghoul::deinitialize(); exit(EXIT_SUCCESS); } diff --git a/apps/Sync/CMakeLists.txt b/apps/Sync/CMakeLists.txt index 9c5d883745..57b41bce3e 100644 --- a/apps/Sync/CMakeLists.txt +++ b/apps/Sync/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2018 # +# Copyright (c) 2014-2020 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -25,16 +25,16 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake) set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns - PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" ) set(MACOSX_BUNDLE_ICON_FILE openspace.icns) create_new_application(Sync MACOSX_BUNDLE - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) target_link_libraries(Sync openspace-core) @@ -43,20 +43,20 @@ target_link_libraries(Sync openspace-core) # Why not put these in the module's path? Because they do not have access to the # target as of July 2017, which is needed. if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) - # wanted by CEF - set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE") + # wanted by CEF + set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE") - if (WIN32) - set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) - endif () + if (WIN32) + set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) + endif () - # Add the CEF binary distribution's cmake/ directory to the module path and - # find CEF to initialize it properly. - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") - include(webbrowser_helpers) + # Add the CEF binary distribution's cmake/ directory to the module path and + # find CEF to initialize it properly. + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") + include(webbrowser_helpers) - set_cef_targets("${CEF_ROOT}" Sync) - run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") + set_cef_targets("${CEF_ROOT}" Sync) + run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () diff --git a/apps/Sync/main.cpp b/apps/Sync/main.cpp index 9b38745161..7ea54a745a 100644 --- a/apps/Sync/main.cpp +++ b/apps/Sync/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2018 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * diff --git a/apps/TaskRunner/CMakeLists.txt b/apps/TaskRunner/CMakeLists.txt index 6845978ac2..e5eba87469 100644 --- a/apps/TaskRunner/CMakeLists.txt +++ b/apps/TaskRunner/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2018 # +# Copyright (c) 2014-2020 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -25,16 +25,16 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake) set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns - PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" ) set(MACOSX_BUNDLE_ICON_FILE openspace.icns) create_new_application(TaskRunner MACOSX_BUNDLE - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) target_link_libraries(TaskRunner openspace-core) @@ -43,20 +43,20 @@ target_link_libraries(TaskRunner openspace-core) # Why not put these in the module's path? Because they do not have access to the # target as of July 2017, which is needed. if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) - # wanted by CEF - set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE") + # wanted by CEF + set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE") - if (WIN32) - set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) - endif () + if (WIN32) + set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) + endif () - # Add the CEF binary distribution's cmake/ directory to the module path and - # find CEF to initialize it properly. - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") - include(webbrowser_helpers) + # Add the CEF binary distribution's cmake/ directory to the module path and + # find CEF to initialize it properly. + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") + include(webbrowser_helpers) - set_cef_targets("${CEF_ROOT}" TaskRunner) - run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") + set_cef_targets("${CEF_ROOT}" TaskRunner) + run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () diff --git a/apps/TaskRunner/main.cpp b/apps/TaskRunner/main.cpp index 6fd9e29ede..f41d8105ab 100644 --- a/apps/TaskRunner/main.cpp +++ b/apps/TaskRunner/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2018 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -26,6 +26,7 @@ #include #include +#include #include #include #include @@ -34,7 +35,8 @@ #include #include #include -#include +#include +#include #include #include @@ -106,6 +108,14 @@ int main(int argc, char** argv) { ghoul::initialize(); + // Register the path of the executable, + // to make it possible to find other files in the same directory. + FileSys.registerPathToken( + "${BIN}", + ghoul::filesystem::File(absPath(argv[0])).directoryName(), + ghoul::filesystem::FileSystem::Override::Yes + ); + std::string configFile = configuration::findConfiguration(); global::configuration = configuration::loadConfigurationFromFile(configFile); openspace::global::openSpaceEngine.registerPathTokens(); diff --git a/apps/TimelineView/configurationwidget.cpp b/apps/TimelineView/configurationwidget.cpp deleted file mode 100644 index f96e29ad39..0000000000 --- a/apps/TimelineView/configurationwidget.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2018 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#include "configurationwidget.h" - -#include -#include -#include -#include - -ConfigurationWidget::ConfigurationWidget(QWidget* parent) - : QWidget(parent) - , _ipAddress(new QLineEdit("localhost")) - , _port(new QLineEdit("20500")) - , _connect(new QPushButton("Connect")) -{ - _connect->setObjectName("connection"); - QGroupBox* box = new QGroupBox("Connection", this); - - QGridLayout* layout = new QGridLayout; - layout->setVerticalSpacing(0); - { - QLabel* t = new QLabel("IP Address"); - t->setObjectName("label"); - layout->addWidget(t, 0, 0); - } - layout->addWidget(_ipAddress, 1, 0); - - { - QLabel* t = new QLabel("Port"); - t->setObjectName("label"); - layout->addWidget(t, 0, 1); - } - layout->addWidget(_port, 1, 1); - layout->addWidget(_connect, 1, 2, 1, 1); - - box->setLayout(layout); - - QHBoxLayout* l = new QHBoxLayout; - l->addWidget(box); - setLayout(l); - QObject::connect(_connect, SIGNAL(clicked()), this, SLOT(onConnectButton())); - - QTimer::singleShot(100, this, SLOT(onConnectButton())); -} - -void ConfigurationWidget::onConnectButton() { - emit connect(_ipAddress->text(), _port->text()); -} - -void ConfigurationWidget::socketConnected() { - _ipAddress->setEnabled(false); - _port->setEnabled(false); - _connect->setText("Disconnect"); - QObject::disconnect(_connect, SIGNAL(clicked()), this, SLOT(onConnectButton())); - QObject::connect(_connect, SIGNAL(clicked()), this, SIGNAL(disconnect())); -} - -void ConfigurationWidget::socketDisconnected() { - _ipAddress->setEnabled(true); - _port->setEnabled(true); - _connect->setText("Connect"); - QObject::disconnect(_connect, SIGNAL(clicked()), this, SIGNAL(disconnect())); - QObject::connect(_connect, SIGNAL(clicked()), this, SLOT(onConnectButton())); -} diff --git a/apps/TimelineView/controlwidget.cpp b/apps/TimelineView/controlwidget.cpp deleted file mode 100644 index e25da89769..0000000000 --- a/apps/TimelineView/controlwidget.cpp +++ /dev/null @@ -1,319 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2018 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#include "controlwidget.h" - -#include "mainwindow.h" - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace { - struct ImportantDate { - QString date; - QString focus; - QString coordinateSystem; - }; - - const ImportantDate ImportantDates[] = { - { "", "", "" }, - { "2007-02-27T16:40:00.00", "JupiterProjection", "Jupiter" }, - { "2015-07-14T10:10:00.00", "PlutoProjection", "Pluto" }, - { "2015-07-14T10:50:00.00", "PlutoProjection", "Pluto" }, - { "2015-07-14T11:22:00.00", "PlutoProjection", "Pluto" }, - { "2015-07-14T11:36:40.00", "PlutoProjection", "Pluto" }, - { "2015-07-14T11:48:43.00", "PlutoProjection", "Pluto" }, - { "2015-07-14T12:04:35.00", "PlutoProjection", "Pluto" }, - { "2015-07-14T15:02:46.00", "PlutoProjection", "Pluto" } - }; - - struct FocusNode { - QString guiName; - QString name; - QString coordinateSystem; - }; - const FocusNode FocusNodes[] = { - { "Earth", "Earth", "Sun" }, - { "Sun", "Sun", "Sun" }, - { "Pluto", "PlutoProjection", "Pluto" }, - { "Charon", "Charon", "Pluto" }, - { "Jupiter", "JupiterProjection", "Jupiter" }, - { "Nix", "Nix", "Pluto" }, - { "Kerberos", "Kerberos", "Pluto" }, - { "Hydra", "Hydra", "Pluto" }, - }; -} - -ControlWidget::ControlWidget(QWidget* parent) - : QWidget(parent) - , _currentTime(new QLabel("")) - , _setTime(new QComboBox) - , _currentDelta(new QLabel("")) - , _setDelta(new QSlider(Qt::Horizontal)) - , _pause(new QPushButton("Pause")) - , _play(new QPushButton("Play")) - , _focusNode(new QComboBox) - , _setFocusToNextTarget(new QPushButton("Set Focus to the next Target")) - , _setFocusToNewHorizons(new QPushButton("Set Focus to New Horizons")) -{ - _pause->setObjectName("pause"); - _play->setObjectName("play"); - - _currentTime->setObjectName("value"); - _currentDelta->setObjectName("value"); - - for (const ImportantDate& d : ImportantDates) - _setTime->addItem(d.date); - QObject::connect( - _setTime, - SIGNAL(currentIndexChanged(int)), - this, - SLOT(onDateChange()) - ); - - for (const FocusNode& f : FocusNodes) - _focusNode->addItem(f.guiName); - QObject::connect( - _focusNode, - SIGNAL(currentIndexChanged(int)), - this, - SLOT(onFocusChange()) - ); - - _setDelta->setMinimum(-100); - _setDelta->setMaximum(100); - _setDelta->setValue(0); - QObject::connect( - _setDelta, - SIGNAL(valueChanged(int)), - this, - SLOT(onValueChange()) - ); - - QObject::connect( - _pause, - SIGNAL(clicked()), - this, - SLOT(onPauseButton()) - ); - - QObject::connect( - _play, - SIGNAL(clicked()), - this, - SLOT(onPlayButton()) - ); - - QObject::connect( - _setFocusToNextTarget, - SIGNAL(clicked()), - this, - SLOT(onFocusToTargetButton()) - ); - - QObject::connect( - _setFocusToNewHorizons, - SIGNAL(clicked()), - this, - SLOT(onFocusToNewHorizonsButton()) -); - - QVBoxLayout* mainLayout = new QVBoxLayout; - - { - QGroupBox* box = new QGroupBox("Time", this); - QGridLayout* layout = new QGridLayout; - - //layout->setRowStretch(1, 5); - box->setLayout(layout); - - { - QLabel* l = new QLabel("Current Time (UTC):"); - l->setObjectName("label"); - layout->addWidget(l, 0, 0, Qt::AlignLeft); - layout->addWidget(_currentTime, 0, 1, Qt::AlignRight); - } - { - QLabel* l = new QLabel("Bookmarked Times:"); - l->setObjectName("label"); - layout->addWidget(l, 1, 0, Qt::AlignLeft); - layout->addWidget(_setTime, 1, 1, Qt::AlignRight); - } - layout->addItem(new QSpacerItem(0, 7), 2, 0, 1, 2); - { - QLabel* l = new QLabel("Current Time Increment\n(seconds per second):"); - l->setObjectName("label"); - layout->addWidget(l, 3, 0, Qt::AlignLeft); - layout->addWidget(_currentDelta, 3, 1, Qt::AlignRight); - } - - _setDelta->setObjectName("background"); - layout->addWidget(_setDelta, 4, 0, 1, 2); - - QWidget* controlContainer = new QWidget; - controlContainer->setObjectName("background"); - QHBoxLayout* controlContainerLayout = new QHBoxLayout; - controlContainerLayout->addWidget(_pause); - controlContainerLayout->addWidget(_play); - controlContainer->setLayout(controlContainerLayout); - layout->addWidget(controlContainer, 5, 0, 1, 2); - - mainLayout->addWidget(box); - } - - { - QGroupBox* box = new QGroupBox("Focus"); - QGridLayout* layout = new QGridLayout; - box->setLayout(layout); - - { - QLabel* l = new QLabel("Set Focus:"); - l->setObjectName("label"); - layout->addWidget(l, 0, 0, Qt::AlignLeft); - _focusNode->setMinimumWidth(200); - layout->addWidget(_focusNode, 0, 1, Qt::AlignRight); - } - layout->addWidget(_setFocusToNextTarget, 1, 0, 1, 2); - layout->addWidget(_setFocusToNewHorizons, 2, 0, 1, 2); - - mainLayout->addWidget(box); - } - - setLayout(mainLayout); -} - -void ControlWidget::update(QString currentTime, QString currentDelta) { - currentTime.replace("T", " "); - _currentTime->setText(currentTime); - _currentDelta->setText(currentDelta); -} - -void ControlWidget::onValueChange() { - float value = static_cast(_setDelta->value()); - - float delta; - if (value < 0.f) { - value = -value; - float d = pow(3, value / 10) - 1.f; - delta = -d; - } - else { - float d = pow(3, value / 10) - 1.f; - delta = d; - } - - QString script = "openspace.time.setDeltaTime(" + QString::number(delta) + ");"; - emit scriptActivity(script); -} - -void ControlWidget::onPauseButton() { - QString script = "openspace.time.setPause(true);"; - emit scriptActivity(script); -} - -void ControlWidget::onPlayButton() { - QString script = "openspace.time.setPause(false);"; - emit scriptActivity(script); -} - -void ControlWidget::onDateChange() { - int index = _setTime->currentIndex(); - if (index != 0) { - QString date = ImportantDates[index].date; - QString focus = ImportantDates[index].focus; - QString coordinateSystem = ImportantDates[index].coordinateSystem; - QString script = - "openspace.time.setTime('" + date + "');\ - openspace.setPropertyValue('Interaction.origin', '" + focus + "');\ - openspace.setPropertyValue('Interaction.coordinateSystem', '" + - coordinateSystem + "')"; - emit scriptActivity(script); - } - _setTime->blockSignals(true); - _setTime->setCurrentIndex(0); - _setTime->blockSignals(false); -} - -void ControlWidget::onFocusChange() { - int index = _focusNode->currentIndex(); - QString name = FocusNodes[index].name; - QString coordinateSystem = FocusNodes[index].coordinateSystem; - QString script = "openspace.setPropertyValue('Interaction.origin', '" + name + - "');openspace.setPropertyValue('Interaction.coordinateSystem', '" + - coordinateSystem + "');"; - emit scriptActivity(script); -} - -void ControlWidget::onFocusToTargetButton() { - std::string target = reinterpret_cast(parent())->nextTarget(); - if (!target.empty()) { - auto it = std::find_if( - std::begin(FocusNodes), - std::end(FocusNodes), - [target](const FocusNode& n) { - return n.guiName.toLower() == QString::fromStdString(target).toLower(); - }); - if (it != std::end(FocusNodes)) { - QString name = it->name; - QString coordinateSystem = it->coordinateSystem; - QString script = - "openspace.setPropertyValue('Interaction.origin', '" + name + - "');openspace.setPropertyValue('Interaction.coordinateSystem', '" + - coordinateSystem + "');"; - emit scriptActivity(script); - } - } -} - -void ControlWidget::onFocusToNewHorizonsButton() { - QString coordinateSystem; - int date = _currentTime->text().left(4).toInt(); - if (date < 2008) - coordinateSystem = "Jupiter"; - else if (date < 2014) - coordinateSystem = "Sun"; - else - coordinateSystem = "Pluto"; - - QString script = "openspace.setPropertyValue('Interaction.origin', 'NewHorizons');\ - openspace.setPropertyValue('Interaction.coordinateSystem', '" + coordinateSystem + - "');"; - emit scriptActivity(script); -} - -void ControlWidget::socketConnected() { - setDisabled(false); -} - -void ControlWidget::socketDisconnected() { - setDisabled(true); -} - diff --git a/apps/TimelineView/controlwidget.h b/apps/TimelineView/controlwidget.h deleted file mode 100644 index 571142aa7b..0000000000 --- a/apps/TimelineView/controlwidget.h +++ /dev/null @@ -1,69 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2018 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#ifndef __OPENSPACE_APP_TIMELINEVIEW___CONTROLWIDGET___H__ -#define __OPENSPACE_APP_TIMELINEVIEW___CONTROLWIDGET___H__ - -#include - -class QComboBox; -class QLabel; -class QPushButton; -class QSlider; - -class ControlWidget : public QWidget { -Q_OBJECT -public: - ControlWidget(QWidget* parent); - - void update(QString currentTime, QString currentDelta); - - void socketConnected(); - void socketDisconnected(); - -signals: - void scriptActivity(QString script); - -private slots: - void onValueChange(); - void onDateChange(); - void onFocusChange(); - void onPauseButton(); - void onPlayButton(); - void onFocusToTargetButton(); - void onFocusToNewHorizonsButton(); - -private: - QLabel* _currentTime; - QComboBox* _setTime; - QLabel* _currentDelta; - QSlider* _setDelta; - QPushButton* _pause; - QPushButton* _play; - QComboBox* _focusNode; - QPushButton* _setFocusToNextTarget; - QPushButton* _setFocusToNewHorizons; -}; - -#endif // __OPENSPACE_APP_TIMELINEVIEW___CONTROLWIDGET___H__ diff --git a/apps/TimelineView/main.cpp b/apps/TimelineView/main.cpp deleted file mode 100644 index 72cab84afa..0000000000 --- a/apps/TimelineView/main.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2018 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#include - -#include "mainwindow.h" - -static const QString style = R"style( -QWidget { - background-color: rgb(80, 80, 80); - font-family: Helvetica; -} - -QGroupBox { - background-color: qlineargradient( - x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #858585, - stop: 1 #959595); - border: 2px solid gray; - border-radius: 5px; - margin-top: 4ex; - font-size: bold 12px; -} - -QGroupBox::title { - background-color: #E0E0E0; - border: 2px solid gray; - border-radius: 5px; - subcontrol-origin: margin; - subcontrol-position: top center; - padding: 0 10px; -} - -QLineEdit { - color: lightgray; -} - -QSlider::groove:horizontal { - border: 1px solid #999999; - /* the groove expands to the size of the slider by default. by giving it a height, - it has a fixed size */ - height: 8px; - background: qlineargradient( - x1:0, y1:0, x2:1, y2:0, - stop:0 #c4c4c4, - stop:0.5 #555555, - stop:1 #c4c4c4 - ); - margin: 2px 0; -} - -QSlider::handle:horizontal { - background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); - border: 1px solid #5c5c5c; - width: 18px; - /* handle is placed by default on the contents rect of the groove. - Expand outside the groove */ - margin: -2px 0; - border-radius: 3px; -} - -QPushButton { - background-color: lightgray; - border-style: outset; - border-width: 0.5px; - border-radius: 5px; - border-color: black; - font: bold 12px; - min-width: 10em; -} - -QPushButton#connection { - background-color: lightgreen; -} - -QPushButton#connection:pressed { - background-color: green; -} - - -QPushButton#pause, QPushButton#play { - padding: 5px; -} - -QPushButton#pause:pressed, QPushButton#play:pressed, QPushButton:pressed { - background-color: darkgray; - border-style: inset; -} - -QCombobox { - border: 1px solid gray; - border-radius: 3px; - padding: 1px 18px 1px 3px; - min-width: 6em; -} - -QComboBox:editable { - background: lightgrey; -} - -QComboBox QAbstractItemView { - border: 2px solid darkgray; - border-radius: 5px; - background-color: #a8a8a8; - selection-background-color: #a8a8a8; -} - -QLabel#label { - font-size: 13px; - background-color: transparent; - font-variant: small-caps; -} - -QLabel#value { - font-family: monospace; - font-weight: bold; - font-size: 14px; - background-color: transparent; -} - -QWidget#background { - background-color: transparent; -} - -QTextEdit { - font-family: monospace; -} -)style"; - -int main(int argc, char** argv) { - QApplication app(argc, argv); - - app.setStyleSheet(style); - - MainWindow window; - window.show(); - - return app.exec(); -} diff --git a/apps/TimelineView/mainwindow.cpp b/apps/TimelineView/mainwindow.cpp deleted file mode 100644 index cb32a185ec..0000000000 --- a/apps/TimelineView/mainwindow.cpp +++ /dev/null @@ -1,398 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2018 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#include "mainwindow.h" - -#include "configurationwidget.h" -#include "controlwidget.h" -#include "informationwidget.h" -#include "timelinewidget.h" - -#include -#include -#include -#include - -#include -#include - -namespace { - QByteArray continuousData; -} - -template -T readFromBuffer(char* buffer, size_t& currentReadLocation) { - union { - T value; - std::array data; - } b; - std::memmove(b.data.data(), buffer + currentReadLocation, sizeof(T)); - currentReadLocation += sizeof(T); - return b.value; -} - -template <> -std::string readFromBuffer(char* buffer, size_t& currentReadLocation) { - uint8_t size = readFromBuffer(buffer, currentReadLocation); - - std::string result(buffer + currentReadLocation, buffer + currentReadLocation + size); - currentReadLocation += size; - return result; -} - -MainWindow::MainWindow() - : QWidget(nullptr) - , _configurationWidget(nullptr) - , _timeControlWidget(nullptr) - , _informationWidget(nullptr) - , _timelineWidget(nullptr) - , _socket(nullptr) -{ - setWindowTitle("OpenSpace Timeline"); - - _configurationWidget = new ConfigurationWidget(this); - _configurationWidget->setMinimumWidth(350); - _timeControlWidget = new ControlWidget(this); - _timeControlWidget->setMinimumWidth(350); - _informationWidget = new InformationWidget(this); - _informationWidget->setMinimumWidth(350); - _timelineWidget = new TimelineWidget(this); - - QGridLayout* layout = new QGridLayout; - layout->addWidget(_configurationWidget, 0, 0); - layout->addWidget(_timeControlWidget, 1, 0); - layout->addWidget(_informationWidget, 2, 0); - layout->addWidget(_timelineWidget, 0, 1, 3, 1); - - layout->setColumnStretch(1, 5); - - - QObject::connect( - _configurationWidget, SIGNAL(connect(QString, QString)), - this, SLOT(onConnect(QString, QString)) - ); - QObject::connect( - _configurationWidget, SIGNAL(disconnect()), - this, SLOT(onDisconnect()) - ); - - QObject::connect( - _timeControlWidget, SIGNAL(scriptActivity(QString)), - this, SLOT(sendScript(QString)) - ); - - setLayout(layout); - - _configurationWidget->socketDisconnected(); - _timeControlWidget->socketDisconnected(); - _informationWidget->socketDisconnected(); - _timelineWidget->socketDisconnected(); -} - -MainWindow::~MainWindow() { - delete _socket; -} - -void MainWindow::onConnect(QString host, QString port) { - delete _socket; - - _socket = new QTcpSocket(this); - QObject::connect(_socket, SIGNAL(readyRead()), SLOT(readTcpData())); - QObject::connect(_socket, SIGNAL(connected()), SLOT(onSocketConnected())); - QObject::connect(_socket, SIGNAL(disconnected()), SLOT(onSocketDisconnected())); - - _socket->connectToHost(host, port.toUInt()); -} - -void MainWindow::onDisconnect() { - delete _socket; - _socket = nullptr; -} - -void MainWindow::readTcpData() { - static const uint16_t MessageTypeStatus = 0; - static const uint16_t MessageTypeMappingIdentifier = 1; - static const uint16_t MessageTypeInitialMessageFinished = 2; - static const uint16_t MessageTypePlayBookLabel = 3; - static const uint16_t MessageTypePlayBookHongKang = 4; - - QByteArray data = continuousData.append(_socket->readAll()); -// int d = data.size(); - - if (QString(data) == "Connected to SGCT!\r\n") { - continuousData.clear(); - return; - } - if (QString(data) == "OK\r\n") { - continuousData.clear(); - return; - } - - if (data.size() != 42) - qDebug() << QString(data); - - QByteArray messageTypeData = data.left(2); - union { - uint16_t value; - std::array data; - } messageType; - std::memcpy(messageType.data.data(), messageTypeData.data(), sizeof(uint16_t)); - - switch (messageType.value) { - case MessageTypeStatus: - break; - case MessageTypeMappingIdentifier: - qDebug() << "Mapping Identifier received"; - printMapping(data.mid(2)); - continuousData.clear(); - break; - case MessageTypeInitialMessageFinished: - qDebug() << "InitialMessageFinished received"; - break; - case MessageTypePlayBookHongKang: - qDebug() << "Hong Kang Playbook received"; - break; - case MessageTypePlayBookLabel: - qDebug() << "Label Playbook received"; - break; - default: - qDebug() << "Unknown message of type '" << messageType.value << "'"; - } - - switch (messageType.value) { - case MessageTypeStatus: - { - if (_isConnected) - handleStatusMessage(data.mid(2)); - continuousData.clear(); - break; - } - case MessageTypePlayBookHongKang: - case MessageTypePlayBookLabel: - { -// const char* payloadDebug = data.mid(2).data(); - - size_t beginning = 0; - uint32_t size = readFromBuffer(data.mid(2).data(), beginning); - - //qDebug() << "Begin reading data"; - while (_socket->waitForReadyRead() && data.size() < int(size)) { - //qDebug() << "."; - //_socket->read - //data = data.append(_socket->re) - data = data.append(_socket->readAll()); - //data = data.append(_socket->read(int(size) - data.size())); - //QThread::msleep(50); - } - //qDebug() << "Finished reading data. Handling playbook"; - - continuousData = handlePlaybook(data.mid(2)); - - - //qDebug() << "Finished handling playbook"; - - //if (messageType.value == MessageTypePlayBookHongKang) - // _hasHongKangTimeline = true; - //if (messageType.value == MessageTypePlayBookLabel) - // _hasLabelTimeline = true; - - //if (_hasHongKangTimeline && _hasLabelTimeline) { - // fullyConnected(); - //} - - break; - } - case MessageTypeInitialMessageFinished: - _isConnected = true; - fullyConnected(); - continuousData.clear(); - break; - - default: - qDebug() << QString(data); - } - -} - -void MainWindow::handleStatusMessage(QByteArray data) { - const char* buffer = data.data(); - - union { - double value; - std::array buffer; - } et; - std::memmove(et.buffer.data(), buffer, sizeof(double)); - - std::vector timeString(24); - std::memmove(timeString.data(), buffer + sizeof(double), 24); - - union { - double value; - std::array buffer; - } delta; - std::memmove(delta.buffer.data(), buffer + sizeof(double) + 24, sizeof(double)); - - _timeControlWidget->update( - QString::fromStdString(std::string(timeString.begin(), timeString.end())), - QString::number(delta.value) - ); - _timelineWidget->setCurrentTime( - std::string(timeString.begin(), timeString.end()), - et.value - ); -} - -std::vector instrumentsFromId(uint16_t instrumentId, - std::map instrumentMap) -{ - std::vector results; - for (int i = 0; i < 16; ++i) { - uint16_t testValue = 1 << i; - if ((testValue & instrumentId) != 0) { - std::string t = instrumentMap.at(testValue); - if (t.empty()) { - qDebug() << "Empty instrument"; - } - results.push_back(t); - } - } - return results; -} - -QByteArray MainWindow::handlePlaybook(QByteArray data) { - char* buffer = data.data(); - size_t currentReadLocation = 0; - - uint32_t totalData = readFromBuffer(buffer, currentReadLocation); - - uint8_t nTargets = readFromBuffer(buffer, currentReadLocation); - qDebug() << "Targets: " << nTargets; - std::map targetMap; - for (uint8_t i = 0; i < nTargets; ++i) { - uint8_t id = readFromBuffer(buffer, currentReadLocation); - std::string value = readFromBuffer(buffer, currentReadLocation); - qDebug() << QString::fromStdString(value); - targetMap[id] = value; - } - - uint8_t nInstruments = readFromBuffer(buffer, currentReadLocation); - qDebug() << "Instruments: " << nInstruments; - std::map instrumentMap; - for (uint8_t i = 0; i < nInstruments; ++i) { - uint16_t id = readFromBuffer(buffer, currentReadLocation); - std::string value = readFromBuffer(buffer, currentReadLocation); - qDebug() << QString::fromStdString(value); - instrumentMap[id] = value; - } - - uint32_t nImages = readFromBuffer(buffer, currentReadLocation); - std::vector images; - for (uint32_t i = 0; i < nImages; ++i) { - Image image; - image.beginning = readFromBuffer(buffer, currentReadLocation); - image.ending = readFromBuffer(buffer, currentReadLocation); - - image.beginningString = readFromBuffer(buffer, currentReadLocation); - image.endingString = readFromBuffer(buffer, currentReadLocation); - - uint8_t targetId = readFromBuffer(buffer, currentReadLocation); - uint16_t instrumentId = readFromBuffer(buffer, currentReadLocation); - image.target = targetMap[targetId]; - image.instruments = instrumentsFromId(instrumentId, instrumentMap); - if (image.instruments.empty()) - qDebug() << "Instruments were empty"; - images.push_back(image); - } - _timelineWidget->setData( - std::move(images), - std::move(targetMap), - std::move(instrumentMap) - ); - - auto dataSize = data.size(); - auto readSize = currentReadLocation; - auto extraBytes = dataSize - readSize; - if (extraBytes > 0) { - return data.mid(currentReadLocation); - } - else { - return QByteArray(); - } -} - -void MainWindow::sendScript(QString script) { - if (_socket) { - _socket->write(("0" + script + "\r\n").toLatin1()); - //QByteArray data = (QString("0") + script).toLocal8Bit(); - //qDebug() << data; - //_socket->write(data); - //QThread::msleep(25); - } - //_socket->write(("0" + script + "\r\n").toLatin1()); - //_socket->write(("0" + script + "\0").toLatin1()); -} - -void MainWindow::onSocketConnected() { - _socket->write(QString("1\r\n").toLatin1()); - //_socket->write(QString("1").toLatin1()); - -} - -void MainWindow::onSocketDisconnected() { - _configurationWidget->socketDisconnected(); - _timeControlWidget->socketDisconnected(); - _informationWidget->socketDisconnected(); - _timelineWidget->socketDisconnected(); - - _informationWidget->logInformation("Disconnected."); -} - -std::string MainWindow::nextTarget() const { - return _timelineWidget->nextTarget(); -} - -void MainWindow::fullyConnected() { - _informationWidget->logInformation( - "Connected to " + _socket->peerName() + " on port " + - QString::number(_socket->peerPort()) + "." - ); - - _configurationWidget->socketConnected(); - _timeControlWidget->socketConnected(); - _informationWidget->socketConnected(); - _timelineWidget->socketConnected(); -} - -void MainWindow::printMapping(QByteArray data) { - char* buffer = data.data(); - size_t currentReadPosition = 0; - - uint16_t size = readFromBuffer(buffer, currentReadPosition); - for (uint16_t i = 0; i < size; ++i) { - uint16_t identifier = readFromBuffer(buffer, currentReadPosition); - std::string mapping = readFromBuffer(buffer, currentReadPosition); - - qDebug() << identifier << ": " << QString::fromStdString(mapping); - } -} diff --git a/apps/TimelineView/mainwindow.h b/apps/TimelineView/mainwindow.h deleted file mode 100644 index 94f5a1d362..0000000000 --- a/apps/TimelineView/mainwindow.h +++ /dev/null @@ -1,74 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2018 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#ifndef __OPENSPACE_APP_TIMELINEVIEW___MAINWINDOW___H__ -#define __OPENSPACE_APP_TIMELINEVIEW___MAINWINDOW___H__ - -#include -#include - -#include "common.h" - -class ConfigurationWidget; -class ControlWidget; -class InformationWidget; -class TimelineWidget; - -class MainWindow : public QWidget { -Q_OBJECT -public: - MainWindow(); - ~MainWindow(); - - std::string nextTarget() const; - -public slots: - void sendScript(QString script); - -private slots: - void onConnect(QString host, QString port); - void onDisconnect(); - - void onSocketConnected(); - void onSocketDisconnected(); - - void readTcpData(); - void handleStatusMessage(QByteArray data); - QByteArray handlePlaybook(QByteArray data); - void printMapping(QByteArray data); - - void fullyConnected(); - -private: - ConfigurationWidget* _configurationWidget; - ControlWidget* _timeControlWidget; - InformationWidget* _informationWidget; - TimelineWidget* _timelineWidget; - - QTcpSocket* _socket; - - bool _isConnected = false; -}; - -#endif // __OPENSPACE_APP_TIMELINEVIEW___MAINWINDOW___H__ diff --git a/apps/TimelineView/timelinewidget.cpp b/apps/TimelineView/timelinewidget.cpp deleted file mode 100644 index 9716999482..0000000000 --- a/apps/TimelineView/timelinewidget.cpp +++ /dev/null @@ -1,304 +0,0 @@ -/***************************************************************************************** - * * - * OpenSpace * - * * - * Copyright (c) 2014-2018 * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this * - * software and associated documentation files (the "Software"), to deal in the Software * - * without restriction, including without limitation the rights to use, copy, modify, * - * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * - * permit persons to whom the Software is furnished to do so, subject to the following * - * conditions: * - * * - * The above copyright notice and this permission notice shall be included in all copies * - * or substantial portions of the Software. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * - * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ****************************************************************************************/ - -#include "timelinewidget.h" - -#include -#include -#include -#include - -#include -#include - -namespace { - static const int LegendHeight = 105; - static const int TimeWidth = 200; - - static const int TextOffset = 5; - - QMap InstrumentColors = { - { "NH_ALICE_AIRGLOW", QColor(40, 130, 200) }, - { "NH_ALICE_SOC", QColor(49, 234, 219) }, - { "NH_RALPH_LEISA", QColor(139, 86, 152) }, - { "NH_RALPH_MVIC_NIR", QColor(100, 14, 14) }, - { "NH_RALPH_MVIC_METHANE", QColor(211, 154, 31) }, - { "NH_RALPH_MVIC_RED", QColor(175, 18, 18) }, - { "NH_RALPH_MVIC_BLUE", QColor(84, 79, 149) }, - { "NH_LORRI", QColor(149, 219, 32) }, - { "NH_REX", QColor(35, 185, 125) }, - - { "NH_RALPH_MVIC_PAN1", QColor(203, 153, 200) }, - { "NH_RALPH_MVIC_FT", QColor(242, 101, 74) }, - { "NH_RALPH_MVIC_PAN2", QColor(180, 180, 140) } - }; - - //{ "NH_ALICE_AIRGLOW", QColor(82, 145, 57) }, - //{ "NH_ALICE_SOC", QColor(241, 231, 48) }, - - - QMap InstrumentConversion = { - { "NH_ALICE_AIRGLOW", "ALICE Airglow" }, - { "NH_RALPH_LEISA", "RALPH LEISA" }, - { "NH_RALPH_MVIC_NIR", "RALPH MVIC NIR" }, - { "NH_ALICE_SOC", "ALICE SOC" }, - { "NH_RALPH_MVIC_BLUE", "RALPH MVIC Blue" }, - { "NH_RALPH_MVIC_PAN1" , "RALPH MVIC Pan1" }, - { "NH_LORRI", "LORRI" }, - { "NH_RALPH_MVIC_FT", "RALPH MVIC FT" }, - { "NH_RALPH_MVIC_PAN2", "RALPH MVIC Pan2" }, - { "NH_RALPH_MVIC_METHANE", "RALPH MVIC Methane" }, - { "NH_RALPH_MVIC_RED", "RALPH MVIC Red" }, - { "NH_REX", "REX" } - }; - - const double etSpread = 100.0; -} - -TimelineWidget::TimelineWidget(QWidget* parent) - : QWidget(parent) - , _currentTime{"", 0.0} -{ - setMinimumWidth(600); - setMinimumHeight(600); -} - -void TimelineWidget::paintEvent(QPaintEvent* event) { - QPainter painter(this); - - QRectF fullRect = contentsRect(); - QRectF contentRect(0, 0, fullRect.width() - 1, fullRect.height() - LegendHeight); - QRectF legendRect( - 0, - fullRect.bottom() - LegendHeight, - fullRect.right(), - fullRect.bottom() - ); - - painter.save(); - drawContent(painter, contentRect); - painter.restore(); - - painter.save(); - painter.translate(0, fullRect.height() - LegendHeight); - drawLegend(painter, QRectF(legendRect)); - painter.restore(); -} - -void TimelineWidget::setData(std::vector images, - std::map targetMap, - std::map instrumentMap) -{ - _images.insert(_images.end(), images.begin(), images.end()); - - std::sort( - _images.begin(), - _images.end(), - [](const Image& a, const Image& b) { return a.beginning < b.beginning; } - ); - - _targetMap.insert(targetMap.begin(), targetMap.end()); - _instrumentMap.insert(instrumentMap.begin(), instrumentMap.end()); - - _instruments.clear(); - std::set instruments; - for (auto p : _instrumentMap) - instruments.insert(p.second); - std::copy(instruments.begin(), instruments.end(), std::back_inserter(_instruments)); - - _targets.clear(); - std::set targets; - for (auto p : _targetMap) - targets.insert(p.second); - std::copy(targets.begin(), targets.end(), std::back_inserter(_targets)); - - repaint(); -} - -void TimelineWidget::drawContent(QPainter& painter, QRectF rect) { - QRectF timelineRect(0, 0, rect.width() - TimeWidth, rect.height()); - QRectF dateRect(rect.width() - TimeWidth, 0, TimeWidth, rect.height()); - - // Draw background - //painter.setBrush(QBrush(Qt::lightGray)); painter.drawRect(timelineRect); - painter.setBrush(QBrush(QColor(85, 85, 85))); painter.drawRect(timelineRect); - painter.setBrush(QBrush(QColor(165, 165, 165))); painter.drawRect(dateRect); - - const double lowerTime = _currentTime.et - etSpread; - const double upperTime = _currentTime.et + etSpread; - - std::vector images; - for (Image& i : _images) { - if (i.beginning <= upperTime && i.ending >= lowerTime) - images.push_back(&i); - } - - drawImages(painter, timelineRect, images, lowerTime, upperTime); - - - // Draw current time - painter.setBrush(QBrush(Qt::black)); - painter.setPen(QPen(Qt::black, 2)); - painter.drawLine( - QPointF(0, timelineRect.height() / 2), - QPointF(timelineRect.width(), timelineRect.height() / 2) - ); - painter.drawText( - timelineRect.width(), - timelineRect.height() / 2 + TextOffset, - QString::fromStdString(_currentTime.time) - ); -} - -void TimelineWidget::drawLegend(QPainter& painter, QRectF rect) { - static const int Padding = 5; - static const int BoxSize = 20; - - int currentHorizontalPosition = Padding; - int currentVerticalPosition = Padding + BoxSize + Padding; - - // Draw Targets - // Draw Instruments - for (int i = 0; i < _instruments.size(); ++i) { - if (i == _instruments.size() / 3 || i == _instruments.size() * 2 / 3) { - currentVerticalPosition += BoxSize + Padding; - currentHorizontalPosition = Padding; - } - - const std::string& instrument = _instruments[i]; - ; - painter.setBrush(QBrush(InstrumentColors[QString::fromStdString(instrument)])); - painter.setPen(QPen(InstrumentColors[QString::fromStdString(instrument)])); - painter.drawRect( - currentHorizontalPosition, - currentVerticalPosition, - BoxSize, - BoxSize - ); - currentHorizontalPosition += BoxSize + Padding; - - painter.setPen(QPen(QColor(200, 200, 200))); - //painter.setPen(QPen(Qt::black)); - painter.drawText( - currentHorizontalPosition, - currentVerticalPosition + BoxSize / 2 + TextOffset, - InstrumentConversion[QString::fromStdString(instrument)] - ); - currentHorizontalPosition += 125; - } -} - -void TimelineWidget::setCurrentTime(std::string currentTime, double et) { - _currentTime.time = std::move(currentTime); - _currentTime.et = std::move(et); - repaint(); - -} - -void TimelineWidget::drawImages( - QPainter& painter, - QRectF timelineRect, - std::vector images, - double minimumTime, double maximumTime) -{ - std::set instrumentSet; - for (Image* i : images) { - for (std::string instrument : i->instruments) { - instrumentSet.insert(instrument); - } - } - std::map instruments; - for (auto it = instrumentSet.begin(); it != instrumentSet.end(); ++it) - instruments[*it] = std::distance(instrumentSet.begin(), it); - - for (Image* i : images) { - double tBeg = (i->beginning - minimumTime) / (maximumTime - minimumTime); - tBeg = std::max(tBeg, 0.0); - double tEnd = (i->ending - minimumTime) / (maximumTime - minimumTime); - tEnd = std::min(tEnd, 1.0); - - int loc = timelineRect.top() + timelineRect.height() * tBeg; - int height = (timelineRect.top() + timelineRect.height() * tEnd) - loc; - height = std::max(height, 5); - - if (loc + height > timelineRect.height()) { - height = timelineRect.height() - loc; - } - - std::string target = i->target; - auto it = std::find(_targets.begin(), _targets.end(), target); -// int iTarget = std::distance(_targets.begin(), it); - - for (std::string instrument : i->instruments) { - auto it = std::find(_instruments.begin(), _instruments.end(), instrument); - if (it == _instruments.end()) { - qDebug() << "Instrument not found"; - } - - painter.setBrush( - QBrush(InstrumentColors[QString::fromStdString(instrument)]) - ); - - double width = timelineRect.width() / instruments.size(); - double pos = instruments[instrument] * width; - - painter.drawRect(pos, loc, width, height); - } - - if (height >= 5) { - painter.setBrush(QBrush(Qt::black)); - painter.setPen(QPen(Qt::black)); - QString line = QString::fromStdString(i->beginningString) + QString(" (") + - QString::fromStdString(i->target) + QString(")"); - - painter.drawText(timelineRect.width(), loc + height / 2 + TextOffset, line); - } - } -} - -void TimelineWidget::socketConnected() { - setDisabled(false); -} - -void TimelineWidget::socketDisconnected() { - setDisabled(true); - _images.clear(); - _instruments.clear(); - _targets.clear(); -} - -std::string TimelineWidget::nextTarget() const { - auto it = std::lower_bound( - _images.begin(), - _images.end(), - _currentTime.et, - [](const Image& i, double et) { return i.beginning < et; } - ); - if (it != _images.end()) { - return it->target; - } - else { - return ""; - } -} diff --git a/apps/Wormhole/CMakeLists.txt b/apps/Wormhole/CMakeLists.txt index a3c27dd29b..fb8a75f2cd 100644 --- a/apps/Wormhole/CMakeLists.txt +++ b/apps/Wormhole/CMakeLists.txt @@ -2,7 +2,7 @@ # # # OpenSpace # # # -# Copyright (c) 2014-2018 # +# Copyright (c) 2014-2020 # # # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # # software and associated documentation files (the "Software"), to deal in the Software # @@ -25,18 +25,17 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/application_definition.cmake) set_source_files_properties( - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns - PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + PROPERTIES MACOSX_PACKAGE_LOCATION "Resources" ) set(MACOSX_BUNDLE_ICON_FILE openspace.icns) create_new_application( - Wormhole - MACOSX_BUNDLE - ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc - ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns + Wormhole MACOSX_BUNDLE + ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.rc + ${CMAKE_CURRENT_SOURCE_DIR}/openspace.icns ) target_link_libraries(Wormhole openspace-core) @@ -45,20 +44,21 @@ target_link_libraries(Wormhole openspace-core) # Why not put these in the module's path? Because they do not have access to the # target as of July 2017, which is needed. if (OPENSPACE_MODULE_WEBBROWSER AND CEF_ROOT) - # wanted by CEF - set(CMAKE_BUILD_TYPE Debug CACHE INTERNAL "CMAKE_BUILD_TYPE") + # wanted by CEF + set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMAKE_BUILD_TYPE") + set(PROJECT_ARCH "x86_64") - if (WIN32) - set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) - endif () + if (WIN32) + set(RESOURCE_FILE ${OPENSPACE_APPS_DIR}/OpenSpace/openspace.rc) + endif () - # Add the CEF binary distribution's cmake/ directory to the module path and - # find CEF to initialize it properly. - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") - include(webbrowser_helpers) + # Add the CEF binary distribution's cmake/ directory to the module path and + # find CEF to initialize it properly. + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${WEBBROWSER_MODULE_PATH}/cmake") + include(webbrowser_helpers) - set_cef_targets("${CEF_ROOT}" Wormhole) - run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") + set_cef_targets("${CEF_ROOT}" Wormhole) + run_cef_platform_config("${CEF_ROOT}" "${CEF_TARGET}" "${WEBBROWSER_MODULE_PATH}") elseif (OPENSPACE_MODULE_WEBBROWSER) - message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") + message(WARNING "Web configured to be included, but no CEF_ROOT was found, please try configuring CMake again.") endif () diff --git a/apps/Wormhole/main.cpp b/apps/Wormhole/main.cpp index 0e948ceb54..12b3764abb 100644 --- a/apps/Wormhole/main.cpp +++ b/apps/Wormhole/main.cpp @@ -2,7 +2,7 @@ * * * OpenSpace * * * - * Copyright (c) 2014-2018 * + * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * @@ -22,43 +22,26 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ - -#include - -#include -#include -#include -#include -#include +#include +#include #include #include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include +#include #include -#include namespace { - const std::string _loggerCat = "Wormhole"; -} + constexpr const char*_loggerCat = "Wormhole"; +} // namespace int main(int argc, char** argv) { using namespace openspace; + using namespace ghoul::cmdparser; std::vector arguments(argv, argv + argc); - ghoul::cmdparser::CommandlineParser commandlineParser( + CommandlineParser commandlineParser( "Wormhole", - ghoul::cmdparser::CommandlineParser::AllowUnknownCommands::Yes + CommandlineParser::AllowUnknownCommands::Yes ); std::stringstream defaultPassword; @@ -73,43 +56,43 @@ int main(int argc, char** argv) { std::chrono::system_clock::now().time_since_epoch().count() + 1 ) % 0xffffff); - std::string portString = ""; + std::string portString; commandlineParser.addCommand( std::make_unique>( portString, "--port", "-p", "Sets the port to listen on" - ) + ) ); - std::string password = ""; + std::string password; commandlineParser.addCommand( std::make_unique>( password, "--password", "-l", "Sets the password to use" - ) + ) ); - std::string changeHostPassword = ""; + std::string changeHostPassword; commandlineParser.addCommand( std::make_unique>( changeHostPassword, "--hostpassword", "-h", "Sets the host password to use" - ) + ) ); commandlineParser.setCommandLine(arguments); commandlineParser.execute(); - if (password == "") { + if (password.empty()) { password = defaultPassword.str(); } - if (changeHostPassword == "") { + if (changeHostPassword.empty()) { changeHostPassword = defaultChangeHostPassword.str(); } @@ -118,11 +101,11 @@ int main(int argc, char** argv) { int port = 25001; - if (portString != "") { + if (!portString.empty()) { try { port = std::stoi(portString); } - catch (...) { + catch (const std::invalid_argument&) { LERROR(fmt::format("Invalid port: {}", portString)); } } @@ -132,7 +115,9 @@ int main(int argc, char** argv) { server.setDefaultHostAddress("127.0.0.1"); LINFO(fmt::format("Server listening to port {}", port)); - while (std::cin.get() != 'q') {} + while (std::cin.get() != 'q') { + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + } server.stop(); LINFO("Server stopped"); diff --git a/config/fullscreen1080.xml b/config/fullscreen1080.xml new file mode 100644 index 0000000000..3b7f94c4cc --- /dev/null +++ b/config/fullscreen1080.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/gui_projector.xml b/config/gui_projector.xml new file mode 100644 index 0000000000..21e9d09a9f --- /dev/null +++ b/config/gui_projector.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/openvr_htcVive.xml b/config/openvr_htcVive.xml index e663b11521..c5ab46597a 100644 --- a/config/openvr_htcVive.xml +++ b/config/openvr_htcVive.xml @@ -1,23 +1,23 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/config/openvr_oculusRiftCv1.xml b/config/openvr_oculusRiftCv1.xml index e264dd3788..665715fb53 100644 --- a/config/openvr_oculusRiftCv1.xml +++ b/config/openvr_oculusRiftCv1.xml @@ -1,23 +1,23 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/config/single.xml b/config/single.xml index 6f8f58b23b..6ec2d5a125 100644 --- a/config/single.xml +++ b/config/single.xml @@ -1,24 +1,24 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/config/single_fisheye.xml b/config/single_fisheye.xml index b9bc7415dd..e27230e520 100644 --- a/config/single_fisheye.xml +++ b/config/single_fisheye.xml @@ -1,37 +1,37 @@ - - - - - - - - - - - - - - - - - - - + + + + --> + + + + + + + + + + + + + + + + + + + diff --git a/config/single_fisheye_gui.xml b/config/single_fisheye_gui.xml new file mode 100644 index 0000000000..794a03b056 --- /dev/null +++ b/config/single_fisheye_gui.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/single_gui.xml b/config/single_gui.xml index 129232a9ea..832273090e 100644 --- a/config/single_gui.xml +++ b/config/single_gui.xml @@ -1,37 +1,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/single_sbs_stereo.xml b/config/single_sbs_stereo.xml new file mode 100644 index 0000000000..595d92cafb --- /dev/null +++ b/config/single_sbs_stereo.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/single_two_win.xml b/config/single_two_win.xml index 48b50d2a0f..ed1b09fc04 100644 --- a/config/single_two_win.xml +++ b/config/single_two_win.xml @@ -1,32 +1,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/spherical_mirror.xml b/config/spherical_mirror.xml index 20bbdebfa0..fc98729758 100644 --- a/config/spherical_mirror.xml +++ b/config/spherical_mirror.xml @@ -1,32 +1,34 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/spherical_mirror_gui.xml b/config/spherical_mirror_gui.xml index 2da44b6241..e1e84e46df 100644 --- a/config/spherical_mirror_gui.xml +++ b/config/spherical_mirror_gui.xml @@ -1,7 +1,7 @@ - - + + @@ -17,7 +17,9 @@ - 8k (8192) tilt specifies the dome tilt angle in degrees from the horizontal --> - + + + @@ -25,15 +27,16 @@ - + + - + diff --git a/config/spout_output.xml b/config/spout_output.xml index 7ceecacb8e..bac296112f 100644 --- a/config/spout_output.xml +++ b/config/spout_output.xml @@ -1,29 +1,19 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/config/two_nodes.xml b/config/two_nodes.xml index b4ae20f8c0..e47946d5ef 100644 --- a/config/two_nodes.xml +++ b/config/two_nodes.xml @@ -1,36 +1,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/assets/default.scene b/data/assets/base.asset similarity index 56% rename from data/assets/default.scene rename to data/assets/base.asset index acab28d799..86bdf3cbd6 100644 --- a/data/assets/default.scene +++ b/data/assets/base.asset @@ -1,37 +1,42 @@ +-- This is a base scene that is included in most other scenes to set up defaults +-- loading this scene directly without any other elements added on top of it will +-- probably not work + local assetHelper = asset.require('util/asset_helper') local sceneHelper = asset.require('util/scene_helper') local propertyHelper = asset.require('util/property_helper') -- Specifying which other assets should be loaded in this scene asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.require('scene/solarsystem/planets') + +asset.require('scene/solarsystem/sun/sun') +asset.require('scene/solarsystem/sun/glare') +asset.require('scene/solarsystem/sun/default_layers') +asset.require('scene/solarsystem/planets/planets') +asset.require('scene/solarsystem/planets/default_layers') asset.require('scene/solarsystem/planets/mars/moons/phobos') asset.require('scene/solarsystem/planets/mars/moons/deimos') asset.require('scene/solarsystem/dwarf_planets/pluto/system') -assetHelper.requestAll(asset, 'scene/digitaluniverse') +asset.require('scene/solarsystem/dwarf_planets/pluto/default_layers') +asset.require('scene/solarsystem/dwarf_planets/pluto/charon/default_layers') +asset.require('scene/milkyway/milkyway/volume') +asset.require('scene/milkyway/constellations/constellation_art') +asset.require('scene/milkyway/constellations/constellation_keybinds') + +assetHelper.requireAll(asset, 'scene/digitaluniverse') + -- Load default key bindings applicable to most scenes asset.require('util/default_keybindings') asset.require('util/default_dashboard') asset.require('util/default_joystick') -asset.require('util/webgui') +-- Load web gui +local webGui = asset.require('util/webgui') -asset.request('customization/globebrowsing') +asset.require('customization/globebrowsing') -- Keybindings that are specific for this scene local Keybindings = { - { - Key = "s", - Command = propertyHelper.invert('Scene.Earth.Renderable.Layers.NightLayers.Earth at Night 2012.Enabled') .. - propertyHelper.invert('Scene.Earth.Renderable.PerformShading') .. - propertyHelper.invert('Scene.Earth.Renderable.Atmosphere') .. - propertyHelper.invert('Scene.Earth.Renderable.Layers.WaterMasks.MODIS_Water_Mask.Enabled'), - Name = "Night for earth", - Documentation = "Toggle night texture, shading, atmosphere, and water for Earth.", - GuiPath = "/Rendering", - Local = false - }, { Key = "b", Name = "Toggle background", @@ -58,54 +63,36 @@ local Keybindings = { }, { Key = "h", - Name="Hide Trails", - Command = "openspace.setPropertyValue('Scene.*Trail.Renderable.Enabled', false)", - Documentation = "Disables visibility of the trails", + Name="Toggle Trails", + Command = "local list = openspace.getProperty('{planetTrail_solarSystem}.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end\n" .. + "local moonlist = openspace.getProperty('{moonTrail_solarSystem}.Renderable.Enabled'); for _,v in pairs(moonlist) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end", + Documentation = "Toggles the visibility of planet and moon trails", GuiPath = "/Rendering", Local = false }, + { + Key = "l", + Name = "Toggle planet labels", + Command = "local list = openspace.getProperty('{solarsystem_labels}.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end", + Documentation = "Turns on visibility for all solar system labels", + GuiPath = "/Rendering", + Local = false + } } -local earthAsset = asset.require('scene/solarsystem/planets/earth/earth') - -assetHelper.registerInterestingNodes(asset, { - "Earth", "Mars", "Moon", "Sun" -}) - asset.onInitialize(function () - local now = openspace.time.currentWallTime() - -- Jump back one day to show a complete planet - openspace.time.setTime(openspace.time.advancedTime(now, "-1d")) + webGui.setCefRoute("onscreen") sceneHelper.bindKeys(Keybindings) - openspace.setDefaultGuiSorting() + openspace.setPropertyValueSingle("RenderEngine.VerticalLogOffset", 0.100000) + openspace.globebrowsing.loadWMSServersFromFile( openspace.absPath("${DATA}/globebrowsing_servers.lua") ) - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "Scene.*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = earthAsset.Earth.Identifier, - Position = { 0, 0, 0 }, - Rotation = { 0.758797, 0.221490, -0.605693, -0.091135 }, - }) - - openspace.globebrowsing.goToGeo(58.5877, 16.1924, 20000000) end) asset.onDeinitialize(function () sceneHelper.unbindKeys(Keybindings) - - openspace.removeVirtualProperty("*Trail.Renderable.Enabled") end) diff --git a/data/assets/customization/globebrowsing.asset b/data/assets/customization/globebrowsing.asset index 726ac0bce9..2d6b09b63e 100644 --- a/data/assets/customization/globebrowsing.asset +++ b/data/assets/customization/globebrowsing.asset @@ -1,10 +1,9 @@ -- Add require statements for assets exporting the neccessary globes --- example: +-- here we add Mars, Moon and Mercury: asset.require('../scene/solarsystem/planets/mars/mars') asset.require('../scene/solarsystem/planets/earth/moon/moon') asset.require('../scene/solarsystem/planets/mercury/mercury') - local CreateFocusNodes = false -- Add folders to this list that contain .info files describing patches @@ -21,8 +20,17 @@ local vrt_folders = { -- tl;dr: Specify CTX folders first, then HiRISE -- example: 'C:/OpenSpace/GlobeBrowsingData/Mars/CTX' + + -- We recommend using this folder for CTX openspace.absPath('${BASE}/../OpenSpaceData/Mars/CTX'), + -- if not and you have a custom path for CTX layers, enter it below + '', + + -- Our provided HiRISE layer + openspace.absPath('${ASSETS}/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE'), + -- We recommend using this folder for HiRISE openspace.absPath('${BASE}/../OpenSpaceData/Mars/HiRISE'), + -- if not and you have a custom path for HiRISE layers, enter it below '', }, Moon = { @@ -32,6 +40,7 @@ local vrt_folders = { -- results -- example: 'C:/OpenSpace/GlobeBrowsingData/Moon' openspace.absPath('${BASE}/../OpenSpaceData/Moon'), + openspace.absPath('${BASE}/../OpenSpaceData/Apollo'), '' }, Mercury = { @@ -49,10 +58,12 @@ asset.onInitialize(function () -- Add local patches described at the top of this file for obj, list in pairs(vrt_folders) do for _, dir in pairs(list) do - openspace.globebrowsing.addBlendingLayersFromDirectory(dir, obj) + if (dir ~= '') then + openspace.globebrowsing.addBlendingLayersFromDirectory(dir, obj) - if CreateFocusNodes then - openspace.globebrowsing.addFocusNodesFromDirectory(dir, obj) + if CreateFocusNodes then + openspace.globebrowsing.addFocusNodesFromDirectory(dir, obj) + end end end end diff --git a/data/assets/customization/gui.asset b/data/assets/customization/gui.asset index b1d255fdbd..e18cd44a7f 100644 --- a/data/assets/customization/gui.asset +++ b/data/assets/customization/gui.asset @@ -5,4 +5,4 @@ asset.export("webguiDevelopmentMode", false) -- 1) Set the above `webguiDevelopmentMode` to true -- 2) Clone the repository: https://github.com/OpenSpace/OpenSpace-WebGuiFrontend -- 3) Install nodejs (including npm) --- 4) Within the repository, run `npm install` and `npm start` \ No newline at end of file +-- 4) Within the repository, run `npm install` and `npm start` diff --git a/data/assets/customization/localbookmarks.csv b/data/assets/customization/localbookmarks.csv new file mode 100644 index 0000000000..138adef2cf --- /dev/null +++ b/data/assets/customization/localbookmarks.csv @@ -0,0 +1,2 @@ +Group (optional),Name (required),Globe (optional),Lat (required if globe),Lon (required if globe),Altitude (optional if globe),x (required if not globe),y (required if not globe),z (required if not globe),Scale (optional),LineWidth (optional) +NASA,Kenedy Space Center,Earth,28.6658276,-80.70282839,,,,,, diff --git a/data/assets/dawn.scene b/data/assets/dawn.scene deleted file mode 100644 index 6169619bb7..0000000000 --- a/data/assets/dawn.scene +++ /dev/null @@ -1,53 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.request('scene/solarsystem/planets') -asset.request('scene/digitaluniverse/stars') -asset.request('scene/digitaluniverse/milkyway') -asset.require('scene/solarsystem/missions/dawn/ceres') -asset.require('scene/solarsystem/missions/dawn/dawn') -asset.require('scene/solarsystem/missions/dawn/vesta') - --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') - -asset.require('util/webgui') - -local DawnAsset = asset.require('scene/solarsystem/missions/dawn/dawn') - -asset.onInitialize(function () - openspace.time.setTime("2011 AUG 06 00:00:00") - - openspace.setDefaultGuiSorting() - - openspace.markInterestingNodes({ - "Dawn", "Ceres", "Vesta" - }) - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = DawnAsset.Dawn.Identifier, - Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 }, - Rotation = { -0.106166, 0.981574, -0.084545, 0.134513 }, - }) -end) - -asset.onDeinitialize(function () - openspace.removeVirtualProperty("*Trail.Renderable.Enabled") - openspace.removeInterestingNodes({ - "Dawn", "Ceres", "Vesta" - }) -end) diff --git a/data/assets/default_full.scene b/data/assets/default_full.scene deleted file mode 100644 index faf201f55e..0000000000 --- a/data/assets/default_full.scene +++ /dev/null @@ -1,7 +0,0 @@ -asset.require('./default') -asset.require('scene/solarsystem/planets/jupiter/minor_moons') -asset.require('scene/solarsystem/planets/saturn/minor_moons') -asset.require('scene/solarsystem/planets/uranus/minor_moons') -asset.require('scene/solarsystem/planets/neptune/inner_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_prograde_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_retrograde_moons') diff --git a/data/assets/examples/basic.scene b/data/assets/examples/basic.scene new file mode 100644 index 0000000000..ec17991a57 --- /dev/null +++ b/data/assets/examples/basic.scene @@ -0,0 +1,27 @@ +local assetHelper = asset.require('util/asset_helper') +local sceneHelper = asset.require('util/scene_helper') +local propertyHelper = asset.require('util/property_helper') +local debugHelper = asset.require('util/debug_helper') + +-- At this point, a scene needs basic spice data to load. +asset.require('spice/base') + +asset.require('util/default_keybindings') +asset.require('util/default_dashboard') +asset.require('util/default_joystick') + +asset.require('util/webgui') +local spheres = asset.require('examples/spheres') + +debugHelper.registerCartesianAxes(asset, { + Parent = "Root", + Scale = 10 +}) + +asset.onInitialize(function () + openspace.navigation.setNavigationState({ + Anchor = "Root", + Position = { 20, 20, 20 }, + Up = {0, 1, 0}, + }) +end) diff --git a/data/assets/examples/grids.asset b/data/assets/examples/grids.asset new file mode 100644 index 0000000000..8f001c06ad --- /dev/null +++ b/data/assets/examples/grids.asset @@ -0,0 +1,54 @@ +local assetHelper = asset.require('util/asset_helper') + +local scale = 3E11 + +local radialGrid = { + Identifier = "ExampleRadialGrid", + Parent = "Root", + Transform = { + Scale = { + Type = "StaticScale", + Scale = scale + } + }, + Renderable = { + Type = "RenderableRadialGrid", + Opacity = 0.8, + GridColor = {0.6, 1.0, 0.7}, + LineWidth = 3.0, + GridSegments = {3, 4}, + InnerRadius = 0.2, + Enabled = false + }, + GUI = { + Name = "Example Radial Grid", + Path = "/Examples/Grids" + } +} + +local planarGrid = { + Identifier = "ExampleGrid", + Transform = { + Scale = { + Type = "StaticScale", + Scale = scale + } + }, + Renderable = { + Type = "RenderableGrid", + GridColor = {0.0, 1.0, 0.8}, + LineWidth = 2.0, + Segments = {5, 10}, + Size = {1, 2}, + Enabled = false + }, + GUI = { + Name = "Example Grid", + Path = "/Examples/Grids" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + radialGrid, + planarGrid +}) diff --git a/data/assets/examples/screenspacebrowser.asset b/data/assets/examples/screenspacebrowser.asset new file mode 100644 index 0000000000..f10350749e --- /dev/null +++ b/data/assets/examples/screenspacebrowser.asset @@ -0,0 +1,10 @@ +local assetHelper = asset.require('util/asset_helper') + +local spec = { + Type = "ScreenSpaceBrowser", + Identifier = "ScreenSpaceBrowserExample", + Name = "Screen Space Browser Example", + Url = "https://www.openspaceproject.com/" +}; + +assetHelper.registerScreenSpaceRenderables(asset, { spec }) diff --git a/data/assets/examples/slidedeck.asset b/data/assets/examples/slidedeck.asset index 2db61a0b7a..14073d5251 100644 --- a/data/assets/examples/slidedeck.asset +++ b/data/assets/examples/slidedeck.asset @@ -3,8 +3,10 @@ local deck = nil asset.onInitialize(function () deck = helper.createDeck("example", { - FlatScreen = false, - SphericalPosition = {0.0, 3.1415 / 2}, + UseRadiusAzimuthElevation = true, + RadiusAzimuthElevation = {1.0, 0.0, 0.0}, -- use for dome + UsePerspectiveProjection = true, + FaceCamera = true, Scale = 0.7 }) diff --git a/data/assets/examples/spheres.asset b/data/assets/examples/spheres.asset new file mode 100644 index 0000000000..2510084d70 --- /dev/null +++ b/data/assets/examples/spheres.asset @@ -0,0 +1,34 @@ +local assetHelper = asset.require('util/asset_helper') + +local i = 1 +for z=1,3 do + for y=1,3 do + for x=1,3 do + local sphere = { + Identifier = "ExampleSphere" .. i, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = {x, y, z} + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = true, + Size = 0.20 + i * 0.01, + Segments = 80, + Opacity = 1, + Texture = "${DATA}/test2.jpg", + Orientation = "Both", + }, + GUI = { + Name = "Test Sphere " .. i, + Path = "/Other/Spheres" + } + } + assetHelper.registerSceneGraphNodesAndExport(asset, { sphere }) + i = i + 1 + end + end +end + diff --git a/data/assets/examples/volume/generated/cartesiansequence.asset b/data/assets/examples/volume/generated/cartesiansequence.asset index 4ec617eb64..7b341c79f1 100644 --- a/data/assets/examples/volume/generated/cartesiansequence.asset +++ b/data/assets/examples/volume/generated/cartesiansequence.asset @@ -35,4 +35,4 @@ local volume = { } local objects = { volume } -assetHelper.registerSceneGraphNodes(asset, objects) \ No newline at end of file +assetHelper.registerSceneGraphNodes(asset, objects) diff --git a/data/assets/examples/volume/toyvolume.asset b/data/assets/examples/volume/toyvolume.asset index 93730536f1..a52f4d879d 100644 --- a/data/assets/examples/volume/toyvolume.asset +++ b/data/assets/examples/volume/toyvolume.asset @@ -8,10 +8,10 @@ local ToyVolume = { Parent = transforms.SolarSystemBarycenter.Identifier, Renderable = { Type = "RenderableToyVolume", - Size = {5, 5, 5}, + Size = { 5, 5, 5 }, ScalingExponent = 11, StepSize = 0.01, - Color = {1, 0, 0, 1} + Color = { 1, 0, 0 } }, GUI = { Path = "/Examples" diff --git a/data/assets/gaia.scene b/data/assets/gaia.scene deleted file mode 100644 index a8b164c5a8..0000000000 --- a/data/assets/gaia.scene +++ /dev/null @@ -1,40 +0,0 @@ -local has_gaia = openspace.modules.isLoaded('gaia') -if not has_gaia then - openspace.printFatal('Could not load scene "' .. asset.filePath .. '" due to missing module "gaia"') - do return end -end - -local assetHelper = asset.require('util/asset_helper') - -asset.require('default') - --- Augment default scene with gaia data, 3D model and trail -asset.require('scene/milkyway/gaia/gaiastars') -asset.require('scene/milkyway/gaia/apogee') -asset.require('scene/milkyway/gaia/galah') -asset.require('scene/solarsystem/missions/gaia/gaia') -asset.require('scene/solarsystem/missions/gaia/trail') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemDistance", - Identifier = "GaiaEarthDistance", - GuiName = "Gaia Earth Distance", - SourceType = "Node", - SourceNodeName = "Gaia", - DestinationType = "Node Surface", - DestinationNodeName = "Earth" - } -}) - -assetHelper.registerInterestingNodes(asset, { "Gaia" }) - -asset.onInitialize(function () - openspace.setPropertyValueSingle('Scene.Stars.Renderable.Enabled', false); - - openspace.navigation.setCameraState({ - Focus = "Gaia", - Position = { 1000000000000.0, 1000000000000.0, 1000000000000.0 }, - Rotation = { 0.683224, -0.765934, -0.601234, -0.418073 }, - }) -end) \ No newline at end of file diff --git a/data/assets/global/localbookmarks.asset b/data/assets/global/localbookmarks.asset new file mode 100644 index 0000000000..18fd5b408e --- /dev/null +++ b/data/assets/global/localbookmarks.asset @@ -0,0 +1,5 @@ +local assetHelper = asset.require('util/asset_helper') +local bookmarkHelper = asset.require('util/generate_bookmarks') + +local nodes = bookmarkHelper.getBookmarks('Local Bookmarks', '${ASSETS}/customization/localbookmarks.csv') +assetHelper.registerSceneGraphNodesAndExport(asset, nodes); diff --git a/data/assets/global/openspacebookmarks.asset b/data/assets/global/openspacebookmarks.asset new file mode 100644 index 0000000000..8075929c44 --- /dev/null +++ b/data/assets/global/openspacebookmarks.asset @@ -0,0 +1,28 @@ +local assetHelper = asset.require('util/asset_helper') +local bookmarkHelper = asset.require('util/generate_bookmarks') + +local dataProvider = 'http://data.openspaceproject.com/files/bookmarks/v1/bookmarks.csv' + +local bookmarksCSV = asset.syncedResource({ + Identifier = 'openspace_bookmarks', + Name = 'OpenSpace Bookmarks', + Type = 'UrlSynchronization', + UseHash = false, + Override = true, + Url = dataProvider +}) + +local nodes = {} + +asset.onInitialize(function () + nodes = bookmarkHelper.getBookmarks('OpenSpace Bookmarks', bookmarksCSV .. '/bookmarks.csv.txt') + for _, n in ipairs(nodes) do + openspace.addSceneGraphNode(n); + end +end) + +asset.onDeinitialize(function () + for _, n in ipairs(nodes) do + openspace.removeSceneGraphNode(n.Identifier); + end +end) diff --git a/data/assets/gui/images.asset b/data/assets/gui/images.asset new file mode 100644 index 0000000000..abb6bee4b9 --- /dev/null +++ b/data/assets/gui/images.asset @@ -0,0 +1,48 @@ +-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_SYNC enabled + +local assetHelper = asset.require("util/asset_helper") + +asset.syncedResource({ + Type = "UrlSynchronization", + Name = "Icons", + Identifier = "planet_icons", + Url = { + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/earth.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/moon.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/jupiter.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/mars.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/mercury.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/neptune.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/saturn.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/uranus.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/venus.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/callisto.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/europa.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/ganymede.png", + "http://data.openspaceproject.com/files/webgui/assets/icons/solarsystem/io.png", + }, + UseHash = false +}) + +asset.syncedResource({ + Type = "UrlSynchronization", + Name = "Stories", + Identifier = "story_images", + Url = { + "http://data.openspaceproject.com/files/webgui/assets/images/stories/story_solarsystem.png", + "http://data.openspaceproject.com/files/webgui/assets/images/stories/story_jupitermoons.png", + "http://data.openspaceproject.com/files/webgui/assets/images/stories/story_earthweather.png", + "http://data.openspaceproject.com/files/webgui/assets/images/stories/story_mars.png", + "http://data.openspaceproject.com/files/webgui/assets/images/stories/story_galaxies.png", + "http://data.openspaceproject.com/files/webgui/assets/images/stories/story_example.png", + }, + UseHash = false +}) + +asset.syncedResource({ + Type = "UrlSynchronization", + Name = "Instructions", + Identifier = "images", + Url = "http://data.openspaceproject.com/files/webgui/assets/images/instructions.png", + UseHash = false +}) diff --git a/data/assets/juno.scene b/data/assets/juno.scene deleted file mode 100644 index 9e521e2f7a..0000000000 --- a/data/assets/juno.scene +++ /dev/null @@ -1,54 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.request('scene/solarsystem/planets') -asset.request('scene/digitaluniverse/stars') -asset.request('scene/digitaluniverse/milkyway') -assetHelper.requireAll(asset, 'scene/solarsystem/missions/juno') - --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') -asset.require('util/default_joystick') - -asset.require('util/webgui') - -local junoAsset = asset.require('scene/solarsystem/missions/juno/juno') - -assetHelper.registerInterestingNodes(asset, { - "Jupiter", "Juno" -}) - -asset.onInitialize(function () - openspace.time.setTime("2016-07-01T10:05:00.00") - - openspace.setDefaultGuiSorting() - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = junoAsset.Juno.Identifier, - Position = { 1837386367.601345, -389860693812.834839, 714830404470.398926 }, - Rotation = { -0.336540, 0.711402, -0.099212, 0.608937 }, - }) -end) - -asset.onDeinitialize(function () - openspace.removeVirtualProperty("*Trail.Renderable.Enabled") -end) diff --git a/data/assets/messenger.scene b/data/assets/messenger.scene deleted file mode 100644 index 5aeaa37827..0000000000 --- a/data/assets/messenger.scene +++ /dev/null @@ -1,70 +0,0 @@ ---messenger.scene - -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') - -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.require('scene/solarsystem/planets') -asset.request('scene/digitaluniverse/stars') -asset.request('scene/digitaluniverse/milkyway') - -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') - -asset.require('util/webgui') - -local MessengerAsset = asset.require('scene/solarsystem/missions/messenger/messengerSC') - -if not openspace.modules.isLoaded("Volume") then - openspace.printError("Volume module is not loaded, skipping asset: mercurymagnetosphere") -else - asset.require('scene/solarsystem/missions/messenger/mercurymagnetosphere') -end - -asset.request('customization/globebrowsing') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemDistance", - Identifier = "MessengerDistance", - GuiName = "Messenger - Mercury Distance", - SourceType = "Node", - SourceNodeName = "Messenger", - DestinationType = "Node", - DestinationNodeName = "Mercury" - } -}) - -assetHelper.registerInterestingNodes(asset, { - "Mercury", "Messenger", "Earth", "Sun" -}) - -asset.onInitialize(function () - - openspace.time.setTime("2011 MAY 13 00:05:18") - - openspace.setDefaultGuiSorting() - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "Scene.*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = "Mercury", - Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 }, - Rotation = {0.180662, 0.021334, 0.979084, 0.091111}, - }) -end) diff --git a/data/assets/newhorizons.scene b/data/assets/newhorizons.scene deleted file mode 100644 index 834ffc1f11..0000000000 --- a/data/assets/newhorizons.scene +++ /dev/null @@ -1,238 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') -local renderableHelper = asset.require('util/renderable_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.require('scene/solarsystem/planets') -asset.request('scene/digitaluniverse/stars') -asset.request('scene/digitaluniverse/milkyway') -asset.require('scene/solarsystem/missions/newhorizons/newhorizons') - --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') -asset.require('util/default_joystick') - -asset.require('util/webgui') - -asset.request('customization/globebrowsing') - --- Custom Keybindings -local Keybindings = { - { - Key = "a", - Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'NewHorizons')", - Documentation = "Sets the focus of the camera on 'NewHorizons'.", - Name = "Focus on New Horizons", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "s", - Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'Pluto')", - Documentation = "Sets the focus of the camera on 'Pluto'", - Name = "Focus on Pluto", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "d", - Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'Charon')", - Documentation = "Sets the focus of the camera on 'Charon'.", - Name = "Focus on New Charon", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "F7", - Command = -[[local enabled = openspace.getPropertyValue('Scene.Pluto.Renderable.ProjectionComponent.PerformProjection') -openspace.setPropertyValue('Scene.Pluto.Renderable.ProjectionComponent.PerformProjection', not enabled) -openspace.setPropertyValue('Scene.Charon.Renderable.ProjectionComponent.PerformProjection', not enabled) -openspace.setPropertyValueSingle("Dashboard.NewHorizonsInstruments.Enabled", not enabled)]], - Documentation = "Toggles New Horizons image projection.", - Name = "Toggle NH Image Projection", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "F8", - Command = "openspace.setPropertyValue('Scene.Pluto.Renderable.ProjectionComponent.ClearAllProjections', true);" .. - "openspace.setPropertyValue('Scene.Charon.Renderable.ProjectionComponent.ClearAllProjections', true);", - Documentation = "Removes all image projections from Pluto and Charon.", - Name = "Clear image projections", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "F9", - Command = "openspace.time.setTime('2015-07-14T09:00:00.00');" .. - "openspace.setPropertyValue('Scene.Pluto.Renderable.ClearAllProjections', true);" .. - "openspace.setPropertyValue('Scene.Charon.Renderable.ClearAllProjections', true);", - Documentation = "Jumps to the 14th of July 2015 at 0900 UTC and clears all projections.", - Name = "Reset time and projections", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_8", - Command = propertyHelper.increment('Scene.Pluto.Renderable.HeightExaggeration', 5000), - Documentation = "Increases the height map exaggeration on Pluto.", - Name = "Pluto HeightExaggeration +", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_2", - Command = propertyHelper.decrement('Scene.Pluto.Renderable.HeightExaggeration', 5000), - Documentation = "Decreases the height map exaggeration on Pluto.", - Name = "Pluto HeightExaggeration -", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_9", - Command = propertyHelper.increment('Scene.Charon.Renderable.HeightExaggeration', 5000), - Documentation = "Increases the height map exaggeration on Charon.", - Name = "Charon HeightExaggeration +", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "KP_3", - Command = propertyHelper.decrement('Scene.Charon.Renderable.HeightExaggeration', 5000), - Documentation = "Decreases the height map exaggeration on Charon.", - Name = "Charon HeightExaggeration -", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "o", - Command = propertyHelper.invert('Scene.PlutoTrail.Renderable.Enabled'), - Documentation = "Toggles the visibility of the trail behind Pluto.", - Name = "Toggle Pluto Trail", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "j", - Command = renderableHelper.toggle('Scene.PlutoText') .. renderableHelper.toggle('Scene.CharonText') .. - renderableHelper.toggle('Scene.HydraText') .. renderableHelper.toggle('Scene.NixText') .. - renderableHelper.toggle('Scene.KerberosText') .. renderableHelper.toggle('Scene.StyxText'), - Documentation = "Toggles the visibility of the text labels of Pluto, Charon, Hydra, Nix, Kerberos, and Styx.", - Name = "Toggle Pluto Labels", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "l", - Command = propertyHelper.fadeInOut('Scene.Labels.Renderable.Opacity', 2.0), - Documentation = "Toggles the visibility of the labels for the New Horizons instruments.", - Name = "Toggle New Horizons Labels", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "m", - Command = propertyHelper.invert('Scene.NH_LORRI.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_LEISA.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN1.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN2.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_RED.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_BLUE.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_FT.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_METHANE.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_RALPH_MVIC_NIR.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_ALICE_AIRGLOW.Renderable.SolidDraw') .. - propertyHelper.invert('Scene.NH_ALICE_SOC.Renderable.SolidDraw'), - Documentation = "Draws the instrument field of views in a solid color or as lines.", - Name = "Toggle instrument FOVs", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "Shift+t", - Command = renderableHelper.toggle('Scene.PlutoShadow') .. renderableHelper.toggle('Scene.CharonShadow'), - Documentation = "Toggles the visibility of the shadow visualization of Pluto and Charon.", - Name = "Toggle Shadows", - GuiPath = "/New Horizons", - Local = false - }, - { - Key = "t", - Command = renderableHelper.toggle('Scene.NewHorizonsTrailPluto'), - Documentation = "Toggles the trail of New Horizons.", - Name = "Toggle NH Trail", - GuiPath = "/New Horizons", - Local = false - } - -} - -local NewHorizonsAsset = asset.require('scene/solarsystem/missions/newhorizons/model') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemSpacing", - Identifier = "NewHorizonsSpacing", - GuiName = "New Horizons Spacing", - Spacing = 25 - }, - { - Type = "DashboardItemDistance", - Identifier = "NewHorizonsPlutoDistance", - GuiName = "New Horizons Pluto Distance", - SourceType = "Node", - SourceNodeName = "NewHorizons", - DestinationType = "Node Surface", - DestinationNodeName = "Pluto" - }, - { - Type = "DashboardItemInstruments", - Identifier = "NewHorizonsInstruments", - GuiName = "NewHorizons Instruments", - } -}) - -assetHelper.registerInterestingNodes(asset, { - "Pluto", "NewHorizons", "Charon" -}) - -asset.onInitialize(function () - openspace.time.setTime("2015-07-14T08:00:00.00") - sceneHelper.bindKeys(Keybindings) - - openspace.setDefaultGuiSorting() - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 60, 120, 360, 540, 1080, - 2160, 4320, 8640 - }) - - openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.FollowFocusNodeRotationDistance', 20.000000); - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = NewHorizonsAsset.NewHorizons.Identifier, - Position = { 4662120063743.592773, 1263245003503.724854, -955413856565.788086 }, - Rotation = { 0.683224, -0.165934, 0.701234, 0.118073 }, - }) -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - - openspace.removeVirtualProperty("*Trail.Renderable.Enabled") -end) diff --git a/data/assets/osirisrex.scene b/data/assets/osirisrex.scene deleted file mode 100644 index 81f0eef20c..0000000000 --- a/data/assets/osirisrex.scene +++ /dev/null @@ -1,149 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.require('scene/solarsystem/planets') -asset.request('scene/digitaluniverse/stars') -asset.request('scene/digitaluniverse/milkyway') -asset.require('scene/solarsystem/missions/osirisrex/osirisrex') - --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') -asset.require('util/default_joystick') - -asset.require('util/webgui') - --- Custom Keybindings -local Keybindings = { - { - Key = "a", - Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'OsirisRex')", - Documentation = "Sets the focus of the camera on 'OsirisRex'.", - Local = false - }, - { - Key = "s", - Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'BennuBarycenter')", - Documentation = "Sets the focus of the camera on 'Bennu'", - Local = false - }, - { - Key = "F6", - Command = "openspace.printInfo('Set time: Launch');openspace.time.setTime('2016 SEP 08 23:05:00');", - Documentation = "Sets the time to the launch.", - Local = false - }, - { - Key = "F7", - Command = "openspace.printInfo('Set time: Gravity Assist');openspace.time.setTime('2017 SEP 22 15:00:00');", - Documentation = "Sets the time to the Earth gravity assist.", - Local = false - }, - { - Key = "F8", - Command = "openspace.printInfo('Set time: Approach');openspace.time.setTime('2018-SEP-11 21:31:01.183');", - Documentation = "Sets the time to the approach at Bennu.", - Local = false - }, - { - Key = "F9", - Command = "openspace.printInfo('Set time: Preliminary Survey');openspace.time.setTime('2018-NOV-20 01:13:12.183');", - Documentation = "Sets the time to the preliminary survey of Bennu.", - Local = false - }, - { - Key = "F10", - Command = "openspace.printInfo('Set time: Orbital B');openspace.time.setTime('2019-APR-08 10:35:27.186');", - Documentation = "Sets the time to the orbital B event.", - Local = false - }, - { - Key = "F11", - Command = "openspace.printInfo('Set time: Recon');openspace.time.setTime('2019-MAY-25 03:50:31.195');", - Documentation = "Sets the time to the recon event.", - Local = false - }, - { - Key = "q", - Command = propertyHelper.invert('Scene.SunMarker.Renderable.Enabled'), - Documentation = "Toggles the visibility of the text marking the location of the Sun.", - Local = false - }, - { - Key = "e", - Command = propertyHelper.invert('Scene.EarthMarker.Renderable.Enabled'), - Documentation = "Toggles the visibility of the text marking the location of the Earth.", - Local = false - } -} - -local OsirisRexAsset = asset.require('scene/solarsystem/missions/osirisrex/model') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemSpacing", - Identifier = "OsirisRexSpacing", - GuiName = "OSIRIS-REx Spacing", - Spacing = 25 - }, - { - Type = "DashboardItemDistance", - Identifier = "OsirisRexBennuDistance", - GuiName = "OSIRIS-REx Bennu Distance", - SourceType = "Node", - SourceNodeName = "OsirisRex", - DestinationType = "Node", - DestinationNodeName = "BennuBarycenter" - }, - { - Type = "DashboardItemInstruments", - Identifier = "OsirisRexInstruments", - GuiName = "OSIRIS-REx Instruments", - } -}) - -asset.onInitialize(function () - -- openspace.time.setTime("2019 APR 16 12:03:00.00") - openspace.time.setTime("2016 SEP 8 23:00:00.500") - sceneHelper.bindKeys(Keybindings) - - openspace.setDefaultGuiSorting() - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 60, 120, 360, 540, 1080, - 2160, 4320, 8640 - }) - - openspace.markInterestingNodes({ - "OsirisRex", "BennuBarycenter", "Earth" - }) - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = OsirisRexAsset.OsirisRex.Identifier, - Position = { 26974590199.661884, 76314608558.908020, -127086452897.101791 }, - Rotation = { 0.729548, -0.126024, 0.416827, 0.527382 }, - }) -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - - openspace.removeVirtualProperty("*Trail.Renderable.Enabled") - openspace.removeInterestingNodes({ - "OsirisRex", "BennuBarycenter", "Earth" - }) -end) diff --git a/data/assets/rosetta.scene b/data/assets/rosetta.scene deleted file mode 100644 index 1272560a61..0000000000 --- a/data/assets/rosetta.scene +++ /dev/null @@ -1,152 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') -local renderableHelper = asset.require('util/renderable_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.require('scene/solarsystem/planets') -asset.request('scene/digitaluniverse/stars') -asset.request('scene/digitaluniverse/milkyway') -asset.require('scene/solarsystem/missions/rosetta/67p') -asset.require('scene/solarsystem/missions/rosetta/rosetta') - --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') -asset.require('util/default_joystick') - -asset.require('util/webgui') - -asset.request('customization/globebrowsing') - --- Custom Keybindings -local Keybindings = { - { - Key = "a", - Command = "openspace.setPropertyValue('NavigationHandler.Origin', '67P')", - Documentation = "Sets the focus of the camera on '67P'.", - Local = false - }, - { - Key = "s", - Command = "openspace.setPropertyValue('NavigationHandler.Origin', 'Rosetta')", - Documentation = "Sets the focus of the camera on 'Rosetta'", - Local = false - }, - { - Key = "F5", - Command = "openspace.time.setTime('2014-08-01T03:05:18.101')", - Documentation = "Jumps to the time of initial approach of Rosetta to 67P.", - Local = false - }, - { - Key = "F6", - Command = "openspace.time.setTime('2014-11-12T08:20:00.00')", - Documentation = "Jumps to the time when the Philae lander is released.", - Local = false - }, - { - Key = "F8", - Command = "openspace.setPropertyValue('Scene.67P.Renderable.ProjectionComponent.clearAllProjections', true)", - Documentation = "Removes all image projections from 67P.", - Local = false - }, - { - Key = "q", - Command = propertyHelper.invert('Scene.SunMarker.Renderable.Enabled'), - Documentation = "Toggles the visibility of the text marking the location of the Sun.", - Local = false - }, - { - Key = "e", - Command = renderableHelper.toggle('Scene.JupiterTrail') .. renderableHelper.toggle('Scene.SaturnTrail') .. - renderableHelper.toggle('Scene.UranusTrail') .. renderableHelper.toggle('Scene.NeptuneTrail'), - Documentation = "Toggles the visibility of all trails further from the Sun than 67P.", - Local = false - }, - { - Key = "i", - Command = renderableHelper.toggle('Scene.ImagePlaneRosetta'), - Documentation = "Toggles the visibility of the free floating image plane.", - Local = false - }, - { - Key = "f", - Command = renderableHelper.toggle('Scene.PhilaeTrail'), - Documentation = "Toggles the visibility of Philae's trail.", - Local = false - }, - { - Key = "p", - Command = propertyHelper.invert('Scene.67P.Renderable.ProjectionComponent.performProjection'), - Documentation = "Enables or disables the image projection on 67P.", - Local = false - } -} - -local Comet67PAsset = asset.require('scene/solarsystem/missions/rosetta/67p') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemSpacing", - Identifier = "RosettaSpacing", - GuiName = "Rosetta Spacing", - Spacing = 25 - }, - { - Type = "DashboardItemDistance", - Identifier = "Rosetta67PDistance", - GuiName = "Rosetta 67P Distance", - SourceType = "Node", - SourceNodeName = "Rosetta", - DestinationType = "Node", - DestinationNodeName = "67P" - }, - { - Type = "DashboardItemInstruments", - Identifier = "RosettaInstruments", - GuiName = "Rosetta Instruments", - } -}) - -assetHelper.registerInterestingNodes(asset, { - "67P", "Rosetta", "Philae" -}) - -asset.onInitialize(function () - openspace.time.setTime("2014-08-01T03:05:00.000") - sceneHelper.bindKeys(Keybindings) - - openspace.setDefaultGuiSorting() - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = Comet67PAsset.Comet67P.Identifier, - Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 }, - Rotation = { -0.106166, 0.981574, -0.084545, 0.134513 }, - }) - - openspace.setPropertyValue('Scene.67P.Renderable.PerformShading', false); -end) - -asset.onDeinitialize(function () - sceneHelper.unbindKeys(Keybindings) - - openspace.removeVirtualProperty("*Trail.Renderable.Enabled") -end) diff --git a/data/assets/scene/digitaluniverse/2dF.asset b/data/assets/scene/digitaluniverse/2dF.asset index b7dac60fe2..2da1fb619d 100644 --- a/data/assets/scene/digitaluniverse/2dF.asset +++ b/data/assets/scene/digitaluniverse/2dF.asset @@ -6,14 +6,14 @@ local textures = asset.syncedResource({ Name = "2dF Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_2dF_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ Name = "2dF Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_2dF_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,14 +22,16 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 1.0, + Opacity = 1.0, File = speck .. "/2dF.speck", - Texture = textures .. "/point3.png", - ColorMap = speck .. "/lss.cmap", - ColorOption = { "redshift", "prox5Mpc" }, - ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } }, + Texture = textures .. "/point3A.png", + ColorMap = speck .. "/2dF.cmap", + ColorOption = { "redshift", "proximity" }, + ColorRange = { { 0.0, 0.075 }, { 1.0, 25.0 } }, Unit = "Mpc", - ScaleFactor = 508.0 + ScaleFactor = 520.0, + BillboardMaxSize = 4.7, + EnablePixelSizeControl = true }, GUI = { Name = "2dF Galaxies", diff --git a/data/assets/scene/digitaluniverse/2mass.asset b/data/assets/scene/digitaluniverse/2mass.asset index ab68580372..c27557c282 100644 --- a/data/assets/scene/digitaluniverse/2mass.asset +++ b/data/assets/scene/digitaluniverse/2mass.asset @@ -6,7 +6,7 @@ local textures = asset.syncedResource({ Name = "2MASS Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_2mass_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ @@ -22,16 +22,18 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 0.4, 0.2 }, - Transparency = 1.0, + Opacity = 1.0, File = speck .. "/2MASS.speck", - Texture = textures .. "/point3.png", + Texture = textures .. "/point3A.png", ColorMap = speck .. "/lss.cmap", ColorOption = { "redshift", "prox5Mpc" }, ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } }, Unit = "Mpc", CorrectionSizeEndDistance = 20.6, CorrectionSizeFactor = 15.0, - ScaleFactor = 508.0 + ScaleFactor = 510.78, + BillboardMaxSize = 11.15, + EnablePixelSizeControl = true }, GUI = { Name = "2MASS Galaxies", diff --git a/data/assets/scene/digitaluniverse/6dF.asset b/data/assets/scene/digitaluniverse/6dF.asset index 20d0ead030..2843b142d4 100644 --- a/data/assets/scene/digitaluniverse/6dF.asset +++ b/data/assets/scene/digitaluniverse/6dF.asset @@ -6,14 +6,14 @@ local textures = asset.syncedResource({ Name = "6dF Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_6dF_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ Name = "6dF Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_6dF_speck", - Version = 1 + Version = 2 }) local object = { @@ -21,15 +21,17 @@ local object = { Renderable = { Type = "RenderableBillboardsCloud", Enabled = false, - Color = { 1.0, 1.0, 1.0 }, - Transparency = 1.0, + Color = { 1.0, 1.0, 0.0 }, + Opacity = 1.0, File = speck .. "/6dF.speck", - Texture = textures .. "/point3.png", - ColorMap = speck .. "/lss.cmap", - ColorOption = { "redshift", "prox5Mpc" }, - ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } }, + Texture = textures .. "/point3A.png", + ColorMap = speck .. "/6dF.cmap", + ColorOption = { "redshift", "proximity" }, + ColorRange = { { 0.0, 0.075 }, { 1.0, 10.0 } }, Unit = "Mpc", - ScaleFactor = 508.0 + ScaleFactor = 534.0, + BillboardMaxSize = 7.0, + EnablePixelSizeControl = true, }, GUI = { Name = "6dF Galaxies", diff --git a/data/assets/scene/digitaluniverse/abell.asset b/data/assets/scene/digitaluniverse/abell.asset index 187ca33fb8..80b5bbbe94 100644 --- a/data/assets/scene/digitaluniverse/abell.asset +++ b/data/assets/scene/digitaluniverse/abell.asset @@ -6,14 +6,14 @@ local textures = asset.syncedResource({ Name = "Abell Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_abell_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ Name = "Abell Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_abell_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,12 +22,12 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 0.4, 0.2 }, - Transparency = 1.0, - ScaleFactor = 525.0, + Opacity = 1.0, + --ColorMap = speck .. "/abell.cmap", File = speck .. "/abell.speck", - Texture = textures .. "/point3.png", + Texture = textures .. "/point3A.png", LabelFile = speck .. "/abell.label", - TextColor = { 0.0, 0.8, 0.0, 1.0 }, + TextColor = { 0.0, 0.8, 0.0 }, TextSize = 22, TextMinSize = 10.0, Unit = "Mpc", @@ -36,7 +36,10 @@ local object = { -0.074553778365, -0.080991471307, 0.9939225904, 0.0, 0.67314530211, 0.73127116582, 0.11008126223, 0.0, 0.0, 0.0, 0.0, 1.0 - } + }, + ScaleFactor = 520.0, + BillboardMaxSize = 7.0, + EnablePixelSizeControl = true }, GUI = { Name = "Abell Galaxy Clusters", diff --git a/data/assets/scene/digitaluniverse/alternatestarlabels.asset b/data/assets/scene/digitaluniverse/alternatestarlabels.asset index f96a2c20dc..dcef9924a2 100644 --- a/data/assets/scene/digitaluniverse/alternatestarlabels.asset +++ b/data/assets/scene/digitaluniverse/alternatestarlabels.asset @@ -15,9 +15,9 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, LabelFile = speck .. "/stars-altlbl.label", - TextColor = { 0.4, 0.4, 0.4, 1.0 }, + TextColor = { 0.4, 0.4, 0.4 }, DrawLabels = true, TextSize = 14.7, TextMinSize = 6.0, diff --git a/data/assets/scene/digitaluniverse/backgroundradiation.asset b/data/assets/scene/digitaluniverse/backgroundradiation.asset index 5ca7b769ef..66a2c70a46 100644 --- a/data/assets/scene/digitaluniverse/backgroundradiation.asset +++ b/data/assets/scene/digitaluniverse/backgroundradiation.asset @@ -6,7 +6,7 @@ local textures = asset.syncedResource({ Name = "Background Radiation Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_backgroundradiation_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ @@ -18,6 +18,12 @@ local speck = asset.syncedResource({ local wmap = { Identifier = "WMAP", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, Renderable = { Type = "RenderableSphere", Enabled = false, @@ -25,9 +31,10 @@ local wmap = { Segments = 80, Opacity = 0.5, Texture = textures .. "/wmap_ilc_7yr_v4_200uK_RGB_sos.png", - Orientation = "Inside/Outside", - FadeInThreshould = 8E26 - + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 }, GUI = { Name = "Wilkinson Microwave Anisotropy Probe (WMAP)", @@ -37,6 +44,12 @@ local wmap = { local cbe = { Identifier = "CBE", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, Renderable = { Type = "RenderableSphere", Enabled = false, @@ -44,8 +57,10 @@ local cbe = { Segments = 80, Opacity = 0.5, Texture = textures .. "/COBErect.png", - Orientation = "Inside/Outside", - FadeInThreshould = 8E26 + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 }, GUI = { Name = "Cosmic Background Explorer", @@ -55,6 +70,41 @@ local cbe = { local planck = { Identifier = "Planck", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = true, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_1 = { + Identifier = "PlanckMultiverse1", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.0, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, Renderable = { Type = "RenderableSphere", Enabled = false, @@ -62,14 +112,137 @@ local planck = { Segments = 80, Opacity = 0.3, Texture = textures .. "/cmb4k.jpg", - Orientation = "Inside/Outside", - FadeInThreshould = 8E26 + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 }, GUI = { + Name = "Planck Multiverse 1", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_2 = { + Identifier = "PlanckMultiverse2", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 2500E23, 0.0, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 2", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_3 = { + Identifier = "PlanckMultiverse3", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 2500E23, 5000E23, 2000E23} + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 3", + Path = "/Universe/Cosmic Microwave Background" + } +} + +local multiverse_planck_4 = { + Identifier = "PlanckMultiverse4", + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 10000E23, 0.0 } + }, + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 3975.41417036064E23, + Segments = 80, + Opacity = 0.3, + Texture = textures .. "/cmb4k.jpg", + Orientation = "Both", + MirrorTexture = true, + UseAdditiveBlending = true, + FadeInThreshold = 0.4 + }, + GUI = { + Name = "Planck Multiverse 4", Path = "/Universe/Cosmic Microwave Background" } } +local Halpha = { + Identifier = "HAlpha", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = {0, 0, 3.14159265359} + } + }, + Renderable = { + Type = "RenderableSphere", + Enabled = false, + Size = 9.2E21, + Segments = 40, + Opacity = 0.4, + Texture = textures .. "/mwHalpha-f.png", + Orientation = "Inside", + UseAdditiveBlending = true, + MirrorTexture = true, + FadeOutThreshold = 0.025, + Background = true + }, + GUI = { + Name = "H Alpha", + Path = "/Milky Way/All Sky Images" + } +} -assetHelper.registerSceneGraphNodesAndExport(asset, { wmap, cbe, planck }) + +assetHelper.registerSceneGraphNodesAndExport(asset, { + wmap, cbe, planck, multiverse_planck_1, multiverse_planck_2, multiverse_planck_3, + multiverse_planck_4, Halpha +}) diff --git a/data/assets/scene/digitaluniverse/clusters.asset b/data/assets/scene/digitaluniverse/clusters.asset index 6c7794eb13..3f0475d98b 100644 --- a/data/assets/scene/digitaluniverse/clusters.asset +++ b/data/assets/scene/digitaluniverse/clusters.asset @@ -6,7 +6,7 @@ local speck = asset.syncedResource({ Name = "Clusters Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_clusters_speck", - Version = 1 + Version = 2 }) local object = { @@ -15,13 +15,19 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, LabelFile = speck .. "/galclust.label", - TextColor = { 0.7, 0.3, 0.0, 1.0 }, + TextColor = { 1.0, 0.44, 0.0 }, DrawLabels = true, TextSize = 22, TextMinSize = 8.0, - Unit = "Mpc" + Unit = "Mpc", + TransformationMatrix = { + -0.7357425748, 0.67726129641, 0.0, 0.0, + -0.074553778365, -0.080991471307, 0.9939225904, 0.0, + 0.67314530211, 0.73127116582, 0.11008126223, 0.0, + 0.0, 0.0, 0.0, 1.0 + }, }, GUI = { Name = "Galaxy Cluster Labels", diff --git a/data/assets/scene/digitaluniverse/constellations.asset b/data/assets/scene/digitaluniverse/constellations.asset index 18f1911df8..216a320283 100644 --- a/data/assets/scene/digitaluniverse/constellations.asset +++ b/data/assets/scene/digitaluniverse/constellations.asset @@ -6,7 +6,7 @@ local speck = asset.syncedResource({ Name = "Constellation Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_constellations_speck", - Version = 1 + Version = 2 }) local constellationsExtragalactic = { @@ -14,12 +14,11 @@ local constellationsExtragalactic = { Renderable = { Type = "RenderableDUMeshes", Enabled = false, - Color = { 1.0, 0.4, 0.2 }, - Transparency = 1.0, - ScaleFactor = 1.0, + Opacity = 0.4, File = speck .. "/constellationsEXGAL.speck", LabelFile = speck .. "/constellationsEXGAL.label", - TextColor = { 0.8, 0.8, 0.8, 1.0 }, + TextColor = { 0.8, 0.8, 0.8 }, + TextOpacity = 0.4, TextSize = 20.0, TextMinSize = 20.0, TextMaxSize = 30.0, @@ -37,12 +36,11 @@ local constellations = { Renderable = { Type = "RenderableDUMeshes", Enabled = false, - Color = { 1.0, 0.4, 0.2 }, - Transparency = 1.0, - ScaleFactor = 1.0, + Opacity = 0.3, File = speck .. "/constellations.speck", LabelFile = speck .. "/constellations.label", - TextColor = { 0.8, 0.8, 0.8, 1.0 }, + TextColor = { 0.8, 0.8, 0.8 }, + TextOpacity = 0.3, TextSize = 14.5, TextMaxSize = 170.0, TextMinSize = 8.0, diff --git a/data/assets/scene/digitaluniverse/deepsky.asset b/data/assets/scene/digitaluniverse/deepsky.asset new file mode 100644 index 0000000000..4789551408 --- /dev/null +++ b/data/assets/scene/digitaluniverse/deepsky.asset @@ -0,0 +1,87 @@ +local assetHelper = asset.require('util/asset_helper') + +local textures = asset.syncedResource({ + Name = "Deep Sky Objects Textures", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_deepsky_textures", + Version = 1 +}) + +local speck = asset.syncedResource({ + Name = "Deep Sky Objects Speck Files", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_deepsky_speck", + Version = 1 +}) + +local deepSkyPoints = { + Identifier = "DeepSkyObjects", + Renderable = { + Type = "RenderableBillboardsCloud", + Enabled = false, + Color = { 1.0, 1.0, 0.0 }, + Opacity = 0.99, + ScaleFactor = 500.0, + File = speck .. "/dso.speck", + Texture = textures .. "/point3.png", + --ColorMap = speck .. "/tully.cmap", + --ColorMap = speck .. "/lss.cmap", + --ColorOption = { "proximity" }, + --ColorOption = { "prox5Mpc" }, + --ColorRange = { { 1.0, 30.0 } }, + LabelFile = speck .. "/dso.label", + TextColor = { 0.1, 0.4, 0.6 }, + TextSize = 20.50, + TextMinSize = 16.0, + Unit = "Mpc", + -- Fade in value in the same unit as "Unit" + --FadeInDistances = { 0.05, 1.0 }, + -- Max size in pixels + BillboardMaxSize = 8.22, + BillboardMinSize = 0.0, + --CorrectionSizeEndDistance = 22.0, + --CorrectionSizeFactor = 10.45 + EnablePixelSizeControl = true + }, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = { 0, 0, 3.14159265359 } + } + }, + GUI = { + Name = "Deep Sky Objects Points", + Path = "/Universe/Galaxies" + } +} + +local deepSkyImages = { + Identifier = "DeepSkyObjectsImages", + Renderable = { + Type = "RenderablePlanesCloud", + Enabled = false, + Color = { 1.0, 1.0, 1.0 }, + Opacity = 0.99, + ScaleFactor = 1.0, + File = speck .. "/dso.speck", + TexturePath = textures, + Luminosity = "radius", + ScaleLuminosity = 0.001, + Unit = "Mpc", + -- Fade in value in the same unit as "Unit" + --FadeInDistances = {0.001, 0.05010}, + PlaneMinSize = 5.0 + }, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = {3.14159265359, 3.14159265359, 0 } + } + }, + GUI = { + Name = "Deep Sky Objects Images", + Path = "/Universe/Galaxies" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { deepSkyPoints, deepSkyImages }) diff --git a/data/assets/scene/digitaluniverse/dwarfs.asset b/data/assets/scene/digitaluniverse/dwarfs.asset index a2817d4dc2..a302fd9154 100644 --- a/data/assets/scene/digitaluniverse/dwarfs.asset +++ b/data/assets/scene/digitaluniverse/dwarfs.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Brown Dwarf Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_dwarfs_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,20 +22,26 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 0.4, 0.0, 0.1 }, - Transparency = 0.999, + Opacity = 1.0, File = speck .. "/dwarfs.speck", Texture = textures .. "/point3.png", LabelFile = speck .. "/dwarfs.label", - TextColor = { 0.5, 0.1, 0.2, 1.0 }, + ColorMap = speck .. "/dwarfs.cmap", + ColorOption = { "typeindex" }, + --ColorRange = { { 1.0, 4.0} }, + TextColor = { 0.5, 0.1, 0.2 }, TextSize = 14.6, TextMinSize = 10.0, - ScaleFactor = 360, - CorrectionSizeEndDistance = 16.1, - CorrectionSizeFactor = 7.75, + ScaleFactor = 370, + --CorrectionSizeEndDistance = 16.1, + --CorrectionSizeFactor = 7.75, + BillboardMaxSize = 18.0, + EnablePixelSizeControl = true, Unit = "pc" }, GUI = { - Path = "/Milky Way/Brown Dwarfs" + Name = "Brown Dwarfs", + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/exoplanets.asset b/data/assets/scene/digitaluniverse/exoplanets.asset index d85a85779e..7915477f17 100644 --- a/data/assets/scene/digitaluniverse/exoplanets.asset +++ b/data/assets/scene/digitaluniverse/exoplanets.asset @@ -22,19 +22,21 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 1.0, ScaleFactor = 10.0, Texture = textures .. "/target-blue.png", File = speck .. "/expl.speck", LabelFile = speck .. "/expl.label", - ScaleFactor = 380.0, - TextColor = { 0.3, 0.3, 0.8, 1.0 }, + ScaleFactor = 392.5, + TextColor = { 0.3, 0.3, 0.8 }, TextSize = 14.8, TextMaxSize = 200.0, TextMinSize = 10.0, CorrectionSizeEndDistance = 15.23, CorrectionSizeFactor = 13.3, - Unit = "pc" + Unit = "pc", + BillboardMaxSize = 52.0, + EnablePixelSizeControl = true, }, GUI = { Path = "/Milky Way/Exoplanets" diff --git a/data/assets/scene/digitaluniverse/globularclusters.asset b/data/assets/scene/digitaluniverse/globularclusters.asset index 70ad83f995..035052eea1 100644 --- a/data/assets/scene/digitaluniverse/globularclusters.asset +++ b/data/assets/scene/digitaluniverse/globularclusters.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Globular Clusters Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_globularclusters_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,21 +22,23 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 0.8, 0.8, 0.0 }, - Transparency = 0.35, + Opacity = 0.4, File = speck .. "/gc.speck", Texture = textures .. "/point4.png", PolygonSides = 5, LabelFile = speck .. "/gc.label", - TextColor = { 0.5, 0.5, 0.0, 1.0 }, - ScaleFactor = 440.0, - TextSize = 17.5, - TextMinSize = 10.0, - TextMaxSize = 30.0, - Unit = "pc" + TextColor = { 0.5, 0.5, 0.0 }, + ScaleFactor = 431.0, + TextSize = 16.7, + TextMinSize = 4.0, + TextMaxSize = 20, + Unit = "pc", + BillboardMaxSize = 500, + EnablePixelSizeControl = true, }, GUI = { Name = "Globular Clusters", - Path = "/Milky Way/Globular Clusters" + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/grids.asset b/data/assets/scene/digitaluniverse/grids.asset index e8b9a036be..dcb069250a 100644 --- a/data/assets/scene/digitaluniverse/grids.asset +++ b/data/assets/scene/digitaluniverse/grids.asset @@ -2,12 +2,23 @@ local assetHelper = asset.require('util/asset_helper') local transforms = asset.require('scene/solarsystem/sun/transforms') local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms') +local equatorialRotationMatrix = { + -0.05487554, 0.4941095, -0.8676661, + -0.8734371 , -0.4448296, -0.1980764, + -0.483835 , 0.7469823, 0.4559838 +} + +local eclipticRotationMatrix = { + -0.05487554, 0.4941095, -0.8676661, + -0.9938214 , -0.1109906, -0.0003515167, + -0.09647644, 0.8622859, 0.4971472 +} local speck = asset.syncedResource({ Name = "Grids Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_grids_speck", - Version = 1 + Version = 2 }) local radio = { @@ -19,17 +30,18 @@ local radio = { -- First TV signals strong enough to leave the ionosphere ReferenceDate = "1936 AUG 01 12:00:00", Speed = 299792458 -- c + }, + Rotation = { + Type = "StaticRotation", + Rotation = equatorialRotationMatrix } }, Renderable = { Type = "RenderableSphericalGrid", Enabled = false, - GridColor = { 1.0, 1.0, 0.3, 0.75}, - LineWidth = 2.0, - GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0, - -0.9938214 , -0.1109906, -0.0003515167, 0.0, - -0.09647644, 0.8622859, 0.4971472 , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 } + Opacity = 1.0, + GridColor = { 0.3, 0.84, 1.0 }, + LineWidth = 2.0 }, GUI = { Name = "Radio Sphere", @@ -37,24 +49,51 @@ local radio = { } } +local oort = { + Identifier = "OortSphere", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 7.47989845E15 + }, + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableSphericalGrid", + Enabled = false, + Opacity = 0.8, + GridColor = { 0.8, 0.4, 0.4 }, + LineWidth = 2.0 + }, + GUI = { + Name = "Oort Sphere", + Path = "/Other/Grids" + } +} + local ecliptic = { Identifier = "EclipticSphere", Parent = transforms.SolarSystemBarycenter.Name, Transform = { Scale = { Type = "StaticScale", - Scale = 9.46377307652E17; + Scale = 9.46377307652E17 + }, + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix } }, Renderable = { Type = "RenderableSphericalGrid", Enabled = false, - GridColor = { 0.7, 0.0, 0.0, 0.5}, - LineWidth = 2.0, - GridMatrix = { -0.05487554, 0.4941095, -0.8676661 , 0.0, - -0.9938214 , -0.1109906, -0.0003515167, 0.0, - -0.09647644, 0.8622859, 0.4971472 , 0.0, - 0.0 , 0.0 , 0.0 , 1.0 } + Opacity = 1.0, + GridColor = { 0.74, 0.26, 0.26 }, + LineWidth = 2.0 }, GUI = { Name = "Ecliptic Sphere", @@ -65,24 +104,24 @@ local ecliptic = { local eclipticLabels = { Identifier = "EclipticSphereLabels", Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, Renderable = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, LabelFile = speck .. "/eclip.label", DrawLabels = true, - TextColor = { 0.5, 0.5, 0.5, 1.0 }, + TextColor = { 0.5, 0.5, 0.5 }, TextSize = 14.75, TextMinSize = 1.3, TextMaxSize = 50.0, Unit = "pc", - TransformationMatrix = { - -0.05487554, 0.4941095, -0.8676661, 0.0, - -0.9938214 , -0.1109906, -0.0003515167, 0.0, - -0.09647644, 0.8622859, 0.4971472, 0.0, - 0.0, 0.0, 0.0, 1.0 - } }, GUI = { Name = "Ecliptic Sphere Labels", @@ -96,18 +135,19 @@ local equatorial = { Transform = { Scale = { Type = "StaticScale", - Scale = 6.2440846E17; + Scale = 4.28601E17; + }, + Rotation = { + Type = "StaticRotation", + Rotation = equatorialRotationMatrix } }, Renderable = { Type = "RenderableSphericalGrid", Enabled = false, - GridColor = { 0.0, 0.0, 1.0, 0.8}, - LineWidth = 2.0, - GridMatrix = { -0.05487554, 0.4941095, -0.8676661, 0.0, - -0.8734371 , -0.4448296, -0.1980764, 0.0, - -0.483835 , 0.7469823, 0.4559838, 0.0, - 0.0 , 0.0 , 0.0 , 1.0 }, + Opacity = 0.8, + GridColor = { 0.69, 0.68, 0.29 }, + LineWidth = 2.0 }, GUI = { Name = "Equatorial Sphere", @@ -118,24 +158,24 @@ local equatorial = { local equatorialLabels = { Identifier = "EquatorialSphereLabels", Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = equatorialRotationMatrix + } + }, Renderable = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, LabelFile = speck .. "/radec.label", DrawLabels = true, - TextColor = { 0.5, 0.5, 0.5, 1.0 }, + TextColor = { 0.5, 0.5, 0.5 }, TextSize = 14.5, TextMinSize = 1.7, TextMaxSize = 70.0, Unit = "pc", - TransformationMatrix = { - -0.05487554, 0.4941095, -0.8676661, 0.0, - -0.8734371 , -0.4448296, -0.1980764, 0.0, - -0.483835 , 0.7469823, 0.4559838, 0.0, - 0.0 , 0.0 , 0.0 , 1.0 - } }, GUI = { Name = "Equatorial Sphere Labels", @@ -156,7 +196,8 @@ local galactic = { Type = "RenderableSphericalGrid", Enabled = false, LineWidth = 2.0, - GridColor = { 0.0, 0.6, 0.6, 0.6} + Opacity = 1.0, + GridColor = { 0.0, 0.6, 0.6 } }, GUI = { Name = "Galactic Sphere", @@ -171,10 +212,10 @@ local galacticLabels = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, LabelFile = speck .. "/galac.label", DrawLabels = true, - TextColor = { 0.5, 0.5, 0.5, 1.0 }, + TextColor = { 0.5, 0.5, 0.5 }, TextSize = 15.8, TextMinSize = 0.5, TextMaxSize = 100.0, @@ -186,18 +227,212 @@ local galacticLabels = { } } +local plane1ld = { + Identifier = "1ldGrid", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 0.4, + File = speck .. "/1ld.speck", + MeshColor = {{ 0.1, 0.5, 0.6 }}, + LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "Km" + }, + GUI = { + Name = "1ld Grid", + Path = "/Other/Grids" + } +} + +local plane1lm = { + Identifier = "1lmGrid", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 0.4, + File = speck .. "/1lm.speck", + MeshColor = {{ 0.1, 0.5, 0.6 }}, + LabelFile = speck .. "/1lm.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 11.8, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "1lm Grid", + Path = "/Other/Grids" + } +} + +local plane1ly = { + Identifier = "1lyGrid", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 0.4, + File = speck .. "/1ly.speck", + MeshColor = {{ 0.1, 0.5, 0.6 }}, + LabelFile = speck .. "/1ly.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 13.0, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "1ly Grid", + Path = "/Other/Grids" + } +} + +local plane10ly = { + Identifier = "10lyGrid", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 0.4, + File = speck .. "/10ly.speck", + MeshColor = {{ 0.1, 0.5, 0.6 }}, + LabelFile = speck .. "/10ly.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 14.17, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "10ly Grid", + Path = "/Other/Grids" + } +} + +local plane100ly = { + Identifier = "100lyGrid", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 0.4, + File = speck .. "/100ly.speck", + MeshColor = {{ 0.1, 0.5, 0.6 }}, + LabelFile = speck .. "/100ly.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 15.0, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "100ly Grid", + Path = "/Other/Grids" + } +} + +local plane1kly = { + Identifier = "1klyGrid", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 0.4, + File = speck .. "/1kly.speck", + MeshColor = {{ 0.1, 0.5, 0.6 }}, + LabelFile = speck .. "/1kly.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 16.0, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "1kly Grid", + Path = "/Other/Grids" + } +} + +local plane10kly = { + Identifier = "10klyGrid", + Parent = transforms.SolarSystemBarycenter.Name, + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = eclipticRotationMatrix + } + }, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 0.4, + File = speck .. "/10kly.speck", + MeshColor = {{ 0.1, 0.5, 0.6 }}, + LabelFile = speck .. "/10kly.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 17.25, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "10kly Grid", + Path = "/Other/Grids" + } +} + local plane100kly = { Identifier = "100klyGrid", Renderable = { Type = "RenderableDUMeshes", Enabled = false, - Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.4, - ScaleFactor = 1.0, + Opacity = 0.4, File = speck .. "/100kly.speck", MeshColor = {{ 0.1, 0.5, 0.6 }}, LabelFile = speck .. "/100kly.label", - TextColor = { 0.0, 0.2, 0.5, 1.0 }, + TextColor = { 0.0, 0.2, 0.5 }, TextSize = 18.6, TextMinSize = 0.5, TextMaxSize = 30.0, @@ -214,13 +449,11 @@ local plane1Mly = { Renderable = { Type = "RenderableDUMeshes", Enabled = false, - Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.4, - ScaleFactor = 1.0, + Opacity = 0.4, File = speck .. "/1Mly.speck", MeshColor = {{ 0.1, 0.5, 0.6 }}, LabelFile = speck .. "/1Mly.label", - TextColor = { 0.0, 0.2, 0.5, 1.0 }, + TextColor = { 0.0, 0.2, 0.5 }, TextSize = 19.6, TextMinSize = 0.5, TextMaxSize = 30.0, @@ -237,13 +470,11 @@ local plane10Mly = { Renderable = { Type = "RenderableDUMeshes", Enabled = false, - Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.4, - ScaleFactor = 1.0, + Opacity = 0.4, File = speck .. "/10Mly.speck", MeshColor = {{ 0.1, 0.5, 0.6 }}, LabelFile = speck .. "/10Mly.label", - TextColor = { 0.0, 0.2, 0.5, 1.0 }, + TextColor = { 0.0, 0.2, 0.5 }, TextSize = 20.6, TextMinSize = 0.5, TextMaxSize = 30.0, @@ -260,13 +491,11 @@ local plane100Mly = { Renderable = { Type = "RenderableDUMeshes", Enabled = false, - Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.4, - ScaleFactor = 1.0, + Opacity = 0.4, File = speck .. "/100Mly.speck", MeshColor = {{ 0.1, 0.5, 0.6 }}, LabelFile = speck .. "/100Mly.label", - TextColor = { 0.0, 0.2, 0.5, 1.0 }, + TextColor = { 0.0, 0.2, 0.5 }, TextSize = 21.6, TextMinSize = 0.5, TextMaxSize = 30.0, @@ -283,13 +512,11 @@ local plane20Gly = { Renderable = { Type = "RenderableDUMeshes", Enabled = false, - Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.4, - ScaleFactor = 1.0, + Opacity = 0.4, File = speck .. "/20Gly.speck", MeshColor = {{ 0.1, 0.5, 0.6 }}, LabelFile = speck .. "/20Gly.label", - TextColor = { 0.0, 0.2, 0.5, 1.0 }, + TextColor = { 0.0, 0.2, 0.5 }, TextSize = 23.6, TextMinSize = 0.5, TextMaxSize = 30.0, @@ -302,6 +529,7 @@ local plane20Gly = { } assetHelper.registerSceneGraphNodesAndExport(asset, { - radio, ecliptic, eclipticLabels, equatorial, equatorialLabels, galactic, - galacticLabels, plane100kly, plane1Mly, plane10Mly, plane100Mly, plane20Gly + radio, oort, ecliptic, eclipticLabels, equatorial, equatorialLabels, galactic, + galacticLabels, plane1ld, plane1lm, plane1ly, plane10ly, plane100ly, plane1kly, + plane10kly, plane100kly, plane1Mly, plane10Mly, plane100Mly, plane20Gly }) diff --git a/data/assets/scene/digitaluniverse/groups.asset b/data/assets/scene/digitaluniverse/groups.asset index 95e63c03d0..682f7fb65b 100644 --- a/data/assets/scene/digitaluniverse/groups.asset +++ b/data/assets/scene/digitaluniverse/groups.asset @@ -15,16 +15,23 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, --ScaleFactor = 10.0, LabelFile = speck .. "/groups.label", - TextColor = { 0.1, 0.6, 0.2, 1.0 }, + TextColor = { 0.1, 0.6, 0.2 }, TextSize = 21.5, TextMinSize = 8.0, - Unit = "Mpc" + Unit = "Mpc", + DrawLabels = true, + TransformationMatrix = { + -0.7357425748, 0.67726129641, 0.0, 0.0, + -0.074553778365, -0.080991471307, 0.9939225904, 0.0, + 0.67314530211, 0.73127116582, 0.11008126223, 0.0, + 0.0, 0.0, 0.0, 1.0 + }, }, GUI = { - Name = "Nearby Galaxy Groups", + Name = "Galaxy Group Labels", Path = "/Universe/Galaxies" } } diff --git a/data/assets/scene/digitaluniverse/h2regions.asset b/data/assets/scene/digitaluniverse/h2regions.asset index 27772f3728..db9cf215c6 100644 --- a/data/assets/scene/digitaluniverse/h2regions.asset +++ b/data/assets/scene/digitaluniverse/h2regions.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "HII Regions Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_h2regions_speck", - Version = 2 + Version = 3 }) local object = { @@ -22,21 +22,23 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 0.0, 0.5, 1.0 }, - Transparency = 0.35, + Opacity = 0.70, File = speck .. "/h2.speck", Texture = textures .."/point4.png", PolygonSides = 6, LabelFile = speck .. "/h2.label", - TextColor = { 0.5, 0.5, 0.5, 1.0 }, + TextColor = { 0.5, 0.5, 0.5 }, ScaleFactor = 420, - TextSize = 17.25, - TextMinSize = 10.0, - TextMinSize = 30.0, - Unit = "pc" + TextSize = 16.24, + TextMinSize = 4.0, + TextMaxSize = 20.0, + Unit = "pc", + BillboardMaxSize = 300.0, + EnablePixelSizeControl = false }, GUI = { Name = "HII Regions", - Path = "/Milky Way/HII" + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/kepler.asset b/data/assets/scene/digitaluniverse/kepler.asset index e541ec7a87..75e102fe89 100644 --- a/data/assets/scene/digitaluniverse/kepler.asset +++ b/data/assets/scene/digitaluniverse/kepler.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Kepler Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_kepler_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,13 +22,15 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 0.0 }, - Transparency = 0.99, - ScaleFactor = 395.0, + Opacity = 0.99, + ScaleFactor = 410.0, File = speck .. "/kepler.speck", Texture = textures .. "/halo.png", CorrectionSizeEndDistance = 15.86, CorrectionSizeFactor = 8.59, - Unit = "pc" + Unit = "pc", + BillboardMaxSize = 23.0, + EnablePixelSizeControl = true }, GUI = { Name = "Kepler Planetary Candidates", diff --git a/data/assets/scene/digitaluniverse/localdwarfs.asset b/data/assets/scene/digitaluniverse/localdwarfs.asset index b31b13d09e..df011129ee 100644 --- a/data/assets/scene/digitaluniverse/localdwarfs.asset +++ b/data/assets/scene/digitaluniverse/localdwarfs.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Local Dwarfs Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_localdwarfs_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,19 +22,23 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 0.5, 1.0, 0.2 }, - Transparency = 0.3, - File = speck .. "/localdwarfs.speck", + ColorMap = speck .. "/localgroup.cmap", + ColorOption = { "association" }, + Opacity = 0.3, + File = speck .. "/localgroup.speck", Texture = textures .. "/point4.png", PolygonSides = 12, - LabelFile = speck .. "/localdwarfs.label", - TextColor = { 0.3, 0.3, 1.0, 1.0 }, - ScaleFactor = 478, + LabelFile = speck .. "/localgroup.label", + TextColor = { 0.3, 0.3, 1.0 }, + ScaleFactor = 465, TextSize = 18.3, TextMinSize = 7.3, - Unit = "Mpc" + Unit = "Mpc", + BillboardMaxSize = 20.0, + EnablePixelSizeControl = true }, GUI = { - Name = "Local Dwarf Galaxies", + Name = "Local Group", Path = "/Universe/Galaxies" } } diff --git a/data/assets/scene/digitaluniverse/milkyway.asset b/data/assets/scene/digitaluniverse/milkyway.asset index 82d0eb81da..814ce42fe2 100644 --- a/data/assets/scene/digitaluniverse/milkyway.asset +++ b/data/assets/scene/digitaluniverse/milkyway.asset @@ -23,20 +23,36 @@ local planeSpeck = asset.syncedResource({ Version = 1 }) +local homespeck = asset.syncedResource({ + Name = "Home Speck File", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_home_speck", + Version = 1 +}) + local sphere = { Identifier = "MilkyWay", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = {0, 0, 3.14159265359} + } + }, Renderable = { Type = "RenderableSphere", - Size = 9.2E20, + Size = 9.2E21, Segments = 40, - Opacity = 0.4, + Opacity = 0.35, Texture = sphereTextures .. "/DarkUniverse_mellinger_4k.jpg", - Orientation = "Inside/Outside", - FadeOutThreshould = 0.25 + Orientation = "Inside", + UseAdditiveBlending = true, + MirrorTexture = true, + FadeOutThreshold = 0.0015, + Background = true }, GUI = { - Name = "Milky Way", - Path = "/Milky Way/Milky Way" + Name = "Milky Way Sphere", + Path = "/Milky Way" } } @@ -47,15 +63,14 @@ local plane = { Type = "RenderablePlanesCloud", Enabled = true, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.90, + Opacity = 0.99, ScaleFactor = 2.8, File = planeSpeck .. "/galaxy.speck", TexturePath = planeTextures, Luminosity = "size", ScaleLuminosity = 1.0, -- Fade in value in the same unit as "Unit" - FadeInThreshould = 119441, - FadeInDistances = { 1400.0, 119441.0 }, + FadeInDistances = { 3000.0, 50000.0 }, PlaneMinSize = 5.0, Unit = "pc" }, @@ -65,6 +80,43 @@ local plane = { } } +local homeLabel = { + Identifier = "HomeLabel", + Renderable = { + Type = "RenderableBillboardsCloud", + Enabled = false, + Color = { 1.0, 0.4, 0.2 }, + Opacity = 0.99, + ScaleFactor = 500.0, + --File = homespeck .. "/home.speck", + -- Texture = textures .. "/point3.png", + DrawLabels = true, + LabelFile = homespeck .. "/home.label", + TextColor = { 0.8, 0.8, 0.8 }, + TextSize = 20.50, + TextMinSize = 16.0, + TransformationMatrix = { + -0.7357425748, 0.67726129641, 0.0, 0.0, + -0.074553778365, -0.080991471307, 0.9939225904, 0.0, + 0.67314530211, 0.73127116582, 0.11008126223, 0.0, + 0.0, 0.0, 0.0, 1.0 + }, + Unit = "Mpc", + -- Fade in value in the same unit as "Unit" + FadeInDistances = { 0.05, 1.0 }, + -- Max size in pixels + BillboardMaxSize = 8.22, + BillboardMinSize = 0.0, + --CorrectionSizeEndDistance = 22.0, + --CorrectionSizeFactor = 10.45 + EnablePixelSizeControl = true + }, + GUI = { + Name = "Home Label", + Path = "/Universe/Galaxies" + } +} -assetHelper.registerSceneGraphNodesAndExport(asset, { sphere, plane }) + +assetHelper.registerSceneGraphNodesAndExport(asset, { sphere, plane, homeLabel }) diff --git a/data/assets/scene/digitaluniverse/obassociations.asset b/data/assets/scene/digitaluniverse/obassociations.asset index 44fda4b670..ad25602989 100644 --- a/data/assets/scene/digitaluniverse/obassociations.asset +++ b/data/assets/scene/digitaluniverse/obassociations.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "OB Associations Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_obassociations_speck", - Version = 1 + Version = 3 }) local object = { @@ -21,22 +21,28 @@ local object = { Renderable = { Type = "RenderableBillboardsCloud", Enabled = false, - Color = { 0.0, 0.0, 1.0 }, - Transparency = 0.5, + Color = { 1.0, 1.0, 1.0 }, + ColorMap = speck .. "/ob.cmap", + ColorOption = { "arm" }, + SizeOption = {"diameter"}, + ExactColorMap = true, + Opacity = 0.7, File = speck .. "/ob.speck", Texture = textures .. "/point4.png", PolygonSides = 7, LabelFile = speck .. "/ob.label", - TextColor = { 0.4, 0.5, 1.0, 1.0 }, - ScaleFactor = 428.0, - TextSize = 17.0, - TextMinSize = 5.76, - TextMaxSize = 30.0, - Unit = "pc" + TextColor = { 0.4, 0.5, 1.0 }, + ScaleFactor = 390.0, + TextSize = 16.24, + TextMinSize = 4.50, + TextMaxSize = 25, + Unit = "pc", + BillboardMaxSize = 450.0, + EnablePixelSizeControl = true }, GUI = { Name = "OB Associations", - Path = "/Milky Way/OB Associations" + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/openclusters.asset b/data/assets/scene/digitaluniverse/openclusters.asset index 2fde394eda..d060f744db 100644 --- a/data/assets/scene/digitaluniverse/openclusters.asset +++ b/data/assets/scene/digitaluniverse/openclusters.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Open Clusters Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_openclusters_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,21 +22,23 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 0.1, 0.8, 0.4 }, - Transparency = 0.5, + Opacity = 0.5, File = speck .. "/oc.speck", Texture = textures .. "/point4.png", PolygonSides = 12, - TextColor = { 0.05, 0.4, 0.2, 1.0 }, + TextColor = { 0.05, 0.4, 0.2 }, LabelFile = speck .. "/oc.label", - ScaleFactor = 418.33, - TextSize = 16.68, + ScaleFactor = 405.75, + TextSize = 15.5, TextMinSize = 4.5, TextMaxSize = 30.0, - Unit = "pc" + Unit = "pc", + BillboardMaxSize = 604, + EnablePixelSizeControl = true }, GUI = { Name = "Open Star Clusters", - Path = "/Milky Way/Open Clusters" + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/planetarynebulae.asset b/data/assets/scene/digitaluniverse/planetarynebulae.asset index ccd45f3ce3..685cd6d21a 100644 --- a/data/assets/scene/digitaluniverse/planetarynebulae.asset +++ b/data/assets/scene/digitaluniverse/planetarynebulae.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Planetary Nebulae Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_planetarynebulae_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,21 +22,23 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 0.4, 0.4, 0.9 }, - Transparency = 0.35, + Opacity = 0.65, File = speck .. "/pn.speck", Texture = textures .. "/point4.png", PolygonSides = 3, LabelFile = speck .. "/pn.label", - TextColor = { 0.25, 0.25, 0.65, 1.0 }, - ScaleFactor = 418.33, - TextSize = 16.68, + TextColor = { 0.25, 0.25, 0.65 }, + ScaleFactor = 425.0, + TextSize = 16.24, TextMinSize = 4.5, - TextMaxSize = 30.0, - Unit = "pc" + TextMaxSize = 25.0, + Unit = "pc", + BillboardMaxSize = 500, + EnablePixelSizeControl = true }, GUI = { Name = "Planetary Nebulae", - Path = "/Milky Way/Planetary Nebulae" + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/pulsars.asset b/data/assets/scene/digitaluniverse/pulsars.asset index 401dca9381..bd58260f22 100644 --- a/data/assets/scene/digitaluniverse/pulsars.asset +++ b/data/assets/scene/digitaluniverse/pulsars.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Pulsars Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_pulsars_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,20 +22,22 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 0.7, 0.0, 0.0 }, - Transparency = 0.5, + Opacity = 1.0, File = speck .. "/pulsar.speck", Texture = textures .. "/point4.png", PolygonSides = 4, LabelFile = speck .. "/pulsar.label", - TextColor = { 0.7, 0.0, 0.0, 1.0 }, - ScaleFactor = 418.33, - TextSize = 16.68, - TextMinSize = 7.5, - TextMaxSize = 30.0, - Unit = "pc" + TextColor = { 0.7, 0.2, 0.2 }, + ScaleFactor = 424, + TextSize = 15.77, + TextMinSize = 4, + TextMaxSize = 20.0, + Unit = "pc", + BillboardMaxSize = 500, + EnablePixelSizeControl = false }, GUI = { - Path = "/Milky Way/Pulsars" + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/quasars.asset b/data/assets/scene/digitaluniverse/quasars.asset index 63020c882c..be9b11e59b 100644 --- a/data/assets/scene/digitaluniverse/quasars.asset +++ b/data/assets/scene/digitaluniverse/quasars.asset @@ -6,34 +6,36 @@ local textures = asset.syncedResource({ Name = "Quasars Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_quasars_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ Name = "Quasars Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_quasars_speck", - Version = 1 + Version = 2 }) local object = { Identifier = "Quasars", Renderable = { Type = "RenderableBillboardsCloud", - Enabled = false, + Enabled = true, Color = { 1.0, 0.4, 0.2 }, - Transparency = 1.0, + Opacity = 0.95, File = speck .. "/quasars.speck", - Texture = textures .. "/point3.png", + Texture = textures .. "/point3A.png", Unit = "Mpc", - ScaleFactor = 537.31, + ScaleFactor = 540.9, -- Fade in value in the same unit as "Unit" FadeInDistances = { 1000.0, 10000.0 }, BillboardMaxSize = 30.0, BillboardMinSize = 0.0, + BillboardMaxSize = 11.1, + EnablePixelSizeControl = true }, GUI = { - Path = "/Universe/Quasars" + Path = "/Universe" } } diff --git a/data/assets/scene/digitaluniverse/sdss.asset b/data/assets/scene/digitaluniverse/sdss.asset index 03829710cc..56d92df264 100644 --- a/data/assets/scene/digitaluniverse/sdss.asset +++ b/data/assets/scene/digitaluniverse/sdss.asset @@ -6,29 +6,29 @@ local textures = asset.syncedResource({ Name = "Sloan Digital Sky Survey Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_sloandss_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ Name = "Sloan Digital Sky Survey Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_sloandss_speck", - Version = 1 + Version = 2 }) local object = { Identifier = "SloanDigitalSkySurvey", Renderable = { Type = "RenderableBillboardsCloud", - Enabled = false, + Enabled = true, Color = { 0.8, 0.8, 1.0 }, - Transparency = 1.0, - ScaleFactor = 507.88, + Opacity = 0.8, + ScaleFactor = 520.0, File = speck .. "/SDSSgals.speck", - ColorMap = speck .. "/lss.cmap", - ColorOption = { "redshift", "prox5Mpc" }, + ColorMap = speck .. "/SDSSgals.cmap", + ColorOption = { "redshift", "proximity" }, ColorRange = { { 0.0, 0.075 }, { 1.0, 50.0 } }, - Texture = textures .. "/point3.png", + Texture = textures .. "/point3A.png", Unit = "Mpc", -- Fade in value in the same unit as "Unit" FadeInDistances = { 220.0, 650.0 }, @@ -38,7 +38,9 @@ local object = { CorrectionSizeFactor = 10.41, TextSize = 14.8, TextMinSize = 10.0, - TextMaxSize = 50.0 + TextMaxSize = 50.0, + BillboardMaxSize = 5.5, + EnablePixelSizeControl = true }, GUI = { Name = "Sloan Digital Sky Survey", diff --git a/data/assets/scene/digitaluniverse/starlabels.asset b/data/assets/scene/digitaluniverse/starlabels.asset index 14a536635d..6e12b8e7eb 100644 --- a/data/assets/scene/digitaluniverse/starlabels.asset +++ b/data/assets/scene/digitaluniverse/starlabels.asset @@ -15,9 +15,9 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, LabelFile = speck .. "/stars.label", - TextColor = { 0.4, 0.4, 0.4, 1.0 }, + TextColor = { 0.4, 0.4, 0.4 }, DrawLabels = true, TextSize = 14.7, TextMinSize = 6.0, diff --git a/data/assets/scene/digitaluniverse/starorbits.asset b/data/assets/scene/digitaluniverse/starorbits.asset new file mode 100644 index 0000000000..212d2a9b3f --- /dev/null +++ b/data/assets/scene/digitaluniverse/starorbits.asset @@ -0,0 +1,170 @@ +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require('scene/solarsystem/sun/transforms') +local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms') + + +local speck = asset.syncedResource({ + Name = "Grids Speck Files", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_starorbits_speck", + Version = 1 +}) + +local sunOrbit = { + Identifier = "SunOrbit", + --Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 1.0, + File = speck .. "/starorbits-Sun.speck", + MeshColor = {{ 1.0, 0.65, 0.0 }}, + --LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "Sun Orbit", + Path = "/Milky Way/Stars/Stars Orbits" + } +} + +local barnardsOrbit = { + Identifier = "BarnardsOrbit", + --Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 1.0, + File = speck .. "/starorbits-BarnardsStar.speck", + MeshColor = {{0.39, 0.58, 0.93}}, + --LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "Barnards Orbit", + Path = "/Milky Way/Stars/Stars Orbits" + } +} + +local kapteynsOrbit = { + Identifier = "KapteynsOrbit", + --Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 1.0, + File = speck .. "/starorbits-KapteynsStar.speck", + MeshColor = {{0.6, 0.6, 0.6}}, + --LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "Kapteyns Orbit", + Path = "/Milky Way/Stars/Stars Orbits" + } +} + +local lacaille9352Orbit = { + Identifier = "Lacaille9352Orbit", + --Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 1.0, + File = speck .. "/starorbits-Lacaille9352.speck", + MeshColor = {{0.58, 0.0, 0.83}}, + --LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "Lacaille 9352 Orbit", + Path = "/Milky Way/Stars/Stars Orbits" + } +} + +local lSR1826Orbit = { + Identifier = "LSR1826Orbit", + --Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 1.0, + File = speck .. "/starorbits-LSR1826+3014.speck", + MeshColor = {{0.0, 0.39, 0.0}}, + --LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "LSR1826+3014 Orbit", + Path = "/Milky Way/Stars/Stars Orbits" + } +} + +local lSRJ0822Orbit = { + Identifier = "LSRJ0822Orbit", + --Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 1.0, + File = speck .. "/starorbits-LSRJ0822+1700.speck", + MeshColor = {{0.5, 1.0, 0.0}}, + --LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "LSRJ0822+1700 Orbit", + Path = "/Milky Way/Stars/Stars Orbits" + } +} + +local pM_J13420Orbit = { + Identifier = "PM_J13420Orbit", + --Parent = transforms.SolarSystemBarycenter.Name, + Renderable = { + Type = "RenderableDUMeshes", + Enabled = false, + Opacity = 1.0, + File = speck .. "/starorbits-PM_J13420-3415.speck", + MeshColor = {{0.70, 0.13, 0.13}}, + --LabelFile = speck .. "/1ld.label", + TextColor = { 0.0, 0.2, 0.5 }, + TextSize = 10.3, + TextMinSize = 0.5, + TextMaxSize = 30.0, + Unit = "pc" + }, + GUI = { + Name = "PM_J13420-3415 Orbit", + Path = "/Milky Way/Stars/Stars Orbits" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + sunOrbit, barnardsOrbit, pM_J13420Orbit, lSRJ0822Orbit, lSR1826Orbit, + lacaille9352Orbit, kapteynsOrbit +}) diff --git a/data/assets/scene/digitaluniverse/stars.asset b/data/assets/scene/digitaluniverse/stars.asset index 67a6145985..0407908aab 100644 --- a/data/assets/scene/digitaluniverse/stars.asset +++ b/data/assets/scene/digitaluniverse/stars.asset @@ -13,6 +13,13 @@ local speck = asset.syncedResource({ Name = "Stars Speck Files", Type = "HttpSynchronization", Identifier = "stars_du", + Version = 4 +}) + +local sunspeck = asset.syncedResource({ + Name = "Stars Speck Files", + Type = "HttpSynchronization", + Identifier = "digitaluniverse_sunstar_speck", Version = 1 }) @@ -29,11 +36,34 @@ local stars = { Type = "RenderableStars", File = speck .. "/stars.speck", Texture = textures .. "/halo.png", - ColorMap = colorLUT .. "/colorbv.cmap" + --ShapeTexture = textures .. "/disc.png", + ColorMap = colorLUT .. "/colorbv.cmap", + MagnitudeExponent = 6.2, + SizeComposition = "Distance Modulus", + RenderMethod = "Texture Based" -- or PSF }, GUI = { Path = "/Milky Way/Stars" } } -assetHelper.registerSceneGraphNodesAndExport(asset, { stars }) +local sunstar = { + Identifier = "SunStar", + Renderable = { + Type = "RenderableStars", + File = sunspeck .. "/sunstar.speck", + Texture = textures .. "/halo.png", + --ShapeTexture = textures .. "/disc.png", + ColorMap = colorLUT .. "/colorbv.cmap", + MagnitudeExponent = 6.2, + SizeComposition = "Distance Modulus", + RenderMethod = "Texture Based", -- or PSF + FadeInDistances = { 0.0001, 0.1 } + }, + GUI = { + Name = "Sun", + Path = "/Milky Way/Stars" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { stars, sunstar }) diff --git a/data/assets/scene/digitaluniverse/superclusters.asset b/data/assets/scene/digitaluniverse/superclusters.asset index cd8afe87fd..6ebbb1f488 100644 --- a/data/assets/scene/digitaluniverse/superclusters.asset +++ b/data/assets/scene/digitaluniverse/superclusters.asset @@ -6,14 +6,14 @@ local textures = asset.syncedResource({ Name = "Galaxy Superclusters Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_superclusters_textures", - Version = 1 + Version = 2 }) local speck = asset.syncedResource({ Name = "Galaxy Superclusters Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_superclusters_speck", - Version = 1 + Version = 2 }) local object = { @@ -21,16 +21,20 @@ local object = { Renderable = { Type = "RenderableBillboardsCloud", Enabled = false, + DrawElements = false, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, File = speck .. "/superclust.speck", - Texture = textures .. "/point3.png", + Texture = textures .. "/point3A.png", LabelFile = speck .. "/superclust.label", - TextColor = { 0.6, 0.6, 0.6, 1.0 }, + TextColor = { 0.9, 0.9, 0.9 }, ScaleFactor = 531.0, TextSize = 22.44, TextMinSize = 8.0, - Unit = "Mpc" + Unit = "Mpc", + DrawLabels = true, + --BillboardMaxSize = 7.2, + EnablePixelSizeControl = true }, GUI = { Name = "Galaxy Superclusters", diff --git a/data/assets/scene/digitaluniverse/supernovaremnants.asset b/data/assets/scene/digitaluniverse/supernovaremnants.asset index 31cbe5d1c5..c821080e65 100644 --- a/data/assets/scene/digitaluniverse/supernovaremnants.asset +++ b/data/assets/scene/digitaluniverse/supernovaremnants.asset @@ -13,7 +13,7 @@ local speck = asset.syncedResource({ Name = "Supernova Remnants Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_supernovaremnants_speck", - Version = 1 + Version = 2 }) local object = { @@ -22,23 +22,25 @@ local object = { Type = "RenderableBillboardsCloud", Enabled = false, Color = { 1.0, 0.5, 0.0 }, - Transparency = 0.5, + Opacity = 0.32, File = speck .. "/snr.speck", Texture = textures .. "/point4.png", PolygonSides = 7, LabelFile = speck .. "/snr.label", - TextColor = { 0.6, 0.3, 0.0, 1.0 }, - ScaleFactor = 440.08, - TextSize = 17.5, - TextMinSize = 8.0, - TextMaxSize = 30.0, - CorrectionSizeEndDistance = 17.5, - CorrectionSizeFactor = 13.96, - Unit = "pc" + TextColor = { 0.6, 0.46, 0.0 }, + ScaleFactor = 424, + TextSize = 16.44, + TextMinSize = 4.0, + TextMaxSize = 200.0, + --CorrectionSizeEndDistance = 17.5, + --CorrectionSizeFactor = 13.96, + Unit = "pc", + BillboardMaxSize = 500, + EnablePixelSizeControl = true }, GUI = { Name = "Supernova Remnants", - Path = "/Milky Way/Supernova Remnants" + Path = "/Milky Way" } } diff --git a/data/assets/scene/digitaluniverse/tully.asset b/data/assets/scene/digitaluniverse/tully.asset index 5c3ee2ca20..45ce730432 100644 --- a/data/assets/scene/digitaluniverse/tully.asset +++ b/data/assets/scene/digitaluniverse/tully.asset @@ -6,33 +6,36 @@ local textures = asset.syncedResource({ Name = "Tully Textures", Type = "HttpSynchronization", Identifier = "digitaluniverse_tully_textures", - Version = 2 + Version = 3 }) local speck = asset.syncedResource({ Name = "Tully Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_tully_speck", - Version = 1 + Version = 2 }) local tullyPoints = { Identifier = "TullyGalaxies", Renderable = { Type = "RenderableBillboardsCloud", - Enabled = false, + Enabled = true, Color = { 1.0, 0.4, 0.2 }, - Transparency = 0.99, - ScaleFactor = 502.77, + Opacity = 0.99, + ScaleFactor = 500.0, File = speck .. "/tully.speck", - Texture = textures .. "/point3.png", + Texture = textures .. "/point3A.png", + --ColorMap = speck .. "/tully.cmap", ColorMap = speck .. "/lss.cmap", + --ColorOption = { "proximity" }, ColorOption = { "prox5Mpc" }, - ColorRange = { { 1.0, 80.0 } }, + ColorRange = { { 1.0, 30.0 } }, LabelFile = speck .. "/tully.label", - TextColor = { 0.7, 0.7, 0.7, 1.0 }, - TextSize = 20.50, - TextMinSize = 16.0, + DrawLabels = true, + TextColor = { 0.7, 0.7, 0.7 }, + TextSize = 19.36, + TextMinSize = 8.2, TransformationMatrix = { -0.7357425748, 0.67726129641, 0.0, 0.0, -0.074553778365, -0.080991471307, 0.9939225904, 0.0, @@ -41,12 +44,13 @@ local tullyPoints = { }, Unit = "Mpc", -- Fade in value in the same unit as "Unit" - FadeInDistances = { 0.05, 1.0 }, + FadeInDistances = { 0.001, 1.0 }, -- Max size in pixels - BillboardMaxSize = 50.0, - BillboardMinSize = 0.0, - CorrectionSizeEndDistance = 20.55, - CorrectionSizeFactor = 10.45, + BillboardMaxSize = 5, + BillboardMinSize = 0, + --CorrectionSizeEndDistance = 22.0, + --CorrectionSizeFactor = 10.45 + EnablePixelSizeControl = true }, GUI = { Name = "Tully Galaxies", @@ -58,9 +62,9 @@ local tullyImages = { Identifier = "TullyGalaxiesImages", Renderable = { Type = "RenderablePlanesCloud", - Enabled = false, + Enabled = true, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.99, + Opacity = 0.99, ScaleFactor = 1.0, File = speck .. "/tully.speck", TexturePath = textures, @@ -74,8 +78,8 @@ local tullyImages = { }, Unit = "Mpc", -- Fade in value in the same unit as "Unit" - FadeInDistances = {0.05, 0.1}, - PlaneMinSize = 5.0 + FadeInDistances = {0.0005, 0.003}, + PlaneMinSize = 1.0 }, GUI = { Name = "Tully Galaxies Images", @@ -84,5 +88,4 @@ local tullyImages = { } - assetHelper.registerSceneGraphNodesAndExport(asset, { tullyPoints, tullyImages }) diff --git a/data/assets/scene/digitaluniverse/voids.asset b/data/assets/scene/digitaluniverse/voids.asset index c6684a28c8..420ebe54b7 100644 --- a/data/assets/scene/digitaluniverse/voids.asset +++ b/data/assets/scene/digitaluniverse/voids.asset @@ -6,7 +6,7 @@ local speck = asset.syncedResource({ Name = "Voids Speck Files", Type = "HttpSynchronization", Identifier = "digitaluniverse_voids_speck", - Version = 1 + Version = 2 }) local object = { @@ -14,11 +14,12 @@ local object = { Renderable = { Type = "RenderableBillboardsCloud", Enabled = false, + DrawElements = false, DrawLabels = true, Color = { 1.0, 1.0, 1.0 }, - Transparency = 0.65, + Opacity = 0.65, LabelFile = speck .. "/voids.label", - TextColor = { 0.0, 0.4, 0.7, 1.0 }, + TextColor = { 0.296, 0.629, 1.0 }, TextSize = 20.9, TextMinSize = 8.0, Unit = "Mpc" diff --git a/data/assets/scene/milkyway/constellations/constellation_art.asset b/data/assets/scene/milkyway/constellations/constellation_art.asset new file mode 100644 index 0000000000..4d4ad4e64f --- /dev/null +++ b/data/assets/scene/milkyway/constellations/constellation_art.asset @@ -0,0 +1,106 @@ +local constellationsCSV = asset.localResource('constellation_data.csv') +local transforms = asset.require("scene/solarsystem/sun/transforms") + +local images = asset.syncedResource({ + Name = "Constellation Images", + Type = "HttpSynchronization", + Identifier = "constellation_images", + Version = 1 +}) + +--function that reads the file +local createConstellations = function (guiPath, constellationfile) + local genConstellations = {}; + --skip the first line + local notFirstLine = false; + -- define parsec to meters + local PARSEC_CONSTANT = 3.0856776E16; + -- how many parsecs away do you want the images to be? + -- this setting puts the billboards at the location of the constellation bounds grid from DU. + -- but they can really be anywhere since the billboard size will scale with distance. + local distanceMultiplier = 3.2; + local baseScale = 1e17; + for line in io.lines(openspace.absPath(constellationfile)) do + if (notFirstLine) then + -- describes the data + local matchstring = '(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)$' + local group, abbreviation, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar = line:match(matchstring) + local magVec = math.sqrt(x*x + y*y + z*z) + local normx = x/magVec + local normy = y/magVec + local normz = z/magVec + + group = (group == '' and globe or group) + + local aconstellation = { + Identifier = guiPath .. '-' .. name, + Parent = transforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + -- position is in parsecs from the SolarSystemBarycenter, so convert to meters + Position = { + normx * PARSEC_CONSTANT * distanceMultiplier, + normy * PARSEC_CONSTANT * distanceMultiplier, + normz * PARSEC_CONSTANT * distanceMultiplier + } + }, + Rotation = { + Type = "StaticRotation", + Rotation = { tonumber(rotX), tonumber(rotY), tonumber(rotZ) } + } + + }, + Renderable = { + Type = "RenderablePlaneImageLocal", + Size = tonumber(baseScale * scale * distanceMultiplier / 10), + Enabled = false, + Origin = "Center", + Billboard = false, + LazyLoading = true, + Texture = images .. "/" .. imageName, + BlendMode = "Additive", + Opacity = 0.1 + }, + Tag = { "ConstellationArtImage", group }, + GUI = { + Name = name .. ' Image', + Path = '/Milky Way/' .. guiPath + } + } + table.insert(genConstellations, aconstellation); + + else + notFirstLine = true + end + end + return genConstellations +end + + +local nodes = {} + +asset.onInitialize(function () + local constellationsCSV = images .. "/constellation_data.csv" + + nodes = createConstellations('Constellation Art', constellationsCSV) + for _, n in ipairs(nodes) do + openspace.addSceneGraphNode(n); + end +end) + +asset.onDeinitialize(function () + for _, n in ipairs(nodes) do + openspace.removeSceneGraphNode(n.Identifier); + end +end) + + +asset.meta = { + Name = "Constellation Images", + Version = "1.0", + Description = "Artistic images depicting the constellations", + Author = "James Hedberg", + URL = "jameshedberg.com", + License = "CC-BY" +} diff --git a/data/assets/scene/milkyway/constellations/constellation_data.csv b/data/assets/scene/milkyway/constellations/constellation_data.csv new file mode 100644 index 0000000000..7c02f310de --- /dev/null +++ b/data/assets/scene/milkyway/constellations/constellation_data.csv @@ -0,0 +1,85 @@ +Data about Constellations columns are: group, name, x, y, z, scale, imageName, rotX, rotY, rotZ, centerStar +normal,Ori,Orion,-550.8742,-259.3621,-188.9620,1.5,Ori.png,1.128407,1.058407,1.668407,HD37128 +zodiac,Tau,Taurus,-18.7277,-0.3175,-6.9092,1.2,Tau.png,1.198407,0.908407,1.378407,Aldebran +zodiac,Ari,Aries,-13.2892,9.4519,-11.9378,0.8,Ari.png,0.668407,0.538407,0.518407,Hamal +zodiac,Gem,Gemini,-362.5493,-102.2245,79.4030,0.85,Gem.png,-0.731593,2.268407,-0.451593,Mekbuda +zodiac,Cnc,Cancer,-30.9209,-16.4584,22.6601,0.8,Cnc.png,-1.151593,1.888407,-1.041593,HD74442 +zodiac,Leo,Leo,-17.9030,-13.2719,31.4196,1.33,Leo.png,-0.131593,2.448407,0.418407,HD89484 +zodiac,Vir,Virgo,36.5809,-35.1877,62.3341,1.5,Vir.png,-0.371593,3.138407,0.518407,HD116658 +zodiac,Lib,Libra,17.5393,-6.2768,14.5916,1.0,Lib.png,-1.011593,3.138407,1.318407,HD130819 +zodiac,Sco,Scorpius,137.4378,-19.4456,37.3606,1.2,Sco.png,1.698407,-1.001593,-1.751593,HD148478 +zodiac,Sgr,Sagittarius,66.2304,11.1498,-14.8095,1.2,Sgr.png,1.728407,-1.321593,-1.751593,HD175191 +zodiac,Cap,Capricornus,32.9799,20.0621,-29.3945,1.3,Cap.png,1.158407,-0.881593,-0.561593,HD200761 +zodiac,Aqr,Aquarius,86.5090,149.4078,-155.8102,1.2,Aqr.png,-2.921593,-2.391593,-2.551593,-2.511593 +zodiac,Psc,Pisces,-28.0235,45.3150,-76.8893,1.6,Psc.png,0.458407,-0.001593,0.618407,HD4656 +northern,Uma,Ursa Major,-12.0503,7.1931,19.8974,1.6,UMa.png,0.748407,2.398407,0.658407,HD95418 +northern,Dra,Draco,-1.4340,20.6566,23.5098,1.9,Dra.png,0.658407,-2.541593,1.058407,HD137759 +southern,Ant,Antila,-0.2233,-103.8908,42.7940,1.3,Ant.png,1.848407,0.198407,-3.141593,HD90610 +southern,Crv,Corvus,8.0442,-16.8858,19.3984,1.1,Crv.png,2.198407,-0.041593,-2.221593,HD108767 +southern,Cet,Cetus,-28.7960,7.2425,-73.6693,1.5,Cet.png,0.238407,0.368407,0.688407,HD11353 +southern,Cha,Chameleon,53.5121,-108.3624,-38.1807,1.1,Cha.png,-1.801593,2.738407,0.448407,HD92305 +northern,Cam,Camelopardalis,-304.8155,179.0620,71.1454,1.7,Cam.png,2.128407,1.228407,1.478407,HD31910 +equatorial,Aql,Aquila,11.7741,9.7467,-1.6418,1.0,Aql.png,-2.601593,-2.511593,-3.141593,HD182640 +southern,Aps,Apus,31.6370,-32.5620,-16.5786,1.1,Aps.png,-1.691593,-2.281593,0.838407,HD149324 +northern,Lyn,Lynx,-98.3174,4.4830,67.2289,1.2,Lyn.png,1.688407,1.768407,1.668407,HD70272 +southern,Phe,Phoenix,5.0172,-4.2096,-22.8088,1.5,Phe.png,-3.141593,3.138407,-3.141593,HD6595 +northern,Cyg,Cygnus,78.7445,375.2440,12.4995,1.4,Cyg.png,1.668407,-0.931593,-0.261593,HD194093 +southern,Cen,Centaurus,20.1398,-33.1830,9.5915,2.7,Cen.png,-1.291593,3.088407,0.458407,HD110304 +northern,Aur,Auriga,-12.3062,3.8595,1.0302,1.5,Aur.png,1.378407,1.108407,1.178407,HD34029 +northern,Peg,Pegasus,0.9791,32.5947,-27.7339,2.42,Peg.png,0.918407,-0.221593,-0.191593,HD218045 +southern,Hya,Hydra,-2.9043,-33.5496,25.8962,3,Hya.png,-0.531593,2.838407,0.368407,HD93813 +southern,Oct,Octans,22.0434,-27.8601,-24.3108,1.0,Oct.png,-0.911593,0.398407,1.198407,HD214846 +southern,Nor,Norma,34.9251,-17.5643,0.0068,1.0,Nor.png,-1.631593,-2.421593,1.298407,HD146686 +southern,Mus,Musca,48.8888,-79.2952,-10.2828,1.25,Mus.png,-1.871593,3.138407,0.358407,HD109668 +southern,Hyi,Hydrus,3.2767,-4.7183,-4.7829,1.1,Hyi.png,2.438407,-3.141593,-2.381593,HD2151 +northern,Lac,Lacerta,-6.0878,30.5794,-3.6064,1.0,Lac.png,-1.521593,-2.391593,3.138407,HD213558 +equatorial,Lep,Lepus,-212.6297,-184.4909,-132.1156,1.0,Lep.png,-1.801593,-2.351593,-0.861593,HD36673 +southern,Lup,Lupus,129.1166,-102.2983,33.3251,1.2,Lup.png,-1.191593,-2.391593,0.798407,HD129056 +southern,Men,Mensa,2.4149,-8.5586,-4.8892,1.0,Men.png,-2.101593,-2.781593,0.828407,HD43834 +southern,Mic,Microscopium,51.0335,11.1671,-44.3692,1.0,Mic.png,0.728407,-0.831593,-0.561593,HD199951 +equatorial,Mon,Monoceros,-93.0725,-66.8909,8.6548,1.2,Mon.png,-1.331593,1.988407,-0.891593,HD55185 +southern,Pav,Pavo,4.4549,-2.5959,-3.2739,1.3,Pav.png,-2.391593,-2.171593,1.648407,HD190248 +southern,Ind,Indus,133.6149,-53.5569,-115.9552,1.5,Ind.png,-2.031593,-1.491593,1.758407,HD198700 +northern,LMi,Leo Minor,-23.3948,-2.5770,38.0756,1.1,LMi.png,-3.141593,0.478407,-2.201593,HD90537 +northern,Lyr,Lyra,2.8086,6.7630,2.5555,1.0,Lyr.png,-1.831593,-2.091593,3.141500,HD172167 +northern,Her,Hercules,14.0526,14.9773,12.5478,1.3,Her.png,-1.511593,-1.811593,2.288407,HD156164 +southern,Gru,Grus,18.6528,-3.2893,-24.6602,1.3,Gru.png,-3.141593,-2.511593,-2.901593,HD209952 +southern,Crt,Crater,1.5886,-43.9831,40.3390,1.3,Crt.png,-0.521593,3.140000,0.588407,HD98430 +northern,Del,Delphinus,14.8599,24.6150,-8.0550,1.2,Del.png,1.308407,-0.951593,-0.241593,HD196524 +southern,Dor,Dorado,-0.6460,-9.3172,-6.9654,1.2,Dor.png,2.118407,1.768407,-2.901593,HD33262 +northern,Equ,Equuleus,27.7363,41.7071,-27.4371,1.2,Equ.png,-1.801593,-2.511593,2.558407,HD202447 +southern,Eri,Eridanus,-37.5153,-23.5231,-65.6368,2.1,Eri.png,0.128407,0.698407,0.998407,HD20720 +southern,For,Fornax,-14.0351,-17.8282,-46.5514,1.4,For.png,3.138407,2.678407,-2.351593,HD17652 +southern,Hor,Horologium,2.1021,-27.1310,-40.5136,1.2,Hor.png,-3.141593,2.468407,-2.191593,HD16920 +southern,Pyx,Pyxis,-66.7424,-248.9639,26.0445,1.2,Pyx.png,1.838407,-1.651593,2.708407,HD74575 +southern,Ret,Reticulum,2.8130,-37.2904,-33.2644,1.5,Ret.png,1.998407,2.188407,-2.591593,HD27256 +northern,Sge,Sagitta,44.3886,70.9446,-7.6264,1.2,Sge.png,-0.741593,-2.231593,2.108407,HD189319 +southern,Scl,Sculptor,21.6545,-6.8861,-166.5240,1.3,Scl.png,-0.071593,-0.221593,0.638407,HD2429 +southern,Sct,Scutum,48.8939,21.5158,-0.1629,1.2,Sct.png,1.188407,-1.271593,-0.971593,HD171443 +southern,Tuc,Tucana,35.3950,-20.2535,-45.2324,1.1,Tuc.png,-0.351593,-0.161593,0.308407,HD211416 +northern,Tri,Triangulum,-26.6263,21.9119,-16.2254,1.2,Tri.png,1.168407,0.218407,0.558407,HD13161 +southern,TrA,Triangulum Australe,96.2283,-76.4459,-33.5257,1.2,TrA.png,-1.991593,-2.491593,1.128407,HD150798 +southern,Tel,Telescopium,72.3444,-14.5016,-20.0248,1.2,Tel.png,-0.461593,-1.731593,0.298407,HD169467 +southern,Ara,Ara,164.9273,-75.6246,-35.3100,1.1,Ara.png,-1.381593,-2.131593,1.048407,HD157244 +southern,Cae,Caelum,-6.0961,-13.7926,-13.3392,1.0,Cae.png,-0.661593,0.948407,0.418407,HD29875 +southern,CMa,Canis Major,-1.7693,-1.9125,-0.4074,1.3,CMa.png,1.128407,1.048407,1.878407,HD48915 +northern,CMi,Canis Minor,-2.8348,-1.8906,0.7881,1.2,CMi.png,2.538407,1.138407,-3.141593,HD61421 +southern,Vol,Volans,37.6000,-182.7856,-62.6559,1.2,Vol.png,-2.441593,1.988407,-0.351593,HD68520 +northern,UMi,Ursa Minor,-11.3527,27.2100,25.1835,1.3,UMi.png,-2.491593,-0.581593,-2.381593,HD131873 +northern,And,Andromdeda,-32.8276,43.3946,-27.8475,1.6,And.png,-2.021593,-3.141593,-2.521593,HD6860 +northern,Boo,Bootes,11.2468,14.9864,30.4945,2.0,Boo.png,-3.141593,-0.601593,-2.361593,HD135722 +northern,Vul,Vulpecula,46.7540,77.7780,5.3953,1.1,Vul.png,-2.301593,-2.061593,-3.141593,HD131873 +northern,CVn,Canes Venatici,-3.1198,5.7935,33.1368,1.3,CVn.png,0.148407,3.138407,0.428407,HD112413 +southern,Cir,Circinus,11.4255,-11.6937,-1.3129,1.0,Cir.png,1.448407,-0.391593,-2.211593,HD128898 +northern,Com,Coma Berenices,1.9257,-1.2062,12.2465,1.4,Com.png,3.138407,-0.051593,-2.711593,HD114378 +southern,CrA,Corona Australis,146.1322,-4.7492,-53.7124,1.0,CrA.png,-3.141593,-2.021593,-3.141593,HD178345 +northern,CrB,Corona Borealis,33.5737,32.0314,52.9729,1.3,CrB.png,-3.141593,-0.601593,-2.271593,HD143107 +northern,Cas,Cassiopeia,-36.3073,59.4424,-7.6926,1.4,Cas.png,-1.431593,3.128407,-2.331593,HD3712 +northern,Cep,Cepheus,-2.8178,14.4985,2.3848,1.7,Cep.png,-1.331593,-2.291593,-2.931593,HD203280 +southern,Car,Carina Vela Puppis,14.1325,-188.6018,-42.2785,2.0,Car.png,2.078407,1.048407,-3.111593,HD71129 +northern,Col,Columba,-11.2568,-20.5973,-11.9895,1.0,Col.png,2.518407,1.358407,-2.981593,HD39425 +northern,Per,Perseus,-139.8202,79.8063,-16.2631,1.3,Per.png,-1.751593,2.428407,-2.411593,HD22928 +northern,Oph,Ophiuchus,127.9419,14.0822,56.2015,3.2,Oph.png,2.178407,-0.781593,-1.681593,HD149757 +southern,PsA,Piscis Austrinus,99.9977,47.6679,-199.6345,1.0,PsA.png,3.138407,-2.541593,-2.881593,HD214748 +southern,Cru,Crux,49.3509,-85.0446,-0.6223,1.1,Cru.png,1.718407,0.048407,-2.741593,HD108248 +southern,Pic,Pictor,-4.5417,-45.5649,-27.1768,1.0,Pic.png,2.568407,2.138407,-2.081593,HD39523 diff --git a/data/assets/scene/milkyway/constellations/constellation_keybinds.asset b/data/assets/scene/milkyway/constellations/constellation_keybinds.asset new file mode 100644 index 0000000000..f527e59fb4 --- /dev/null +++ b/data/assets/scene/milkyway/constellations/constellation_keybinds.asset @@ -0,0 +1,38 @@ +local scene_helper = asset.require('util/scene_helper') + +local Keybindings = { + { + Key = "c", + Name = "Show Constellation Art", + Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0);" .. + "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', true);" .. + "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0.1, 2);", + Documentation = "Enables and fades up constellation art work", + GuiPath = "/Rendering", + Local = false + }, + { + Key = "SHIFT+c", + Name = "Hide Constellation Art", + Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Opacity', 0, 2);", + Documentation = "Fades out constellation artwork", + GuiPath = "/Rendering", + Local = false + }, + { + Key = "CTRL+c", + Name = "Disable Constellation Art", + Command = "openspace.setPropertyValue('Scene.Constellation Art*.Renderable.Enabled', false);", + Documentation = "Disable constellation artwork", + GuiPath = "/Rendering", + Local = false + } +} + +asset.onInitialize(function () + scene_helper.bindKeys(Keybindings) +end) + +asset.onDeinitialize(function () + scene_helper.unbindKeys(Keybindings) +end) diff --git a/data/assets/scene/milkyway/gaia/apogee.asset b/data/assets/scene/milkyway/gaia/apogee.asset index 44332682a8..1b1bdccd80 100644 --- a/data/assets/scene/milkyway/gaia/apogee.asset +++ b/data/assets/scene/milkyway/gaia/apogee.asset @@ -31,8 +31,11 @@ local gaia_abundance_apogee = { File = speck .. "/GaiaAbundApogee.speck", ColorOption = "Other Data", OtherData = "FeH", - ScaleFactor = 100, + MagnitudeExponent = 6.2, + SizeComposition = "Distance Modulus", + RenderMethod = "Texture Based", Texture = textures .. "/halo.png", + -- ShapeTexture = textures .. "/disc.png", ColorMap = colorLUT .. "/colorbv.cmap", OtherDataColorMap = colorLUT .. "/viridis.cmap", StaticFilter = -9999, diff --git a/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset b/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset index 4dac2821f8..d80419ac78 100644 --- a/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset +++ b/data/assets/scene/milkyway/gaia/gaia_dr2_download_stars.asset @@ -1,19 +1,30 @@ -- Download a dataset of 618 million stars (28 GB), already preprocessed and stored in a binary octree. -- The octree was generated from the full DR2 by filtering away all stars with a parallax error higher than 0.5 -- Max Star Per Node = 50,000 and max distance = 500kpc -asset.syncedResource({ +local gaia618Destination = asset.syncedResource({ Name = "Gaia DR2 618M Octree", Type = "HttpSynchronization", Identifier = "gaia_stars_618M_octree", Version = 1 }) +local gaia618DestinationExtracted = gaia618Destination + '/data'; -- Download the full DR2 dataset with 24 values per star (preprocessed with theReadFitsTask (gaia_read.task) into 8 binary files). -- From these files new subsets can be created with the ConstructOctreeTask (gaia_octree.task). -- Total size of download is 151 GB. -asset.syncedResource({ +local gaiaFull = asset.syncedResource({ Name = "Gaia DR2 Full Raw", Type = "HttpSynchronization", Identifier = "gaia_stars_dr2_raw", Version = 1 }) + +asset.onInitialize(function() + if not openspace.directoryExists(gaia618DestinationExtracted) then + openspace.printInfo("Extracted Gaia dataset") + openspace.unzipFile(gaia618Destination .. '/DR2_full_Octree[50kSPN,500dist]_50,50.zip', gaia618DestinationExtracted, true) + end +end) + +asset.export('GaiaDR2_618M', gaia618DestinationExtracted) +asset.export('GaiaFullDataset', gaiaFull) diff --git a/data/assets/scene/milkyway/gaia/galah.asset b/data/assets/scene/milkyway/gaia/galah.asset index 359e409111..a12160fa5a 100644 --- a/data/assets/scene/milkyway/gaia/galah.asset +++ b/data/assets/scene/milkyway/gaia/galah.asset @@ -30,9 +30,12 @@ local gaia_abundance_galah = { Enabled = false, File = speck .. "/GaiaAbundGalah.speck", Texture = textures .. "/halo.png", + -- ShapeTexture = textures .. "/disc.png", + MagnitudeExponent = 6.2, + SizeComposition = "Distance Modulus", + RenderMethod = "Texture Based", ColorOption = "Other Data", OtherData = "FeH", - ScaleFactor = 100, ColorMap = colorLUT .. "/colorbv.cmap", OtherDataColorMap = colorLUT .. "/viridis.cmap", StaticFilter = -9999, diff --git a/data/assets/scene/milkyway/milkyway/eso.asset b/data/assets/scene/milkyway/milkyway/eso.asset index dcfd30c43b..95eb437099 100644 --- a/data/assets/scene/milkyway/milkyway/eso.asset +++ b/data/assets/scene/milkyway/milkyway/eso.asset @@ -11,14 +11,23 @@ local textures = asset.syncedResource({ local object = { Identifier = "MilkyWay-ESO", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = {0, 0, 3.14159265359} + } + }, Renderable = { Type = "RenderableSphere", Size = 9.2E20, Segments = 40, Opacity = 0.4, Texture = textures .. "/eso0932a_blend.png", - Orientation = "Inside/Outside", - FadeOutThreshould = 0.01 + UseAdditiveBlending = true, + Orientation = "Inside", + MirrorTexture = true, + FadeOutThreshold = 0.01, + Background = true }, GUI = { Name = "Milky Way (ESO)", diff --git a/data/assets/scene/milkyway/milkyway/volume.asset b/data/assets/scene/milkyway/milkyway/volume.asset new file mode 100644 index 0000000000..2ae420e931 --- /dev/null +++ b/data/assets/scene/milkyway/milkyway/volume.asset @@ -0,0 +1,54 @@ +-- asset.require('../examples/volume/generated/cartesian.asset') + +local assetHelper = asset.require("util/asset_helper") +local transforms = asset.require("scene/solarsystem/sun/transforms") + +local data = asset.syncedResource({ + Name = "Milkyway Volume Data", + Type = "HttpSynchronization", + Identifier = "milkyway_volume_data", + Version = 1 +}) + +local kiloparsec = 3.086E19 + +local MilkyWayVolumeGalaxy = { + Identifier = "MilkyWayVolume", + Parent = transforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + -- The center of the Milky Way is approximately 8 kiloparsec from the Sun. + -- The x-axis of galactic coordinates points from the sun towards the center + -- of the galaxy. + Position = { 8 * kiloparsec, 0, 0 } + } + }, + Renderable = { + Type = "RenderableGalaxy", + StepSize = 0.01, + AbsorptionMultiply = 200, + EmissionMultiply = 250, + Rotation = { 3.1415926, 3.1248, 4.45741 }, + Volume = { + Type = "Volume", + Filename = data .. "/MilkyWayRGBAVolume1024x1024x128.raw", + Dimensions = { 1024, 1024, 128 }, + Size = { 1.2E21, 1.2E21, 0.15E21 }, + Downscale = 0.4, + }, + Points = { + Type = "Points", + Filename = data .. "/MilkyWayPoints.off", + EnabledPointsRatio = 0.3, + Texture = data .. "/halo.png" + } + }, + GUI = { + Path = "/Milky Way", + Name = "Milky Way Volume" + } +} + +local objects = { MilkyWayVolumeGalaxy } +assetHelper.registerSceneGraphNodesAndExport(asset, objects) diff --git a/data/assets/scene/milkyway/stars/denver.asset b/data/assets/scene/milkyway/stars/denver.asset index bee27521e8..8cf214031f 100644 --- a/data/assets/scene/milkyway/stars/denver.asset +++ b/data/assets/scene/milkyway/stars/denver.asset @@ -29,7 +29,10 @@ local object = { Type = "RenderableStars", File = speck .. "/denver_stars.speck", Texture = textures .. "/halo.png", - ColorMap = colorLUT .. "/denver_colorbv.cmap" + ColorMap = colorLUT .. "/denver_colorbv.cmap", + MagnitudeExponent = 6.2, + SizeComposition = "Distance Modulus", + RenderMethod = "Texture Based" -- or PSF }, GUI = { Name = "Stars (Denver)", diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset similarity index 53% rename from data/assets/scene/solarsystem/dwarf_planets/pluto/charon.asset rename to data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset index 7a7ffd934a..b9a30df0b5 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon.asset @@ -1,7 +1,8 @@ local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') +local transforms = asset.require('./../transforms') asset.require("spice/base") -asset.request('./trail') +asset.require('../trail') +local labelsPath = asset.require('./../pluto_globelabels').LabelsPath @@ -19,25 +20,28 @@ local Charon = { Type = "SpiceRotation", SourceFrame = "IAU_CHARON", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", Radii = { 6.035E5, 6.035E5, 6.035E5 }, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Greyscale_USGS", - Name = "Black & White [USGS]", - FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/pluto/charon_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NEWHORIZONS_CHARON_MOSAIC&SRS=EPSG:4326&BBOX=-180,-90.0003,359.972,90", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/charon.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "planet_solarSystem", "planet_terrestrial" }, diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon_trail.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon_trail.asset similarity index 87% rename from data/assets/scene/solarsystem/dwarf_planets/pluto/charon_trail.asset rename to data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon_trail.asset index afc1190919..4a64b0d59b 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon_trail.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/charon_trail.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') +local transforms = asset.require('../transforms') asset.require("spice/base") @@ -18,7 +18,7 @@ local CharonTrailBarycentric = { Resolution = 1000 }, GUI = { - Name = "Pluto Barycenteric Trail", + Name = "Charon Barycentric Trail", Path = "/Solar System/Dwarf Planets/Pluto" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/default_layers.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/default_layers.asset new file mode 100644 index 0000000000..f33e3e6c24 --- /dev/null +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./charon') +local globeIdentifier = globeAsset.Charon.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/greyscale_usgs').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/colorlayers/greyscale_usgs.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/colorlayers/greyscale_usgs.asset new file mode 100644 index 0000000000..f8c906d910 --- /dev/null +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/colorlayers/greyscale_usgs.asset @@ -0,0 +1,7 @@ +local layer = { + Identifier = "Greyscale_USGS", + Name = "Black & White [USGS]", + FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/pluto/charon_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NEWHORIZONS_CHARON_MOSAIC&SRS=EPSG:4326&BBOX=-180,-90.0003,359.972,90", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/default_layers.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/default_layers.asset new file mode 100644 index 0000000000..135f5c3541 --- /dev/null +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/charon/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/greyscale_usgs").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/default_layers.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/default_layers.asset new file mode 100644 index 0000000000..8537adb532 --- /dev/null +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./pluto') +local globeIdentifier = globeAsset.Pluto.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/greyscale_usgs').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/kernels.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/kernels.asset index ed16895beb..a29ab30df4 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/kernels.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/kernels.asset @@ -7,7 +7,8 @@ local Kernels = asset.syncedResource({ local PlutoKernels = { Kernels .. "/NavPE_de433_od122.bsp", - Kernels .. "/NavSE_plu047_od122.bsp" + Kernels .. "/NavSE_plu047_od122.bsp", + Kernels .. "/ssd_jpl_nasa_gov_plu043.bsp" } asset.export("PlutoKernels", PlutoKernels) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/colorlayers/greyscale_usgs.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/colorlayers/greyscale_usgs.asset new file mode 100644 index 0000000000..d451e59e79 --- /dev/null +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/colorlayers/greyscale_usgs.asset @@ -0,0 +1,7 @@ +local layer = { + Identifier = "Greyscale_USGS", + Name = "Black & White [USGS]", + FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/pluto/pluto_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NEWHORIZONS_PLUTO_MOSAIC&SRS=EPSG:4326&BBOX=-180,-90,360,90", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/default_layers.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/default_layers.asset new file mode 100644 index 0000000000..135f5c3541 --- /dev/null +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/greyscale_usgs").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/hydra.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/hydra.asset similarity index 91% rename from data/assets/scene/solarsystem/dwarf_planets/pluto/hydra.asset rename to data/assets/scene/solarsystem/dwarf_planets/pluto/minor/hydra.asset index 46887461ee..10edebc8a9 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/hydra.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/hydra.asset @@ -1,6 +1,6 @@ local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels').PlutoKernels +local transforms = asset.require('../transforms') +local kernels = asset.require('../kernels').PlutoKernels diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/kerberos.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/kerberos.asset similarity index 91% rename from data/assets/scene/solarsystem/dwarf_planets/pluto/kerberos.asset rename to data/assets/scene/solarsystem/dwarf_planets/pluto/minor/kerberos.asset index a6f3643356..25aec2f0b6 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/kerberos.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/kerberos.asset @@ -1,6 +1,6 @@ local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels').PlutoKernels +local transforms = asset.require('../transforms') +local kernels = asset.require('../kernels').PlutoKernels diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/nix.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/nix.asset similarity index 89% rename from data/assets/scene/solarsystem/dwarf_planets/pluto/nix.asset rename to data/assets/scene/solarsystem/dwarf_planets/pluto/minor/nix.asset index 3ab7b01f12..fac09bf119 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/nix.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/nix.asset @@ -1,6 +1,6 @@ local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels').PlutoKernels +local transforms = asset.require('../transforms') +local kernels = asset.require('../kernels').PlutoKernels @@ -41,7 +41,7 @@ local NixTrail = { Resolution = 1000 }, GUI = { - Name = "Hydra Trail", + Name = "Nix Trail", Path = "/Solar System/Dwarf Planets/Pluto" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/styx.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/styx.asset similarity index 89% rename from data/assets/scene/solarsystem/dwarf_planets/pluto/styx.asset rename to data/assets/scene/solarsystem/dwarf_planets/pluto/minor/styx.asset index 40c5b52b2c..ceca463f5f 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/styx.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/minor/styx.asset @@ -1,6 +1,6 @@ local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels').PlutoKernels +local transforms = asset.require('../transforms') +local kernels = asset.require('../kernels').PlutoKernels @@ -41,7 +41,7 @@ local StyxTrail = { Resolution = 1000 }, GUI = { - Name = "Hydra Trail", + Name = "Styx Trail", Path = "/Solar System/Dwarf Planets/Pluto" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset index d49fbae85b..ceb9a72424 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto.asset @@ -1,7 +1,8 @@ local assetHelper = asset.require('util/asset_helper') local transforms = asset.require('./transforms') asset.require("spice/base") -asset.request('./trail') +asset.require('./trail') +local labelsPath = asset.require('./pluto_globelabels').LabelsPath @@ -19,25 +20,28 @@ local Pluto = { Type = "SpiceRotation", SourceFrame = "IAU_PLUTO", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", Radii = { 1.173E6, 1.173E6, 1.173E6 }, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Greyscale_USGS", - Name = "Black & White [USGS]", - FilePath = "WMS:https://planetarymaps.usgs.gov/cgi-bin/mapserv?map=/maps/pluto/pluto_simp_cyl.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NEWHORIZONS_PLUTO_MOSAIC&SRS=EPSG:4326&BBOX=-180,-90,360,90", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/pluto.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "planet_solarSystem", "planet_terrestrial" }, @@ -46,6 +50,25 @@ local Pluto = { } } +local PlutoLabel = { + Identifier = "PlutoLabel", + Parent = Pluto.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Pluto", + FontSize = 100.0, + LabelSize = 8.9, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + BlendMode = "Additive", + LabelOrientationOption = "Camera View Direction" + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Pluto Label", + Path = "/Solar System/Dwarf Planets/Pluto" + } +} - -assetHelper.registerSceneGraphNodesAndExport(asset, { Pluto }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Pluto, PlutoLabel }) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_globelabels.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_globelabels.asset new file mode 100644 index 0000000000..241ef8e6b7 --- /dev/null +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_globelabels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Pluto Labels", + Type = "HttpSynchronization", + Identifier = "pluto_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset index 87c3736da9..145d3c4973 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/pluto_trail.asset @@ -18,7 +18,7 @@ local PlutoTrailBarycentric = { Resolution = 1000 }, GUI = { - Name = "Pluto Barycenteric Trail", + Name = "Pluto Barycentric Trail", Path = "/Solar System/Dwarf Planets/Pluto" } } diff --git a/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset b/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset index 27f589806f..c6497de839 100644 --- a/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset +++ b/data/assets/scene/solarsystem/dwarf_planets/pluto/system.asset @@ -1,10 +1,10 @@ -asset.request('./trail') -asset.request('./pluto') -asset.request('./pluto_trail') -asset.request('./charon') -asset.request('./charon_trail') -asset.request('./hydra') -asset.request('./kerberos') -asset.request('./nix') -asset.request('./styx') +asset.require('./trail') +asset.require('./pluto') +asset.require('./pluto_trail') +asset.require('./charon/charon') +asset.require('./charon/charon_trail') +asset.require('./minor/hydra') +asset.require('./minor/kerberos') +asset.require('./minor/nix') +asset.require('./minor/styx') diff --git a/data/assets/scene/solarsystem/interstellar/c-2019_q4_borisov.asset b/data/assets/scene/solarsystem/interstellar/c-2019_q4_borisov.asset new file mode 100644 index 0000000000..a21679ce59 --- /dev/null +++ b/data/assets/scene/solarsystem/interstellar/c-2019_q4_borisov.asset @@ -0,0 +1,46 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local trajectory = asset.syncedResource({ + Name = "C-2019 Q4 Borisov Trajectory", + Type = "HttpSynchronization", + Identifier = "borisov_horizons", + Version = 1 +}) + +local C2019Q4BorisovTrail = { + Identifier = "C2019Q4BorisovTrail", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = trajectory .. "/horizons_c2019q4borisov.dat" + }, + Color = { 0.9, 0.9, 0.0 }, + StartTime = "2015 JAN 01 00:00:00", + EndTime = "2024 JAN 01 00:00:00", + SampleInterval = 60 * 60 * 24 * 7 + }, + GUI = { + Name = "C-2019 Q4 Borisov Trail", + Path = "/Solar System/Interstellar" + } +} + +local C2019Q4BorisovPosition = { + Identifier = "C2019Q4BorisovPosition", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = trajectory .. "/horizons_c2019q4borisov.dat" + }, + }, + GUI = { + Name = "C-2019 Q4 Borisov", + Path = "/Solar System/Interstellar" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { C2019Q4BorisovPosition, C2019Q4BorisovTrail }) diff --git a/data/assets/scene/solarsystem/interstellar/oumuamua.asset b/data/assets/scene/solarsystem/interstellar/oumuamua.asset new file mode 100644 index 0000000000..2b972b5c3a --- /dev/null +++ b/data/assets/scene/solarsystem/interstellar/oumuamua.asset @@ -0,0 +1,47 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local trajectory = asset.syncedResource({ + Name = "'Oumuamua Trajectory", + Type = "HttpSynchronization", + Identifier = "oumuamua_horizons", + Version = 1 +}) + +local OumuamuaTrail = { + Identifier = "OumuamuaTrail", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = trajectory .. "/horizons_oumuamua.dat" + }, + Color = { 0.9, 0.9, 0.0 }, + StartTime = "2014 JAN 01 00:00:00", + EndTime = "2023 JAN 01 00:00:00", + SampleInterval = 7000, + TimeStampSubsampleFactor = 1 + }, + GUI = { + Name = "'Oumuamua Trail", + Path = "/Solar System/Interstellar" + } +} + +local OumuamuaPosition = { + Identifier = "OumuamuaPosition", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = trajectory .. "/horizons_oumuamua.dat" + }, + }, + GUI = { + Name = "'Oumuamua", + Path = "/Solar System/Interstellar" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { OumuamuaPosition, OumuamuaTrail }) diff --git a/data/assets/scene/solarsystem/missions/apollo/11/apollo11.asset b/data/assets/scene/solarsystem/missions/apollo/11/apollo11.asset new file mode 100644 index 0000000000..c65cd3c47a --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/11/apollo11.asset @@ -0,0 +1,234 @@ +local asset_helper = asset.require('util/asset_helper') +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') +local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon') + +local descentKeyframes = asset.require('./lem_descent.asset') +local descentRotationKeyframes = asset.require('./lem_descent_rotation.asset') + +local lem_model = asset.require('scene/solarsystem/missions/apollo/lem_model') +local kernels = asset.require('./kernels').kernels + +local models = asset.require('./models').models + +asset.require('spice/base') + +--landing - 1969-07-20T20:17:40 +local apolloSpiceId = "-911" +local apolloLemSpiceId = "-911500" + +local Apollo11Position = { + Identifier = "Apollo11Position", + Parent = moon_transforms.Moon.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1969 JUL 19 19:38:29.183", + End = "1969 JUL 22 04:55:35.183" + }, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = apolloSpiceId, + Observer = "MOON", + Frame = "MOON_ME", + Kernels = kernels + }, + }, + GUI = { + Hidden = true, + Name = "Apollo 11", + Path = "/Solar System/Missions/Apollo/11" + } +} + +local Apollo11Model = { + Identifier = "Apollo11", + Parent = Apollo11Position.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1969 JUL 19 19:38:29.183", + End = "1969 JUL 22 04:55:35.183" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 20.0 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_double_size.obj" + }, + ColorTexture = models .. "/gray.png", + LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier) + }, + GUI = { + Name = "Apollo 11 CSM", + Path = "/Solar System/Missions/Apollo/11" + } +} + +local Apollo11MoonTrail = { + Identifier = "Apollo11MoonTrail", + Parent = moon_transforms.Moon.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = apolloSpiceId, + Observer = "MOON", + Frame = "IAU_MOON", + Kernels = kernels + }, + Color = { 0.180000,0.510000,0.750000 }, + StartTime = "1969 JUL 19 19:38:29.183", + EndTime = "1969 JUL 22 04:55:35.183", + SampleInterval = 60, + EnableFade = false, + Enabled = false + }, + GUI = { + Name = "Apollo 11 Moon Orbits", + Path = "/Solar System/Missions/Apollo/11" + } +} + + +local lemTranslation = { + Type = "TimelineTranslation", + Keyframes = { + -- 20:14:30 is an arbitrary cutoff, but last 4 minutes data in descentKeyframes + -- begins at 20.14.40. Due to linear interpolation, we will get + -- a 10s linear transition to the location where the descentKeyframes start. + ['1969 JUL 20 20:14:30'] = { + Type = "SpiceTranslation", + Target = apolloLemSpiceId, + Observer = "MOON", + Frame = "IAU_MOON", + Kernels = kernels + }, + ['1969 JUL 20 20:14:40'] = { + Type = "TimelineTranslation", + Keyframes = descentKeyframes.keyframes + } + } +} + +local lemRotation = { + Type = "TimelineRotation", + Keyframes = descentRotationKeyframes.keyframes +} + + + +local Apollo11LemTrail = { + Identifier = "Apollo11LemTrail", + Parent = moon_transforms.Moon.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = lemTranslation, + Color = { 0.780000,0.940000,0.340000 }, + StartTime = "1969 JUL 20 19:10:25.183", + EndTime = "1969 JUL 20 20:17:46.183", + SampleInterval = 2, + EnableFade = false, + Enabled = false, + }, + GUI = { + Name = "Apollo 11 Lunar Lander Trail", + Path = "/Solar System/Missions/Apollo/11" + } +} + +local Apollo11LemPosition = { + Identifier = "Apollo11LemPosition", + Parent = moon_transforms.Moon.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1969 JUL 20 19:10:25.183" + }, + Transform = { + Translation = lemTranslation, + Rotation = lemRotation + }, + GUI = { + Name = "Apollo 11 Lunar Lander Position", + Path = "/Solar System/Missions/Apollo/11" + } +} +--landing - 1969-07-20T20:17:40 + +local Apollo11LemDescentModel = { + Identifier = "Apollo11LemDescentModel", + Parent = Apollo11LemPosition.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1969 JUL 19 19:38:29.183", + End = "1969 JUL 20 20:17:40.0" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.24 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = lem_model.modelFolder .. "/lmremoved.obj" + }, + SpecularIntensity = 0.0, + RotationVector = { 273.750,28.0,309.85 }, + ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg", + LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier) + }, + GUI = { + Name = "Apollo 11 Descent Lem", + Path = "/Solar System/Missions/Apollo/11" + } +} + +local Apollo11LemLandedModel = { + Identifier = "Apollo11LemLandedModel", + Parent = Apollo11LemPosition.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1969 JUL 20 20:17:40.0" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.24 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj" + }, + SpecularIntensity = 0.0, + RotationVector = { 273.750,28.0,309.85 }, + ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg", + LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier) + }, + GUI = { + Name = "Apollo 11 Landed Lem", + Path = "/Solar System/Missions/Apollo/11" + } +} + + +local exportList = { + Apollo11Position, + Apollo11LemPosition, + Apollo11Model, + Apollo11LemDescentModel, + Apollo11LemLandedModel, + Apollo11MoonTrail, + Apollo11LemTrail, +} + +asset_helper.registerSceneGraphNodesAndExport(asset, exportList) diff --git a/data/assets/scene/solarsystem/missions/apollo/11/kernels.asset b/data/assets/scene/solarsystem/missions/apollo/11/kernels.asset new file mode 100644 index 0000000000..d1ffcf55e4 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/11/kernels.asset @@ -0,0 +1,16 @@ +local kernelsFolder = asset.syncedResource({ + Name = "Apollo Kernels", + Type = "HttpSynchronization", + Identifier = "apollo_11_spice", + Version = 1 +}) + +local kernels = { + kernelsFolder .. "/moon_080317.tf", + kernelsFolder .. "/apollo_naif_ids.tf", + kernelsFolder .. "/moon_pa_de421_1900-2050.bpc", + kernelsFolder .. '/apollo11_orbits_full9km.bsp', + kernelsFolder .. '/apollo11_orbits_lm9km.bsp', +} + +asset.export('kernels', kernels) diff --git a/data/assets/scene/solarsystem/missions/apollo/11/lem.asset b/data/assets/scene/solarsystem/missions/apollo/11/lem.asset new file mode 100644 index 0000000000..0ca61edef6 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/11/lem.asset @@ -0,0 +1,53 @@ +-- a11_lem.asset +local asset_helper = asset.require('util/asset_helper') +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') +local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon') + +local lem_model = asset.require('scene/solarsystem/missions/apollo/lem_model') + + +local Apollo11Lem = { + Identifier = "Apollo11Lem", + Parent = moon_asset.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+23.47306, + Latitude = 0.67402, + Altitude = -1927.65, + UseHeightMap = false + }, + }, + GUI = { + Name = "Apollo 11 Lem Position", + Path = "/Solar System/Missions/Apollo/11" + } +} + +local Apollo11LemModel = { + Identifier = "Apollo11LemModel", + Parent = Apollo11Lem.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.24 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = lem_model.modelFolder .. "/LM-2_ver2clean.obj" + }, + RotationVector = { 91.044090,171.229706,111.666664 }, + ColorTexture = lem_model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg", + LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier) + }, + GUI = { + Name = "Apollo 11 Lem", + Path = "/Solar System/Missions/Apollo/11" + } +} + +asset_helper.registerSceneGraphNodesAndExport(asset, { Apollo11Lem, Apollo11LemModel }) diff --git a/data/assets/scene/solarsystem/missions/apollo/11/lem_descent.asset b/data/assets/scene/solarsystem/missions/apollo/11/lem_descent.asset new file mode 100644 index 0000000000..3102e6a618 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/11/lem_descent.asset @@ -0,0 +1,1834 @@ +-- The following keyframe data was converted from the_last_four_minutes_2019-06-09.kml, +-- which is available at http://apollo.mem-tek.com/GoogleMoonKMZ.html + +--[[ +In the conversion, some assumptions and simplifications were made: + * The descent markers in the KML have Point nodes expressed "relative to ground". + We assume that the ground is fixed at altitude 1927.65 meters below the reference ellipsoid, + in order to match height data from a height map constructed from LRO data. + * We manually offset the coordiantes slightly, by 0.013496003622691433 degrees in longitude and -0.007472581881668883 degrees in latitude, + in order to match the landing spot specified at long: 23.47306, lat: 0.67402 extracted from footage from LRO. + The kml file provided 23.45956399637731, lat: 0.6814925818816688 as the landing coordinates - hence the manual offset. + If more accurate height/color maps are aqcuired, these values can be adjusted by running the conversion script again. +]]-- + +local keyframes = { + ['1969-07-20T20:13:40'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.64480784327766, + Latitude = 0.6899960896998255, + Altitude = -1546.3568594681615, + UseHeightmap = false + }, + ['1969-07-20T20:13:41'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.64371058653857, + Latitude = 0.6878218095380976, + Altitude = -1565.4215164947534, + UseHeightmap = false + }, + ['1969-07-20T20:13:42'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.64182673932963, + Latitude = 0.6868724573827948, + Altitude = -1565.4215164947534, + UseHeightmap = false + }, + ['1969-07-20T20:13:43'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.64054706630478, + Latitude = 0.6858670898943581, + Altitude = -1579.0391286566048, + UseHeightmap = false + }, + ['1969-07-20T20:13:44'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.63636509003987, + Latitude = 0.6869318608730292, + Altitude = -1579.0391286566048, + UseHeightmap = false + }, + ['1969-07-20T20:13:45'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.63333610553231, + Latitude = 0.6875049989808152, + Altitude = -1584.4861735213453, + UseHeightmap = false + }, + ['1969-07-20T20:13:46'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.630258198415152, + Latitude = 0.6879251024075629, + Altitude = -1587.2096959537155, + UseHeightmap = false + }, + ['1969-07-20T20:13:47'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.62944534804935, + Latitude = 0.6868614912680597, + Altitude = -1592.656740818456, + UseHeightmap = false + }, + ['1969-07-20T20:13:48'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.62679291745059, + Latitude = 0.6859161360075229, + Altitude = -1604.9125917641222, + UseHeightmap = false + }, + ['1969-07-20T20:13:49'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.624085315638872, + Latitude = 0.685126212476227, + Altitude = -1619.8919651421588, + UseHeightmap = false + }, + ['1969-07-20T20:13:50'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.62142772795633, + Latitude = 0.6848656185526153, + Altitude = -1630.7860548716399, + UseHeightmap = false + }, + ['1969-07-20T20:13:51'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.617193313827283, + Latitude = 0.6849603490017026, + Altitude = -1630.7860548716399, + UseHeightmap = false + }, + ['1969-07-20T20:13:52'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.61543137875974, + Latitude = 0.68523470439912, + Altitude = -1629.4242936554547, + UseHeightmap = false + }, + ['1969-07-20T20:13:53'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.61158202958536, + Latitude = 0.6853852597026965, + Altitude = -1633.5095773040102, + UseHeightmap = false + }, + ['1969-07-20T20:13:54'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.60991413189263, + Latitude = 0.6852537398149626, + Altitude = -1643.041905817306, + UseHeightmap = false + }, + ['1969-07-20T20:13:55'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.607915527643012, + Latitude = 0.6853963551830907, + Altitude = -1662.106562843898, + UseHeightmap = false + }, + ['1969-07-20T20:13:56'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.605996916437142, + Latitude = 0.6830167672762936, + Altitude = -1663.4683240600832, + UseHeightmap = false + }, + ['1969-07-20T20:13:57'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.6027345854584, + Latitude = 0.6824580715414034, + Altitude = -1671.09418687072, + UseHeightmap = false + }, + ['1969-07-20T20:13:58'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.60047452065999, + Latitude = 0.6837230890353062, + Altitude = -1671.638891357194, + UseHeightmap = false + }, + ['1969-07-20T20:13:59'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.598006245556462, + Latitude = 0.6851039272779041, + Altitude = -1670.277130141009, + UseHeightmap = false + }, + ['1969-07-20T20:14:00'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.594980604909782, + Latitude = 0.6859011120513393, + Altitude = -1683.8947423028603, + UseHeightmap = false + }, + ['1969-07-20T20:14:01'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.595085912567033, + Latitude = 0.685405665002322, + Altitude = -1698.874115680897, + UseHeightmap = false + }, + ['1969-07-20T20:14:02'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.5930664955042, + Latitude = 0.6852493785380211, + Altitude = -1701.597638113267, + UseHeightmap = false + }, + ['1969-07-20T20:14:03'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.591385100243283, + Latitude = 0.6848676328581234, + Altitude = -1709.768205410378, + UseHeightmap = false + }, + ['1969-07-20T20:14:04'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.58888799865371, + Latitude = 0.6847945134519827, + Altitude = -1717.9387727074889, + UseHeightmap = false + }, + ['1969-07-20T20:14:05'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.58707895840121, + Latitude = 0.6847997274847563, + Altitude = -1720.662295139859, + UseHeightmap = false + }, + ['1969-07-20T20:14:06'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.585134523523262, + Latitude = 0.6844679679748537, + Altitude = -1726.1093400045995, + UseHeightmap = false + }, + ['1969-07-20T20:14:07'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.58309233633901, + Latitude = 0.6845115405154798, + Altitude = -1730.194623653155, + UseHeightmap = false + }, + ['1969-07-20T20:14:08'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.581800658763132, + Latitude = 0.6837790677972603, + Altitude = -1737.0034297340808, + UseHeightmap = false + }, + ['1969-07-20T20:14:09'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.580055660445762, + Latitude = 0.6831436064664251, + Altitude = -1741.0887133826361, + UseHeightmap = false + }, + ['1969-07-20T20:14:10'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.57863282556605, + Latitude = 0.6828140286921376, + Altitude = -1749.259280679747, + UseHeightmap = false + }, + ['1969-07-20T20:14:11'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.57640031861404, + Latitude = 0.6825176811105468, + Altitude = -1751.9828031121174, + UseHeightmap = false + }, + ['1969-07-20T20:14:12'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.57398679174075, + Latitude = 0.6826876185178852, + Altitude = -1750.6210418959322, + UseHeightmap = false + }, + ['1969-07-20T20:14:13'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.57156483164977, + Latitude = 0.6825035088375115, + Altitude = -1758.7916091930429, + UseHeightmap = false + }, + ['1969-07-20T20:14:14'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.568805614344672, + Latitude = 0.6825830127392937, + Altitude = -1764.2386540577836, + UseHeightmap = false + }, + ['1969-07-20T20:14:15'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.56712274763365, + Latitude = 0.6821390846562359, + Altitude = -1764.2386540577836, + UseHeightmap = false + }, + ['1969-07-20T20:14:16'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.56530723506546, + Latitude = 0.6815597518028071, + Altitude = -1772.4092213548943, + UseHeightmap = false + }, + ['1969-07-20T20:14:17'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.56412162578659, + Latitude = 0.6811736246098009, + Altitude = -1773.7709825710795, + UseHeightmap = false + }, + ['1969-07-20T20:14:18'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.56276962682385, + Latitude = 0.6808738576281527, + Altitude = -1779.2180274358202, + UseHeightmap = false + }, + ['1969-07-20T20:14:19'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.560994966586822, + Latitude = 0.6806433210749815, + Altitude = -1781.9415498681901, + UseHeightmap = false + }, + ['1969-07-20T20:14:20'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.55943927760013, + Latitude = 0.680762500394614, + Altitude = -1788.7503559491158, + UseHeightmap = false + }, + ['1969-07-20T20:14:21'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.55808185917876, + Latitude = 0.6806932677701746, + Altitude = -1788.205651462642, + UseHeightmap = false + }, + ['1969-07-20T20:14:22'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.556393791415733, + Latitude = 0.6811207130416086, + Altitude = -1791.4738783814862, + UseHeightmap = false + }, + ['1969-07-20T20:14:23'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.55496480157647, + Latitude = 0.6814204204715102, + Altitude = -1792.8356395976714, + UseHeightmap = false + }, + ['1969-07-20T20:14:24'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.55306742293409, + Latitude = 0.6817752241315425, + Altitude = -1795.5591620300418, + UseHeightmap = false + }, + ['1969-07-20T20:14:25'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.55137129589691, + Latitude = 0.6815869620825672, + Altitude = -1802.3679681109675, + UseHeightmap = false + }, + ['1969-07-20T20:14:26'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.54977453252549, + Latitude = 0.681089420496018, + Altitude = -1805.0914905433376, + UseHeightmap = false + }, + ['1969-07-20T20:14:27'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.548083879890072, + Latitude = 0.6807962459602379, + Altitude = -1807.8150129757078, + UseHeightmap = false + }, + ['1969-07-20T20:14:28'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.546540200146502, + Latitude = 0.6805000865197504, + Altitude = -1810.5385354080781, + UseHeightmap = false + }, + ['1969-07-20T20:14:29'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.54516644867878, + Latitude = 0.6804026508636472, + Altitude = -1815.9855802728187, + UseHeightmap = false + }, + ['1969-07-20T20:14:30'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.54408346592703, + Latitude = 0.6805503084088244, + Altitude = -1817.3473414890038, + UseHeightmap = false + }, + ['1969-07-20T20:14:31'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.54339758182375, + Latitude = 0.6804859303352504, + Altitude = -1818.709102705189, + UseHeightmap = false + }, + ['1969-07-20T20:14:32'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.54194570925206, + Latitude = 0.6803064377127922, + Altitude = -1821.4326251375592, + UseHeightmap = false + }, + ['1969-07-20T20:14:33'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.54085221251783, + Latitude = 0.6801546546560774, + Altitude = -1824.9732042996407, + UseHeightmap = false + }, + ['1969-07-20T20:14:34'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.53954140597472, + Latitude = 0.6797325898259152, + Altitude = -1827.696726732011, + UseHeightmap = false + }, + ['1969-07-20T20:14:35'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.537934104316932, + Latitude = 0.679569186740729, + Altitude = -1831.7820103805664, + UseHeightmap = false + }, + ['1969-07-20T20:14:36'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.53689199133522, + Latitude = 0.6794114031790662, + Altitude = -1833.6884760832256, + UseHeightmap = false + }, + ['1969-07-20T20:14:37'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.53536814560564, + Latitude = 0.6791732992510942, + Altitude = -1836.9567030020698, + UseHeightmap = false + }, + ['1969-07-20T20:14:38'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.53395331216349, + Latitude = 0.6792039275673737, + Altitude = -1839.4078731912032, + UseHeightmap = false + }, + ['1969-07-20T20:14:39'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.53275788877434, + Latitude = 0.6790059399149831, + Altitude = -1840.497282164151, + UseHeightmap = false + }, + ['1969-07-20T20:14:40'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.531279977460432, + Latitude = 0.6788794363528592, + Altitude = -1844.5825658127067, + UseHeightmap = false + }, + ['1969-07-20T20:14:41'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.52959475512685, + Latitude = 0.6788906739797406, + Altitude = -1845.9443270288918, + UseHeightmap = false + }, + ['1969-07-20T20:14:42'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.52769228385669, + Latitude = 0.6787279693068425, + Altitude = -1848.123144974788, + UseHeightmap = false + }, + ['1969-07-20T20:14:43'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.52685377337869, + Latitude = 0.6787634478561919, + Altitude = -1850.8466674071583, + UseHeightmap = false + }, + ['1969-07-20T20:14:44'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.526284004538702, + Latitude = 0.6785694853441325, + Altitude = -1853.0254853530546, + UseHeightmap = false + }, + ['1969-07-20T20:14:45'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.5258419320743, + Latitude = 0.6784720829848033, + Altitude = -1852.2084286233435, + UseHeightmap = false + }, + ['1969-07-20T20:14:46'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.524906401275462, + Latitude = 0.6784174518581257, + Altitude = -1855.7490077854247, + UseHeightmap = false + }, + ['1969-07-20T20:14:47'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.52349915098792, + Latitude = 0.6782893729810321, + Altitude = -1857.383121244847, + UseHeightmap = false + }, + ['1969-07-20T20:14:48'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.522315823805602, + Latitude = 0.6780556991046269, + Altitude = -1859.5619391907433, + UseHeightmap = false + }, + ['1969-07-20T20:14:49'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.52101739233993, + Latitude = 0.6779647310824661, + Altitude = -1862.2854616231134, + UseHeightmap = false + }, + ['1969-07-20T20:14:50'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.51994166433182, + Latitude = 0.6778711676787862, + Altitude = -1864.7366318122467, + UseHeightmap = false + }, + ['1969-07-20T20:14:51'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.51898851685442, + Latitude = 0.6778817565177891, + Altitude = -1866.643097514906, + UseHeightmap = false + }, + ['1969-07-20T20:14:52'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.51808183367586, + Latitude = 0.6778718533214779, + Altitude = -1868.821915460802, + UseHeightmap = false + }, + ['1969-07-20T20:14:53'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.517315195124922, + Latitude = 0.6777409244088132, + Altitude = -1869.6389721905132, + UseHeightmap = false + }, + ['1969-07-20T20:14:54'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.516423288093712, + Latitude = 0.6776383502937863, + Altitude = -1872.0901423796465, + UseHeightmap = false + }, + ['1969-07-20T20:14:55'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.515618488386473, + Latitude = 0.6775904175972421, + Altitude = -1873.7242558390685, + UseHeightmap = false + }, + ['1969-07-20T20:14:56'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.514931748492103, + Latitude = 0.677451729714544, + Altitude = -1875.0860170552537, + UseHeightmap = false + }, + ['1969-07-20T20:14:57'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.5141592094038, + Latitude = 0.6774090469390076, + Altitude = -1876.1754260282019, + UseHeightmap = false + }, + ['1969-07-20T20:14:58'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.513268517407862, + Latitude = 0.677380792748438, + Altitude = -1878.3542439740982, + UseHeightmap = false + }, + ['1969-07-20T20:14:59'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.51249864236425, + Latitude = 0.6773301671802587, + Altitude = -1878.8989484605722, + UseHeightmap = false + }, + ['1969-07-20T20:15:00'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.511670817073732, + Latitude = 0.6773498341149018, + Altitude = -1879.9883574335202, + UseHeightmap = false + }, + ['1969-07-20T20:15:01'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.510927468201952, + Latitude = 0.6773124695718212, + Altitude = -1881.0777664064683, + UseHeightmap = false + }, + ['1969-07-20T20:15:02'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.510140364179833, + Latitude = 0.6772452153026853, + Altitude = -1882.9842321091276, + UseHeightmap = false + }, + ['1969-07-20T20:15:03'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50940612514804, + Latitude = 0.6772084204274821, + Altitude = -1884.3459933253127, + UseHeightmap = false + }, + ['1969-07-20T20:15:04'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.508556629045042, + Latitude = 0.6771417022964165, + Altitude = -1885.1630500550239, + UseHeightmap = false + }, + ['1969-07-20T20:15:05'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.5078270022667, + Latitude = 0.6770996409435569, + Altitude = -1885.707754541498, + UseHeightmap = false + }, + ['1969-07-20T20:15:06'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50712374883535, + Latitude = 0.6770942256987497, + Altitude = -1886.7971635144459, + UseHeightmap = false + }, + ['1969-07-20T20:15:07'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50638631083077, + Latitude = 0.6770208020089364, + Altitude = -1888.158924730631, + UseHeightmap = false + }, + ['1969-07-20T20:15:08'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50572166907488, + Latitude = 0.6769421116864789, + Altitude = -1888.431276973868, + UseHeightmap = false + }, + ['1969-07-20T20:15:09'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.505080467779102, + Latitude = 0.6769068207439769, + Altitude = -1889.5206859468162, + UseHeightmap = false + }, + ['1969-07-20T20:15:10'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.504394828536693, + Latitude = 0.6768437996516232, + Altitude = -1890.6100949197644, + UseHeightmap = false + }, + ['1969-07-20T20:15:11'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50370057106609, + Latitude = 0.6767452474349132, + Altitude = -1891.9718561359496, + UseHeightmap = false + }, + ['1969-07-20T20:15:12'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.503056349392182, + Latitude = 0.6766723806693259, + Altitude = -1893.3336173521345, + UseHeightmap = false + }, + ['1969-07-20T20:15:13'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50246925266341, + Latitude = 0.6766252349202276, + Altitude = -1893.8783218386086, + UseHeightmap = false + }, + ['1969-07-20T20:15:14'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50184956306549, + Latitude = 0.6765535257068991, + Altitude = -1894.9677308115567, + UseHeightmap = false + }, + ['1969-07-20T20:15:15'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.501422630419572, + Latitude = 0.6765112802947014, + Altitude = -1894.1506740818456, + UseHeightmap = false + }, + ['1969-07-20T20:15:16'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50104221348722, + Latitude = 0.676487362071662, + Altitude = -1893.8783218386086, + UseHeightmap = false + }, + ['1969-07-20T20:15:17'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50076948252455, + Latitude = 0.6764658967447386, + Altitude = -1892.2442083791866, + UseHeightmap = false + }, + ['1969-07-20T20:15:18'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.50013364513089, + Latitude = 0.6764482060496164, + Altitude = -1893.3336173521345, + UseHeightmap = false + }, + ['1969-07-20T20:15:19'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.499460285339502, + Latitude = 0.6764309028737, + Altitude = -1894.9677308115567, + UseHeightmap = false + }, + ['1969-07-20T20:15:20'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.498899330647752, + Latitude = 0.6763755753041285, + Altitude = -1896.057139784505, + UseHeightmap = false + }, + ['1969-07-20T20:15:21'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.49826864115494, + Latitude = 0.6763489810183512, + Altitude = -1896.601844270979, + UseHeightmap = false + }, + ['1969-07-20T20:15:22'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.49765193973772, + Latitude = 0.6763177659437667, + Altitude = -1897.41890100069, + UseHeightmap = false + }, + ['1969-07-20T20:15:23'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.49706547748806, + Latitude = 0.6762368192356724, + Altitude = -1898.2359577304012, + UseHeightmap = false + }, + ['1969-07-20T20:15:24'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.496489420526313, + Latitude = 0.676209886695223, + Altitude = -1899.053014460112, + UseHeightmap = false + }, + ['1969-07-20T20:15:25'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.495878153012562, + Latitude = 0.6761763249034947, + Altitude = -1900.1424234330602, + UseHeightmap = false + }, + ['1969-07-20T20:15:26'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.4953425244022, + Latitude = 0.6761311089575274, + Altitude = -1901.5041846492454, + UseHeightmap = false + }, + ['1969-07-20T20:15:27'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.494725217962213, + Latitude = 0.6761017566851846, + Altitude = -1902.5935936221936, + UseHeightmap = false + }, + ['1969-07-20T20:15:28'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.494112443564592, + Latitude = 0.6760842983575135, + Altitude = -1903.4106503519047, + UseHeightmap = false + }, + ['1969-07-20T20:15:29'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.493537644480202, + Latitude = 0.6760386448926926, + Altitude = -1903.9553548383788, + UseHeightmap = false + }, + ['1969-07-20T20:15:30'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.49299719757025, + Latitude = 0.6760147528943234, + Altitude = -1903.9553548383788, + UseHeightmap = false + }, + ['1969-07-20T20:15:31'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.492415313069813, + Latitude = 0.6759919962423392, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:32'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.491877755110142, + Latitude = 0.6759640721591937, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:33'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.49128819308786, + Latitude = 0.6759491077295323, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:34'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.49073158429634, + Latitude = 0.6759379383686839, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:35'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.490174891596332, + Latitude = 0.6759054634588104, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:36'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.489635065407523, + Latitude = 0.6758939648884956, + Altitude = -1904.5000593248528, + UseHeightmap = false + }, + ['1969-07-20T20:15:37'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.4891060535486, + Latitude = 0.6759004097281942, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:38'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48855436619652, + Latitude = 0.6758862600165565, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:39'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.488052711552413, + Latitude = 0.6758544116957282, + Altitude = -1904.5000593248528, + UseHeightmap = false + }, + ['1969-07-20T20:15:40'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48754943516269, + Latitude = 0.6758316193430558, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:41'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.487094304824993, + Latitude = 0.6758175052522961, + Altitude = -1904.2277070816158, + UseHeightmap = false + }, + ['1969-07-20T20:15:42'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.486618165034592, + Latitude = 0.6757757367756437, + Altitude = -1904.7724115680899, + UseHeightmap = false + }, + ['1969-07-20T20:15:43'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48604740534131, + Latitude = 0.675733428263931, + Altitude = -1905.3171160545637, + UseHeightmap = false + }, + ['1969-07-20T20:15:44'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48548248435554, + Latitude = 0.6756797157749009, + Altitude = -1905.8618205410378, + UseHeightmap = false + }, + ['1969-07-20T20:15:45'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48494957486896, + Latitude = 0.6756120527881188, + Altitude = -1905.8618205410378, + UseHeightmap = false + }, + ['1969-07-20T20:15:46'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.484598386683622, + Latitude = 0.675584857481579, + Altitude = -1907.49593400046, + UseHeightmap = false + }, + ['1969-07-20T20:15:47'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.4841269963268, + Latitude = 0.6755482784409179, + Altitude = -1908.040638486934, + UseHeightmap = false + }, + ['1969-07-20T20:15:48'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48373390336955, + Latitude = 0.6754890811171497, + Altitude = -1908.8576952166452, + UseHeightmap = false + }, + ['1969-07-20T20:15:49'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48325134882829, + Latitude = 0.6754258626149947, + Altitude = -1908.4491668517896, + UseHeightmap = false + }, + ['1969-07-20T20:15:50'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48284574619883, + Latitude = 0.6753753196460469, + Altitude = -1909.1300474598822, + UseHeightmap = false + }, + ['1969-07-20T20:15:51'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48245362823393, + Latitude = 0.6753264776464533, + Altitude = -1909.4023997031193, + UseHeightmap = false + }, + ['1969-07-20T20:15:52'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.482060114185842, + Latitude = 0.6752749804130574, + Altitude = -1909.6747519463563, + UseHeightmap = false + }, + ['1969-07-20T20:15:53'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.481698202127482, + Latitude = 0.675223605520775, + Altitude = -1909.6747519463563, + UseHeightmap = false + }, + ['1969-07-20T20:15:54'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48129046365451, + Latitude = 0.6751730022703166, + Altitude = -1909.6747519463563, + UseHeightmap = false + }, + ['1969-07-20T20:15:55'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.480893026154902, + Latitude = 0.6751376710849429, + Altitude = -1909.6747519463563, + UseHeightmap = false + }, + ['1969-07-20T20:15:56'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48059324160945, + Latitude = 0.6750772226256051, + Altitude = -1909.6747519463563, + UseHeightmap = false + }, + ['1969-07-20T20:15:57'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48034984354739, + Latitude = 0.6750430267458865, + Altitude = -1909.6747519463563, + UseHeightmap = false + }, + ['1969-07-20T20:15:58'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.48005268645993, + Latitude = 0.6750019848756621, + Altitude = -1909.6747519463563, + UseHeightmap = false + }, + ['1969-07-20T20:15:59'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47978070153665, + Latitude = 0.6749655364121049, + Altitude = -1909.9471041895933, + UseHeightmap = false + }, + ['1969-07-20T20:16:00'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47951311851127, + Latitude = 0.6749420304945992, + Altitude = -1909.9471041895933, + UseHeightmap = false + }, + ['1969-07-20T20:16:01'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47927978098579, + Latitude = 0.6748989409040068, + Altitude = -1909.9471041895933, + UseHeightmap = false + }, + ['1969-07-20T20:16:02'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47904250519933, + Latitude = 0.6748472712728636, + Altitude = -1910.4918086760674, + UseHeightmap = false + }, + ['1969-07-20T20:16:03'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47879202998348, + Latitude = 0.674809514541568, + Altitude = -1910.7641609193045, + UseHeightmap = false + }, + ['1969-07-20T20:16:04'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.478567222437622, + Latitude = 0.6747692774477394, + Altitude = -1910.7641609193045, + UseHeightmap = false + }, + ['1969-07-20T20:16:05'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47836548542964, + Latitude = 0.6747160116119115, + Altitude = -1910.7641609193045, + UseHeightmap = false + }, + ['1969-07-20T20:16:06'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47818769774975, + Latitude = 0.6746866473279819, + Altitude = -1911.3088654057785, + UseHeightmap = false + }, + ['1969-07-20T20:16:07'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.477896613823983, + Latitude = 0.6746547793250971, + Altitude = -1913.2153311084376, + UseHeightmap = false + }, + ['1969-07-20T20:16:08'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47781195503974, + Latitude = 0.6746276583132307, + Altitude = -1913.2153311084376, + UseHeightmap = false + }, + ['1969-07-20T20:16:09'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.477664452707373, + Latitude = 0.6746112868414526, + Altitude = -1914.0323878381487, + UseHeightmap = false + }, + -- ['1969-07-20T20:16:10'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.477750217762413, + -- Latitude = 0.6745910947360472, + -- Altitude = -1912.6706266219635, + -- UseHeightmap = false + -- }, + -- ['1969-07-20T20:16:11'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.477590925415402, + -- Latitude = 0.6745598993839581, + -- Altitude = -1912.6706266219635, + -- UseHeightmap = false + -- }, + -- ['1969-07-20T20:16:12'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47745952757753, + -- Latitude = 0.6745298610932787, + -- Altitude = -1912.6706266219635, + -- UseHeightmap = false + -- }, + -- ['1969-07-20T20:16:13'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.477271343369093, + -- Latitude = 0.6745166392893209, + -- Altitude = -1913.2153311084376, + -- UseHeightmap = false + -- }, + -- ['1969-07-20T20:16:14'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.477100932665042, + -- Latitude = 0.6744937499451563, + -- Altitude = -1914.3047400813857, + -- UseHeightmap = false + -- }, + ['1969-07-20T20:16:15'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47697690593997, + Latitude = 0.6744644602883288, + Altitude = -1914.8494445678598, + UseHeightmap = false + }, + ['1969-07-20T20:16:16'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.476842953277412, + Latitude = 0.6744457159538018, + Altitude = -1915.1217968110968, + UseHeightmap = false + }, + ['1969-07-20T20:16:17'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.476774052091812, + Latitude = 0.6744243634139203, + Altitude = -1914.8494445678598, + UseHeightmap = false + }, + ['1969-07-20T20:16:18'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47665204889191, + Latitude = 0.6743981221140924, + Altitude = -1915.1217968110968, + UseHeightmap = false + }, + ['1969-07-20T20:16:19'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47657652039885, + Latitude = 0.6743808573601865, + Altitude = -1915.1217968110968, + UseHeightmap = false + }, + ['1969-07-20T20:16:20'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.476475036022492, + Latitude = 0.6743552389834175, + Altitude = -1914.8494445678598, + UseHeightmap = false + }, + ['1969-07-20T20:16:21'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47638671770867, + Latitude = 0.6743412077411113, + Altitude = -1915.3941490543339, + UseHeightmap = false + }, + ['1969-07-20T20:16:22'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.476286834646782, + Latitude = 0.6743241644041175, + Altitude = -1915.3941490543339, + UseHeightmap = false + }, + ['1969-07-20T20:16:23'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47623840477727, + Latitude = 0.6743121023448013, + Altitude = -1915.3941490543339, + UseHeightmap = false + }, + ['1969-07-20T20:16:24'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.476125794037742, + Latitude = 0.6743019779643423, + Altitude = -1915.938853540808, + UseHeightmap = false + }, + ['1969-07-20T20:16:25'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47604582826371, + Latitude = 0.6742984062330349, + Altitude = -1916.211205784045, + UseHeightmap = false + }, + ['1969-07-20T20:16:26'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47599605084473, + Latitude = 0.6742864748966985, + Altitude = -1916.211205784045, + UseHeightmap = false + }, + ['1969-07-20T20:16:27'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47598166921822, + Latitude = 0.6742856341308172, + Altitude = -1916.755910270519, + UseHeightmap = false + }, + -- ['1969-07-20T20:16:28'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47600003592791, + -- Latitude = 0.6742816108377042, + -- Altitude = -1916.211205784045, + -- UseHeightmap = false + -- }, + -- ['1969-07-20T20:16:29'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47593990066764, + -- Latitude = 0.6742699316275284, + -- Altitude = -1916.483558027282, + -- UseHeightmap = false + -- }, + ['1969-07-20T20:16:30'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47587957412098, + Latitude = 0.6742661771136219, + Altitude = -1916.755910270519, + UseHeightmap = false + }, + ['1969-07-20T20:16:31'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47579282136856, + Latitude = 0.6742214263433656, + Altitude = -1917.028262513756, + UseHeightmap = false + }, + ['1969-07-20T20:16:32'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47571834266516, + Latitude = 0.6741885448706321, + Altitude = -1917.5729670002302, + UseHeightmap = false + }, + -- ['1969-07-20T20:16:33'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47569457676149, + -- Latitude = 0.6741859152655852, + -- Altitude = -1917.3006147569931, + -- UseHeightmap = false + -- }, + ['1969-07-20T20:16:34'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47557041293751, + Latitude = 0.6741798073326593, + Altitude = -1918.117671486704, + UseHeightmap = false + }, + ['1969-07-20T20:16:35'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.475475681892203, + Latitude = 0.6741822414281841, + Altitude = -1918.117671486704, + UseHeightmap = false + }, + ['1969-07-20T20:16:36'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47541533097675, + Latitude = 0.6742009046793005, + Altitude = -1918.390023729941, + UseHeightmap = false + }, + ['1969-07-20T20:16:37'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47532207549478, + Latitude = 0.6742269926054295, + Altitude = -1918.662375973178, + UseHeightmap = false + }, + ['1969-07-20T20:16:38'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47522251798864, + Latitude = 0.6742695236577596, + Altitude = -1918.662375973178, + UseHeightmap = false + }, + ['1969-07-20T20:16:39'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47513564425997, + Latitude = 0.6742809051574165, + Altitude = -1918.662375973178, + UseHeightmap = false + }, + ['1969-07-20T20:16:40'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47498810518855, + Latitude = 0.6743095342428154, + Altitude = -1920.2964894326003, + UseHeightmap = false + }, + -- ['1969-07-20T20:16:41'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47489523759891, + -- Latitude = 0.6743154022599566, + -- Altitude = -1920.0241371893633, + -- UseHeightmap = false + -- }, + -- ['1969-07-20T20:16:42'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47479438729774, + -- Latitude = 0.6743324078003049, + -- Altitude = -1920.2964894326003, + -- UseHeightmap = false + -- }, + -- ['1969-07-20T20:16:43'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47475788126512, + -- Latitude = 0.674345583979325, + -- Altitude = -1920.0241371893633, + -- UseHeightmap = false + -- }, + ['1969-07-20T20:16:44'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.474678823712882, + Latitude = 0.6743691203511213, + Altitude = -1920.2964894326003, + UseHeightmap = false + }, + ['1969-07-20T20:16:45'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47460302474115, + Latitude = 0.6743890347121807, + Altitude = -1920.2964894326003, + UseHeightmap = false + }, + ['1969-07-20T20:16:46'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47450130965027, + Latitude = 0.6744202280781089, + Altitude = -1920.8411939190744, + UseHeightmap = false + }, + ['1969-07-20T20:16:47'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.474379586340042, + Latitude = 0.6744490653475903, + Altitude = -1921.1135461623114, + UseHeightmap = false + }, + ['1969-07-20T20:16:48'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47431921657337, + Latitude = 0.6745028925523043, + Altitude = -1921.1135461623114, + UseHeightmap = false + }, + ['1969-07-20T20:16:49'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47424698504895, + Latitude = 0.6745115395661241, + Altitude = -1921.1135461623114, + UseHeightmap = false + }, + ['1969-07-20T20:16:50'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.474158028620153, + Latitude = 0.6745268900936557, + Altitude = -1921.6582506487855, + UseHeightmap = false + }, + ['1969-07-20T20:16:51'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47408003386958, + Latitude = 0.674531434078838, + Altitude = -1921.6582506487855, + UseHeightmap = false + }, + ['1969-07-20T20:16:52'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473993195514502, + Latitude = 0.6745434127092755, + Altitude = -1921.9306028920225, + UseHeightmap = false + }, + -- ['1969-07-20T20:16:53'] = { + -- Type = "GlobeTranslation", + -- Globe = "Moon", + -- Longitude = 23.47392353665608, + -- Latitude = 0.6745464032805983, + -- Altitude = -1922.2029551352596, + -- UseHeightmap = false + -- }, + ['1969-07-20T20:16:54'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47388537487237, + Latitude = 0.674552865152663, + Altitude = -1921.9306028920225, + UseHeightmap = false + }, + ['1969-07-20T20:16:55'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47382957912373, + Latitude = 0.6745443566727537, + Altitude = -1921.9306028920225, + UseHeightmap = false + }, + ['1969-07-20T20:16:56'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47378652829031, + Latitude = 0.6745361955127924, + Altitude = -1921.6582506487855, + UseHeightmap = false + }, + ['1969-07-20T20:16:57'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473741159081282, + Latitude = 0.6745139398577651, + Altitude = -1921.6582506487855, + UseHeightmap = false + }, + ['1969-07-20T20:16:58'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473674434325403, + Latitude = 0.6745046665169872, + Altitude = -1922.2029551352596, + UseHeightmap = false + }, + ['1969-07-20T20:16:59'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47366202033169, + Latitude = 0.6744553774680945, + Altitude = -1922.2029551352596, + UseHeightmap = false + }, + ['1969-07-20T20:17:00'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47360771579434, + Latitude = 0.6744345598586292, + Altitude = -1922.7476596217336, + UseHeightmap = false + }, + ['1969-07-20T20:17:01'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47357090816817, + Latitude = 0.6744054827778567, + Altitude = -1923.0200118649707, + UseHeightmap = false + }, + ['1969-07-20T20:17:02'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47354290217646, + Latitude = 0.6743765403194303, + Altitude = -1923.2923641082077, + UseHeightmap = false + }, + ['1969-07-20T20:17:03'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47354640286736, + Latitude = 0.6743332580785223, + Altitude = -1923.5647163514448, + UseHeightmap = false + }, + ['1969-07-20T20:17:04'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473541367503802, + Latitude = 0.6742974556070759, + Altitude = -1923.8370685946818, + UseHeightmap = false + }, + ['1969-07-20T20:17:05'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47350854369485, + Latitude = 0.6742858449512636, + Altitude = -1924.1094208379188, + UseHeightmap = false + }, + ['1969-07-20T20:17:06'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47347424911663, + Latitude = 0.6742611487873781, + Altitude = -1924.6541253243927, + UseHeightmap = false + }, + ['1969-07-20T20:17:07'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473503629496022, + Latitude = 0.6742462694505276, + Altitude = -1924.6541253243927, + UseHeightmap = false + }, + ['1969-07-20T20:17:08'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473512768546712, + Latitude = 0.6742384048959066, + Altitude = -1924.6541253243927, + UseHeightmap = false + }, + ['1969-07-20T20:17:09'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47353343175876, + Latitude = 0.6742241072273591, + Altitude = -1924.3817730811559, + UseHeightmap = false + }, + ['1969-07-20T20:17:10'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47353316391657, + Latitude = 0.6742142580747189, + Altitude = -1925.4711820541038, + UseHeightmap = false + }, + ['1969-07-20T20:17:11'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47355774790429, + Latitude = 0.6742015107317392, + Altitude = -1924.9264775676297, + UseHeightmap = false + }, + ['1969-07-20T20:17:12'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.4735540335665, + Latitude = 0.6741800864866416, + Altitude = -1924.9264775676297, + UseHeightmap = false + }, + ['1969-07-20T20:17:13'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47353500681606, + Latitude = 0.6741617950501063, + Altitude = -1925.1988298108668, + UseHeightmap = false + }, + ['1969-07-20T20:17:14'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47350664772458, + Latitude = 0.6741447111551033, + Altitude = -1925.4711820541038, + UseHeightmap = false + }, + ['1969-07-20T20:17:15'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473494757982273, + Latitude = 0.6741430011390509, + Altitude = -1925.4711820541038, + UseHeightmap = false + }, + ['1969-07-20T20:17:16'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473485349949943, + Latitude = 0.6741431504511513, + Altitude = -1925.4711820541038, + UseHeightmap = false + }, + ['1969-07-20T20:17:17'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473464448566723, + Latitude = 0.674141681840806, + Altitude = -1925.4711820541038, + UseHeightmap = false + }, + ['1969-07-20T20:17:18'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47344203973089, + Latitude = 0.6741518055278933, + Altitude = -1925.4711820541038, + UseHeightmap = false + }, + ['1969-07-20T20:17:19'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473416197134252, + Latitude = 0.6741705280217748, + Altitude = -1925.7435342973408, + UseHeightmap = false + }, + ['1969-07-20T20:17:20'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47339416150648, + Latitude = 0.6741799656622618, + Altitude = -1925.7435342973408, + UseHeightmap = false + }, + ['1969-07-20T20:17:21'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.4733232813815, + Latitude = 0.6741727841821631, + Altitude = -1926.288238783815, + UseHeightmap = false + }, + ['1969-07-20T20:17:24'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47324174890097, + Latitude = 0.6742091863213222, + Altitude = -1926.288238783815, + UseHeightmap = false + }, + ['1969-07-20T20:17:27'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47317556908458, + Latitude = 0.6742072669430229, + Altitude = -1926.560591027052, + UseHeightmap = false + }, + ['1969-07-20T20:17:30'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47310752310149, + Latitude = 0.6742134078571678, + Altitude = -1926.832943270289, + UseHeightmap = false + }, + ['1969-07-20T20:17:32'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.473074792306253, + Latitude = 0.6741925230045956, + Altitude = -1927.105295513526, + UseHeightmap = false + }, + ['1969-07-20T20:17:40'] = { + Type = "GlobeTranslation", + Globe = "Moon", + Longitude = 23.47306, + Latitude = 0.67402, + Altitude = -1927.65, + UseHeightmap = false + }, +}; + +asset.export('keyframes', keyframes); diff --git a/data/assets/scene/solarsystem/missions/apollo/11/lem_descent_rotation.asset b/data/assets/scene/solarsystem/missions/apollo/11/lem_descent_rotation.asset new file mode 100644 index 0000000000..2c45cb9d0f --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/11/lem_descent_rotation.asset @@ -0,0 +1,1587 @@ +asset.export('keyframes', { + -- ['1969-7-20T20:9:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3815, -0.0048, -0.4891} + -- }, + -- ['1969-7-20T20:9:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3773, 0.0042, -0.3557} + -- }, + -- ['1969-7-20T20:9:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3677, 0.0184, -0.2218} + -- }, + -- ['1969-7-20T20:9:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3606, -0.0117, -0.0861} + -- }, + -- ['1969-7-20T20:10:1'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3587, -0.0222, -0.0219} + -- }, + -- ['1969-7-20T20:10:3'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3622, -0.0207, -0.0533} + -- }, + -- ['1969-7-20T20:10:5'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3639, -0.0032, -0.0640} + -- }, + -- ['1969-7-20T20:10:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3612, 0.0178, -0.0685} + -- }, + -- ['1969-7-20T20:10:9'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3571, 0.0196, -0.0796} + -- }, + -- ['1969-7-20T20:10:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3484, 0.0029, -0.0913} + -- }, + -- ['1969-7-20T20:10:13'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3597, -0.0149, -0.0832} + -- }, + -- ['1969-7-20T20:10:15'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3587, -0.0220, -0.0679} + -- }, + -- ['1969-7-20T20:10:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3482, -0.0121, -0.0736} + -- }, + -- ['1969-7-20T20:10:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3520, -0.0098, -0.0876} + -- }, + -- ['1969-7-20T20:10:21'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3503, -0.0240, -0.0872} + -- }, + -- ['1969-7-20T20:10:25'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3470, 0.0245, -0.0545} + -- }, + -- ['1969-7-20T20:10:27'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3420, 0.0115, -0.0518} + -- }, + -- ['1969-7-20T20:10:29'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3294, -0.0153, -0.0556} + -- }, + -- ['1969-7-20T20:10:31'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3399, -0.0136, -0.0573} + -- }, + -- ['1969-7-20T20:10:33'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3459, 0.0002, -0.0569} + -- }, + -- ['1969-7-20T20:10:35'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3440, 0.0012, -0.0542} + -- }, + -- ['1969-7-20T20:10:37'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3230, -0.0096, -0.0527} + -- }, + -- ['1969-7-20T20:10:39'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2966, -0.0119, -0.0510} + -- }, + -- ['1969-7-20T20:10:41'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3146, -0.0040, -0.0504} + -- }, + -- ['1969-7-20T20:10:43'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.3355, -0.0015, -0.0514} + -- }, + -- ['1969-7-20T20:10:45'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2916, 0.0061, -0.0516} + -- }, + -- ['1969-7-20T20:10:47'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2901, -0.0257, -0.0516} + -- }, + -- ['1969-7-20T20:10:49'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2818, -0.0123, -0.0495} + -- }, + -- ['1969-7-20T20:10:51'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2682, 0.0058, -0.0477} + -- }, + -- ['1969-7-20T20:10:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2732, 0.0035, -0.0195} + -- }, + -- ['1969-7-20T20:10:54'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2740, 0.0029, 0.0123} + -- }, + -- ['1969-7-20T20:10:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2778, 0.0035, 0.0234} + -- }, + -- ['1969-7-20T20:10:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2573, 0.0069, 0.0174} + -- }, + -- ['1969-7-20T20:10:58'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2515, -0.0023, 0.0115} + -- }, + -- ['1969-7-20T20:10:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2333, -0.0092, 0.0092} + -- }, + -- ['1969-7-20T20:11:0'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2191, -0.0157, 0.0056} + -- }, + -- ['1969-7-20T20:11:1'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2246, -0.0195, 0.0029} + -- }, + -- ['1969-7-20T20:11:3'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2419, -0.0146, -0.0019} + -- }, + -- ['1969-7-20T20:11:5'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2274, -0.0054, -0.0048} + -- }, + -- ['1969-7-20T20:11:6'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2218, -0.0042, -0.0056} + -- }, + -- ['1969-7-20T20:11:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2047, 0.0010, -0.0065} + -- }, + -- ['1969-7-20T20:11:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2042, -0.0054, -0.0069} + -- }, + -- ['1969-7-20T20:11:9'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2007, -0.0100, -0.0077} + -- }, + -- ['1969-7-20T20:11:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2136, -0.0173, -0.0077} + -- }, + -- ['1969-7-20T20:11:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.2013, -0.0021, -0.0077} + -- }, + -- ['1969-7-20T20:11:13'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1928, 0.0102, -0.0056} + -- }, + -- ['1969-7-20T20:11:13'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1854, 0.0090, -0.0057} + -- }, + -- ['1969-7-20T20:11:15'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1856, -0.0075, -0.0044} + -- }, + -- ['1969-7-20T20:11:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1670, -0.0157, -0.0023} + -- }, + -- ['1969-7-20T20:11:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1599, -0.0149, 0.0012} + -- }, + -- ['1969-7-20T20:11:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1514, -0.0119, 0.0012} + -- }, + -- ['1969-7-20T20:11:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1465, -0.0094, 0.0040} + -- }, + -- ['1969-7-20T20:11:21'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1593, -0.0176, 0.0063} + -- }, + -- ['1969-7-20T20:11:23'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1712, -0.0144, 0.0132} + -- }, + -- ['1969-7-20T20:11:24'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1727, -0.0052, 0.0176} + -- }, + -- ['1969-7-20T20:11:25'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1652, 0.0083, 0.0190} + -- }, + -- ['1969-7-20T20:11:26'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1827, -0.0044, 0.0178} + -- }, + -- ['1969-7-20T20:11:27'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1942, -0.0172, 0.0180} + -- }, + -- ['1969-7-20T20:11:29'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1788, -0.0071, 0.0188} + -- }, + -- ['1969-7-20T20:11:30'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1639, 0.0035, 0.0176} + -- }, + -- ['1969-7-20T20:11:31'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1614, 0.0048, 0.0178} + -- }, + -- ['1969-7-20T20:11:31'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1551, 0.0083, 0.0169} + -- }, + -- ['1969-7-20T20:11:33'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1643, 0.0060, 0.0175} + -- }, + -- ['1969-7-20T20:11:35'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1746, 0.0006, 0.0173} + -- }, + -- ['1969-7-20T20:11:35'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1679, -0.0008, 0.0178} + -- }, + -- ['1969-7-20T20:11:37'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1735, -0.0127, 0.0173} + -- }, + -- ['1969-7-20T20:11:37'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1599, -0.0044, 0.0186} + -- }, + -- ['1969-7-20T20:11:39'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1545, 0.0012, 0.0167} + -- }, + -- ['1969-7-20T20:11:39'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1461, 0.0075, 0.0169} + -- }, + -- ['1969-7-20T20:11:41'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1470, 0.0012, 0.0155} + -- }, + -- ['1969-7-20T20:11:41'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1442, -0.0086, 0.0148} + -- }, + -- ['1969-7-20T20:11:43'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1411, -0.0236, 0.0142} + -- }, + -- ['1969-7-20T20:11:43'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1302, -0.0240, 0.0131} + -- }, + -- ['1969-7-20T20:11:45'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1098, -0.0115, 0.0140} + -- }, + -- ['1969-7-20T20:11:45'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1043, -0.0088, 0.0134} + -- }, + -- ['1969-7-20T20:11:47'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0979, -0.0025, 0.0144} + -- }, + -- ['1969-7-20T20:11:47'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1092, -0.0125, 0.0144} + -- }, + -- ['1969-7-20T20:11:49'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1175, -0.0205, 0.0146} + -- }, + -- ['1969-7-20T20:11:49'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1230, -0.0249, 0.0157} + -- }, + -- ['1969-7-20T20:11:51'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1099, -0.0119, 0.0161} + -- }, + -- ['1969-7-20T20:11:51'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.1056, -0.0071, 0.0167} + -- }, + -- ['1969-7-20T20:11:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0916, 0.0044, 0.0131} + -- }, + -- ['1969-7-20T20:11:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0901, 0.0073, 0.0111} + -- }, + -- ['1969-7-20T20:11:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0839, 0.0040, 0.0075} + -- }, + -- ['1969-7-20T20:11:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0832, 0.0015, 0.0050} + -- }, + -- ['1969-7-20T20:11:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0831, -0.0109, 0.0003} + -- }, + -- ['1969-7-20T20:11:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0812, -0.0147, -0.0009} + -- }, + -- ['1969-7-20T20:11:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0814, -0.0278, -0.0031} + -- }, + -- ['1969-7-20T20:11:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0696, -0.0224, -0.0050} + -- }, + -- ['1969-7-20T20:12:1'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0617, -0.0242, -0.0067} + -- }, + -- ['1969-7-20T20:12:1'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0508, -0.0174, -0.0075} + -- }, + -- ['1969-7-20T20:12:3'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0523, -0.0174, -0.0094} + -- }, + -- ['1969-7-20T20:12:3'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0466, -0.0117, -0.0094} + -- }, + -- ['1969-7-20T20:12:5'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0565, -0.0107, -0.0109} + -- }, + -- ['1969-7-20T20:12:5'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0559, -0.0080, -0.0109} + -- }, + -- ['1969-7-20T20:12:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0686, -0.0065, -0.0113} + -- }, + -- ['1969-7-20T20:12:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0692, -0.0082, -0.0115} + -- }, + -- ['1969-7-20T20:12:9'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0722, -0.0075, -0.0107} + -- }, + -- ['1969-7-20T20:12:9'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0707, -0.0144, -0.0113} + -- }, + -- ['1969-7-20T20:12:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0630, -0.0153, -0.0103} + -- }, + -- ['1969-7-20T20:12:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0605, -0.0261, -0.0102} + -- }, + -- ['1969-7-20T20:12:13'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0441, -0.0305, -0.0096} + -- }, + -- ['1969-7-20T20:12:13'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0427, -0.0410, -0.0086} + -- }, + -- ['1969-7-20T20:12:15'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0283, -0.0228, -0.0075} + -- }, + -- ['1969-7-20T20:12:15'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0329, -0.0178, -0.0050} + -- }, + -- ['1969-7-20T20:12:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0260, -0.0009, -0.0027} + -- }, + -- ['1969-7-20T20:12:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0404, -0.0059, -0.0004} + -- }, + -- ['1969-7-20T20:12:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0467, -0.0140, 0.0023} + -- }, + -- ['1969-7-20T20:12:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0584, -0.0220, 0.0044} + -- }, + -- ['1969-7-20T20:12:21'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0416, -0.0176, 0.0088} + -- }, + -- ['1969-7-20T20:12:21'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0370, -0.0102, 0.0104} + -- }, + -- ['1969-7-20T20:12:23'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0222, -0.0063, 0.0121} + -- }, + -- ['1969-7-20T20:12:23'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0193, 0.0006, 0.0108} + -- }, + -- ['1969-7-20T20:12:25'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0166, -0.0059, 0.0098} + -- }, + -- ['1969-7-20T20:12:25'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0164, -0.0038, 0.0092} + -- }, + -- ['1969-7-20T20:12:27'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0237, -0.0188, 0.0081} + -- }, + -- ['1969-7-20T20:12:27'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0249, -0.0199, 0.0081} + -- }, + -- ['1969-7-20T20:12:29'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0329, -0.0330, 0.0077} + -- }, + -- ['1969-7-20T20:12:29'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0209, -0.0255, 0.0079} + -- }, + -- ['1969-7-20T20:12:31'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0157, -0.0205, 0.0084} + -- }, + -- ['1969-7-20T20:12:31'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0034, -0.0159, 0.0092} + -- }, + -- ['1969-7-20T20:12:33'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0044, -0.0136, 0.0106} + -- }, + -- ['1969-7-20T20:12:33'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9963, -0.0161, 0.0096} + -- }, + -- ['1969-7-20T20:12:35'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0036, -0.0180, 0.0084} + -- }, + -- ['1969-7-20T20:12:35'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9998, -0.0253, 0.0073} + -- }, + -- ['1969-7-20T20:12:37'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0088, -0.0265, 0.0065} + -- }, + -- ['1969-7-20T20:12:37'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0105, -0.0339, 0.0065} + -- }, + -- ['1969-7-20T20:12:39'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0230, -0.0280, 0.0060} + -- }, + -- ['1969-7-20T20:12:39'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0253, -0.0282, 0.0067} + -- }, + -- ['1969-7-20T20:12:41'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0216, -0.0071, 0.0067} + -- }, + -- ['1969-7-20T20:12:42'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0118, -0.0115, 0.0079} + -- }, + -- ['1969-7-20T20:12:43'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9946, -0.0098, 0.0077} + -- }, + -- ['1969-7-20T20:12:43'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9927, -0.0172, 0.0081} + -- }, + -- ['1969-7-20T20:12:45'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9890, -0.0147, 0.0094} + -- }, + -- ['1969-7-20T20:12:45'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0046, -0.0125, 0.0094} + -- }, + -- ['1969-7-20T20:12:47'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0109, -0.0048, 0.0104} + -- }, + -- ['1969-7-20T20:12:47'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0186, -0.0057, 0.0083} + -- }, + -- ['1969-7-20T20:12:49'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9940, -0.0226, 0.0048} + -- }, + -- ['1969-7-20T20:12:49'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9861, -0.0278, 0.0023} + -- }, + -- ['1969-7-20T20:12:51'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9712, -0.0301, 0.0000} + -- }, + -- ['1969-7-20T20:12:51'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9768, -0.0176, -0.0013} + -- }, + -- ['1969-7-20T20:12:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9791, -0.0088, -0.0025} + -- }, + -- ['1969-7-20T20:12:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9890, -0.0017, -0.0036} + -- }, + -- ['1969-7-20T20:12:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9906, -0.0245, -0.0056} + -- }, + -- ['1969-7-20T20:12:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9892, -0.0303, -0.0067} + -- }, + -- ['1969-7-20T20:12:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9852, -0.0470, -0.0086} + -- }, + -- ['1969-7-20T20:12:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9837, -0.0307, -0.0088} + -- }, + -- ['1969-7-20T20:12:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9873, -0.0128, -0.0090} + -- }, + -- ['1969-7-20T20:12:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9861, 0.0010, -0.0088} + -- }, + -- ['1969-7-20T20:13:1'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9944, -0.0117, -0.0094} + -- }, + -- ['1969-7-20T20:13:1'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9900, -0.0194, -0.0100} + -- }, + -- ['1969-7-20T20:13:3'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9917, -0.0355, -0.0103} + -- }, + -- ['1969-7-20T20:13:3'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9856, -0.0395, -0.0105} + -- }, + -- ['1969-7-20T20:13:5'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9969, -0.0299, -0.0096} + -- }, + -- ['1969-7-20T20:13:5'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9965, -0.0228, -0.0088} + -- }, + -- ['1969-7-20T20:13:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-1.0015, -0.0073, -0.0075} + -- }, + -- ['1969-7-20T20:13:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9908, -0.0098, -0.0067} + -- }, + -- ['1969-7-20T20:13:9'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9814, -0.0034, -0.0057} + -- }, + -- ['1969-7-20T20:13:9'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9729, -0.0071, -0.0044} + -- }, + -- ['1969-7-20T20:13:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9716, -0.0002, -0.0029} + -- }, + -- ['1969-7-20T20:13:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9729, -0.0044, -0.0013} + -- }, + -- ['1969-7-20T20:13:13'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9793, 0.0010, 0.0006} + -- }, + -- ['1969-7-20T20:13:14'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9869, -0.0040, 0.0031} + -- }, + -- ['1969-7-20T20:13:15'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9938, -0.0031, 0.0048} + -- }, + -- ['1969-7-20T20:13:15'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9978, -0.0134, 0.0067} + -- }, + -- ['1969-7-20T20:13:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9881, -0.0334, 0.0048} + -- }, + -- ['1969-7-20T20:13:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9881, -0.0449, 0.0023} + -- }, + -- ['1969-7-20T20:13:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9756, -0.0447, -0.0015} + -- }, + -- ['1969-7-20T20:13:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9804, -0.0351, -0.0034} + -- }, + -- ['1969-7-20T20:13:21'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9769, -0.0269, -0.0052} + -- }, + -- ['1969-7-20T20:13:21'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9816, -0.0182, -0.0073} + -- }, + -- ['1969-7-20T20:13:23'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9783, -0.0192, -0.0084} + -- }, + -- ['1969-7-20T20:13:23'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9808, -0.0149, -0.0103} + -- }, + -- ['1969-7-20T20:13:25'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9771, -0.0197, -0.0117} + -- }, + -- ['1969-7-20T20:13:25'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9748, -0.0171, -0.0127} + -- }, + -- ['1969-7-20T20:13:27'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9710, -0.0197, -0.0144} + -- }, + -- ['1969-7-20T20:13:27'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9643, -0.0186, -0.0146} + -- }, + -- ['1969-7-20T20:13:29'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9616, -0.0165, -0.0159} + -- }, + -- ['1969-7-20T20:13:29'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9534, -0.0163, -0.0159} + -- }, + -- ['1969-7-20T20:13:31'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.9605, -0.0096, -0.0165} + -- }, + -- ['1969-7-20T20:13:41'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.8092, -0.0297, -0.0155} + -- }, + -- ['1969-7-20T20:13:41'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.8097, -0.0389, -0.0149} + -- }, + -- ['1969-7-20T20:13:43'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7923, -0.0358, -0.0138} + -- }, + -- ['1969-7-20T20:13:43'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7988, -0.0267, -0.0125} + -- }, + -- ['1969-7-20T20:13:45'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7909, -0.0128, -0.0094} + -- }, + -- ['1969-7-20T20:13:45'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7967, -0.0061, -0.0080} + -- }, + -- ['1969-7-20T20:13:47'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7748, -0.0207, -0.0056} + -- }, + -- ['1969-7-20T20:13:47'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7681, -0.0278, -0.0048} + -- }, + -- ['1969-7-20T20:13:49'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7574, -0.0426, -0.0027} + -- }, + -- ['1969-7-20T20:13:49'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7582, -0.0364, -0.0004} + -- }, + -- ['1969-7-20T20:13:51'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7699, -0.0324, 0.0036} + -- }, + -- ['1969-7-20T20:13:51'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7676, -0.0245, 0.0040} + -- }, + -- ['1969-7-20T20:13:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7733, -0.0194, 0.0023} + -- }, + -- ['1969-7-20T20:13:53'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7574, -0.0207, 0.0008} + -- }, + -- ['1969-7-20T20:13:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7440, -0.0310, -0.0017} + -- }, + -- ['1969-7-20T20:13:55'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7405, -0.0569, -0.0044} + -- }, + -- ['1969-7-20T20:13:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7549, -0.0587, -0.0054} + -- }, + -- ['1969-7-20T20:13:57'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7518, -0.0326, -0.0046} + -- }, + -- ['1969-7-20T20:13:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7465, 0.0040, -0.0050} + -- }, + -- ['1969-7-20T20:13:59'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.7465, 0.0113, -0.0050} + -- }, + -- ['1969-7-20T20:14:1'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6939, 0.0029, -0.0063} + -- }, + -- ['1969-7-20T20:14:2'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6912, 0.0079, -0.0079} + -- }, + -- ['1969-7-20T20:14:3'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6793, 0.0048, -0.0077} + -- }, + -- ['1969-7-20T20:14:4'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6817, 0.0090, -0.0098} + -- }, + -- ['1969-7-20T20:14:5'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6730, 0.0117, -0.0090} + -- }, + -- ['1969-7-20T20:14:6'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6684, 0.0102, -0.0096} + -- }, + -- ['1969-7-20T20:14:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6604, 0.0115, -0.0109} + -- }, + -- ['1969-7-20T20:14:7'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6418, 0.0006, -0.0098} + -- }, + -- ['1969-7-20T20:14:9'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6301, -0.0067, -0.0121} + -- }, + -- ['1969-7-20T20:14:10'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6128, -0.0142, -0.0119} + -- }, + -- ['1969-7-20T20:14:11'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6180, -0.0134, -0.0119} + -- }, + -- ['1969-7-20T20:14:12'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6249, -0.0057, -0.0121} + -- }, + -- ['1969-7-20T20:14:13'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6299, -0.0057, -0.0098} + -- }, + -- ['1969-7-20T20:14:14'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6437, -0.0009, -0.0100} + -- }, + -- ['1969-7-20T20:14:15'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6328, -0.0105, -0.0100} + -- }, + -- ['1969-7-20T20:14:16'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6285, -0.0232, -0.0088} + -- }, + -- ['1969-7-20T20:14:17'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6195, -0.0291, -0.0117} + -- }, + -- ['1969-7-20T20:14:18'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6073, -0.0374, -0.0127} + -- }, + -- ['1969-7-20T20:14:19'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.6027, -0.0362, -0.0132} + -- }, + -- ['1969-7-20T20:14:20'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5892, -0.0314, -0.0147} + -- }, + -- ['1969-7-20T20:14:21'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5829, -0.0096, -0.0157} + -- }, + -- ['1969-7-20T20:14:23'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5674, 0.0119, -0.0263} + -- }, + -- ['1969-7-20T20:14:23'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5674, 0.0261, -0.0324} + -- }, + -- ['1969-7-20T20:14:25'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5637, 0.0232, -0.0439} + -- }, + -- ['1969-7-20T20:14:26'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5670, 0.0081, -0.0525} + -- }, + -- ['1969-7-20T20:14:27'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5739, 0.0013, -0.0564} + -- }, + -- ['1969-7-20T20:14:28'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5660, -0.0021, -0.0587} + -- }, + -- ['1969-7-20T20:14:29'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5603, -0.0025, -0.0604} + -- }, + -- ['1969-7-20T20:14:30'] = { + -- Type = "StaticRotation", + -- Rotation = {-0.5394, 0.0092, -0.0562} + -- }, + ['1969-7-20T20:10:00'] = { + Type = "StaticRotation", + Rotation = {0, 0, 1.5708} + }, + ['1969-7-20T20:12:10'] = { + Type = "StaticRotation", + Rotation = {0, 0, 1.5708} + }, + ['1969-7-20T20:12:14'] = { + Type = "StaticRotation", + Rotation = {0, 0, 1.5708} + }, + ['1969-7-20T20:14:30'] = { + Type = "StaticRotation", + Rotation = {0, 0, 1.5708} + }, + + ['1969-7-20T20:14:31'] = { + Type = "StaticRotation", + Rotation = {-0.5133, 0.0131, -0.0531} + }, + ['1969-7-20T20:14:32'] = { + Type = "StaticRotation", + Rotation = {-0.5043, 0.0117, -0.0487} + }, + ['1969-7-20T20:14:33'] = { + Type = "StaticRotation", + Rotation = {-0.4893, 0.0090, -0.0447} + }, + ['1969-7-20T20:14:33'] = { + Type = "StaticRotation", + Rotation = {-0.4851, -0.0008, -0.0429} + }, + ['1969-7-20T20:14:35'] = { + Type = "StaticRotation", + Rotation = {-0.4865, -0.0057, -0.0382} + }, + ['1969-7-20T20:14:35'] = { + Type = "StaticRotation", + Rotation = {-0.4788, -0.0073, -0.0345} + }, + ['1969-7-20T20:14:37'] = { + Type = "StaticRotation", + Rotation = {-0.4824, -0.0130, -0.0307} + }, + ['1969-7-20T20:14:37'] = { + Type = "StaticRotation", + Rotation = {-0.4836, -0.0103, -0.0268} + }, + ['1969-7-20T20:14:39'] = { + Type = "StaticRotation", + Rotation = {-0.4792, -0.0121, -0.0203} + }, + ['1969-7-20T20:14:40'] = { + Type = "StaticRotation", + Rotation = {-0.4874, -0.0140, -0.0211} + }, + ['1969-7-20T20:14:41'] = { + Type = "StaticRotation", + Rotation = {-0.5030, 0.0002, -0.0209} + }, + ['1969-7-20T20:14:42'] = { + Type = "StaticRotation", + Rotation = {-0.5361, -0.0040, -0.0209} + }, + ['1969-7-20T20:14:44'] = { + Type = "StaticRotation", + Rotation = {-0.4715, -0.0040, -0.0234} + }, + ['1969-7-20T20:14:45'] = { + Type = "StaticRotation", + Rotation = {-0.4433, -0.0050, -0.0238} + }, + ['1969-7-20T20:14:46'] = { + Type = "StaticRotation", + Rotation = {-0.4280, -0.0019, -0.0268} + }, + ['1969-7-20T20:14:47'] = { + Type = "StaticRotation", + Rotation = {-0.4310, -0.0069, -0.0259} + }, + ['1969-7-20T20:14:48'] = { + Type = "StaticRotation", + Rotation = {-0.4389, -0.0147, -0.0257} + }, + ['1969-7-20T20:14:49'] = { + Type = "StaticRotation", + Rotation = {-0.4519, -0.0178, -0.0287} + }, + ['1969-7-20T20:14:50'] = { + Type = "StaticRotation", + Rotation = {-0.4579, -0.0201, -0.0278} + }, + ['1969-7-20T20:14:51'] = { + Type = "StaticRotation", + Rotation = {-0.4554, -0.0147, -0.0265} + }, + ['1969-7-20T20:14:52'] = { + Type = "StaticRotation", + Rotation = {-0.4468, -0.0084, -0.0284} + }, + ['1969-7-20T20:14:53'] = { + Type = "StaticRotation", + Rotation = {-0.4316, -0.0127, -0.0268} + }, + ['1969-7-20T20:14:53'] = { + Type = "StaticRotation", + Rotation = {-0.4228, -0.0171, -0.0255} + }, + ['1969-7-20T20:14:55'] = { + Type = "StaticRotation", + Rotation = {-0.4046, -0.0174, -0.0274} + }, + ['1969-7-20T20:14:57'] = { + Type = "StaticRotation", + Rotation = {-0.3806, -0.0211, -0.0243} + }, + ['1969-7-20T20:14:57'] = { + Type = "StaticRotation", + Rotation = {-0.3751, -0.0178, -0.0249} + }, + ['1969-7-20T20:14:59'] = { + Type = "StaticRotation", + Rotation = {-0.3670, -0.0153, -0.0230} + }, + ['1969-7-20T20:14:59'] = { + Type = "StaticRotation", + Rotation = {-0.3641, -0.0100, -0.0209} + }, + ['1969-7-20T20:15:1'] = { + Type = "StaticRotation", + Rotation = {-0.3526, -0.0021, -0.0207} + }, + ['1969-7-20T20:15:1'] = { + Type = "StaticRotation", + Rotation = {-0.3457, -0.0038, -0.0195} + }, + ['1969-7-20T20:15:3'] = { + Type = "StaticRotation", + Rotation = {-0.3371, -0.0038, -0.0161} + }, + ['1969-7-20T20:15:3'] = { + Type = "StaticRotation", + Rotation = {-0.3309, -0.0015, -0.0192} + }, + ['1969-7-20T20:15:5'] = { + Type = "StaticRotation", + Rotation = {-0.3263, -0.0096, -0.0232} + }, + ['1969-7-20T20:15:5'] = { + Type = "StaticRotation", + Rotation = {-0.3240, 0.0015, -0.0243} + }, + ['1969-7-20T20:15:7'] = { + Type = "StaticRotation", + Rotation = {-0.3160, 0.0061, -0.0295} + }, + ['1969-7-20T20:15:7'] = { + Type = "StaticRotation", + Rotation = {-0.3135, 0.0035, -0.0318} + }, + ['1969-7-20T20:15:9'] = { + Type = "StaticRotation", + Rotation = {-0.3074, 0.0108, -0.0341} + }, + ['1969-7-20T20:15:9'] = { + Type = "StaticRotation", + Rotation = {-0.3022, 0.0027, -0.0360} + }, + ['1969-7-20T20:15:11'] = { + Type = "StaticRotation", + Rotation = {-0.2995, -0.0061, -0.0406} + }, + ['1969-7-20T20:15:11'] = { + Type = "StaticRotation", + Rotation = {-0.2976, -0.0098, -0.0416} + }, + ['1969-7-20T20:15:13'] = { + Type = "StaticRotation", + Rotation = {-0.2901, -0.0127, -0.0447} + }, + ['1969-7-20T20:15:14'] = { + Type = "StaticRotation", + Rotation = {-0.2886, -0.0169, -0.0470} + }, + ['1969-7-20T20:15:15'] = { + Type = "StaticRotation", + Rotation = {-0.2700, -0.0174, -0.0491} + }, + ['1969-7-20T20:15:15'] = { + Type = "StaticRotation", + Rotation = {-0.2107, -0.0119, -0.0512} + }, + ['1969-7-20T20:15:17'] = { + Type = "StaticRotation", + Rotation = {-0.1630, -0.0123, -0.0560} + }, + ['1969-7-20T20:15:18'] = { + Type = "StaticRotation", + Rotation = {-0.1101, -0.0077, -0.0583} + }, + ['1969-7-20T20:15:19'] = { + Type = "StaticRotation", + Rotation = {-0.0868, -0.0029, -0.0613} + }, + ['1969-7-20T20:15:19'] = { + Type = "StaticRotation", + Rotation = {-0.0893, -0.0036, -0.0642} + }, + ['1969-7-20T20:15:21'] = { + Type = "StaticRotation", + Rotation = {-0.0892, -0.0029, -0.0675} + }, + ['1969-7-20T20:15:21'] = { + Type = "StaticRotation", + Rotation = {-0.0970, -0.0004, -0.0698} + }, + ['1969-7-20T20:15:23'] = { + Type = "StaticRotation", + Rotation = {-0.1020, -0.0079, -0.0736} + }, + ['1969-7-20T20:15:24'] = { + Type = "StaticRotation", + Rotation = {-0.0959, -0.0069, -0.0771} + }, + ['1969-7-20T20:15:25'] = { + Type = "StaticRotation", + Rotation = {-0.0999, -0.0057, -0.0794} + }, + ['1969-7-20T20:15:26'] = { + Type = "StaticRotation", + Rotation = {-0.1001, -0.0075, -0.0828} + }, + ['1969-7-20T20:15:27'] = { + Type = "StaticRotation", + Rotation = {-0.0966, -0.0067, -0.0849} + }, + ['1969-7-20T20:15:28'] = { + Type = "StaticRotation", + Rotation = {-0.1039, -0.0050, -0.0876} + }, + ['1969-7-20T20:15:29'] = { + Type = "StaticRotation", + Rotation = {-0.1055, -0.0059, -0.0893} + }, + ['1969-7-20T20:15:30'] = { + Type = "StaticRotation", + Rotation = {-0.1010, -0.0050, -0.0909} + }, + ['1969-7-20T20:15:31'] = { + Type = "StaticRotation", + Rotation = {-0.1066, -0.0036, -0.0903} + }, + ['1969-7-20T20:15:32'] = { + Type = "StaticRotation", + Rotation = {-0.1106, -0.0032, -0.0882} + }, + ['1969-7-20T20:15:33'] = { + Type = "StaticRotation", + Rotation = {-0.1074, -0.0019, -0.0874} + }, + ['1969-7-20T20:15:34'] = { + Type = "StaticRotation", + Rotation = {-0.1131, 0.0021, -0.0857} + }, + ['1969-7-20T20:15:35'] = { + Type = "StaticRotation", + Rotation = {-0.1193, 0.0036, -0.0842} + }, + ['1969-7-20T20:15:36'] = { + Type = "StaticRotation", + Rotation = {-0.1193, 0.0083, -0.0819} + }, + ['1969-7-20T20:15:37'] = { + Type = "StaticRotation", + Rotation = {-0.1233, 0.0129, -0.0809} + }, + ['1969-7-20T20:15:38'] = { + Type = "StaticRotation", + Rotation = {-0.1365, 0.0194, -0.0786} + }, + ['1969-7-20T20:15:39'] = { + Type = "StaticRotation", + Rotation = {-0.1334, 0.0230, -0.0765} + }, + ['1969-7-20T20:15:40'] = { + Type = "StaticRotation", + Rotation = {-0.1267, 0.0257, -0.0744} + }, + ['1969-7-20T20:15:41'] = { + Type = "StaticRotation", + Rotation = {-0.1271, 0.0288, -0.0732} + }, + ['1969-7-20T20:15:42'] = { + Type = "StaticRotation", + Rotation = {-0.1206, 0.0272, -0.0700} + }, + ['1969-7-20T20:15:43'] = { + Type = "StaticRotation", + Rotation = {-0.1465, 0.0244, -0.0692} + }, + ['1969-7-20T20:15:44'] = { + Type = "StaticRotation", + Rotation = {-0.1931, 0.0217, -0.0692} + }, + ['1969-7-20T20:15:45'] = { + Type = "StaticRotation", + Rotation = {-0.1981, 0.0205, -0.0679} + }, + ['1969-7-20T20:15:46'] = { + Type = "StaticRotation", + Rotation = {-0.2048, 0.0173, -0.0656} + }, + ['1969-7-20T20:15:47'] = { + Type = "StaticRotation", + Rotation = {-0.2151, 0.0169, -0.0650} + }, + ['1969-7-20T20:15:48'] = { + Type = "StaticRotation", + Rotation = {-0.2385, 0.0132, -0.0633} + }, + ['1969-7-20T20:15:49'] = { + Type = "StaticRotation", + Rotation = {-0.2590, 0.0092, -0.0623} + }, + ['1969-7-20T20:15:50'] = { + Type = "StaticRotation", + Rotation = {-0.2607, 0.0077, -0.0608} + }, + ['1969-7-20T20:15:51'] = { + Type = "StaticRotation", + Rotation = {-0.2646, 0.0056, -0.0600} + }, + ['1969-7-20T20:15:52'] = { + Type = "StaticRotation", + Rotation = {-0.2680, 0.0004, -0.0575} + }, + ['1969-7-20T20:15:53'] = { + Type = "StaticRotation", + Rotation = {-0.2682, -0.0011, -0.0560} + }, + ['1969-7-20T20:15:54'] = { + Type = "StaticRotation", + Rotation = {-0.2742, -0.0044, -0.0543} + }, + ['1969-7-20T20:15:55'] = { + Type = "StaticRotation", + Rotation = {-0.2757, -0.0061, -0.0522} + }, + ['1969-7-20T20:15:56'] = { + Type = "StaticRotation", + Rotation = {-0.2727, -0.0065, -0.0491} + }, + ['1969-7-20T20:15:57'] = { + Type = "StaticRotation", + Rotation = {-0.2724, -0.0063, -0.0474} + }, + ['1969-7-20T20:15:58'] = { + Type = "StaticRotation", + Rotation = {-0.2732, -0.0077, -0.0445} + }, + ['1969-7-20T20:15:59'] = { + Type = "StaticRotation", + Rotation = {-0.2709, -0.0092, -0.0420} + }, + ['1969-7-20T20:16:0'] = { + Type = "StaticRotation", + Rotation = {-0.2690, -0.0102, -0.0387} + }, + ['1969-7-20T20:16:1'] = { + Type = "StaticRotation", + Rotation = {-0.2704, -0.0115, -0.0368} + }, + ['1969-7-20T20:16:2'] = { + Type = "StaticRotation", + Rotation = {-0.2704, -0.0142, -0.0332} + }, + ['1969-7-20T20:16:3'] = { + Type = "StaticRotation", + Rotation = {-0.2700, -0.0153, -0.0305} + }, + ['1969-7-20T20:16:4'] = { + Type = "StaticRotation", + Rotation = {-0.2736, -0.0176, -0.0268} + }, + ['1969-7-20T20:16:5'] = { + Type = "StaticRotation", + Rotation = {-0.2752, -0.0199, -0.0243} + }, + ['1969-7-20T20:16:6'] = { + Type = "StaticRotation", + Rotation = {-0.2752, -0.0238, -0.0207} + }, + ['1969-7-20T20:16:7'] = { + Type = "StaticRotation", + Rotation = {-0.2702, -0.0245, -0.0205} + }, + ['1969-7-20T20:16:8'] = { + Type = "StaticRotation", + Rotation = {-0.1841, -0.0217, -0.0219} + }, + ['1969-7-20T20:16:9'] = { + Type = "StaticRotation", + Rotation = {-0.1632, -0.0217, -0.0226} + }, + ['1969-7-20T20:16:26'] = { + Type = "StaticRotation", + Rotation = {-0.0989, -0.0184, -0.0391} + }, + ['1969-7-20T20:16:27'] = { + Type = "StaticRotation", + Rotation = {-0.0968, -0.0167, -0.0393} + }, + ['1969-7-20T20:16:28'] = { + Type = "StaticRotation", + Rotation = {-0.0171, -0.0103, -0.0406} + }, + ['1969-7-20T20:16:29'] = { + Type = "StaticRotation", + Rotation = {-0.0157, -0.0105, -0.0412} + }, + ['1969-7-20T20:16:30'] = { + Type = "StaticRotation", + Rotation = {0.0127, -0.0103, -0.0427} + }, + ['1969-7-20T20:16:31'] = { + Type = "StaticRotation", + Rotation = {0.0134, -0.0147, -0.0433} + }, + ['1969-7-20T20:16:32'] = { + Type = "StaticRotation", + Rotation = {0.0042, -0.0370, -0.0470} + }, + ['1969-7-20T20:16:33'] = { + Type = "StaticRotation", + Rotation = {0.0092, -0.0506, -0.0487} + }, + ['1969-7-20T20:16:34'] = { + Type = "StaticRotation", + Rotation = {0.0244, -0.0512, -0.0510} + }, + ['1969-7-20T20:16:35'] = { + Type = "StaticRotation", + Rotation = {0.0042, -0.0546, -0.0512} + }, + ['1969-7-20T20:16:36'] = { + Type = "StaticRotation", + Rotation = {-0.0006, -0.0558, -0.0533} + }, + ['1969-7-20T20:16:37'] = { + Type = "StaticRotation", + Rotation = {0.0050, -0.0522, -0.0543} + }, + ['1969-7-20T20:16:38'] = { + Type = "StaticRotation", + Rotation = {0.0077, -0.0343, -0.0548} + }, + ['1969-7-20T20:16:39'] = { + Type = "StaticRotation", + Rotation = {-0.0004, -0.0155, -0.0550} + }, + ['1969-7-20T20:16:40'] = { + Type = "StaticRotation", + Rotation = {0.0036, -0.0105, -0.0571} + }, + ['1969-7-20T20:16:41'] = { + Type = "StaticRotation", + Rotation = {-0.0080, -0.0086, -0.0579} + }, + ['1969-7-20T20:16:42'] = { + Type = "StaticRotation", + Rotation = {-0.0698, -0.0140, -0.0604} + }, + ['1969-7-20T20:16:43'] = { + Type = "StaticRotation", + Rotation = {-0.0579, -0.0134, -0.0623} + }, + ['1969-7-20T20:16:44'] = { + Type = "StaticRotation", + Rotation = {-0.0462, -0.0090, -0.0648} + }, + ['1969-7-20T20:16:45'] = { + Type = "StaticRotation", + Rotation = {-0.0466, -0.0067, -0.0665} + }, + ['1969-7-20T20:16:46'] = { + Type = "StaticRotation", + Rotation = {-0.0529, -0.0027, -0.0694} + }, + ['1969-7-20T20:16:47'] = { + Type = "StaticRotation", + Rotation = {-0.0518, 0.0079, -0.0707} + }, + ['1969-7-20T20:16:48'] = { + Type = "StaticRotation", + Rotation = {-0.0602, 0.0299, -0.0729} + }, + ['1969-7-20T20:16:49'] = { + Type = "StaticRotation", + Rotation = {-0.0510, 0.0562, -0.0729} + }, + ['1969-7-20T20:16:50'] = { + Type = "StaticRotation", + Rotation = {-0.0539, 0.0562, -0.0765} + }, + ['1969-7-20T20:16:51'] = { + Type = "StaticRotation", + Rotation = {-0.0928, 0.0545, -0.0813} + }, + ['1969-7-20T20:16:52'] = { + Type = "StaticRotation", + Rotation = {-0.0886, 0.0560, -0.0844} + }, + ['1969-7-20T20:16:53'] = { + Type = "StaticRotation", + Rotation = {-0.0832, 0.0552, -0.0865} + }, + ['1969-7-20T20:16:54'] = { + Type = "StaticRotation", + Rotation = {-0.0805, 0.0573, -0.0899} + }, + ['1969-7-20T20:16:55'] = { + Type = "StaticRotation", + Rotation = {-0.0784, 0.0614, -0.0924} + }, + ['1969-7-20T20:16:56'] = { + Type = "StaticRotation", + Rotation = {-0.0729, 0.0635, -0.0945} + }, + ['1969-7-20T20:16:57'] = { + Type = "StaticRotation", + Rotation = {-0.0792, 0.0627, -0.0976} + }, + ['1969-7-20T20:17:7'] = { + Type = "StaticRotation", + Rotation = {-0.1056, -0.0366, -0.1402} + }, + ['1969-7-20T20:17:7'] = { + Type = "StaticRotation", + Rotation = {-0.1053, -0.0395, -0.1428} + }, + ['1969-7-20T20:17:9'] = { + Type = "StaticRotation", + Rotation = {-0.0725, -0.0314, -0.1503} + }, + ['1969-7-20T20:17:9'] = { + Type = "StaticRotation", + Rotation = {-0.0259, -0.0270, -0.1542} + }, + ['1969-7-20T20:17:11'] = { + Type = "StaticRotation", + Rotation = {0.0874, -0.0059, -0.1614} + }, + ['1969-7-20T20:17:12'] = { + Type = "StaticRotation", + Rotation = {0.0769, -0.0096, -0.1678} + }, + ['1969-7-20T20:17:13'] = { + Type = "StaticRotation", + Rotation = {0.0740, -0.0270, -0.1743} + }, + ['1969-7-20T20:17:14'] = { + Type = "StaticRotation", + Rotation = {0.0673, -0.0458, -0.1810} + }, + ['1969-7-20T20:17:15'] = { + Type = "StaticRotation", + Rotation = {0.0550, -0.0506, -0.1860} + }, + ['1969-7-20T20:17:16'] = { + Type = "StaticRotation", + Rotation = {0.0449, -0.0577, -0.1931} + }, + ['1969-7-20T20:17:17'] = { + Type = "StaticRotation", + Rotation = {0.0437, -0.0617, -0.1967} + }, + ['1969-7-20T20:17:18'] = { + Type = "StaticRotation", + Rotation = {0.0297, -0.0650, -0.2027} + }, + ['1969-7-20T20:17:19'] = { + Type = "StaticRotation", + Rotation = {0.0203, -0.0518, -0.2061} + }, + ['1969-7-20T20:17:20'] = { + Type = "StaticRotation", + Rotation = {0.0211, -0.0201, -0.2109} + }, + ['1969-7-20T20:17:21'] = { + Type = "StaticRotation", + Rotation = {0.0228, -0.0197, -0.2159} + }, + ['1969-7-20T20:17:22'] = { + Type = "StaticRotation", + Rotation = {-0.0201, -0.0257, -0.2230} + }, + ['1969-7-20T20:17:23'] = { + Type = "StaticRotation", + Rotation = {-0.0299, -0.0125, -0.2287} + }, + ['1969-7-20T20:17:24'] = { + Type = "StaticRotation", + Rotation = {-0.0368, -0.0025, -0.2355} + }, + ['1969-7-20T20:17:25'] = { + Type = "StaticRotation", + Rotation = {-0.0464, 0.0209, -0.2408} + }, + ['1969-7-20T20:17:26'] = { + Type = "StaticRotation", + Rotation = {-0.0548, 0.0474, -0.2472} + }, + ['1969-7-20T20:17:27'] = { + Type = "StaticRotation", + Rotation = {-0.0535, 0.0464, -0.2481} + }, + ['1969-7-20T20:17:28'] = { + Type = "StaticRotation", + Rotation = {-0.0512, 0.0508, -0.2491} + }, + ['1969-7-20T20:17:29'] = { + Type = "StaticRotation", + Rotation = {-0.0625, 0.0781, -0.2504} + }, + ['1969-7-20T20:17:30'] = { + Type = "StaticRotation", + Rotation = {-0.0811, 0.0711, -0.2531} + }, + ['1969-7-20T20:17:31'] = { + Type = "StaticRotation", + Rotation = {-0.0855, 0.0692, -0.2544} + }, + ['1969-7-20T20:17:32'] = { + Type = "StaticRotation", + Rotation = {-0.0940, 0.0673, -0.2569} + }, + ['1969-7-20T20:17:33'] = { + Type = "StaticRotation", + Rotation = {-0.0963, 0.0648, -0.2587} + }, + ['1969-7-20T20:17:34'] = { + Type = "StaticRotation", + Rotation = {-0.0909, 0.0619, -0.2587} + }, + ['1969-7-20T20:17:35'] = { + Type = "StaticRotation", + Rotation = {-0.0832, 0.0602, -0.2585} + }, + ['1969-7-20T20:17:36'] = { + Type = "StaticRotation", + Rotation = {-0.0761, 0.0326, -0.2602} + }, + ['1969-7-20T20:17:37'] = { + Type = "StaticRotation", + Rotation = {-0.0612, 0.0013, -0.2635} + }, + ['1969-7-20T20:17:38'] = { + Type = "StaticRotation", + Rotation = {-0.0274, -0.0079, -0.2727} + }, + ['1969-7-20T20:17:39'] = { + Type = "StaticRotation", + Rotation = {-0.0061, -0.0470, -0.2732} + }, + ['1969-7-20T20:17:40'] = { + Type = "StaticRotation", + Rotation = {-0.0794, -0.0088, -0.2447} + }, +}) diff --git a/data/assets/scene/solarsystem/missions/apollo/11/lem_flipbook.asset b/data/assets/scene/solarsystem/missions/apollo/11/lem_flipbook.asset new file mode 100644 index 0000000000..1d0025bc74 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/11/lem_flipbook.asset @@ -0,0 +1,39 @@ +local helper = asset.require('util/vrt_flipbook_helper') +local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon') + +local assetPrefix = "A11flip"; +local assetGlobe = moon_asset.Moon.Identifier; +local flipbookCount = 19; + +local flipbook = nil; + +local vrts = asset.syncedResource({ + Name = "Apollo 11 Flipbook", + Type = "HttpSynchronization", + Identifier = "apollo_11_flipbook", + Version = 1 +}) + +asset.onInitialize(function () + openspace.globebrowsing.addBlendingLayersFromDirectory(vrts, assetGlobe); + flipbook = helper.createFlipbook(assetPrefix, assetGlobe, 19); + + function nextFlip() + helper.nextFlipbookPage(flipbook); + end + + function previousFlip() + helper.previousFlipbookPage(flipbook); + end + + openspace.bindKey("RIGHT", "nextFlip()", "Show the next Apollo 11 flipbook image.", "Next A11 flip", "/Missions/Apollo/11") + openspace.bindKey("LEFT", "previousFlip()","Show the previous Apollo 11 flipbook image.", "Prev A11 flip", "/Missions/Apollo/11") +end) + + +asset.onDeinitialize(function () + flipbook = nil; + + openspace.clearKey("RIGHT") + openspace.clearKey("LEFT") +end) diff --git a/data/assets/scene/solarsystem/missions/apollo/11/models.asset b/data/assets/scene/solarsystem/missions/apollo/11/models.asset new file mode 100644 index 0000000000..36b3d25a94 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/11/models.asset @@ -0,0 +1,8 @@ +local modelFolder = asset.syncedResource({ + Name = "Apollo Models", + Type = "HttpSynchronization", + Identifier = "apollo_11_models", + Version = 1 +}) + +asset.export('models', modelFolder) diff --git a/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset new file mode 100644 index 0000000000..770592ba8e --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/15/apollo15.asset @@ -0,0 +1,115 @@ +local assetHelper = asset.require('util/asset_helper') +local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon') +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') +local csm = asset.require('../apollo_csm') +asset.require('spice/base') + +local kernels = asset.require('scene/solarsystem/missions/apollo/15/kernels').kernels + + +-- local models = asset.syncedResource({ +-- Name = "Apollo 15 Models", +-- Type = "HttpSynchronization", +-- Identifier = "apollo_models", +-- Version = 1 +-- }) + +local LightSources = { + { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = sun_transforms.SolarSystemBarycenter.Identifier, + Intensity = 1.0 + }, + -- { + -- Identifier = "Camera", + -- Type = "CameraLightSource", + -- Intensity = 0.5, + -- Enabled = false + -- } +} + + +local Apollo15 = { + Identifier = "Apollo15", + Parent = moon_transforms.Moon.Identifier, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = "APOLLO 15", + Observer = "MOON", + Frame = "IAU_MOON", + Kernels = kernels + }, + Rotation = { + Type = "SpiceRotation", + SourceFrame = "A15_METRIC", + DestinationFrame = "GALACTIC" + } + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1971-07-30T02:22:00.00", + End = "1971-08-01T18:05:00.00" + }, + GUI = { + Name = "Apollo 15", + Path = "/Solar System/Missions/Apollo/15" + } +} + +-- local Apollo15Main = { +-- Identifier = "Apollo15Main", +-- Parent = Apollo15.Identifier, +-- Renderable = { +-- Type = "RenderableModel", +-- Geometry = { +-- Type = "MultiModelGeometry", +-- -- GeometryFile = models .. "/Apollo_Spacecraft.obj" +-- GeometryFile = models .. "/Apollo_CSM_shrunk_rotated_xy_doubble_size.obj" +-- }, +-- ColorTexture = models .. "/gray.png", +-- LightSources = LightSources, +-- DisableFaceCulling = true +-- }, +-- GUI = { +-- Name = "Apollo 15 Main", +-- Path = "/Solar System/Missions/Apollo 15" +-- } +-- } + +local Apollo15Trail = { + Identifier = "Apollo15Trail", + Parent = moon_transforms.Moon.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = "APOLLO 15", + Observer = "MOON", + Frame = "IAU_MOON", + Kernels = kernels + }, + Color = { 0.70, 0.50, 0.20 }, + StartTime = "1971 JUL 26", + EndTime = "1971 AUG 01 14:30:41.680", + SampleInterval = 2 + }, + GUI = { + Name = "Apollo 15 Trail", + Path = "/Solar System/Missions/Apollo/15" + } +} + + +local model_part = csm.createCsmModel(Apollo15.Identifier) + +local list = { Apollo15, Apollo15Trail } +for k,v in pairs(model_part) do + v.GUI.Path = "/Solar System/Missions/Apollo/15/Model" + table.insert(list, v) +end + + +assetHelper.registerSceneGraphNodesAndExport(asset, list) + diff --git a/data/assets/scene/solarsystem/missions/apollo/15/kernels.asset b/data/assets/scene/solarsystem/missions/apollo/15/kernels.asset new file mode 100644 index 0000000000..1b00fd7596 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/15/kernels.asset @@ -0,0 +1,92 @@ +local folder = asset.syncedResource({ + Name = "Apollo Kernels", + Type = "HttpSynchronization", + Identifier = "apollo_spice", + Version = 1 +}) + +local kernels = { + folder .. "/apollo15.0001.tsc", + + -- folder .. '/AS15-P_v01.bc', + folder .. '/apollo15.0001.tf', + folder .. '/apollo15MetricAddendum002.ti', + -- folder .. '/apollo15PanoramicAddendum001.ti', + folder .. '/apollo15_metric.0002.ti', + -- folder .. '/apollo15_panoramic.0001.ti', + folder .. '/apollo15-1.bsp', + folder .. '/AS15-M_v01.bc', + -- folder .. '/AS15-M_v01.bsp', +} + +-- local kernels = { +-- --sclk +-- folder .. "apollo15.0001.tsc", + +-- --pck +-- folder .. "moon_080317.tf", +-- folder .. "moon_assoc_me.tf", + +-- --ik +-- folder .. "apollo15_metric_v2.0001.ti", +-- folder .. "apollo15_panoramic.0001.ti", + +-- --tspk +-- folder .. "de421.bsp", +-- folder .. "moon_pa_de421_1900-2050.bpc", + +-- --iak +-- folder .. "apollo15MetricAddendum002.ti", +-- folder .. "apolloPanAddendum001.ti", + +-- --fk +-- folder .. "apollo15_v2.0001.tf", +-- folder .. "apollo15_v2.0002.tf", + +-- --spk +-- folder .. "AS15_M_REV23_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV4.bsp ", +-- folder .. "AS15_M_REV70_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV04_v2.bsp ", +-- folder .. "AS15_M_REV27_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV44_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV71_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV15_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV33_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV50_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV71_SMITHED_V02.bsp", +-- folder .. "AS15_M_REV15_v2.bsp ", +-- folder .. "AS15_M_REV34_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV60_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV72_v2.bsp", +-- folder .. "AS15_M_REV16_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV35_SMITHED_V02.bsp", +-- folder .. "AS15_M_REV62_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV22_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV38_SMITHED_V01.bsp", +-- folder .. "AS15_M_REV63_SMITHED_V01.bsp", + +-- --ck +-- folder .. "AS15_M_REV04_SMITHED_V01.bc", +-- folder .. "AS15_M_REV15_SMITHED_V01.bc", +-- folder .. "AS15_M_REV16_SMITHED_V01.bc", +-- folder .. "AS15_M_REV22_SMITHED_V01.bc", +-- folder .. "AS15_M_REV23_SMITHED_V01.bc", +-- folder .. "AS15_M_REV27_SMITHED_V01.bc", +-- folder .. "AS15_M_REV33_SMITHED_V01.bc", +-- folder .. "AS15_M_REV34_SMITHED_V01.bc", +-- folder .. "AS15_M_REV35_SMITHED_V01.bc", +-- folder .. "AS15_M_REV35_SMITHED_V02.bc", +-- folder .. "AS15_M_REV38_SMITHED_V01.bc", +-- folder .. "AS15_M_REV44_SMITHED_V01.bc", +-- folder .. "AS15_M_REV50_SMITHED_V01.bc", +-- folder .. "AS15_M_REV60_SMITHED_V01.bc", +-- folder .. "AS15_M_REV62_SMITHED_V01.bc", +-- folder .. "AS15_M_REV63_SMITHED_V01.bc", +-- folder .. "AS15_M_REV70_SMITHED_V01.bc", +-- folder .. "AS15_M_REV71_SMITHED_V01.bc", +-- folder .. "AS15_M_REV71_SMITHED_V02.bc", +-- folder .. "AS15_M_REV72_v2.bc", +-- } + +asset.export("kernels", kernels) diff --git a/data/assets/scene/solarsystem/missions/apollo/17/boulder_models.asset b/data/assets/scene/solarsystem/missions/apollo/17/boulder_models.asset new file mode 100644 index 0000000000..7868bae468 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/17/boulder_models.asset @@ -0,0 +1,8 @@ +local models = asset.syncedResource({ + Name = "Apollo Boulders Models", + Type = "HttpSynchronization", + Identifier = "apollo_boulders", + Version = 1 +}) + +asset.export('models', models) diff --git a/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation2.asset b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation2.asset new file mode 100644 index 0000000000..f709f0bc2b --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation2.asset @@ -0,0 +1,162 @@ +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') +local asset_helper = asset.require('util/asset_helper') +local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon') +local models = asset.require('./boulder_models').models + +local LightSources = { + { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = sun_transforms.SolarSystemBarycenter.Identifier, + Intensity = 1.0 + }, + { + Identifier = "Camera", + Type = "CameraLightSource", + Intensity = 0.5 + } +} + +local Station2Boulder1Holder = { + Identifier = "Station_2_Boulder1", + Parent = moon_asset.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.5294692, + Latitude = 20.098824, + Altitude = -2442.8, + UseHeightMap = false + } + }, + GUI = { + Name = "Station 2 Boulder 1", + Path = "/Solar System/Missions/Apollo/17/Station 2" + } +} + +local Station2Boulder1Model = { + Identifier = "Station2Boulder1Model", + Parent = Station2Boulder1Holder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.06 + }, + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/b1-v2.obj" + }, + RotationVector = { 243.243256 ,206.270264, 309.677429 }, + ColorTexture = models .. "/b1-v2_u1_v1.jpeg", + LightSources = LightSources, + PerformShading = false, + DisableFaceCulling = true + }, + GUI = { + Name = "Station 2 Boulder 1 Model", + Path = "/Solar System/Missions/Apollo/17/Station 2" + } +} + +local Station2Boulder2Holder = { + Identifier = "Station_2_Boulder2", + Parent = moon_asset.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.5287892, + Latitude = 20.098240, + Altitude = -2434.6, + UseHeightMap = false + } + }, + GUI = { + Name = "Station 2 Boulder 2", + Path = "/Solar System/Missions/Apollo/17/Station 2" + } +} + +local Station2Boulder2Model = { + Identifier = "Station2Boulder2Model", + Parent = Station2Boulder2Holder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.06 + }, + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/b2model.obj" + }, + RotationVector = { 66.162155, 7.783780, 114.193550 }, + ColorTexture = models .. "/b2model_u1_v1.jpeg", + LightSources = LightSources, + PerformShading = false, + DisableFaceCulling = true + }, + GUI = { + Name = "Station 2 Boulder 2 Model", + Path = "/Solar System/Missions/Apollo/17/Station 2" + } +} + +local Station2Boulder3Holder = { + Identifier = "Station_2_Boulder3", + Parent = moon_asset.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.5294692, + Latitude = 20.098610, + Altitude = -2441.55, + UseHeightMap = false + } + }, + GUI = { + Name = "Station 2 Boulder 3", + Path = "/Solar System/Missions/Apollo/17/Station 2" + } +} + +local Station2Boulder3Model = { + Identifier = "Station2Boulder3Model", + Parent = Station2Boulder3Holder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.06 + }, + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/b3model.obj" + }, + RotationVector = { 161.513519 ,243.243256, 65.806450 }, + ColorTexture = models .. "/b3model_u1_v1.jpeg", + LightSources = LightSources, + PerformShading = false, + DisableFaceCulling = true + }, + GUI = { + Name = "Station 2 Boulder 3 Model", + Path = "/Solar System/Missions/Apollo/17/Station 2" + } +} + +asset_helper.registerSceneGraphNodesAndExport(asset, { + Station2Boulder1Holder, Station2Boulder1Model, + Station2Boulder2Holder, Station2Boulder2Model, + Station2Boulder3Holder, Station2Boulder3Model +}) diff --git a/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation6.asset b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation6.asset new file mode 100644 index 0000000000..d013b8fea4 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation6.asset @@ -0,0 +1,161 @@ +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') +local asset_helper = asset.require('util/asset_helper') +local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon') +local models = asset.require('./boulder_models').models + +local LightSources = { + { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = sun_transforms.SolarSystemBarycenter.Identifier, + Intensity = 1.0 + }, + { + Identifier = "Camera", + Type = "CameraLightSource", + Intensity = 0.5 + } +} + + +local Station6Frag1Holder = { + Identifier = "Station_6_Fragment1", + Parent = moon_asset.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.80068, + Latitude = 20.2903, + Altitude = -2562.6, + UseHeightmap = false + } + }, + GUI = { + Name = "Station 6 Fragment 1", + Path = "/Solar System/Missions/Apollo/17/Station 6" + } +} + +local Station6Frag1Model = { + Identifier = "Station6Frag1Model", + Parent = Station6Frag1Holder.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.8007, + Latitude = 20.2903, + Altitude = -2562.6, + UseHeightmap = false + } + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.1 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/A17-S6-frag1.obj" + }, + RotationVector = { 235.909088,165.000000,286.299194 }, + ColorTexture = models .. "/A17-S6-frag1.png", + LightSources = LightSources, + PerformShading = false, + DisableFaceCulling = true + }, + GUI = { + Name = "Station 6 Fragment 1 Model", + Path = "/Solar System/Missions/Apollo/17/Station 6" + } +} + + + +local Station6Frag23Holder = { + Identifier = "Station_6_Fragments_2_3", + Parent = moon_asset.Moon.Identifier, + GUI = { + Name = "Station 6 Fragments 2 & 3 Holder", + Path = "/Solar System/Missions/Apollo/17/Station 6" + } +} + + +local Station6Frag2Model = { + Identifier = "A17S6F5", + Parent = Station6Frag23Holder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.14 + }, + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.80055, + Latitude = 20.289808, + Altitude = -2566.5, + UseHeightmap = false + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/station6_boulder_frag2.obj" + }, + RotationVector = { 336.959991,210.239990,325.984253 }, + ColorTexture = models .. "/frag2crop_u1_v1.jpeg", + LightSources = LightSources, + PerformShading = false, + DisableFaceCulling = true, + }, + GUI = { + Name = "Station 6 Fragment 2 Model", + Path = "/Solar System/Missions/Apollo/17/Station 6" + } +} + +local Station6Frag3Model = { + Identifier = "A17S6F3", + Parent = Station6Frag23Holder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.14 + }, + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.80053, + Latitude = 20.29030, + Altitude = -2563.0, + UseHeightMap = false + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/station6_boulder_frag3.obj" + }, + RotationVector = { 293.181824,255.000000,4.090910 }, + ColorTexture = models .. "/frag3crop_u1_v1.jpeg", + LightSources = LightSources, + PerformShading = false, + DisableFaceCulling = true + }, + GUI = { + Name = "Station 6 Fragment 3 Model", + Path = "/Solar System/Missions/Apollo/17/Station 6" + } +} + +asset_helper.registerSceneGraphNodesAndExport(asset, { + Station6Frag1Holder, Station6Frag1Model, Station6Frag23Holder, Station6Frag2Model, Station6Frag3Model, +}) diff --git a/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation7.asset b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation7.asset new file mode 100644 index 0000000000..d2e9c5146c --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/17/bouldersstation7.asset @@ -0,0 +1,68 @@ +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') +local asset_helper = asset.require('util/asset_helper') +local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon') +local models = asset.require('./boulder_models').models + +local LightSources = { + { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = sun_transforms.SolarSystemBarycenter.Identifier, + Intensity = 1.0 + }, + { + Identifier = "Camera", + Type = "CameraLightSource", + Intensity = 0.5 + } +} + +local Station7BoulderHolder = { + Identifier = "Station_7_Boulder", + Parent = moon_asset.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -360+30.8165882, + Latitude = 20.2908556, + Altitude = -2593.5, + UseHeightMap = true + } + }, + GUI = { + Name = "Station 7 Boulder", + Path = "/Solar System/Missions/Apollo/17/Station 7" + } +} + +local Station7BoulderModel = { + Identifier = "Station7BoulderModel", + Parent = Station7BoulderHolder.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.1 + }, + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/b7model.obj" + }, + RotationVector = { 1.945950,274.378387,212.903214 }, + ColorTexture = models .. "/b7model_u1_v1.jpeg", + LightSources = LightSources, + PerformShading = false, + DisableFaceCulling = true + }, + GUI = { + Name = "Station 7 Boulder Model", + Path = "/Solar System/Missions/Apollo/17/Station 7" + } +} + +asset_helper.registerSceneGraphNodesAndExport(asset, { + Station7BoulderHolder, Station7BoulderModel +}) diff --git a/data/assets/scene/solarsystem/missions/apollo/17/lem.asset b/data/assets/scene/solarsystem/missions/apollo/17/lem.asset new file mode 100644 index 0000000000..50f81a1693 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/17/lem.asset @@ -0,0 +1,52 @@ +local asset_helper = asset.require('util/asset_helper') +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') +local moon_asset = asset.require('scene/solarsystem/planets/earth/moon/moon') + +local model = asset.require('scene/solarsystem/missions/apollo/lem_model') + +local Apollo17Lem = { + Identifier = "Apollo17Lem", + Parent = moon_asset.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon_asset.Moon.Identifier, + Longitude = -329.22833, + Latitude = 20.19092, + UseHeightmap = true + }, + }, + GUI = { + Hidden = true, + Name = "Apollo 17 Lem Position", + Path = "/Solar System/Missions/Apollo/17" + } +} + +local Apollo17LemModel = { + Identifier = "Apollo17LemModel", + Parent = Apollo17Lem.Identifier, + Transform = { + Scale = { + Type = "StaticScale", + Scale = 0.24 + } + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = model.modelFolder .. "/LM-2_ver2clean.obj" + }, + SpecularIntensity = 0.0, + RotationVector = { 110.255219,171.229706,126.666664 }, + ColorTexture = model.modelFolder .. "/LM-2_ver2clean_u1_v1.jpeg", + LightSources = asset_helper.getDefaultLightSources(sun_transforms.SolarSystemBarycenter.Identifier) + }, + GUI = { + Name = "Apollo 17 Lem", + Path = "/Solar System/Missions/Apollo/17" + } +} + +asset_helper.registerSceneGraphNodesAndExport(asset, { Apollo17Lem, Apollo17LemModel }) diff --git a/data/assets/scene/solarsystem/missions/apollo/8/apollo8.asset b/data/assets/scene/solarsystem/missions/apollo/8/apollo8.asset new file mode 100644 index 0000000000..4b2a8777a1 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/8/apollo8.asset @@ -0,0 +1,3 @@ +asset.require('./model') +asset.require('./launch_model') +asset.require('./trails') diff --git a/data/assets/scene/solarsystem/missions/apollo/8/kernels.asset b/data/assets/scene/solarsystem/missions/apollo/8/kernels.asset new file mode 100644 index 0000000000..5baf800205 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/8/kernels.asset @@ -0,0 +1,17 @@ +local kernelsFolder = asset.syncedResource({ + Name = "Apollo Kernels", + Type = "HttpSynchronization", + Identifier = "apollo_spice", + Version = 1 +}) + +local kernels = { + kernelsFolder .. "/moon_080317.tf", + kernelsFolder .. "/apollo8.tf", + kernelsFolder .. "/moon_pa_de421_1900-2050.bpc", + kernelsFolder .. '/apollo8.tsc', + kernelsFolder .. '/apollo8.bsp', + kernelsFolder .. '/apollo8_earthrise.bc', +} + +asset.export('kernels', kernels) diff --git a/data/assets/scene/solarsystem/missions/apollo/8/launch_model.asset b/data/assets/scene/solarsystem/missions/apollo/8/launch_model.asset new file mode 100644 index 0000000000..1e76c60931 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/8/launch_model.asset @@ -0,0 +1,65 @@ +local asset_helper = asset.require('util/asset_helper') +local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms') +local kernels = asset.require('./kernels').kernels +local csm = asset.require('../apollo_csm') + +local apolloSpiceId = "-908" + +local Apollo8Launch = { + Identifier = "Apollo8Launch", + Parent = earth_transforms.EarthIAU.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1968 DEC 21", + End = "1968 DEC 28" + }, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = apolloSpiceId, + Observer = "EARTH", + Frame = "IAU_EARTH", + Kernels = kernels + }, + }, + GUI = { + Name = "Apollo 8 Launch Capsule", + Path = "/Solar System/Missions/Apollo" + } +} + +local Apollo8LaunchModel = { + Identifier = "Apollo8LaunchModel", + Parent = Apollo8Launch.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1968 DEC 21", + End = "1968 DEC 22" + }, + Transform = { + Scale = { + Type = "StaticScale", + -- The scale of the model is in cm; OpenSpace is in m + Scale = 0.01 + }, + Rotation = { + Type = "StaticRotation", + Rotation = {0.0, 0.0, -3.1415 / 2} + } + }, + GUI = { + Hidden = true, + Name = "Apollo 8 Launch Model", + Path = "/Solar System/Missions/Apollo/8" + } +} + +local launch_model_part = csm.createCsmModel(Apollo8LaunchModel.Identifier) + +local list = { Apollo8Launch, Apollo8LaunchModel } +for k,v in pairs(launch_model_part) do + v.GUI.Path = "/Solar System/Missions/Apollo/8/Model" + table.insert(list, v) +end + +asset_helper.registerSceneGraphNodesAndExport(asset, list) diff --git a/data/assets/scene/solarsystem/missions/apollo/8/model.asset b/data/assets/scene/solarsystem/missions/apollo/8/model.asset new file mode 100644 index 0000000000..4b677cc818 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/8/model.asset @@ -0,0 +1,93 @@ +local asset_helper = asset.require('util/asset_helper') +local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms') +local kernels = asset.require('./kernels').kernels +local csm = asset.require('../apollo_csm') + +local apolloSpiceId = "-908" + +local Apollo8 = { + Identifier = "Apollo8", + Parent = earth_transforms.EarthBarycenter.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1968 DEC 21", + End = "1968 DEC 28" + }, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = apolloSpiceId, + Observer = "EARTH BARYCENTER", + Frame = "GALACTIC", + Kernels = kernels + }, + Rotation = { + Type = "SpiceRotation", + SourceFrame = "A8_EARTHRISE", + DestinationFrame = "GALACTIC", + TimeFrame = { + -- The orientation of Apollo 8 is only available during the few minutes + -- when the Earthrise picture was taken. + Type = "TimeFrameInterval", + Start = "1968 DEC 24 16:37:19", + End = "1968 DEC 24 16:40:15" + } + } + }, + GUI = { + Name = "Apollo 8", + Path = "/Solar System/Missions/Apollo" + } +} + +local Apollo8Model = { + Identifier = "Apollo8Model", + Parent = Apollo8.Identifier, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1968 DEC 22", + End = "1968 DEC 28" + }, + Transform = { + Scale = { + Type = "StaticScale", + -- The scale of the model is in cm; OpenSpace is in m + Scale = 0.01 + }, + Rotation = { + Type = "StaticRotation", + Rotation = {0.0, 0.0, -3.1415 / 2} + } + }, + GUI = { + Hidden = true, + Name = "Apollo 8 Model", + Path = "/Solar System/Missions/Apollo" + } +} + +-- The pivot node is used for navigation inside the spacecraft +local Apollo8Pivot = { + Identifier = "Apollo8Pivot", + Parent = Apollo8.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0, 2.5, 0 } + }, + }, + GUI = { + Name = "Apollo 8 Pivot", + Path = "/Solar System/Missions/Apollo" + } +} + +local model_part = csm.createCsmModel(Apollo8Model.Identifier) + +local list = { Apollo8, Apollo8Model, Apollo8Pivot } +for k,v in pairs(model_part) do + v.GUI.Path = "/Solar System/Missions/Apollo/8/Model" + table.insert(list, v) +end + +asset_helper.registerSceneGraphNodesAndExport(asset, list) diff --git a/data/assets/scene/solarsystem/missions/apollo/8/trails.asset b/data/assets/scene/solarsystem/missions/apollo/8/trails.asset new file mode 100644 index 0000000000..5919504dcd --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/8/trails.asset @@ -0,0 +1,82 @@ +local assetHelper = asset.require('util/asset_helper') + +local earth_transforms = asset.require('scene/solarsystem/planets/earth/transforms') +local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon') +local kernels = asset.require('./kernels').kernels + +local apolloSpiceId = "-908" + + +local LaunchTrail = { + Identifier = "Apollo8LaunchTrail", + Parent = earth_transforms.EarthIAU.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = apolloSpiceId, + Observer = "EARTH", + Frame = "IAU_EARTH", + Kernels = kernels + }, + Color = { 0.70, 0.50, 0.20 }, + StartTime = "1968 DEC 21 12:51:00", + EndTime = "1968 DEC 21 23:23:22", + SampleInterval = 30, + RenderBinMode = "PostDeferredTransparent" + }, + GUI = { + Name = "Apollo 8 Launch Trail", + Path = "/Solar System/Missions/Apollo" + } +} + +local MoonTrail = { + Identifier = "Apollo8MoonTrail", + Parent = moon_transforms.Moon.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = apolloSpiceId, + Observer = "MOON", + Frame = "IAU_MOON", + Kernels = kernels + }, + Color = { 0.70, 0.50, 0.20 }, + StartTime = "1968 DEC 23", + EndTime = "1968 DEC 26", + SampleInterval = 30, + Enabled = false, + }, + GUI = { + Name = "Apollo 8 Moon Trail", + Path = "/Solar System/Missions/Apollo" + } +} + +local EarthBarycenterTrail = { + Identifier = "Apollo8EarthBarycenterTrail", + Parent = earth_transforms.EarthCenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = apolloSpiceId, + Observer = "EARTH", + Frame = "GALACTIC", + Kernels = kernels + }, + Color = { 0.8, 0.2, 0.2 }, + StartTime = "1968 DEC 21", + EndTime = "1968 DEC 28", + SampleInterval = 30, + Enabled = true, + }, + GUI = { + Name = "Apollo 8 Earth Barycenter Trail", + Path = "/Solar System/Missions/Apollo" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { LaunchTrail, MoonTrail, EarthBarycenterTrail }) diff --git a/data/assets/scene/solarsystem/missions/apollo/apollo_csm.asset b/data/assets/scene/solarsystem/missions/apollo/apollo_csm.asset new file mode 100644 index 0000000000..32581a1597 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/apollo_csm.asset @@ -0,0 +1,280 @@ +-- This asset exports a function to create an Apollo Command and Service Module (CSM). +-- Instead of hard-coding the scene graph node parent, +-- client assets can decide which object that the CSM should be attached to. +-- Usage example: createCsmModel(asset, Apollo8.Idenfitier) +-- ...where Apollo8 is the scene graph node identifier to attach the CSM to. + +local asset_helper = asset.require('util/asset_helper') +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') + +local models = asset.syncedResource({ + Name = "Apollo Models", + Type = "HttpSynchronization", + Identifier = "apollo_models", + Version = 1 +}) + +local partsInfo = { + -- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading + + -- Exterior + { "AP08_cone_command_module", "Command_module_diff.png", true }, + { "AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true }, + { "AP08_cone_vent_ports_black", "black.png", true }, + { "AP08_cone_vent_ports_red", "red.png", true }, + { "AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false }, + + { "AP08_service_black", "black.png", true }, + { "AP08_service_brown", "brown.png", true }, + { "AP08_service_grey", "gray.png", true }, + { "AP08_service_high_gain_antenna", "Antenna_diff.png", true }, + { "AP08_service_module", "Service_module_diff.png", true }, + { "AP08_service_nozzle", "Nozzle_diff.png", true }, + { "AP08_service_pink", "pink.png", true }, + { "AP08_service_red", "red.png", true }, + { "AP08_service_scratched_metal", "scratched_metal_gloss.png", true }, + { "AP08_service_white", "white.png", true }, + + -- Interior + -- { "AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false}, + -- { "AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false }, + -- { "AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false }, + -- { "AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false }, + -- { "AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false }, + -- { "AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false }, + -- { "AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false }, + -- { "AP11_interior_box_back_01", "box_back_01_paint_v001.png", false }, + -- { "AP11_interior_box_back_02", "box_back_02_paint_v001.png", false }, + -- { "AP11_interior_box_back_04", "box_back_04_paint_v001.png", false }, + -- { "AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false }, + -- { "AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false }, + -- { "AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false }, + -- { "AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false }, + -- { "AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false }, + -- { "AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false }, + -- { "AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false }, + -- { "AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false }, + -- { "AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false }, + -- { "AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false }, + -- { "AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false }, + -- { "AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false }, + -- { "AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false }, + -- { "AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false }, + -- { "AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false }, + -- { "AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false }, + -- { "AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false }, + -- { "AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false }, + -- { "AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false }, + -- { "AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false }, + -- { "AP11_interior_grey", "gray.png", false }, + -- { "AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false }, + -- { "AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false }, + -- { "AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false }, + -- { "AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false }, + -- { "AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false }, + -- { "AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false }, + -- { "AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false }, + -- { "AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false }, + -- { "AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false }, + -- { "AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false }, + -- { "AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false }, + -- { "AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_pole_end_02", "pole_end_02.png", false }, + -- { "AP11_interior_pole_end_03", "pole_end_03.png", false }, + -- { "AP11_interior_pole_tex_03", "pole_tex_03.png", false }, + -- { "AP11_interior_pole_tex_04", "pole_tex_04.png", false }, + -- { "AP11_interior_pole_tex_05", "pole_tex_05.png", false }, + -- { "AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false }, + -- { "AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false }, + -- { "AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false }, + -- { "AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false }, + -- { "AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false }, + -- { "AP11_interior_red", "red.png", false }, + -- { "AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false }, + -- { "AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false }, + -- { "AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false }, + -- { "AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false }, + -- { "AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false }, + -- { "AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false }, + -- { "AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false }, + -- { "AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false }, + -- { "AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false }, + -- { "AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false }, + -- { "AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false }, + -- { "AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false }, + -- { "AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false }, + -- { "AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false }, + -- { "AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false } +} + + +local partsInfoFull = { + -- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading + + -- Exterior + { "AP08_cone_command_module", "Command_module_diff.png", true }, + { "AP08_cone_hatchdoor_handle_scratched_metal", "scratched_metal_gloss.png", true }, + { "AP08_cone_vent_ports_black", "black.png", true }, + { "AP08_cone_vent_ports_red", "red.png", true }, + { "AP08_cone_hatchdoor_interior", "apollo_hatchdoor_interior.jpg", false }, + + { "AP08_service_black", "black.png", true }, + { "AP08_service_brown", "brown.png", true }, + { "AP08_service_grey", "gray.png", true }, + { "AP08_service_high_gain_antenna", "Antenna_diff.png", true }, + { "AP08_service_module", "Service_module_diff.png", true }, + { "AP08_service_nozzle", "Nozzle_diff.png", true }, + { "AP08_service_pink", "pink.png", true }, + { "AP08_service_red", "red.png", true }, + { "AP08_service_scratched_metal", "scratched_metal_gloss.png", true }, + { "AP08_service_white", "white.png", true }, + + -- Interior + { "AP11_int_back_wall_left", "AP11_int_back_wall_left.png", false }, + { "AP11_int_back_wall_right", "AP11_int_back_wall_right.png", false }, + { "AP11_interior_back_wall_top_0Shape3", "back_wall_top_0Shape3_tpAmbient_paint_03.png", false }, + { "AP11_interior_belt_buckles_02_L2", "belt_buckles_02_L2Shape_tpAmbient.png", false }, + { "AP11_interior_belt_straps_02", "belt_straps_02Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_black_push_buttons", "push_buttonsShape_tpAmbient.png", false }, + { "AP11_interior_bottom_boxes_03", "bottom_boxes_03_paint_01.png", false }, + { "AP11_interior_bottom_floor_tp", "bottom_floor_tpAmbient_paint_v002.png", false }, + { "AP11_interior_box_back_01", "box_back_01_paint_v001.png", false }, + { "AP11_interior_box_back_02", "box_back_02_paint_v001.png", false }, + { "AP11_interior_box_back_04", "box_back_04_paint_v001.png", false }, + { "AP11_interior_box_lft_lower_01", "box_lft_lower_01Shape_Diffuse_paint_v002.png", false }, + { "AP11_interior_box_lft_top", "box_lft_topShape_Diffuse_paint_v009.png", false }, + { "AP11_interior_box_mid_tp", "box_mid_tpDiffuse_paint_v001.png", false }, + { "AP11_interior_box_rt_top_02", "box_rt_top_02_paint_04.png", false }, + { "AP11_interior_brushed_blue_ano", "brushed_blue_ano_paint_01.png", false }, + { "AP11_interior_brushed_brass", "brushed_brass_paint_01.png", false }, + { "AP11_interior_brushed_grey_ano", "brushed_grey_ano_paint_02.png", false }, + { "AP11_interior_canvas_cover", "canvas_coverShape_tpAmbient_paint_01.png", false }, + { "AP11_interior_Channel_attachment", "Channel_attachment_Diffuse.png", false }, + { "AP11_interior_Channel_baseMetal", "Channel_baseMetal_Diffuse.png", false }, + { "AP11_interior_Channel_Material", "Channel_Material_Diffuse.png", false }, + { "AP11_interior_Channel_rsMaterial2", "Channel_rsMaterial2_Diffuse.png", false }, + { "AP11_interior_cloth_01", "cloth_01Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_coiled_hose", "coiled_hoseShape_tpAmbient.png", false }, + { "AP11_interior_control_panel_left_win_plates", "control_panel_left_win_platesShape_tpAmbient.png", false }, + { "AP11_interior_control_panel_rt_win_plates", "control_panel_rt_win_platesShape_tpAmbient.png", false }, + { "AP11_interior_copper_parts_main_cp", "copper_parts_main_cpShape_tpAmbient.png", false }, + { "AP11_interior_dials_main2", "dials_main2Shape_tpAmbient.png", false }, + { "AP11_interior_dials_t2", "dials_t2Shape_tpAmbient.png", false }, + { "AP11_interior_dial_fixes_01", "dial_fixes_01Shape_tpAmbient.png", false }, + { "AP11_interior_fire_ex_02", "fire_ex_02_paint_v001.png", false }, + { "AP11_interior_floor_panels_3", "floor_panels_3Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_floor_tile_tex_01", "floor_tile_tex_01.png", false }, + { "AP11_interior_grey", "gray.png", false }, + { "AP11_interior_handholds_cp", "handholds_cpShape_tpAmbient_paint_05.png", false }, + { "AP11_interior_hatch_release_0Shape5", "hatch_release_0Shape5_tpAmbient_paint_02.png", false }, + { "AP11_interior_headrests_02", "headrests_02Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_hoses_black_01", "hoses_black_01Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_hoses_white_0Shape1", "hoses_white_0Shape1_tpAmbient_paint_01.png", false }, + { "AP11_interior_josticks1", "joysticks1Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_joysticks_fabric1", "joysticks_fabric1_Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_joystick_poles_lft_05", "joystick_poles_lft_05_paint_v002.png", false }, + { "AP11_interior_joystick_poles_lft_long_05", "joystick_poles_lft_long_05_paint_v002.png", false }, + { "AP11_interior_joystick_poles_rt_05", "joystick_poles_rt_05_paint_v002.png", false }, + { "AP11_interior_latch_mechanisms_01", "latch_mechanisms_01Shape_tpAmbient.png", false }, + { "AP11_interior_lower_push_buttons", "lower_push_buttonsShape_tpAmbient.png", false }, + { "AP11_interior_lower_walls_back", "lower_walls_back_paint_04.png", false }, + { "AP11_interior_lower_walls_boxes_head", "lower_walls_boxes_headShape_tpAmbient_paint_v001.png", false }, + { "AP11_interior_main_cp_left_smth_03", "main_cp_left_0Shape3_tpAmbient_paint_02.png", false }, + { "AP11_interior_main_cp_mid_smth_02", "main_cp_mid_smth_02Shape_tpAmbient_paint_02.png", false }, + { "AP11_interior_main_cp_rt_smth", "main_cp_rt_smthShape_tpAmbient_paint_02.png", false }, + { "AP11_interior_main_cp_wheels", "main_cp_wheelsShape_tpAmbient.png", false }, + { "AP11_interior_metal_brackets_under_hatch", "metal_brackets_under_hatchShape_tpAmbient.png", false }, + { "AP11_interior_metal_tunnel_parts", "metal_tunnel_partsShape_tpAmbient_paint_01.png", false }, + { "AP11_interior_metal_window_parts", "metal_window_partsShape_tpAmbient_paint_01.png", false }, + { "AP11_interior_middle_walls_05", "middle_walls_05_tpAmbient_paint_02.png", false }, + { "AP11_interior_middle_walls_0Shape8", "middle_walls_0Shape8_tpAmbient_paint_01.png", false }, + { "AP11_interior_mid_tunnel_parts", "mid_tunnel_parts_03Shape_tpAmbient_paint_02.png", false }, + { "AP11_interior_new_switch_rails1", "new_switch_rails1Shape_tpAmbient.png", false }, + { "AP11_interior_nozzles_02", "nozzles_02Shape_tpAmbient_paint_01.png", false }, + { "AP11_interior_outlet_fabric3", "outlet_fabric3Shape_tpAmbient_paint_02.png", false }, + { "AP11_interior_pole_end_02", "pole_end_02.png", false }, + { "AP11_interior_pole_end_03", "pole_end_03.png", false }, + { "AP11_interior_pole_tex_03", "pole_tex_03.png", false }, + { "AP11_interior_pole_tex_04", "pole_tex_04.png", false }, + { "AP11_interior_pole_tex_05", "pole_tex_05.png", false }, + { "AP11_interior_pole_tex_lower_01", "pole_tex_lower_01.png", false }, + { "AP11_interior_pole_under_seat_paint_01", "pole_under_seat_paint_01.png", false }, + { "AP11_interior_pole_under_seat_square_bar", "pole_under_seat_square_bar_paint_01.png", false }, + { "AP11_interior_push_switches_lft1", "push_switches_lft1Shape_tpAmbient.png", false }, + { "AP11_interior_random_small_parts_01", "random_small_parts_01Shape_tpAmbient_paint_02.png", false }, + { "AP11_interior_red", "red.png", false }, + { "AP11_interior_reticle_wheel_tp", "reticle_wheel_tpAmbient_paint_01.png", false }, + { "AP11_interior_rivet_paint_v001", "rivet_paint_v001.png", false }, + { "AP11_interior_seats_fabric", "seats_fabric_paint_01.png", false }, + { "AP11_interior_seat_left_tp", "seat_left_tpAmbient_paint_v001.png", false }, + { "AP11_interior_seat_lights_left", "seat_lights_left_Shape_tpAmbient_paint_v001.png", false }, + { "AP11_interior_seat_lights_rt", "seat_lights_rt_Shape_tpAmbient_paint_v001.png", false }, + { "AP11_interior_seat_middle_tp", "seat_middle_tpAmbient_paint_v001.png", false }, + { "AP11_interior_seat_poles_0Shape1", "seat_poles_0Shape1_tpAmbient_paint_01.png", false }, + { "AP11_interior_seat_pole_mirror_0Shape1", "seat_pole_mirror_0Shape1_tpAmbient_paint_01.png", false }, + { "AP11_interior_seat_rt_tp", "seat_rt_tpAmbient_paint_v001.png", false }, + { "AP11_interior_sextant_0Shape2", "sextant_0Shape2_tpAmbient.png", false }, + { "AP11_interior_switch_covers_main_middle1", "switch_covers_main_middle1Shape_tpAmbient.png", false }, + { "AP11_interior_switch_rails_lft", "switch_rails_lftShape_tpAmbient.png", false }, + { "AP11_interior_tunnel_main_cylinder1", "switch_rails_lftShape_tpAmbient.png", false }, + { "AP11_interior_tunnel_switches_01", "tunnel_switches_01Shape_tpAmbient.png", false }, + { "AP11_interior_tunnel_wheelsShape", "tunnel_wheelsShape_tpAmbient.png", false }, + { "AP11_interior_walls_mid_left", "walls_mid_leftShape_tpAmbient_paint_01.png", false }, + { "AP11_interior_windows_front_0Shape4", "windows_front_0Shape4_tpAmbient_paint_01.png", false } +} + + + +asset.export("createCsmModel", function (parentNodeIdentifier) + local parts = {} + for i, info in ipairs(partsInfo) do + parts[#parts + 1] = asset_helper.createModelPart( + parentNodeIdentifier, + sun_transforms.SolarSystemBarycenter.Identifier, + models, + info[1], + info[2], + info[3] + ) + end + return parts +end) + + + +asset.export("createCsmModelFull", function (parentNodeIdentifier) + local parts = {} + for i, info in ipairs(partsInfoFull) do + parts[#parts + 1] = asset_helper.createModelPart( + parentNodeIdentifier, + sun_transforms.SolarSystemBarycenter.Identifier, + models, + info[1], + info[2], + info[3] + ) + end + return parts +end) diff --git a/data/assets/scene/solarsystem/missions/apollo/apollo_globebrowsing.asset b/data/assets/scene/solarsystem/missions/apollo/apollo_globebrowsing.asset new file mode 100644 index 0000000000..c9664a8eeb --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/apollo_globebrowsing.asset @@ -0,0 +1,37 @@ +--apollo_globebrowsing.asset +local moon_transforms = asset.require('scene/solarsystem/planets/earth/moon/moon') + +local heightmaps = asset.syncedResource({ + Name = "Apollo Globebrowsing Heightmaps", + Type = "HttpSynchronization", + Identifier = "apollo_globebrowsing_heightmaps", + Version = 1 +}) + +local basemaps = asset.syncedResource({ + Name = "Apollo Globebrowsing Basemaps", + Type = "HttpSynchronization", + Identifier = "apollo_globebrowsing_basemaps", + Version = 1 +}) + +local naclighting = asset.syncedResource({ + Name = "Apollo Globebrowsing NAC Lighting", + Type = "HttpSynchronization", + Identifier = "apollo_globebrowsing_naclighting", + Version = 1 +}) + +local stations = asset.syncedResource({ + Name = "Apollo 17 Globebrowsing Stations", + Type = "HttpSynchronization", + Identifier = "apollo_17_stations", + Version = 1 +}) + +asset.onInitialize(function () + openspace.globebrowsing.addBlendingLayersFromDirectory(heightmaps, moon_transforms.Moon.Identifier) + openspace.globebrowsing.addBlendingLayersFromDirectory(basemaps, moon_transforms.Moon.Identifier) + openspace.globebrowsing.addBlendingLayersFromDirectory(naclighting, moon_transforms.Moon.Identifier) + openspace.globebrowsing.addBlendingLayersFromDirectory(stations, moon_transforms.Moon.Identifier) +end) diff --git a/data/assets/scene/solarsystem/missions/apollo/apollo_lem.asset b/data/assets/scene/solarsystem/missions/apollo/apollo_lem.asset new file mode 100644 index 0000000000..9fb6f204ef --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/apollo_lem.asset @@ -0,0 +1,51 @@ +--apollo_lem.asset (hopeful title) + +-- This asset exports a function to create an Apollo Lunar Excursion Module (LEM). +-- Instead of hard-coding the scene graph node parent, +-- client assets can decide which object that the LEM should be attached to. +-- Usage example: createLem(Apollo11Lem.Idenfitier) +-- ...where Apollo11Lem is the scene graph node identifier to attach the LEM to. + +local asset_helper = asset.require('util/asset_helper') +local sun_transforms = asset.require('scene/solarsystem/sun/transforms') + +local models = asset.syncedResource({ + Name = "Apollo Models", + Type = "HttpSynchronization", + Identifier = "apollo_lem_model", + Version = 1 +}) + +local partsInfo = { + -- Data is structured as: Geometry file name (except .obj suffix), texture file name, shading + -- Exterior + { "black", "black.png", true }, + { "blue_glass", "blue_glass.png", true }, + { "booster", "booster3.png", true }, + { "bright_white", "white.png", true }, + { "dark_grey_dish", "dark_gray.png", true }, + { "dull_white", "dull_white.png", true }, + { "gold", "gold.png", true }, + { "light_grey", "light_gray.png", true }, + { "mid_grey", "gray.png", true }, + { "orange", "orange.png", true }, + { "texture_lem_flag", "texture_lem_flag.png", true }, + { "texture_lem_unitedstates", "texture_lem_unitedstates.png", true }, + { "yellow_buttons", "yellow.png", true } +} + + +asset.export("createLem", function (parentNodeIdentifier) + local parts = {} + for i, info in ipairs(partsInfo) do + parts[#parts + 1] = asset_helper.createModelPart( + parentNodeIdentifier, + sun_transforms.SolarSystemBarycenter.Identifier, + models, + info[1], + info[2], + info[3] + ) + end + return parts +end) diff --git a/data/assets/scene/solarsystem/missions/apollo/insignias_map.asset b/data/assets/scene/solarsystem/missions/apollo/insignias_map.asset new file mode 100644 index 0000000000..6df2f26d4b --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/insignias_map.asset @@ -0,0 +1,120 @@ +-- Apollo mission insignias on their locations on the Lunar surface. +-- The insignias are invisible by default, but can be enabled using shown or hidden using +-- the exported functions `showInsignias(interpolationDuration)` and `hideInsignias(interpolationDuration)`. + +local asset_helper = asset.require('util/asset_helper') + +local insigniasPath = asset.syncedResource({ + Name = "Apollo Insignias", + Type = "HttpSynchronization", + Identifier = "apollo_insignias", + Version = 1 +}) +local moon = asset.require('scene/solarsystem/planets/earth/moon/moon') + +local landingData = { + { + Identifier = "Apollo11", + Name = "Apollo 11", + Name = "Apollo 11", + Texture = "apollo11.png", + LunarModule = { 0.67409, 23.47298, 0.0 } + }, + { + Identifier = "Apollo12", + Name = "Apollo 12", + Texture = "apollo12.png", + LunarModule = { -3.01381, -23.41930, 0.0 } + }, + { + Identifier = "Apollo14", + Name = "Apollo 14", + Texture = "apollo14.png", + LunarModule = { -3.64544, -17.47139, 0.0 } + }, + { + Identifier = "Apollo15", + Name = "Apollo 15", + Texture = "apollo15.png", + LunarModule = { 26.13224, 3.63400, 0.0 } + }, + { + Identifier = "Apollo16", + Name = "Apollo 16", + Texture = "apollo16.png", + LunarModule = { -8.97341, 15.49859, 0.0 } + }, + { + Identifier = "Apollo17", + Name = "Apollo 17", + Texture = "apollo17.png", + LunarModule = { 20.18809, 30.77475, 0.0 } + } +} + +local nodes = {} +local size = 100000; + +for i = 1, #landingData do + local entry = landingData[i] + nodes[i] = { + Identifier = entry.Identifier .. "Insignia", + Parent = moon.Moon.Identifier, + Transform = { + Translation = { + Type = "GlobeTranslation", + Globe = moon.Moon.Identifier, + Latitude = entry.LunarModule[1], + Longitude = entry.LunarModule[2], + Altitude = entry.LunarModule[3] + size * 1.1, + UseHeightmap = false + }, + }, + Renderable = { + Type = "RenderablePlaneImageLocal", + Size = size, + Origin = "Center", + Billboard = true, + Texture = insigniasPath .. "/" .. entry.Texture, + Opacity = 0.0 + }, + GUI = { + Path = "/Other/Labels", + Name = entry.Name .. " Insignia" + } + } +end + +asset.onInitialize(function () + openspace.bindShortcut( + 'Show Apollo Landing Labels', + 'openspace.setPropertyValue("Scene.Apollo*Insignia.Renderable.Opacity", 1, 0.5)', + 'Show patches of the Apollo missions on their respective landing sites', + '/Missions/Apollo' + ) + + openspace.bindShortcut( + 'Hide Apollo Landing Labels', + 'openspace.setPropertyValue("Scene.Apollo*Insignia.Renderable.Opacity", 0, 0.5)', + 'Hide patches of the Apollo missions on their respective landing sites', + '/Missions/Apollo' + ) +end) + +asset.export('showInsignia', function (missinNumber, interpolationDuration) + openspace.setPropertyValue("Scene.Apollo" .. missionNumber .. "Insignia.Renderable.Opacity", 1, interpolationDuration) +end) + +asset.export('hideInsignia', function (missinNumber, interpolationDuration) + openspace.setPropertyValue("Scene.Apollo" .. missionNumber .. "Insignia.Renderable.Opacity", 0, interpolationDuration) +end) + +asset.export('showInsignias', function (interpolationDuration) + openspace.setPropertyValue("Scene.Apollo*Insignia.Renderable.Opacity", 1, interpolationDuration) +end) + +asset.export('hideInsignias', function (interpolationDuration) + openspace.setPropertyValue("Scene.Apollo*Insignia.Renderable.Opacity", 0, interpolationDuration) +end) + +asset_helper.registerSceneGraphNodesAndExport(asset, nodes) diff --git a/data/assets/scene/solarsystem/missions/apollo/lem_model.asset b/data/assets/scene/solarsystem/missions/apollo/lem_model.asset new file mode 100644 index 0000000000..dbc9210394 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/apollo/lem_model.asset @@ -0,0 +1,8 @@ +local modelFolder = asset.syncedResource({ + Name = "Apollo Lem Models", + Type = "HttpSynchronization", + Identifier = "apollo_lem_model", + Version = 3 +}) + +asset.export('modelFolder', modelFolder) diff --git a/data/assets/scene/solarsystem/missions/dawn/dawn.asset b/data/assets/scene/solarsystem/missions/dawn/dawn.asset index f630ad8b8f..e7fc3a3747 100644 --- a/data/assets/scene/solarsystem/missions/dawn/dawn.asset +++ b/data/assets/scene/solarsystem/missions/dawn/dawn.asset @@ -666,11 +666,17 @@ local Dawn = { local DawnSolarArray1 = { Identifier = "DawnSolar1", Parent = Dawn.Identifier, - Transformation = { + Transform = { + -- JCC: Spice rotations are commented because spice ck files + -- are not present. + -- Rotation = { + -- Type = "SpiceRotation", + -- SourceFrame = "DAWN_SA-Y", + -- DestinationFrame = "DAWN_SPACECRAFT" + -- } Rotation = { - Type = "SpiceRotation", - SourceFrame = "DAWN_SA-Y", - DestinationFrame = "DAWN_SPACECRAFT" + Type = "StaticRotation", + Rotation = {0.0, 4.71225, 0.0} } }, Renderable = { @@ -693,11 +699,15 @@ local DawnSolarArray1 = { local DawnSolarArray2 = { Identifier = "DawnSolar2", Parent = Dawn.Identifier, - Transformation = { + Transform = { + -- Rotation = { + -- Type = "SpiceRotation", + -- SourceFrame = "DAWN_SA+Y", + -- DestinationFrame = "DAWN_SPACECRAFT" + -- } Rotation = { - Type = "SpiceRotation", - SourceFrame = "DAWN_SA+Y", - DestinationFrame = "DAWN_SPACECRAFT" + Type = "StaticRotation", + Rotation = {3.1415, 1.57075, 0.0} } }, Renderable = { diff --git a/data/assets/scene/solarsystem/missions/dawn/dawn_kernels.asset b/data/assets/scene/solarsystem/missions/dawn/dawn_kernels.asset index 6ee7f55abc..bac98c64a6 100644 --- a/data/assets/scene/solarsystem/missions/dawn/dawn_kernels.asset +++ b/data/assets/scene/solarsystem/missions/dawn/dawn_kernels.asset @@ -2,7 +2,7 @@ local Kernels = asset.syncedResource({ Name = "Dawn Kernels", Type = "HttpSynchronization", Identifier = "dawn_kernels", - Version = 1 + Version = 2 }) asset.export("Kernels", Kernels) \ No newline at end of file diff --git a/data/assets/scene/solarsystem/missions/dawn/vesta.asset b/data/assets/scene/solarsystem/missions/dawn/vesta.asset index d6b1735e36..75c1ed63f1 100644 --- a/data/assets/scene/solarsystem/missions/dawn/vesta.asset +++ b/data/assets/scene/solarsystem/missions/dawn/vesta.asset @@ -20,7 +20,7 @@ local images = asset.syncedResource({ local models = asset.syncedResource({ Name = "Vesta Models", Type = "HttpSynchronization", - Identifier = "vesta_comet", + Identifier = "vesta_model", Version = 1 }) @@ -47,8 +47,9 @@ local Vesta = { Type = "RenderableModelProjection", Geometry = { Type = "MultiModelGeometry", - GeometryFile = models .. "/VestaComet/VestaComet_5000.obj" + GeometryFile = models .. "/VestaComet_5000.obj" }, + BoundingSphereRadius = 10.0, ColorTexture = textures .. "/dummy.jpg", Projection = { Sequence = images, diff --git a/data/assets/scene/solarsystem/missions/gaia/dashboard.asset b/data/assets/scene/solarsystem/missions/gaia/dashboard.asset new file mode 100644 index 0000000000..bac51a5ad2 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/gaia/dashboard.asset @@ -0,0 +1,12 @@ +local assetHelper = asset.require('util/asset_helper') +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemDistance", + Identifier = "GaiaEarthDistance", + GuiName = "Gaia Earth Distance", + SourceType = "Node", + SourceNodeName = "Gaia", + DestinationType = "Node Surface", + DestinationNodeName = "Earth" + } +}) diff --git a/data/assets/scene/solarsystem/missions/insight/edl.asset b/data/assets/scene/solarsystem/missions/insight/edl.asset new file mode 100644 index 0000000000..5ede98786a --- /dev/null +++ b/data/assets/scene/solarsystem/missions/insight/edl.asset @@ -0,0 +1,981 @@ +asset.require('spice/base') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') +local assetHelper = asset.require('util/asset_helper') + +local models_chutes = asset.syncedResource({ + Name = "Insight Models Chutes", + Type = "HttpSynchronization", + Identifier = "insight_models_chutes", + Version = 1 +}) + +local models_cruise_arrays = asset.syncedResource({ + Name = "Insight Models Cruise Arrays", + Type = "HttpSynchronization", + Identifier = "insight_models_cruise_arrays", + Version = 1 +}) + +local models_cruise_cone = asset.syncedResource({ + Name = "Insight Models Cruise Cone", + Type = "HttpSynchronization", + Identifier = "insight_models_cruise_cone", + Version = 1 +}) + +local models_lander_lander_deck = asset.syncedResource({ + Name = "Insight Models Lander Deck", + Type = "HttpSynchronization", + Identifier = "insight_models_lander_lander_deck", + Version = 1 +}) + +local models_lander_legs_deploy = asset.syncedResource({ + Name = "Insight Models Lander Legs Deploy", + Type = "HttpSynchronization", + Identifier = "insight_models_lander_legs_deploy", + Version = 1 +}) + +local models_lander_legs_stow = asset.syncedResource({ + Name = "Insight Models Lander Legs Stow", + Type = "HttpSynchronization", + Identifier = "insight_models_lander_legs_stow", + Version = 1 +}) + +local models_lander_panels_deploy = asset.syncedResource({ + Name = "Insight Models Lander Panels Deploy", + Type = "HttpSynchronization", + Identifier = "insight_models_lander_panels_deploy", + Version = 1 +}) + +local models_lander_panels_stow = asset.syncedResource({ + Name = "Insight Models Lander Panels Stow", + Type = "HttpSynchronization", + Identifier = "insight_models_lander_panels_stow", + Version = 1 +}) + + + + +local ikernels = asset.syncedResource({ + Name = "Insight Kernels", + Type = "HttpSynchronization", + Identifier = "insight_kernels", + Version = 1 +}) + +local iKernels = { + ikernels .. '/nsyt_spk_cruise_od063_v1_approach2surface_SC_Lander.tsc', + ikernels .. '/insight_v02.tfr', + ikernels .. '/mar085s.bsp', + ikernels .. '/nsyt_spk_cruise_POST_approach2surface_SC_Lander.bsp', + ikernels .. '/nsyt_spk_cruise_POST_approach2surface_SC_Lander.bck', +} + +local RotationMatrix = { + -1, 0, 0, + 0, 0, -1, + 0, -1, 0 +} + +local LightSources = { + { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = sunTransforms.SolarSystemBarycenter.Identifier, + Intensity = 1.0 + }, + { + Type = "SceneGraphLightSource", + Identifier = "Mars", + Node = "Mars", + Intensity = 1.0 + }, + { + Identifier = "Camera", + Type = "CameraLightSource", + Intensity = 0.5 + } +} + +--expected timeline +local entryTimeStart = "2018 NOV 26 19:39:03.68"; --(-00:08:07.32 less then pdf) +local parachuteDeployTime1 = "2018 NOV 26 19:42:41.68" -- entry + 218s +local parachuteDeployTime20 = "2018 NOV 26 19:42:42.18" -- entry + 218.5s +local parachuteDeployTime40 = "2018 NOV 26 19:42:42.68" -- entry + 219s +local heatShieldSeperationTime = "2018 NOV 26 19:42:56.68" -- entry + 233s +local legDeployTime = "2018 NOV 26 19:43:06.68" -- entry + 243s +local landerSeperationTime = "2018 NOV 26 19:44:51.68" -- entry + 348s +local touchdownTime = "2018 NOV 26 19:45:32.68" -- entry + 389s +local panelDeployTime = "2018 NOV 26 19:45:33.68" -- entry + 390s +local foreverTime = "2018 NOV 26 20:17:50.68" -- entry + 2327s + +local kernelTouchdownTime = "2018 NOV 26 19:45:32.3" +local spiceRotationEndTime = "2018 NOV 26 19:51:39" + +local InsightParent = { + Identifier = "InsightParent", + Parent = "MarsBarycenter", + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = "INSIGHT", + Observer = "MARS", + Frame = "GALACTIC", + Kernels = iKernels + }, + Rotation = { + Type = "SpiceRotation", + SourceFrame = "INSIGHT_LANDER_CRUISE", + DestinationFrame = "GALACTIC" + }, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = spiceRotationEndTime + }, + GUI = { + Hidden = true, + Name = "InsightParent", + Path = "/Solar System/Missions/Insight" + } +} + +-- -1397 offset for MOLA +local Insight = { + Identifier = "Insight", + Parent = "InsightParent", + Transform = { + Rotation = { + Type = "StaticRotation", + Rotation = {0.0, 0.0, -3.1415} + } + }, + GUI = { + Name = "Insight", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Entry_CapsuleA = { + Identifier = "Insight_Entry_CapsuleA", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_cruise_cone .. "/cruise_insight_doubleside2_newcapsule_diffuse.obj" + }, + ColorTexture = models_cruise_cone .. "/insight_newcapsule_diffuse.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = landerSeperationTime + }, + GUI = { + Hidden = true, + Name = "Insight Entry CapsuleA", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Entry_Capsule_Ring = { + Identifier = "Insight_Entry_Capsule_Ring", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_cruise_cone .. "/insight_cruise_cone_ring_foil_gold.obj" + }, + ColorTexture = models_cruise_cone .. "/foil_gold_ramp.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = landerSeperationTime + }, + GUI = { + Hidden = true, + Name = "Insight Entry Capsule Ring", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Entry_Capsule_Plugs = { + Identifier = "Insight_Entry_Capsule_Plugs", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_cruise_cone .. "/insight_cruise_cone_capsule_diffuse.obj" + }, + ColorTexture = models_cruise_cone .. "/insight_capsule_diffuse.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = landerSeperationTime + }, + GUI = { + Hidden = true, + Name = "Insight Entry Capsule Plugs", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Entry_Heatshield = { + Identifier = "Insight_Entry_Heatshield", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_cruise_cone .. "/insight_cruise_heatshield_foil_gold.obj" + }, + ColorTexture = models_cruise_cone .. "/foil_gold_ramp.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = heatShieldSeperationTime + }, + GUI = { + Hidden = true, + Name = "Insight Entry Heatshield", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Parachute_0 = { + Identifier = "Insight_Parachute_0", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_chutes .. "/insight_chute_frame01_diff1.obj" + }, + ColorTexture = models_chutes .. "/chute_diff.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = parachuteDeployTime1, + End = parachuteDeployTime20 + }, + GUI = { + Hidden = true, + Name = "Insight Parachute0", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Parachute_Cords_0 = { + Identifier = "Insight_Parachute_Cords_0", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_chutes .. "/insight_chute_frame01_cords1.obj" + }, + ColorTexture = models_chutes .. "/foil_gold_ramp.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = parachuteDeployTime1, + End = parachuteDeployTime20 + }, + GUI = { + Hidden = true, + Name = "Insight ParachuteC0", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Parachute_20 = { + Identifier = "Insight_Parachute_20", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_chutes .. "/insight_chute_frame20_diff1.obj" + }, + ColorTexture = models_chutes .. "/chute_diff.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = parachuteDeployTime20, + End = parachuteDeployTime40 + }, + GUI = { + Hidden = true, + Name = "Insight Parachute20", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Parachute_Cords_20 = { + Identifier = "Insight_Parachute_Cords_20", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_chutes .. "/insight_chute_frame20_cords1.obj" + }, + ColorTexture = models_chutes .. "/foil_gold_ramp.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = parachuteDeployTime20, + End = parachuteDeployTime40 + }, + GUI = { + Hidden = true, + Name = "Insight ParachuteC20", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Parachute_40 = { + Identifier = "Insight_Parachute_40", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_chutes .. "/chute_doubleside_frame40_diff.obj" + }, + ColorTexture = models_chutes .. "/chute_diff.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = parachuteDeployTime40, + End = landerSeperationTime + }, + GUI = { + Hidden = true, + Name = "Insight Parachute40", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Parachute_Cords_40 = { + Identifier = "Insight_Parachute_Cords_40", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_chutes .. "/insight_chute_frame40_cords1.obj" + }, + ColorTexture = models_chutes .. "/foil_gold_ramp.png", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = parachuteDeployTime40, + End = landerSeperationTime + }, + GUI = { + Hidden = true, + Name = "Insight ParachuteC40", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A001 = { + Identifier = "Insight_Lander_A001", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO01.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A001", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A002 = { + Identifier = "Insight_Lander_A002", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO02.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_02.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A002", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A003 = { + Identifier = "Insight_Lander_A003", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO03.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_03.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A003", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A004 = { + Identifier = "Insight_Lander_A004", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO04.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_04.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A004", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A005 = { + Identifier = "Insight_Lander_A005", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO05.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_05.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A005", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A006 = { + Identifier = "Insight_Lander_A006", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO06.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_06.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A006", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A007 = { + Identifier = "Insight_Lander_A007", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO07.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_07.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A007", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_A008 = { + Identifier = "Insight_Lander_A008", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_AO08.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_AO_08.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander A008", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_foil1 = { + Identifier = "Insight_Lander_foil1", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_foil1.obj" + }, + ColorTexture = models_lander_lander_deck .. "/foil_silver_ramp.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander foil", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_Tex01 = { + Identifier = "Insight_Lander_Tex01", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_tex01.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_tex_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander Tex01", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Lander_Tex02 = { + Identifier = "Insight_Lander_Tex02", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_lander_deck .. "/insight_lander_deck_tex02.obj" + }, + ColorTexture = models_lander_lander_deck .. "/InSIGHT_tex_02.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight Lander Tex02", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Legs_Stowed_tex = { + Identifier = "Insight_Legs_Stowed_tex", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_legs_stow .. "/insight_lander_legs_stow_tex01.obj" + }, + ColorTexture = models_lander_legs_stow .. "/InSIGHT_tex_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = heatShieldSeperationTime, + End = legDeployTime + }, + GUI = { + Hidden = true, + Name = "Insight legs_stow_tex", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Legs_Stowed_AO06 = { + Identifier = "Insight_Legs_Stowed_AO", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_legs_stow .. "/insight_lander_legs_stow_AO06.obj" + }, + ColorTexture = models_lander_legs_stow .. "/InSIGHT_AO_06.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = heatShieldSeperationTime, + End = legDeployTime + }, + GUI = { + Hidden = true, + Name = "Insight legs_stow_AO", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Legs_Deployed_tex = { + Identifier = "Insight_Legs_Deployed_tex", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_legs_deploy .. "/insight_lander_legs_deploy_tex01.obj" + }, + ColorTexture = models_lander_legs_deploy .. "/InSIGHT_tex_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = legDeployTime, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight legs_deploy_tex", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Legs_Deployed_AO06 = { + Identifier = "Insight_Legs_Deployed_AO", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_legs_deploy .. "/insight_lander_legs_deploy_AO06.obj" + }, + ColorTexture = models_lander_legs_deploy .. "/InSIGHT_AO_06.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = legDeployTime, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight legs_deploy_AO", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Panels_Stowed_tex = { + Identifier = "Insight_Panels_Stowed_tex", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_panels_stow .. "/insight_lander_panels_stow_tex01.obj" + }, + ColorTexture = models_lander_panels_stow .. "/InSIGHT_tex_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight panels_stow_tex", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Panels_Stowed_tex2 = { + Identifier = "Insight_Panels_Stowed_tex2", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_panels_stow .. "/insight_lander_panels_stow_tex02.obj" + }, + ColorTexture = models_lander_panels_stow .. "/InSIGHT_tex_02.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight panels_stow_tex2", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Panels_Stowed_AO01 = { + Identifier = "Insight_Panels_Stowed_AO", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_panels_stow .. "/insight_lander_panels_stow_AO01.obj" + }, + ColorTexture = models_lander_panels_stow .. "/InSIGHT_AO_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight panels_stow_AO", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Panels_Deployed_tex = { + Identifier = "Insight_panels_Deployed_tex", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_panels_deploy .. "/insight_lander_panels_deploy_tex01.obj" + }, + ColorTexture = models_lander_panels_deploy .. "/InSIGHT_tex_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = panelDeployTime, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight panels_deploy_tex", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Panels_Deployed_tex2 = { + Identifier = "Insight_panels_Deployed_tex2", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_panels_deploy .. "/insight_lander_panels_deploy_tex02.obj" + }, + ColorTexture = models_lander_panels_deploy .. "/InSIGHT_tex_02.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = panelDeployTime, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight panels_deploy_tex2", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Panels_Deployed_AO06 = { + Identifier = "Insight_panels_Deployed_AO", + Parent = Insight.Identifier, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models_lander_panels_deploy .. "/insight_lander_panels_deploy_AO01.obj" + }, + ColorTexture = models_lander_panels_deploy .. "/InSIGHT_AO_01.jpg", + ModelTransform = RotationMatrix, + LightSources = LightSources, + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = panelDeployTime, + End = foreverTime + }, + GUI = { + Hidden = true, + Name = "Insight panels_deploy_AO", + Path = "/Solar System/Missions/Insight" + } +} + +local Insight_Trail = { + Identifier = "InsightTrail", + Parent = "Mars", + Renderable = { + Enabled = false, + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = "-189", + Observer = "MARS", + Frame = "IAU_MARS", + Kernels = iKernels + }, + Color = { 0.70, 0.50, 0.20 }, + StartTime = "2018 NOV 26 19:30:13.390", + EndTime = "2018 NOV 26 19:51:40.890", + SampleInterval = 2 + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = entryTimeStart, + End = landerSeperationTime + }, + GUI = { + Name = "Insight Trail", + Path = "/Solar System/Missions/Insight" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + InsightParent, Insight, Insight_Entry_CapsuleA, Insight_Entry_Capsule_Ring, + Insight_Entry_Capsule_Plugs, Insight_Entry_Heatshield, Insight_Parachute_0, + Insight_Parachute_Cords_0, Insight_Parachute_20, Insight_Parachute_Cords_20, + Insight_Parachute_40, Insight_Parachute_Cords_40, Insight_Lander_A001, + Insight_Lander_A002, Insight_Lander_A003, Insight_Lander_A004, Insight_Lander_A005, + Insight_Lander_A006, Insight_Lander_A007, Insight_Lander_A008, Insight_Lander_foil1, + Insight_Lander_Tex01, Insight_Lander_Tex02, Insight_Legs_Stowed_tex, + Insight_Legs_Stowed_AO06, Insight_Legs_Deployed_tex, Insight_Legs_Deployed_AO06, + Insight_Panels_Stowed_tex, Insight_Panels_Stowed_tex2, Insight_Panels_Stowed_AO01, + Insight_Panels_Deployed_tex, Insight_Panels_Deployed_tex2, + Insight_Panels_Deployed_AO06, Insight_Trail +}) diff --git a/data/assets/scene/solarsystem/missions/insight/shortcuts.asset b/data/assets/scene/solarsystem/missions/insight/shortcuts.asset new file mode 100644 index 0000000000..a5154e9fca --- /dev/null +++ b/data/assets/scene/solarsystem/missions/insight/shortcuts.asset @@ -0,0 +1,62 @@ +--insight/shortcuts.asset + +local InsightEntryTime = "2018 NOV 26 19:39:03.68" + +local insightNavigationSate = "{" .. + "Anchor = 'Insight'," .. + "Pitch = 0.567457E-4," .. + "Position = { 1.240506E1,-1.369270E1,-2.423553E0 }," .. + "ReferenceFrame = 'Root',".. + "Up = { 0.441211E0,0.247019E0,0.862737E0 }," .. + "Yaw = -0.446853E-4}" + +local Shortcuts = { + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', -470.800006);", + Documentation = "Enable Insight landing height layer offset", + Name = "Insight Height Offset", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', 0);", + Documentation = "Disable Insight landing height layer offset", + Name = "Default Height Offset", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', true);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', true);", + Documentation = "Enables HiRISE layer for insight landing", + Name = "Enable HiRISE", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', false);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', false);", + Documentation = "Disables HiRISE layer used for insight landing", + Name = "Disable HiRISE", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.navigation.setNavigationState(" .. insightNavigationSate .. ");", + Documentation = "Change the camera state for the start of Insight EDL", + Name = "Insight EDL NavigationState", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.time.setPause(true);openspace.time.setTime('" .. InsightEntryTime .. "');", + Documentation = "Change the time for the start of Insight EDL", + Name = "Insight EDL Time", + GuiPath = "/Missions/Insight", + Local = false + }, +} + +asset.export("Shortcuts", Shortcuts) diff --git a/data/assets/scene/solarsystem/missions/juno/juno.asset b/data/assets/scene/solarsystem/missions/juno/juno.asset index bc19b63f9f..78d0296a6f 100644 --- a/data/assets/scene/solarsystem/missions/juno/juno.asset +++ b/data/assets/scene/solarsystem/missions/juno/juno.asset @@ -17,14 +17,16 @@ local model = asset.syncedResource({ Version = 1 }) + local kernels = asset.syncedResource({ Name = "Juno Kernels", Type = "HttpSynchronization", Identifier = "juno_kernels", - Version = 1 + Version = 2 }) local JunoKernels = { + kernels .. "/juno_v12.tf", kernels .. "/JNO_SCLKSCET.00039.tsc", kernels .. "/juno_jade_v00.ti", kernels .. "/juno_jedi_v00.ti", @@ -34,10 +36,10 @@ local JunoKernels = { kernels .. "/juno_mwr_v01.ti", kernels .. "/juno_struct_v01.ti", kernels .. "/juno_uvs_v00.ti", - kernels .. "/juno_v08.tf", kernels .. "/juno_waves_v00.ti", kernels .. "/juno_mwr_v01.ti", kernels .. "/spk_merge_110805_171017_130515.bsp", + kernels .. "/juno_sc_nom_110807_171016_v01.bc", kernels .. "/juno_sc_prl_110930_111028_jc003c01_v01.bc", kernels .. "/juno_sc_prl_111028_111125_jc004b00_v01.bc", kernels .. "/juno_sc_prl_111125_111223_jc005b00_v01.bc", @@ -161,19 +163,12 @@ local Juno = { }, ColorTexture = textures .. "/gray.png", ModelTransform = RotationMatrix, - LightSources = { - { - Type = "SceneGraphLightSource", - Identifier = "Sun", - Node = sunTransforms.SolarSystemBarycenter.Identifier, - Intensity = 1.0 - }, - { - Identifier = "Camera", - Type = "CameraLightSource", - Intensity = 0.5 - } - } + LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier) + }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "2011-08-07T17:15:00", + End = "2017-10-16T19:29:24" }, GUI = { Path = "/Solar System/Missions/Juno" diff --git a/data/assets/scene/solarsystem/missions/messenger/dashboard.asset b/data/assets/scene/solarsystem/missions/messenger/dashboard.asset new file mode 100644 index 0000000000..d271c312ba --- /dev/null +++ b/data/assets/scene/solarsystem/missions/messenger/dashboard.asset @@ -0,0 +1,13 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemDistance", + Identifier = "MessengerDistance", + GuiName = "Messenger - Mercury Distance", + SourceType = "Node", + SourceNodeName = "Messenger", + DestinationType = "Node", + DestinationNodeName = "Mercury" + } +}) diff --git a/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset b/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset index 9a8713faf6..35dfbe7110 100644 --- a/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset +++ b/data/assets/scene/solarsystem/missions/messenger/mercurymagnetosphere.asset @@ -6,7 +6,7 @@ local localFolder = asset.syncedResource({ Name = "Mercury Magnetosphere", Type = "HttpSynchronization", Identifier = "mercury_magnetosphere", - Version = 1 + Version = 3 }) @@ -22,7 +22,7 @@ local Magnetosphere = { SourceDirectory = localFolder, TransferFunction = localFolder .. "/transferfunction.txt", Variable = "rho", - StepSize = "0.003", + StepSize = 0.003, Dimensions = {64, 64, 64}, GridType = "Cartesian", SecondsBefore = 24*60*60*365*100, diff --git a/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset b/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset index 61a01cb9eb..70861f014e 100644 --- a/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset +++ b/data/assets/scene/solarsystem/missions/messenger/messengerSC.asset @@ -14,12 +14,13 @@ local kernels = asset.syncedResource({ Name = "Messenger Kernels", Type = "HttpSynchronization", Identifier = "messenger_spice", - Version = 1 + Version = 2 }) local LocalKernels = { kernels .. '/messenger_2548.tsc', + kernels .. '/msgr_v231.tf', kernels .. '/de405.bsp', kernels .. '/msgr_040803_150430_150430_od431sc_2.bsp', @@ -34,40 +35,30 @@ local LocalKernels = { kernels .. '/msgr_mla_v010.ti', kernels .. '/msgr_rs_v111.ti', kernels .. '/msgr_xrs_v001.ti', - - kernels .. '/msgr_1103_v02.bc', - kernels .. '/msgr_1104_v02.bc', - kernels .. '/msgr_1105_v02.bc', - kernels .. '/msgr_1106_v02.bc', + kernels .. '/pck00008.tpc', kernels .. '/pck00008_msgr.tpc', kernels .. '/pck00009_msgr_v10.tpc', kernels .. '/pck00010_msgr_v10.tpc', kernels .. '/pck00010_msgr_v23.tpc', - kernels .. '/pck00010.tpc' + kernels .. '/pck00010.tpc', + + kernels .. '/msgr_1103_v02.bc', + kernels .. '/msgr_1104_v02.bc', + kernels .. '/msgr_1105_v02.bc', + kernels .. '/msgr_1106_v02.bc', } local RotationMatrix = { - 0, 1, 0, - 0, 0, 1, - 1, 0, 0 + 1, 0, 0, + 0, 0, -1, + 0, 1, 0 } -local LightSources = { - { - Type = "SceneGraphLightSource", - Identifier = "Sun", - Node = sunTransforms.SolarSystemBarycenter.Identifier, - Intensity = 1.0 - }, - { - Identifier = "Camera", - Type = "CameraLightSource", - Intensity = 0.5 - } -} + +local LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier) local Messenger = { Identifier = "Messenger", @@ -85,6 +76,11 @@ local Messenger = { DestinationFrame = "GALACTIC", }, }, + TimeFrame = { + Type = "TimeFrameInterval", + Start = "2011-03-01", + End = "2011-06-30" + }, GUI = { Name = "Messenger", Path = "/Solar System/Missions/Messenger" @@ -148,7 +144,6 @@ local MessengerProbeHeatShield = { } } - local MessengerProbeMetal = { Identifier = "MessengerProbe_Metal", Parent = Messenger.Identifier, diff --git a/data/assets/scene/solarsystem/missions/messenger/openspace_mercury.ti b/data/assets/scene/solarsystem/missions/messenger/openspace_mercury.ti deleted file mode 100644 index 218f8c3ec2..0000000000 --- a/data/assets/scene/solarsystem/missions/messenger/openspace_mercury.ti +++ /dev/null @@ -1,33 +0,0 @@ -OpenSpace ecliptic frames: -Mercury-centric Solar Ecliptic (MERCURYSE) frame - -These frames are only defined as helper frames for OpenSpace. - - +X is parallel to the geometric planet-sun position vector. - - -Y axis is the normalized component of the planet's orbital vector - - +Z axis is parallel to the cross product of the frame's +X axis - and the frame's +Y axis. - -\begindata - - FRAME_MERCURYSE = 4600199 - FRAME_4600199_NAME = 'MERCURYSE' - FRAME_4600199_CLASS = 5 - FRAME_4600199_CLASS_ID = 4600199 - FRAME_4600199_CENTER = 199 - FRAME_4600199_RELATIVE = 'J2000' - FRAME_4600199_DEF_STYLE = 'PARAMETERIZED' - FRAME_4600199_FAMILY = 'TWO-VECTOR' - FRAME_4600199_PRI_AXIS = 'X' - FRAME_4600199_PRI_VECTOR_DEF = 'OBSERVER_TARGET_POSITION' - FRAME_4600199_PRI_OBSERVER = 'MERCURY' - FRAME_4600199_PRI_TARGET = 'SUN' - FRAME_4600199_PRI_ABCORR = 'NONE' - FRAME_4600199_SEC_AXIS = 'Y' - FRAME_4600199_SEC_VECTOR_DEF = 'OBSERVER_TARGET_VELOCITY' - FRAME_4600199_SEC_OBSERVER = 'MERCURY' - FRAME_4600199_SEC_TARGET = 'SUN' - FRAME_4600199_SEC_ABCORR = 'NONE' - FRAME_4600199_SEC_FRAME = 'J2000' diff --git a/data/assets/scene/solarsystem/missions/messenger/transferfunction.txt b/data/assets/scene/solarsystem/missions/messenger/transferfunction.txt deleted file mode 100644 index 7174117a1e..0000000000 --- a/data/assets/scene/solarsystem/missions/messenger/transferfunction.txt +++ /dev/null @@ -1,8 +0,0 @@ -width 1024 -lower 0.0 -upper 0.1 -mappingkey 0.0 255 0 0 0 -mappingkey 0.01 255 0 0 0 -mappingkey 0.1 255 255 0 100 - -mappingkey 0.5 255 255 0 255 \ No newline at end of file diff --git a/data/assets/scene/solarsystem/missions/newhorizons/charon.asset b/data/assets/scene/solarsystem/missions/newhorizons/charon.asset index b99860f62d..8f2c7d5910 100644 --- a/data/assets/scene/solarsystem/missions/newhorizons/charon.asset +++ b/data/assets/scene/solarsystem/missions/newhorizons/charon.asset @@ -13,9 +13,9 @@ local textures = asset.syncedResource({ local charonRadius = 6.035E5 -local Charon = { - Identifier = "Charon", - Parent = transforms.PlutoBarycenter.Identifier, +local CharonProjection = { + Identifier = "CharonProjection", + Parent = transforms.PlutoBarycenterAccurate.Identifier, Transform = { Translation = { Type = "SpiceTranslation", @@ -43,6 +43,7 @@ local Charon = { textures .. "/NH_Charon_DTM.png", textures .. "/NH_Charon_DTM_8192.png" }, + MeridianShift = true, Projection = { Observer = "NEW HORIZONS", Target = "CHARON", @@ -66,13 +67,14 @@ local Charon = { } }, GUI = { - Path = "/Solar System/Dwarf Planets/Pluto" + Path = "/Solar System/Dwarf Planets/Pluto", + Name = "Charon Projection" } } local CharonText = { Identifier = "CharonText", - Parent = Charon.Identifier, + Parent = CharonProjection.Identifier, Transform = { Translation = { Type = "StaticTranslation", @@ -95,9 +97,10 @@ local CharonText = { local CharonShadow = { Identifier = "CharonShadow", - Parent = Charon.Identifier, + Parent = CharonProjection .Identifier, Renderable = { Type = "RenderableShadowCylinder", + Opacity = 0.25, TerminatorType = "PENUMBRAL", LightSource = "SUN", Observer = "NEW HORIZONS", @@ -111,31 +114,8 @@ local CharonShadow = { } } -local CharonTrail = { - Identifier = "CharonTrail", - Parent = transforms.PlutoBarycenter.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Translation = { - Type = "SpiceTranslation", - Target = "CHARON", - Observer = "PLUTO BARYCENTER" - }, - Color = { 0.00, 0.62, 1.00 }, - Period = 6.38725, - Resolution = 1000 - }, - GUI = { - Name = "Charon Trail", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - - - assetHelper.registerSceneGraphNodesAndExport(asset, { - Charon, + CharonProjection, CharonText, - CharonShadow, - CharonTrail + CharonShadow }) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/dashboard.asset b/data/assets/scene/solarsystem/missions/newhorizons/dashboard.asset new file mode 100644 index 0000000000..477303bc06 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/newhorizons/dashboard.asset @@ -0,0 +1,24 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemSpacing", + Identifier = "NewHorizonsSpacing", + GuiName = "New Horizons Spacing", + Spacing = 25 + }, + { + Type = "DashboardItemDistance", + Identifier = "NewHorizonsPlutoDistance", + GuiName = "New Horizons Pluto Distance", + SourceType = "Node", + SourceNodeName = "NewHorizons", + DestinationType = "Node Surface", + DestinationNodeName = "PlutoProjection" + }, + { + Type = "DashboardItemInstruments", + Identifier = "NewHorizonsInstruments", + GuiName = "NewHorizons Instruments", + } +}) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/fov.asset b/data/assets/scene/solarsystem/missions/newhorizons/fov.asset index 182639b9ad..45c7f7ba7e 100644 --- a/data/assets/scene/solarsystem/missions/newhorizons/fov.asset +++ b/data/assets/scene/solarsystem/missions/newhorizons/fov.asset @@ -355,11 +355,7 @@ local Rex = { Transform = { Rotation = { Type = "StaticRotation", - Rotation = { - 0.0, 1.0, 0.0, - 0.0, 0.0, 1.0, - 1.0, 0.0, 0.0 - } + Rotation = {-3.141502/2, 0, -3.141502/2} }, Translation = { Type = "StaticTranslation", diff --git a/data/assets/scene/solarsystem/missions/newhorizons/hydra.asset b/data/assets/scene/solarsystem/missions/newhorizons/hydra.asset deleted file mode 100644 index 153c653dd4..0000000000 --- a/data/assets/scene/solarsystem/missions/newhorizons/hydra.asset +++ /dev/null @@ -1,91 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels').Kernels - - - -local textures = asset.syncedResource({ - Name = "Hydra Textures", - Type = "HttpSynchronization", - Identifier = "hydra_textures", - Version = 1 -}) - -local Hydra = { - Identifier = "Hydra", - Parent = transforms.PlutoBarycenter.Identifier, - Transform = { - Translation = { - Type = "SpiceTranslation", - Target = "HYDRA", - Observer = "PLUTO BARYCENTER", - Kernels = kernels .. "/NavSE_plu047_od122.bsp" - } - }, - Renderable = { - Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "HYDRA", - Radius = hydra_radius, - Geometry = { - Type = "SimpleSphere", - Radius = 0.53E5, - Segments = 100 - }, - ColorTexture = textures .. "/gray.jpg" - }, - GUI = { - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local HydraText = { - Identifier = "HydraText", - Parent = Hydra.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 1000000, 0, 1000000 }, - }, - }, - Renderable = { - Type = "RenderablePlaneImageLocal", - Size = 10.0^6.3, - Origin = "Center", - Billboard = true, - Texture = textures .. "/Hydra-Text.png", - BlendMode = "Additive" - }, - GUI = { - Name = "Hydra Text", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local HydraTrail = { - Identifier = "HydraTrail", - Parent = transforms.PlutoBarycenter.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Translation = { - Type = "SpiceTranslation", - Target = "HYDRA", - Observer = "PLUTO BARYCENTER", - }, - Color = { 0.00, 0.62, 1.00 }, - Period = 38.20177, - Resolution = 1000 - }, - GUI = { - Name = "Hydra Trail", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - - - -assetHelper.registerSceneGraphNodesAndExport(asset, { - Hydra, - HydraText, - HydraTrail -}) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/kerberos.asset b/data/assets/scene/solarsystem/missions/newhorizons/kerberos.asset deleted file mode 100644 index 87c156dd2c..0000000000 --- a/data/assets/scene/solarsystem/missions/newhorizons/kerberos.asset +++ /dev/null @@ -1,94 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels') - - - -local textures = asset.syncedResource({ - Name = "Kerberos Textures", - Type = "HttpSynchronization", - Identifier = "kerberos_textures", - Version = 1 -}) - -local Kerberos = { - Identifier = "Kerberos", - Parent = transforms.PlutoBarycenter.Identifier, - Transform = { - Translation = { - Type = "SpiceTranslation", - Target = "KERBEROS", - Observer = "PLUTO BARYCENTER", - Kernels = kernels.Kernels .. "/NavSE_plu047_od122.bsp" - }, - Rotation = { - Type = "SpiceRotation", - SourceFrame = "IAU_KERBEROS", - DestinationFrame = "GALACTIC" - } - }, - Renderable = { - Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "KERBEROS", - Geometry = { - Type = "SimpleSphere", - Radius = 0.1E5, - Segments = 100 - }, - ColorTexture = textures .. "/gray.jpg" - }, - GUI = { - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local KerberosText = { - Identifier = "KerberosText", - Parent = Kerberos.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 1000000.0, 0, 1000000.0 } - }, - }, - Renderable = { - Type = "RenderablePlaneImageLocal", - Size = 10^6.3, - Origin = "Center", - Billboard = true, - Texture = textures .. "/Kerberos-Text.png" - }, - GUI = { - Name = "Kerberos Text", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local KerberosTrail = { - Identifier = "KerberosTrail", - Parent = transforms.PlutoBarycenter.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Translation = { - Type = "SpiceTranslation", - Target = "KERBEROS", - Observer = "PLUTO BARYCENTER" - }, - Color = { 0.00, 0.62, 1.00 }, - Period = 32.16756, - Resolution = 1000 - }, - GUI = { - Name = "Kerberos Trail", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - - - -assetHelper.registerSceneGraphNodesAndExport(asset, { - Kerberos, - KerberosText, - KerberosTrail -}) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/newhorizons.asset b/data/assets/scene/solarsystem/missions/newhorizons/newhorizons.asset index 82048c9b63..cf35bc01c1 100644 --- a/data/assets/scene/solarsystem/missions/newhorizons/newhorizons.asset +++ b/data/assets/scene/solarsystem/missions/newhorizons/newhorizons.asset @@ -5,10 +5,8 @@ asset.require('./trail') asset.require('./pluto') asset.require('./charon') -asset.require('./hydra') -asset.require('./nix') -asset.require('./styx') +asset.require('./othermoons') local mission = asset.localResource("newhorizons.mission") local missionName diff --git a/data/assets/scene/solarsystem/missions/newhorizons/nix.asset b/data/assets/scene/solarsystem/missions/newhorizons/nix.asset deleted file mode 100644 index 86c04c376d..0000000000 --- a/data/assets/scene/solarsystem/missions/newhorizons/nix.asset +++ /dev/null @@ -1,83 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels') - - - -local textures = asset.syncedResource({ - Name = "Nix Textures", - Type = "HttpSynchronization", - Identifier = "nix_textures", - Version = 1 -}) - -local Nix = { - Identifier = "Nix", - Parent = transforms.PlutoBarycenter.Identifier, - Transform = { - Translation = { - Type = "SpiceTranslation", - Target = "NIX", - Observer = "PLUTO BARYCENTER", - Kernels = kernels.Kernels .. "/NavSE_plu047_od122.bsp" - } - }, - Renderable = { - Type = "RenderablePlanet", - Body = "NIX", - Geometry = { - Type = "SimpleSphere", - Radius = 0.45E5, - Segments = 100 - }, - ColorTexture = textures .. "/gray.jpg", - }, - GUI = { - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local NixText = { - Identifier = "NixText", - Parent = Nix.Identifier, - Renderable = { - Type = "RenderablePlaneImageLocal", - Size = 10^6.3, - Origin = "Center", - Billboard = true, - Texture = textures .. "/Nix-Text.png", - BlendMode = "Additive" - }, - GUI = { - Name = "Nix Text", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local NixTrail = { - Identifier = "NixTrail", - Parent = transforms.PlutoBarycenter.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Translation = { - Type = "SpiceTranslation", - Target = "NIX", - Observer = "PLUTO BARYCENTER" - }, - Color = { 0.0, 0.62, 1.0 }, - Period = 24.85463, - Resolution = 1000 - }, - GUI = { - Name = "Nix Trail", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - - - -assetHelper.registerSceneGraphNodesAndExport(asset, { - Nix, - NixText, - NixTrail -}) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/othermoons.asset b/data/assets/scene/solarsystem/missions/newhorizons/othermoons.asset new file mode 100644 index 0000000000..010e8bc9cf --- /dev/null +++ b/data/assets/scene/solarsystem/missions/newhorizons/othermoons.asset @@ -0,0 +1,126 @@ +local Hydra = asset.require('scene/solarsystem/dwarf_planets/pluto/hydra') +local Kerberos = asset.require('scene/solarsystem/dwarf_planets/pluto/kerberos') +local Nix = asset.require('scene/solarsystem/dwarf_planets/pluto/nix') +local Styx = asset.require('scene/solarsystem/dwarf_planets/pluto/styx') +local assetHelper = asset.require('util/asset_helper') + +local hydraTextures = asset.syncedResource({ + Name = "Hydra Textures", + Type = "HttpSynchronization", + Identifier = "hydra_textures", + Version = 1 +}) + +local HydraText = { + Identifier = "HydraText", + Parent = Hydra.Hydra.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 1000000, 0, 1000000 }, + }, + }, + Renderable = { + Type = "RenderablePlaneImageLocal", + Size = 10.0^6.3, + Origin = "Center", + Billboard = true, + Texture = hydraTextures .. "/Hydra-Text.png", + BlendMode = "Additive" + }, + GUI = { + Name = "Hydra Text", + Path = "/Solar System/Dwarf Planets/Pluto" + } +} + +local kerberosTextures = asset.syncedResource({ + Name = "Kerberos Textures", + Type = "HttpSynchronization", + Identifier = "kerberos_textures", + Version = 1 +}) + +local KerberosText = { + Identifier = "KerberosText", + Parent = Kerberos.Kerberos.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 1000000.0, 0, 1000000.0 } + }, + }, + Renderable = { + Type = "RenderablePlaneImageLocal", + Size = 10^6.3, + Origin = "Center", + Billboard = true, + Texture = kerberosTextures .. "/Kerberos-Text.png", + BlendMode = "Additive" + }, + GUI = { + Name = "Kerberos Text", + Path = "/Solar System/Dwarf Planets/Pluto" + } +} + +local nixTextures = asset.syncedResource({ + Name = "Nix Textures", + Type = "HttpSynchronization", + Identifier = "nix_textures", + Version = 1 +}) + +local NixText = { + Identifier = "NixText", + Parent = Nix.Nix.Identifier, + Renderable = { + Type = "RenderablePlaneImageLocal", + Size = 10^6.3, + Origin = "Center", + Billboard = true, + Texture = nixTextures .. "/Nix-Text.png", + BlendMode = "Additive" + }, + GUI = { + Name = "Nix Text", + Path = "/Solar System/Dwarf Planets/Pluto" + } +} + +local styxTextures = asset.syncedResource({ + Name = "Styx Textures", + Type = "HttpSynchronization", + Identifier = "styx_textures", + Version = 1 +}) + +local StyxText = { + Identifier = "StyxText", + Parent = Styx.Styx.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 1000000.0, 0, 1000000.0 } + }, + }, + Renderable = { + Type = "RenderablePlaneImageLocal", + Size = 10^6.3, + Origin = "Center", + Billboard = true, + Texture = styxTextures .. "/Styx-Text.png", + BlendMode = "Additive" + }, + GUI = { + Name = "Styx Text", + Path = "/Solar System/Dwarf Planets/Pluto" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + HydraText, + KerberosText, + NixText, + StyxText +}) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/pluto.asset b/data/assets/scene/solarsystem/missions/newhorizons/pluto.asset index 48dc6f7913..3a963722e2 100644 --- a/data/assets/scene/solarsystem/missions/newhorizons/pluto.asset +++ b/data/assets/scene/solarsystem/missions/newhorizons/pluto.asset @@ -2,8 +2,6 @@ local assetHelper = asset.require('util/asset_helper') local transforms = asset.require('./transforms') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') - - local assets = asset.syncedResource({ Name = "Pluto Assets", Type = "HttpSynchronization", @@ -34,9 +32,9 @@ local images = asset.syncedResource({ local plutoRadius = 1.173E6 -local Pluto = { - Identifier = "Pluto", - Parent = transforms.PlutoBarycenter.Identifier, +local PlutoProjection = { + Identifier = "PlutoProjection", + Parent = transforms.PlutoBarycenterAccurate.Identifier, Transform = { Translation = { Type = "SpiceTranslation", @@ -48,10 +46,6 @@ local Pluto = { Type = "SpiceRotation", SourceFrame = "IAU_PLUTO", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { @@ -73,7 +67,7 @@ local Pluto = { textures .. "/NH_Pluto_DTM_16384.png", textures .. "/NH_Pluto_DTM_8192.png" }, - MeridianShift = true, + MeridianShift = false, Projection = { Sequence = images, EventFile = assets .. "/core_v9h_obs_getmets_v8_time_fix_nofrcd_mld.txt", @@ -183,13 +177,14 @@ local Pluto = { } }, GUI = { + Name = "Pluto Projection", Path = "/Solar System/Dwarf Planets/Pluto" } } local PlutoBarycenterLabel = { Identifier = "PlutoBarycenterLabel", - Parent = transforms.PlutoBarycenter.Identifier, + Parent = transforms.PlutoBarycenterAccurate.Identifier, Renderable = { Type = "RenderablePlaneImageLocal", Billboard = true, @@ -205,7 +200,7 @@ local PlutoBarycenterLabel = { local PlutoText = { Identifier = "PlutoText", - Parent = Pluto.Identifier, + Parent = PlutoProjection.Identifier, Transform = { Translation = { Type = "StaticTranslation", @@ -228,9 +223,10 @@ local PlutoText = { local PlutoShadow = { Identifier = "PlutoShadow", - Parent = Pluto.Identifier, + Parent = PlutoProjection.Identifier, Renderable = { Type = "RenderableShadowCylinder", + Opacity = 0.25, TerminatorType = "PENUMBRAL", LightSource = "SUN", Observer = "NEW HORIZONS", @@ -244,56 +240,9 @@ local PlutoShadow = { } } -local PlutoTrailBarycentric = { - Identifier = "PlutoBarycentricTrail", - Parent = transforms.PlutoBarycenter.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Translation = { - Type = "SpiceTranslation", - Target = "PLUTO", - Observer = "PLUTO BARYCENTER" - }, - Color = { 0.00, 0.62, 1.00 }, - Period = 6.38723, - Resolution = 1000 - }, - GUI = { - Name = "Pluto Barycenteric Trail", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local PlutoTrail = { - Identifier = "PlutoTrail", - Parent = sunTransforms.SolarSystemBarycenter.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Enabled = false, - Translation = { - Type = "SpiceTranslation", - Target = "PLUTO BARYCENTER", - Observer = "SUN" - }, - Color = { 0.3, 0.7, 0.3 }, - -- Not the actual Period, but the SPICE kernels we have only - -- go back to 1850, about 150 yeays ago - Period = 160 * 365.242, - Resolution = 1000 - }, - GUI = { - Name = "Pluto Trail", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - - - assetHelper.registerSceneGraphNodesAndExport(asset, { - Pluto, + PlutoProjection, PlutoBarycenterLabel, PlutoText, - PlutoShadow, - PlutoTrailBarycentric, - PlutoTrail + PlutoShadow }) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/styx.asset b/data/assets/scene/solarsystem/missions/newhorizons/styx.asset deleted file mode 100644 index 85459c5c66..0000000000 --- a/data/assets/scene/solarsystem/missions/newhorizons/styx.asset +++ /dev/null @@ -1,90 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local transforms = asset.require('./transforms') -local kernels = asset.require('./kernels') - - - -local textures = asset.syncedResource({ - Name = "Styx Textures", - Type = "HttpSynchronization", - Identifier = "styx_textures", - Version = 1 -}) - -local Styx = { - Identifier = "Styx", - Parent = transforms.PlutoBarycenter.Identifier, - Transform = { - Translation = { - Type = "SpiceTranslation", - Target = "STYX", - Observer = "PLUTO BARYCENTER", - Kernels = kernels.Kernels .. "/NavSE_plu047_od122.bsp" - } - }, - Renderable = { - Type = "RenderablePlanet", - Frame = "IAU_PLUTO", - Body = "STYX", - Geometry = { - Type = "SimpleSphere", - Radius = 0.75E4, - Segments = 100 - }, - ColorTexture = textures .. "/gray.jpg" - }, - GUI = { - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local StyxText = { - Identifier = "StyxText", - Parent = Styx.Identifier, - Transform = { - Translation = { - Type = "StaticTranslation", - Position = { 1000000.0, 0, 1000000.0 } - }, - }, - Renderable = { - Type = "RenderablePlaneImageLocal", - Size = 10^6.3, - Origin = "Center", - Billboard = true, - Texture = textures .. "/Styx-Text.png", - BlendMode = "Additive" - }, - GUI = { - Name = "Styx Text", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - -local StyxTrail = { - Identifier = "StyxTrail", - Parent = transforms.PlutoBarycenter.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Translation = { - Type = "SpiceTranslation", - Target = "STYX", - Observer = "PLUTO BARYCENTER" - }, - Color = { 0.00, 0.62, 1.00 }, - Period = 20.16155, - Resolution = 1000 - }, - GUI = { - Name = "Styx Trail", - Path = "/Solar System/Dwarf Planets/Pluto" - } -} - - - -assetHelper.registerSceneGraphNodesAndExport(asset, { - Styx, - StyxText, - StyxTrail -}) diff --git a/data/assets/scene/solarsystem/missions/newhorizons/trail.asset b/data/assets/scene/solarsystem/missions/newhorizons/trail.asset index a51e11f073..9ebb30c5d6 100644 --- a/data/assets/scene/solarsystem/missions/newhorizons/trail.asset +++ b/data/assets/scene/solarsystem/missions/newhorizons/trail.asset @@ -5,7 +5,7 @@ local transforms = asset.require('./transforms') local TrailAtPluto = { Identifier = "NewHorizonsTrailPluto", - Parent = transforms.PlutoBarycenter.Identifier, + Parent = transforms.PlutoBarycenterAccurate.Identifier, Renderable = { Type = "RenderableTrailTrajectory", Translation = { diff --git a/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset b/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset index 6efefa3590..2ce8b47f00 100644 --- a/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset +++ b/data/assets/scene/solarsystem/missions/newhorizons/transforms.asset @@ -2,8 +2,8 @@ local assetHelper = asset.require('util/asset_helper') local sunTransforms = asset.require('scene/solarsystem/sun/transforms') local kernels = asset.require('./kernels') -local PlutoBarycenter = { - Identifier = "PlutoBarycenter", +local PlutoBarycenterAccurate = { + Identifier = "PlutoBarycenterAccurate", Parent = sunTransforms.SolarSystemBarycenter.Identifier, TimeFrame = { Type = "TimeFrameInterval", @@ -19,14 +19,14 @@ local PlutoBarycenter = { }, }, GUI = { - Name = "Pluto Barycenter", + Name = "Pluto Barycenter Accurate", Path = "/Solar System/Dwarf Planets/Pluto" } } local NewHorizonsPosition = { Identifier = "NewHorizonsPosition", - Parent = PlutoBarycenter.Identifier, + Parent = PlutoBarycenterAccurate.Identifier, Transform = { Translation = { Type = "SpiceTranslation", @@ -49,6 +49,6 @@ local NewHorizonsPosition = { assetHelper.registerSceneGraphNodesAndExport(asset, { - PlutoBarycenter, + PlutoBarycenterAccurate, NewHorizonsPosition }) diff --git a/data/assets/scene/solarsystem/missions/osirisrex/dashboard.asset b/data/assets/scene/solarsystem/missions/osirisrex/dashboard.asset new file mode 100644 index 0000000000..9fc97a6439 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/osirisrex/dashboard.asset @@ -0,0 +1,24 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemSpacing", + Identifier = "OsirisRexSpacing", + GuiName = "OSIRIS-REx Spacing", + Spacing = 25 + }, + { + Type = "DashboardItemDistance", + Identifier = "OsirisRexBennuDistance", + GuiName = "OSIRIS-REx Bennu Distance", + SourceType = "Node", + SourceNodeName = "OsirisRex", + DestinationType = "Node", + DestinationNodeName = "BennuBarycenter" + }, + { + Type = "DashboardItemInstruments", + Identifier = "OsirisRexInstruments", + GuiName = "OSIRIS-REx Instruments", + } +}) diff --git a/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset b/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset index 1444106adc..9877ef9694 100644 --- a/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset +++ b/data/assets/scene/solarsystem/missions/osirisrex/osirisrex.asset @@ -1,6 +1,7 @@ -asset.request('./bennu') -asset.request('./model') -asset.request('./trail') +asset.require('./bennu') +asset.require('./model') +asset.require('./trail') +asset.require('scene/solarsystem/sun/marker') asset.require('./script_schedule') diff --git a/data/assets/scene/solarsystem/missions/perseverance/model.asset b/data/assets/scene/solarsystem/missions/perseverance/model.asset new file mode 100644 index 0000000000..24c0c37d9d --- /dev/null +++ b/data/assets/scene/solarsystem/missions/perseverance/model.asset @@ -0,0 +1,1204 @@ +--perseverance/model.asset +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require('./transforms') +local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') +-- asset.require('./fov') + +local LightSources = { + { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = sunTransforms.SolarSystemBarycenter.Identifier, + Intensity = 1.0 + }, + { + Identifier = "Camera", + Type = "CameraLightSource", + Intensity = 0.5 + } +} + +local models = asset.syncedResource({ + Name = "Mars 2020 Kernels", + Type = "HttpSynchronization", + Identifier = "perseverance_models", + Version = 1 +}) + +local textures = asset.syncedResource({ + Name = "Mars 2020 Kernels", + Type = "HttpSynchronization", + Identifier = "perseverance_textures", + Version = 1 +}) + +-- Perseverance Model -- +local Perseverance = { + Identifier = "Perseverance", + Parent = transforms.MSL_Body.Identifier, + GUI = { + Name = "Perseverance", + Path = "/Solar System/Missions/Perseverance" + } +} + +-- Perseverance Model -- +local PerseveranceModel = { + Identifier = "PerseveranceModel", + Parent = Perseverance.Identifier, + GUI = { + Name = "Perseverance Model", + Path = "/Solar System/Missions/Perseverance", + Hidden = true, + } +} + +-- Perseverance Model Instruments -- +local Body = { + Identifier = "Perseverance_body", + Parent = PerseveranceModel.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_BODY_new_1.obj" + }, + ColorTexture = textures .. "/tex_01.png", + LightSources = LightSources, + PerformShading = false, + }, + GUI = { + Name = "Perseverance Model Body", + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true, + } + +} + +local Body_detail = { + Identifier = "Perseverance_Body_detail", + Parent = Body.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_BODY_new_1_new_detail.obj" + }, + ColorTexture = textures .. "/tex_01.png", + LightSources = LightSources, + PerformShading = false, + }, + GUI = { + Name = "Body Detail", + Hidden = true, + Path = "/Solar System/Missions/Perseverance/Model" + } +} + +local Body_staticParts_1 = { + Identifier = "Perseverance_Body_staticParts_1", + Parent = Body.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_BODY_new_2.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Body_staticParts_2 = { + Identifier = "Perseverance_Body_staticParts_2", + Parent = Body.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_BODY_new_3.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Body_staticParts_3 = { + Identifier = "Perseverance_Body_staticParts_3", + Parent = Body.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_BODY_new_4.obj" + }, + ColorTexture = textures .. "/tex_04.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Body_staticParts_4 = { + Identifier = "Perseverance_Body_staticParts_4", + Parent = Body.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_BODY_new_5.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Body_staticParts_5 = { + Identifier = "Perseverance_Body_staticParts_5", + Parent = Body.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_BODY_new_A0.obj" + }, + ColorTexture = textures .. "/parts_AO.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +-- RA AZ +local RA_Shoulder_AZ = { + Identifier = "Perseverance_RA_Shoulder_AZ", + Parent = transforms.RA_Shoulder_AZ_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_SHOULDER_AZ_new.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RA_Shoulder_AZ_detail_1 = { + Identifier = "Perseverance_RA_Shoulder_AZ_detail_1", + Parent = RA_Shoulder_AZ.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_SHOULDER_AZ_detail_1.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RA_Shoulder_AZ_detail_2 = { + Identifier = "Perseverance_RA_Shoulder_AZ_detail_2", + Parent = RA_Shoulder_AZ.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_SHOULDER_AZ_detail_2.obj" + }, + ColorTexture = textures .. "/tex_01.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +---- RA EL +local RA_Shoulder_EL_1 = { + Identifier = "Perseverance_RA_Shoulder_EL_1", + Parent = transforms.RA_Shoulder_EL_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_SHOULDER_EL_1.obj" + }, + ColorTexture = textures .. "/tex_01.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + + +local RA_Shoulder_EL_detail_1 = { + Identifier = "Perseverance_RA_Shoulder_EL_detail_1", + Parent = RA_Shoulder_EL_1.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_SHOULDER_EL_detail_1.obj" + }, + ColorTexture = textures .. "/tex_04.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RA_Shoulder_EL_detail_2 = { + Identifier = "Perseverance_RA_Shoulder_EL_detail_2", + Parent = RA_Shoulder_EL_1.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_SHOULDER_EL_detail_2.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + + + +local RA_Shoulder_EL_2 = { + Identifier = "Perseverance_RA_Shoulder_EL_2", + Parent = RA_Shoulder_EL_1.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_SHOULDER_EL_2.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +-- RA ELBOW +local RA_Elbow_1 = { + Identifier = "Perseverance_RA_Elbow_1", + Parent = transforms.RA_Elbow_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_ELBOW_1.obj" + }, + ColorTexture = textures .. "/tex_01.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RA_Elbow_detail_1 = { + Identifier = "Perseverance_RA_Elbow_detail_1", + Parent = RA_Elbow_1.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_ELBOW_detail_1.obj" + }, + ColorTexture = textures .. "/tex_04.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RA_Elbow_detail_2 = { + Identifier = "Perseverance_RA_Elbow_detail_2", + Parent = RA_Elbow_1.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_ELBOW_detail_2.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + + +local RA_Elbow_2 = { + Identifier = "Perseverance_RA_Elbow_2", + Parent = RA_Elbow_1.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_ELBOW_2.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + + +-- RA WRIST +local RA_Wrist = { + Identifier = "Perseverance_RA_Wrist", + Parent = transforms.RA_Wrist_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_TURRET_new_1.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RA_Wrist_details = { + Identifier = "Perseverance_RA_Wrist_details", + Parent = RA_Wrist.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_TURRET_new_1_details.obj" + }, + ColorTexture = textures .. "/tex_01.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +-- RA TURRET +local RA_Turret = { + Identifier = "Perseverance_RA_Turret", + Parent = transforms.RA_Turret_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_TURRET_new_2.obj" + }, + ColorTexture = textures .. "/tex_04.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + + +local RA_Turret_details_1 = { + Identifier = "Perseverance_RA_Turret_details_1", + Parent = RA_Turret.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_TURRET_new_2_detail_1.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RA_Turret_details_2 = { + Identifier = "Perseverance_RA_Turret_details_2", + Parent = RA_Turret.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RA_TURRET_new_2_detail_2.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +-- MastCam-- +local RSM_root = { + Identifier = "Perseverance_RSM_root", + Parent = transforms.RSM_ROOT_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RSM_ROOT.obj" + + }, + ColorTexture = textures .. "/tex_04.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RSM_AZ = { + Identifier = "Perseverance_RSM_AZ", + Parent = transforms.RSM_AZ_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RSM_AZ.obj" + }, + ColorTexture = textures .. "/tex_04.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local RSM_EL = { + Identifier = "Perseverance_RSM_EL", + Parent = transforms.RSM_EL_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_RSM_EL.obj" + }, + ColorTexture = textures .. "/tex_04.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +---- HGA ---- +local HGA_AZ = { + Identifier = "Perseverance_HGA_AZ", + Parent = transforms.HGA_AZ_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_HGA_AZ_0ANGLE.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local HGA_EL = { + Identifier = "Perseverance_HGA_EL", + Parent = transforms.HGA_EL_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_HGA_EL.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +---- SAM & CHEMIN ---- +local SAM_Cover_1 = { + Identifier = "Perseverance_SAM_Cover_1", + Parent = transforms.SAM_Cover_1_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_SAM_FIXED_COVER_1.obj" + }, + ColorTexture = textures .. "/MSLTextureTest.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local SAM_Cover_2 = { + Identifier = "Perseverance_SAM_Cover_2", + Parent = transforms.SAM_Cover_2_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_SAM_FIXED_COVER_2.obj" + }, + ColorTexture = textures .. "/MSLTextureTest.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local CHEMIN_Bottom = { + Identifier = "Perseverance_CHEMIN_Bottom", + Parent = transforms.CHEMIN_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_CHEMIN.obj" + }, + ColorTexture = textures .. "/MSLTextureTest.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +-- Wheels -- +local Wheel_Base = { + Identifier = "Perseverance_Wheel_Base", + Parent = transforms.Wheel_base_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_BASE.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} +local Wheel_Base_2 = { + Identifier = "Perseverance_Wheel_Base_2", + Parent = Wheel_Base.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_BASE_2.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +-- LEFT SIDE -- +local Wheel_Leg_1_L = { + Identifier = "Perseverance_Wheel_Leg_1_L", + Parent = transforms.Leg_1_L_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_1_L.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Leg_1A_L_detail = { + Identifier = "Perseverance_Wheel_Leg_1A_L_detail", + Parent = Wheel_Leg_1_L.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_1A_L_detail.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Leg_1B_L_detail = { + Identifier = "Perseverance_Wheel_Leg_1B_L_detail", + Parent = Wheel_Leg_1_L.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_1B_L_detail.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Leg_2_L = { + Identifier = "Perseverance_Wheel_Leg_2_L", + Parent = transforms.Leg_2_L_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_2_L_new.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_F_L = { + Identifier = "Perseverance_Wheel_Wrist_F_L", + Parent = transforms.Wrist_F_L_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_F_L.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_hub_F_L = { + Identifier = "Perseverance_Wheel_Wrist_hub_F_L", + Parent = Wheel_Wrist_F_L.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_1B_F_L.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_F_L = { + Identifier = "Perseverance_Wheel_F_L", + Parent = transforms.Wheel_F_L_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_L.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_C_L = { + Identifier = "Perseverance_Wheel_C_L", + Parent = transforms.Wheel_C_L_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_L.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_B_L = { + Identifier = "Perseverance_Wheel_Wrist_B_L", + Parent = transforms.Wrist_B_L_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_B_L.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_hub_B_L = { + Identifier = "Perseverance_Wheel_Wrist_hub_B_L", + Parent = Wheel_Wrist_B_L.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_1B_B_L.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false, + }, + GUI = { + Name = "Perseverance Wheel Wrist hub B L", + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_B_L = { + Identifier = "Perseverance_Wheel_B_L", + Parent = transforms.Wheel_B_L_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_L.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +-- RIGHT SIDE -- +local Wheel_Leg_1_R = { + Identifier = "Perseverance_Wheel_Leg_1_R", + Parent = transforms.Leg_1_R_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_1_R.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Leg_1A_R_detail = { + Identifier = "Perseverance_Wheel_Leg_1A_R_detail", + Parent = Wheel_Leg_1_R.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_1A_R_detail.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Leg_1B_R_detail = { + Identifier = "Perseverance_Wheel_Leg_1B_R_detail", + Parent = Wheel_Leg_1_R.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_1B_R_detail.obj" + }, + ColorTexture = textures .. "/tex_05.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Leg_2_R = { + Identifier = "Perseverance_Wheel_Leg_2_R", + Parent = transforms.Leg_2_R_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_LEG_2_R_new.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_F_R = { + Identifier = "Perseverance_Wheel_Wrist_F_R", + Parent = transforms.Wrist_F_R_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_F_R.obj" + --GeometryFile = models .. "/MSL_WHEEL_WRIST_F_L.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_hub_F_R = { + Identifier = "Perseverance_Wheel_Wrist_hub_F_R", + Parent = Wheel_Wrist_F_R.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_1B_F_R.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_F_R = { + Identifier = "Perseverance_Wheel_F_R", + Parent = transforms.Wheel_F_R_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_R.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_C_R = { + Identifier = "Perseverance_Wheel_C_R", + Parent = transforms.Wheel_C_R_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_R.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_B_R = { + Identifier = "Perseverance_Wheel_Wrist_B_R", + Parent = transforms.Wrist_B_R_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_1A_B_R.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_Wrist_hub_B_R = { + Identifier = "Perseverance_Wheel_Wrist_hub_B_R", + Parent = Wheel_Wrist_B_R.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_WRIST_1B_B_R.obj" + }, + ColorTexture = textures .. "/tex_02.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +local Wheel_B_R = { + Identifier = "Perseverance_Wheel_B_R", + Parent = transforms.Wheel_B_R_Location.Identifier, + Renderable = { + Type = "RenderableModel", + Body = "MARS SCIENCE LABORATORY", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/MSL_WHEEL_R.obj" + }, + ColorTexture = textures .. "/tex_03.png", + LightSources = LightSources, + PerformShading = false + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Model", + Hidden = true + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + Perseverance, + PerseveranceModel, + + Body, Body_detail, Body_staticParts_1, Body_staticParts_2, Body_staticParts_3, + Body_staticParts_4, Body_staticParts_5, + + RA_Shoulder_AZ, RA_Shoulder_AZ_detail_1, RA_Shoulder_AZ_detail_2, RA_Shoulder_EL_1, + RA_Shoulder_EL_detail_1, RA_Shoulder_EL_detail_2, RA_Shoulder_EL_2, RA_Elbow_1, + RA_Elbow_detail_1, RA_Elbow_detail_2, RA_Elbow_2, RA_Wrist, RA_Wrist_details, + RA_Turret, RA_Turret_details_1, RA_Turret_details_2, + + RSM_root, RSM_AZ, RSM_EL, + + HGA_AZ, HGA_EL, + + SAM_Cover_1, SAM_Cover_2, CHEMIN_Bottom, + + Wheel_Base, Wheel_Base_2, Wheel_Leg_1_L, Wheel_Leg_1A_L_detail, Wheel_Leg_1B_L_detail, + Wheel_Leg_2_L, Wheel_Wrist_F_L, Wheel_Wrist_hub_F_L, Wheel_F_L, Wheel_C_L, + Wheel_Wrist_B_L, Wheel_Wrist_hub_B_L, Wheel_B_L, Wheel_Leg_1_R, + Wheel_Leg_1A_R_detail, Wheel_Leg_1B_R_detail, Wheel_Leg_2_R, Wheel_Wrist_F_R, + Wheel_Wrist_hub_F_R, Wheel_F_R, Wheel_C_R, Wheel_Wrist_B_R, Wheel_Wrist_hub_B_R, + Wheel_B_R +}) diff --git a/data/assets/scene/solarsystem/missions/perseverance/perseverance.asset b/data/assets/scene/solarsystem/missions/perseverance/perseverance.asset new file mode 100644 index 0000000000..64667cbd70 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/perseverance/perseverance.asset @@ -0,0 +1,5 @@ +--perseverance.asset +asset.require('./model') +asset.require('./trail') + + diff --git a/data/assets/scene/solarsystem/missions/perseverance/shortcuts.asset b/data/assets/scene/solarsystem/missions/perseverance/shortcuts.asset new file mode 100644 index 0000000000..287cb76164 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/perseverance/shortcuts.asset @@ -0,0 +1,70 @@ +--perseverance/shortcuts.asset + +local PerseveranceLaunchTime = "2020 JUL 17 13:56:42" +local PerseveranceLandingTime = "2021 FEB 18 20:32:16" + +local PerseveranceNavigationState = "{" .. + "Anchor = 'Perseverance'," .. + "Pitch = 0.567457E-4," .. + "Position = { 1.240506E1,-1.369270E1,-2.423553E0 }," .. + "ReferenceFrame = 'Root',".. + "Up = { 0.441211E0,0.247019E0,0.862737E0 }," .. + "Yaw = -0.446853E-4}" + +local Shortcuts = { + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -1677.088867);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', -1677.088867);", + Documentation = "Enable height layer offset for Perseverance landing trail", + Name = "Perseverance Height Offset", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', 0);", + Documentation = "Disable Perseverance landing height layer offset", + Name = "Default Height Offset", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', true);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', true);", + Documentation = "Enables HiRISE layer for Perseverance", + Name = "Enable HiRISE", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', false);" .. + "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', false);", + Documentation = "Disables HiRISE layer used for Perseverance", + Name = "Disable HiRISE", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.navigation.setNavigationState(" .. PerseveranceNavigationState .. ");", + Documentation = "Change the camera state for the start of Insight EDL", + Name = "Insight EDL NavigationState", + GuiPath = "/Missions/Insight", + Local = false + }, + { + Command = "openspace.time.setPause(true);openspace.time.setTime('" .. PerseveranceLaunchTime .. "');", + Documentation = "Change the time for Perseverance launch", + Name = "Perseverance launch time", + GuiPath = "/Missions/Perseverance", + Local = false + }, + { + Command = "openspace.time.setPause(true);openspace.time.setTime('" .. PerseveranceLandingTime .. "');", + Documentation = "Change the time for when Perseverance has landed", + Name = "Perseverance landed time", + GuiPath = "/Missions/Perseverance", + Local = false + }, +} + +asset.export("Shortcuts", Shortcuts) diff --git a/data/assets/scene/solarsystem/missions/perseverance/trail.asset b/data/assets/scene/solarsystem/missions/perseverance/trail.asset new file mode 100644 index 0000000000..a6074d4f3b --- /dev/null +++ b/data/assets/scene/solarsystem/missions/perseverance/trail.asset @@ -0,0 +1,97 @@ +--trail.asset +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') +local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms') + +local kernels = asset.syncedResource({ + Name = "Mars 2020 Kernels", + Type = "HttpSynchronization", + Identifier = "perseverance_kernels", + Version = 1 +}) + +local perseverance_id = "-168" + +local m2020_kernels = { + kernels .. "/m2020.tf", + + kernels .. "/m2020.tls", + kernels .. "/naif0012.tls", + + kernels .. "/m2020.tsc", + + kernels .. "/m2020_FMAresponse_JEZ_20200717_P000.cruise.bsp", + kernels .. "/m2020_FMAresponse_JEZ_20200717_P000.edl.bsp", +} + +local startTime = "2020 JUL 17 13:56:42" +local approachMars = "2021 FEB 11 20:32:16" +local endTime = "2021 FEB 18 20:32:16" + +local PerseveranceNode = { + Identifier = "PerseveranceNode", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = perseverance_id, + Observer = "SUN", + Kernels = m2020_kernels + }, + }, + GUI = { + Name = "Perseverance Node", + Path = "/Solar System/Missions/Perseverance", + Hidden = true + } +} + +local PerseveranceTrailSun = { + Identifier = "PerseveranceTrailSun", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = perseverance_id, + Observer = "SUN", + Kernels = m2020_kernels + }, + Color = { 0.2, 0.7, 0.1 }, + StartTime = startTime, + EndTime = endTime, + SampleInterval = 100 + }, + GUI = { + Name = "Perseverance Trail", + Path = "/Solar System/Missions/Perseverance", + } +} + +local PerseveranceTrailMars = { + Identifier = "PerseveranceTrailMars", + Parent = marsTransforms.MarsBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = perseverance_id, + Observer = "MARS", + Kernels = m2020_kernels + }, + Color = { 0.7, 0.9, 0.6 }, + StartTime = approachMars, + EndTime = endTime, + SampleInterval = 100 + }, + GUI = { + Name = "Perseverance Trail (Mars)", + Path = "/Solar System/Missions/Perseverance", + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + PerseveranceNode, + PerseveranceTrailSun, + PerseveranceTrailMars +}) \ No newline at end of file diff --git a/data/assets/scene/solarsystem/missions/perseverance/transforms.asset b/data/assets/scene/solarsystem/missions/perseverance/transforms.asset new file mode 100644 index 0000000000..7197b0e59f --- /dev/null +++ b/data/assets/scene/solarsystem/missions/perseverance/transforms.asset @@ -0,0 +1,505 @@ +local assetHelper = asset.require('util/asset_helper') +local marsTransforms = asset.require('scene/solarsystem/planets/mars/transforms') +local marsAsset = asset.require('scene/solarsystem/planets/mars/mars') +local trailAsset = asset.require('./trail') + + +local MSL_Body = { + Identifier = "MSL_Body", + Parent = trailAsset.PerseveranceNode.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0, 0.0, 2.8 } + }, + Rotation = { + Type = "StaticRotation", + Rotation = { -0.521593,0.648407,2.888407 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +---- ROBOTIC ARM RA ---- +local RA_Base_Location = { + Identifier = "RA_Base_Location", + Parent = MSL_Body.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 1.111, -0.4525, -0.106 } + }, + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +--AZ +local RA_Shoulder_AZ_Location = { + Identifier = "RA_Shoulder_AZ_Location", + Parent = RA_Base_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.0, -0.08 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +----EL +local RA_Shoulder_EL_Location = { + Identifier = "RA_Shoulder_EL_Location", + Parent = RA_Shoulder_AZ_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.17, 0.2, -0.005 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +--ELBOW +local RA_Elbow_Location = { + Identifier = "RA_Elbow_Location", + Parent = RA_Shoulder_EL_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.83, -0.2, 0.0 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +--WRIST +local RA_Wrist_Location = { + Identifier = "RA_Wrist_Location", + Parent = RA_Elbow_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.77, 0.13, 0.035 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +--TURRET +local RA_Turret_Location = { + Identifier = "RA_Turret_Location", + Parent = RA_Wrist_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.04, -0.15 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +--MAHLI +local RA_Mahli_Location = { + Identifier = "RA_Mahli_Location", + Parent = RA_Turret_Location.Identifier +} + +---- MASTCAM RSM ---- +local RSM_ROOT_Location = { + Identifier = "RSM_ROOT_Location", + Parent = MSL_Body.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.7039, 0.5769, -0.563 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local RSM_AZ_Location = { + Identifier = "RSM_AZ_Location", + Parent = RSM_ROOT_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.008, 0.0 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local RSM_ZERO_EL_Location = { + Identifier = "RSM_ZERO_EL_Location", + Parent = RSM_AZ_Location.Identifier, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local RSM_EL_Location = { + Identifier = "RSM_EL_Location", + Parent = RSM_AZ_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + --Position = {0.0, 0.0, -0.664} + Position = { 0.002, 0.007, -0.688 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +---- HIGH GAIN ANTENNA HGA ---- +local HGA_AZ_Location = { + Identifier = "HGA_AZ_Location", + Parent = MSL_Body.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { -0.46, -0.47, -0.55 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local HGA_EL_Location = { + Identifier = "HGA_EL_Location", + Parent = HGA_AZ_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.0, -0.17 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +---- SAM & HEMIN ---- +local SAM_Cover_1_Location = { + Identifier = "SAM_Cover_1_Location", + Parent = MSL_Body.Identifier, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local SAM_Cover_2_Location = { + Identifier = "SAM_Cover_2_Location", + Parent = MSL_Body.Identifier, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local CHEMIN_Location = { + Identifier = "CHEMIN_Location", + Parent = MSL_Body.Identifier, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +---- Wheels ---- +local Wheel_base_Location = { + Identifier = "Wheel_base_Location", + Parent = MSL_Body.Identifier, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +-- Left side -- +local Leg_1_L_Location = { + Identifier = "Leg_1_L_Location", + Parent = Wheel_base_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.217, -0.812, -0.215 } --for the right side + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Leg_2_L_Location = { + Identifier = "Leg_2_L_Location", + Parent = Leg_1_L_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { -0.74, -0.00380, 0.223 } --CORRECT, DONT CHANGE + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wrist_F_L_Location = { + Identifier = "Wrist_F_L_Location", + Parent = Leg_1_L_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.8839, -0.2659, 0.2 } --CORRECT, DONT TOUCH + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wheel_F_L_Location = { + Identifier = "Wheel_F_L_Location", + Parent = Wrist_F_L_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.0, 0.426 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wheel_C_L_Location = { + Identifier = "Wheel_C_L_Location", + Parent = Leg_2_L_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.45, -0.4, 0.403 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wrist_B_L_Location = { + Identifier = "Wrist_B_L_Location", + Parent = Leg_2_L_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { -0.627, -0.2635, -0.022 } --CORRECT, DONT CHANGE + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wheel_B_L_Location = { + Identifier = "Wheel_B_L_Location", + Parent = Wrist_B_L_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, -0.0, 0.426 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +-- wheels, Right Side -- +local Leg_1_R_Location = { + Identifier = "Leg_1_R_Location", + Parent = Wheel_base_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.217, 0.812, -0.215 } --Check with caroline!!! + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Leg_2_R_Location = { + Identifier = "Leg_2_R_Location", + Parent = Leg_1_R_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + --Position = {-0.74, 0.0, 0.24} + Position = { -0.74, 0.00380, 0.223 } --want to use this one, once the center point is changed in maya + + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wrist_F_R_Location = { + Identifier = "Wrist_F_R_Location", + Parent = Leg_1_R_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.882, 0.259, 0.215 } + --Position = {0.8839, 0.2659, 0.2} --position for the Wrist_F_L + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wheel_F_R_Location = { + Identifier = "Wheel_F_R_Location", + Parent = Wrist_F_R_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, 0.0, 0.426 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wheel_C_R_Location = { + Identifier = "Wheel_C_R_Location", + Parent = Leg_2_R_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.45, 0.4, 0.403 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wrist_B_R_Location = { + Identifier = "Wrist_B_R_Location", + Parent = Leg_2_R_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { -0.6208, 0.2759, -0.025 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +local Wheel_B_R_Location = { + Identifier = "Wheel_B_R_Location", + Parent = Wrist_B_R_Location.Identifier, + Transform = { + Translation = { + Type = "StaticTranslation", + Position = { 0.0, -0.0005, 0.426 } + } + }, + GUI = { + Path = "/Solar System/Missions/Perseverance/Transforms", + Hidden = true + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + MSL_Body, + RA_Base_Location, + RA_Shoulder_AZ_Location, + RA_Shoulder_EL_Location, + RA_Elbow_Location, + RA_Wrist_Location, + RA_Turret_Location, + RA_Mahli_Location, + RSM_ROOT_Location, + RSM_AZ_Location, + RSM_ZERO_EL_Location, + RSM_EL_Location, + + HGA_AZ_Location, + HGA_EL_Location, + SAM_Cover_1_Location, + SAM_Cover_2_Location, + CHEMIN_Location, + + Wheel_base_Location, + Leg_1_L_Location, + Leg_2_L_Location, + Wrist_F_L_Location, + Wheel_F_L_Location, + Wheel_C_L_Location, + Wrist_B_L_Location, + Wheel_B_L_Location, + + Leg_1_R_Location, + Leg_2_R_Location, + Wrist_F_R_Location, + Wheel_F_R_Location, + Wheel_C_R_Location, + Wrist_B_R_Location, + Wheel_B_R_Location +}) + diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset new file mode 100644 index 0000000000..40ec1f9334 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer10.asset @@ -0,0 +1,75 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local modelFolder = asset.syncedResource({ + Name = "Pioneer 10/11 Models", + Type = "HttpSynchronization", + Identifier = "pioneer_10_11_model", + Version = 2 +}) + +local kernelsFolder = asset.syncedResource({ + Name = "Pioneer Kernels", + Type = "HttpSynchronization", + Identifier = "pioneer_10_spice", + Version = 1 +}) + +local kernelsList = {kernelsFolder .. '/p10-a.bsp'} + +local Pioneer10NAIF = "-23" + +local Pioneer10 = { + Identifier = "Pioneer10", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = Pioneer10NAIF, + Observer = "SUN", + Kernels = kernelsList + }, + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = modelFolder .. "/Pioneer.obj" + }, + ColorTexture = modelFolder .. "/gray.png", + LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier) + }, + GUI = { + Name = "Pioneer 10", + Path = "/Solar System/Missions/Pioneer/10" + } +} + +local Pioneer10Trail = { + Identifier = "Pioneer10Trail", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = Pioneer10NAIF, + Observer = "SUN", + Kernels = kernelsList + }, + Color = { 0.70, 0.50, 0.20 }, + StartTime = "1972 MAR 03 02:04:00", + EndTime = "1990 JAN 02 00:00:00", + EnableFade = false, + SampleInterval = 6545 * 2 + -- 6545 is the number of days between the Start and End time (aka sample every 2d) + }, + GUI = { + Name = "Pioneer 10 Trail", + Path = "/Solar System/Missions/Pioneer/10" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + Pioneer10, + Pioneer10Trail, +}) diff --git a/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset new file mode 100644 index 0000000000..2b97f8e720 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/pioneer/pioneer11.asset @@ -0,0 +1,78 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local modelFolder = asset.syncedResource({ + Name = "Pioneer 10/11 Models", + Type = "HttpSynchronization", + Identifier = "pioneer_10_11_model", + Version = 2 +}) + +local kernelsFolder = asset.syncedResource({ + Name = "Pioneer Kernels", + Type = "HttpSynchronization", + Identifier = "pioneer_11_spice", + Version = 1 +}) + +local kernelsList = { + kernelsFolder .. '/p11-a.bsp', + kernelsFolder .. '/p11_sat336.bsp' +} + +local Pioneer11NAIF = "-24" + +local Pioneer11 = { + Identifier = "Pioneer_11", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = Pioneer11NAIF, + Observer = "SUN", + Kernels = kernelsList + }, + }, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = modelFolder .. "/Pioneer.obj" + }, + ColorTexture = modelFolder .. "/gray.png", + LightSources = assetHelper.getDefaultLightSources(sunTransforms.SolarSystemBarycenter.Identifier) + }, + GUI = { + Name = "Pioneer 11", + Path = "/Solar System/Missions/Pioneer/11" + } +} + +local Pioneer11Trail = { + Identifier = "Pioneer11Trail", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "SpiceTranslation", + Target = Pioneer11NAIF, + Observer = "SUN", + Kernels = kernelsList + }, + Color = { 0.70, 0.50, 0.20 }, + StartTime = "1973 APR 06 02:25:00.000", + EndTime = "1990 JAN 02 00:00:00.000", + EnableFade = false, + SampleInterval = 6087 * 2 + --6087 is the number of days between the Start and End time (so sample every 2d) + }, + GUI = { + Name = "Pioneer 11 Trail", + Path = "/Solar System/Missions/Pioneer/11" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { + Pioneer11, + Pioneer11Trail, +}) diff --git a/data/assets/scene/solarsystem/missions/rosetta/67p.asset b/data/assets/scene/solarsystem/missions/rosetta/67p.asset index 475f33ed04..c5882719df 100644 --- a/data/assets/scene/solarsystem/missions/rosetta/67p.asset +++ b/data/assets/scene/solarsystem/missions/rosetta/67p.asset @@ -21,9 +21,11 @@ local images = asset.syncedResource({ Name = "Rosetta Images", Type = "HttpSynchronization", Identifier = "rosettaimages", - Version = 1 + Version = 2 }) +local imagesDestination = images .. "/images" + local Barycenter = { Identifier = "67PBarycenter", Parent = transforms.SolarSystemBarycenter.Identifier, @@ -58,7 +60,7 @@ local Comet67P = { }, ColorTexture = textures .. "/gray.jpg", Projection = { - Sequence = { images }, + Sequence = { imagesDestination }, SequenceType = "image-sequence", Observer = "ROSETTA", Target = "CHURYUMOV-GERASIMENKO", @@ -133,6 +135,13 @@ local Trail67P = { } } +asset.onInitialize(function() + if not openspace.directoryExists(imagesDestination) then + openspace.printInfo("Extracting Rosetta images") + openspace.unzipFile(images .. "/images_v1_v2.zip", imagesDestination, true) + end +end) + assetHelper.registerSceneGraphNodesAndExport(asset, { diff --git a/data/assets/scene/solarsystem/missions/rosetta/dashboard.asset b/data/assets/scene/solarsystem/missions/rosetta/dashboard.asset new file mode 100644 index 0000000000..c84614fe7c --- /dev/null +++ b/data/assets/scene/solarsystem/missions/rosetta/dashboard.asset @@ -0,0 +1,24 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemSpacing", + Identifier = "RosettaSpacing", + GuiName = "Rosetta Spacing", + Spacing = 25 + }, + { + Type = "DashboardItemDistance", + Identifier = "Rosetta67PDistance", + GuiName = "Rosetta 67P Distance", + SourceType = "Node", + SourceNodeName = "Rosetta", + DestinationType = "Node", + DestinationNodeName = "67P" + }, + { + Type = "DashboardItemInstruments", + Identifier = "RosettaInstruments", + GuiName = "Rosetta Instruments", + } +}) diff --git a/data/assets/scene/solarsystem/missions/voyager/dashboard.asset b/data/assets/scene/solarsystem/missions/voyager/dashboard.asset new file mode 100644 index 0000000000..777aae93c5 --- /dev/null +++ b/data/assets/scene/solarsystem/missions/voyager/dashboard.asset @@ -0,0 +1,22 @@ +local assetHelper = asset.require('util/asset_helper') + +assetHelper.registerDashboardItems(asset, { + { + Type = "DashboardItemDistance", + Identifier = "Voyager1Distance", + GuiName = "Voyager 1 - Earth Distance", + SourceType = "Node", + SourceNodeName = "Voyager_1", + DestinationType = "Node", + DestinationNodeName = "Earth" + }, + { + Type = "DashboardItemDistance", + Identifier = "Voyager2Distance", + GuiName = "Voyager 2 - Earth Distance", + SourceType = "Node", + SourceNodeName = "Voyager_2", + DestinationType = "Node", + DestinationNodeName = "Earth" + } +}) diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset index f206b8a6b4..c5a8ae6b0c 100644 --- a/data/assets/scene/solarsystem/missions/voyager/voyager1.asset +++ b/data/assets/scene/solarsystem/missions/voyager/voyager1.asset @@ -61,7 +61,12 @@ local Voyager1 = { Rotation = { Type = "SpiceRotation", SourceFrame = "VG1_SC_BUS", - DestinationFrame = "GALACTIC" + DestinationFrame = "GALACTIC", + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1977-SEP-05 14:10:11.786", + End = "2027-DEC-27" + } } }, GUI = { diff --git a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset index a8a711ba87..f1a87c9e13 100644 --- a/data/assets/scene/solarsystem/missions/voyager/voyager2.asset +++ b/data/assets/scene/solarsystem/missions/voyager/voyager2.asset @@ -64,7 +64,12 @@ local Voyager2 = { Rotation = { Type = "SpiceRotation", SourceFrame = "VG2_SC_BUS", - DestinationFrame = "GALACTIC" + DestinationFrame = "GALACTIC", + TimeFrame = { + Type = "TimeFrameInterval", + Start = "1977-AUG-20 16:07:06.535", + End = "2027-DEC-27" + } } }, GUI = { @@ -205,7 +210,7 @@ local VoyagerTrailEncounterSaturn = { } } -local VoyagerTrailSaturnUranus = { +local VoyagerTrailCruiseSaturnUranus = { Identifier = "Voyager_2_Trail_Cruise_Saturn_Uranus", Parent = sunTransforms.SolarSystemBarycenter.Identifier, Renderable = { diff --git a/data/assets/scene/solarsystem/planets.asset b/data/assets/scene/solarsystem/planets.asset deleted file mode 100644 index 8603643031..0000000000 --- a/data/assets/scene/solarsystem/planets.asset +++ /dev/null @@ -1,23 +0,0 @@ -asset.request('./planets/mercury/mercury') - -asset.request('./planets/venus/venus') - -asset.request('./planets/earth/earth') -asset.request('./planets/earth/atmosphere') -asset.request('./planets/earth/markers') -asset.request('./planets/earth/moon/moon') - -asset.request('./planets/mars/mars') -asset.request('./planets/mars/atmosphere') - -asset.request('./planets/jupiter/jupiter') -asset.request('./planets/jupiter/major_moons') - -asset.request('./planets/saturn/saturn') -asset.request('./planets/saturn/major_moons') - -asset.request('./planets/uranus/uranus') -asset.request('./planets/uranus/major_moons') - -asset.request('./planets/neptune/neptune') -asset.request('./planets/neptune/major_moons') diff --git a/data/assets/scene/solarsystem/planets/default_layers.asset b/data/assets/scene/solarsystem/planets/default_layers.asset new file mode 100644 index 0000000000..2ad62dd2c1 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/default_layers.asset @@ -0,0 +1,28 @@ +asset.require('./earth/default_layers') +asset.require('./earth/moon/default_layers') + +asset.require('./jupiter/default_layers') +asset.require('./jupiter/callisto/default_layers') +asset.require('./jupiter/europa/default_layers') +asset.require('./jupiter/ganymede/default_layers') +asset.require('./jupiter/io/default_layers') + +asset.require('./mars/default_layers') + +asset.require('./mercury/default_layers') + +asset.require('./neptune/default_layers') + +asset.require('./saturn/default_layers') +asset.require('./saturn/dione/default_layers') +asset.require('./saturn/enceladus/default_layers') +asset.require('./saturn/hyperion/default_layers') +asset.require('./saturn/iapetus/default_layers') +asset.require('./saturn/mimas/default_layers') +asset.require('./saturn/rhea/default_layers') +asset.require('./saturn/tethys/default_layers') +asset.require('./saturn/titan/default_layers') + +asset.require('./uranus/default_layers') + +asset.require('./venus/default_layers') diff --git a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset index 641e3a0759..7b3197b84f 100644 --- a/data/assets/scene/solarsystem/planets/earth/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/earth/atmosphere.asset @@ -16,6 +16,7 @@ local Atmosphere = { PlanetRadius = 6377.0, PlanetAverageGroundReflectance = 0.1, GroundRadianceEmittion = 0.6, + SunIntensity = 6.9, Rayleigh = { Coefficients = { -- Wavelengths are given in 10^-9m diff --git a/data/assets/scene/solarsystem/planets/earth/default_layers.asset b/data/assets/scene/solarsystem/planets/earth/default_layers.asset new file mode 100644 index 0000000000..96e165923e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/default_layers.asset @@ -0,0 +1,33 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./earth') +local globeIdentifier = globeAsset.Earth.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') +local colorFallbackLayer = asset.require('./layers/colorlayers/blue_marble_fallback').layer +local nightFallbackLayer = asset.require('./layers/nightlayers/earth_night_texture').layer +local heightFallbackLayer = asset.require('./layers/heightlayers/blue_marble_height_fallback').layer + +colorFallbackLayer.Enabled = true +heightFallbackLayer.Enabled = true +nightFallbackLayer.Enabled = true + +local colorLayer = asset.require('./layers/colorlayers/esri_viirs_combo').layer +local heightLayer = asset.require('./layers/heightlayers/terrain_tileset').layer +local nightLayer = asset.require('./layers/nightlayers/earth_at_night_2012').layer +local waterMask = asset.require('./layers/watermasks/modis_water_mask').layer + +colorLayer.Enabled = true +colorLayer.Fallback = colorFallbackLayer + +heightLayer.Enabled = true +heightLayer.Fallback = heightFallbackLayer + +nightLayer.Enabled = true +nightLayer.Fallback = nightFallbackLayer + +waterMask.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/earth/earth.asset b/data/assets/scene/solarsystem/planets/earth/earth.asset index 8335fb94a9..be78f5c522 100644 --- a/data/assets/scene/solarsystem/planets/earth/earth.asset +++ b/data/assets/scene/solarsystem/planets/earth/earth.asset @@ -1,258 +1,21 @@ local transforms = asset.require('./transforms') local assetHelper = asset.require('util/asset_helper') -local texturesPath = asset.require('./earth_textures').TexturesPath -asset.request('./trail') - +local labelsPath = asset.require('./earth_globelabels').LabelsPath +asset.require('./trail') -- local earthEllipsoid = { 6378137.0, 6378137.0, 6356752.314245 } local earthEllipsoid = { 6378137.0, 6378137.0, 6378137.0 } -local mapServiceConfigsPath = asset.localResource("map_service_configs") local Earth = { Identifier = "Earth", Parent = transforms.EarthIAU.Identifier, - Transform = { - Scale = { - Type = "StaticScale", - Scale = 1.0 - } - }, Renderable = { Type = "RenderableGlobe", Radii = earthEllipsoid, SegmentsPerPatch = 64, PerformShading = false, - Layers = { - ColorLayers = { - { - Identifier = "ESRI_VIIRS_Combo", - Name = "ESRI VIIRS Combo", - Type = "ByLevelTileLayer", - LevelTileProviders = { - { - MaxLevel = 4, - TileProvider = { - Identifier = "Temporal_VIIRS_SNPP", - Name = "Temporal VIIRS SNPP", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_SNPP_CorrectedReflectance_TrueColor", - "2015-11-24", - "Today", - "1d", - "250m", - "jpg" - ), - PadTiles = false - } - }, - { - MaxLevel = 22, - TileProvider = { - Identifier = "ESRI_World_Imagery", - Name = "ESRI World Imagery", - FilePath = mapServiceConfigsPath .. "/ESRI/World_Imagery.wms", - PadTiles = false - } - }, - }, - Enabled = true, - PadTiles = false, - Fallback = { - Identifier = "Blue_Marble", - Name = "Blue Marble", - FilePath = texturesPath .. "/earth_bluemarble.jpg", - Enabled = true - } - }, - { - Identifier = "ESRI_World_Imagery", - Name = "ESRI World Imagery", - FilePath = mapServiceConfigsPath .. "/ESRI/World_Imagery.wms" - }, - { - Identifier = "ESRI_Imagery_World_2D", - Name = "ESRI Imagery World 2D", - FilePath = mapServiceConfigsPath .. "/ESRI/ESRI_Imagery_World_2D.wms" - }, - { - Identifier = "VIIRS_SNPP_Temporal", - Name = "VIIRS SNPP (Temporal)", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_SNPP_CorrectedReflectance_TrueColor", - "2015-11-24", - "Yesterday", - "1d", - "250m", - "jpg" - ) - }, - { - Identifier = "Aqua_Modis_Temporal", - Name = "Aqua Modis (Temporal)", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "MODIS_Aqua_CorrectedReflectance_TrueColor", - "2012-05-08", - "Yesterday", - "1d", - "250m", - "jpg" - ) - }, - { - Identifier = "Terra_Modis_Temporal", - Name = "Terra Modis (Temporal)", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "MODIS_Terra_CorrectedReflectance_TrueColor", - "2012-05-08", - "Yesterday", - "1d", - "250m", - "jpg" - ) - }, - { - Name = "BMNH [Utah]", - Identifier = "BMNG_Utah", - FilePath = mapServiceConfigsPath .. "/Utah/Bmng.wms" - }, - { - Name = "BMNH [Sweden]", - Identifier = "BMNG_Sweden", - FilePath = mapServiceConfigsPath .. "/LiU/Bmng.wms" - }, - { - Identifier = "AMSR2_GCOM_W1_Sea_Ice_Concentration_Temporal", - Name = "AMSR2 GCOM W1 Sea Ice Concentration (Temporal)", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "AMSR2_Sea_Ice_Concentration_12km", - "2012-05-08", - "Yesterday", - "1d", - "2km", - "png" - ) - }, - { - Identifier = "MODIS_Terra_Chlorophyll_A_Temporal", - Name = "MODIS Terra Chlorophyll A (Temporal)", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "MODIS_Terra_Chlorophyll_A", - "2013-07-02", - "Yesterday", - "1d", - "1km", - "png" - ) - }, - { - Identifier = "GHRSST_L4_G1SST_Sea_Surface_Temperature_Temporal", - Name = "GHRSST L4 G1SST Sea Surface Temperature (Temporal)", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "GHRSST_L4_G1SST_Sea_Surface_Temperature", - "2010-06-21", - "Yesterday", - "1d", - "1km", - "png" - ) - } - }, - NightLayers = { - { - Identifier = "Earth_at_Night_2012", - Name = "Earth at Night 2012", - FilePath = mapServiceConfigsPath .. "/GIBS/night/VIIRS_CityLights_2012.wms", - Enabled = true, - Fallback = { - Identifier = "Earth_Night", - Name = "Earth Night", - FilePath = texturesPath .. "/earth_night.jpg", - Enabled = true, - } - }, - { - Identifier = "Earth_at_Night_Temporal", - Name = "Earth at Night (Temporal)", - Type = "TemporalTileLayer", - FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( - "VIIRS_SNPP_DayNightBand_ENCC", - "2012-05-08", - "Yesterday", - "1d", - "500m", - "png" - ) - } - }, - WaterMasks = { - { - Identifier = "MODIS_Water_Mask", - Name = "MODIS Water Mask", - FilePath = mapServiceConfigsPath .. "/GIBS/water/MODIS_Water_Mask.wms", - Enabled = true - }, - { - Name = "Gebco [Utah]", - Identifier = "Gebco_Utah", - FilePath = mapServiceConfigsPath .. "/Utah/Gebco.wms" - }, - { - Name = "Gebco [Sweden]", - Identifier = "Gebco_Sweden", - FilePath = mapServiceConfigsPath .. "/LiU/Gebco.wms" - }, - }, - Overlays = { - { - Identifier = "Coastlines", - FilePath = mapServiceConfigsPath .. "/GIBS/overlays/Coastlines.wms" - }, - { - Identifier = "Reference_Features", - Name = "Reference Features", - FilePath = mapServiceConfigsPath .. "/GIBS/overlays/Reference_Features.wms" - }, - { - Identifier = "Reference_Labels", - Name = "Reference Labels", - FilePath = mapServiceConfigsPath .. "/GIBS/overlays/Reference_Labels.wms" - }, - { - Identifier = "Tile_Indices", - Name = "Tile Indices", - Type = "TileIndexTileLayer" - }, - { - Identifier = "Size_Reference", - Name = "Size Reference", - Type = "SizeReferenceTileLayer", - Radii = earthEllipsoid - } - }, - HeightLayers = { - { - Identifier = "Terrain_tileset", - Name = "Terrain tileset", - FilePath = mapServiceConfigsPath .. "/ESRI/Terrain.wms", - Enabled = true, - TilePixelSize = 64, - Fallback = { - Name = "Earth Bluemarble Height", - Identifier = "Earth_Bluemarble_Height", - FilePath = texturesPath .. "/earth_bluemarble_height.jpg", - Enabled = true - } - } - } - }, + Layers = {}, ShadowGroup = { Source1 = { Name = "Sun", @@ -266,7 +29,24 @@ local Earth = { Radius = 1.737E6 } --Caster2 = { Name = "Independency Day Ship", Radius = 0.0, } - } + }, + Labels = { + Enable = false, + FileName = labelsPath .. "/Earth.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 41.0, + LabelsSize = 0.52, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + LabelsFadeOutEnabled = false, + FadeInStartingDistance = 50000.0, + FadeOutStartingDistance = 80000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1500000.0, + LabelsColor = { 1.0, 0.0, 0.0 } + } }, Tag = { "planet_solarSystem", "planet_terrestrial" }, GUI = { @@ -274,6 +54,55 @@ local Earth = { } } +local EarthLabel = { + Identifier = "EarthLabel", + Parent = Earth.Identifier, + -- Transform = { + -- Translation = { + -- Type = "SpiceTranslation", + -- Target = "EARTH", + -- Observer = "EARTH BARYCENTER" + -- }, + -- -- Rotation = { + -- -- Type = "SpiceRotation", + -- -- SourceFrame = "IAU_MOON", + -- -- DestinationFrame = "GALACTIC" + -- -- } + -- }, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Earth", + FontSize = 100.0, + LabelSize = 8.6, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive", + EnableFading = true, + FadeStartUnit = "au", + FadeStartDistance = 1.5, + FadeStartSpeed = 1.0, + FadeEndUnit = "au", + FadeEndDistance = 15.0, + FadeEndSpeed = 25.0 + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Earth Label", + Path = "/Solar System/Planets/Earth" + } +} -assetHelper.registerSceneGraphNodesAndExport(asset, { Earth }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Earth, EarthLabel }) + + +asset.meta = { + Name = "Earth", + Version = "1.0", + Description = [[ Earth is a special planet with special needs ]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license" +} diff --git a/data/assets/scene/solarsystem/planets/earth/earth_globelabels.asset b/data/assets/scene/solarsystem/planets/earth/earth_globelabels.asset new file mode 100644 index 0000000000..61bc481f9d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/earth_globelabels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Earth Labels", + Type = "HttpSynchronization", + Identifier = "earth_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/amsr2_gcom_w1_sea_ice_concentration_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/amsr2_gcom_w1_sea_ice_concentration_temporal.asset new file mode 100644 index 0000000000..5c6b8ddc33 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/amsr2_gcom_w1_sea_ice_concentration_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "AMSR2_GCOM_W1_Sea_Ice_Concentration_Temporal", + Name = "AMSR2 GCOM W1 Sea Ice Concentration (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "AMSRU2_Sea_Ice_Concentration_12km", + "2012-05-08", + "Yesterday", + "1d", + "2km", + "png" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/aqua_modis_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/aqua_modis_temporal.asset new file mode 100644 index 0000000000..cfdf9d13f1 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/aqua_modis_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "Aqua_Modis_Temporal", + Name = "Aqua Modis (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "MODIS_Aqua_CorrectedReflectance_TrueColor", + "2002-07-04", + "Yesterday", + "1d", + "250m", + "jpg" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/blue_marble_fallback.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/blue_marble_fallback.asset new file mode 100644 index 0000000000..942c2f5343 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/blue_marble_fallback.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../earth_textures").TexturesPath + +local layer = { + Identifier = "Blue_Marble", + Name = "Blue Marble", + FilePath = texturesPath .. "/earth_bluemarble.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/bmng_sweden.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/bmng_sweden.asset new file mode 100644 index 0000000000..d9ea551409 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/bmng_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "BMNG_Sweden", + Name = "BMNG [Sweden]", + FilePath = mapServiceConfigsPath .. "/LiU/Bmng.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/bmng_utah.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/bmng_utah.asset new file mode 100644 index 0000000000..a96f4b1250 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/bmng_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "BMNG_Utah", + Name = "BMNG [Utah]", + FilePath = mapServiceConfigsPath .. "/Utah/Bmng.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_imagery_world_2D.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_imagery_world_2D.asset new file mode 100644 index 0000000000..ba24b18cf9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_imagery_world_2D.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "ESRI_Imagery_World_2D", + Name = "ESRI Imagery World 2D", + FilePath = mapServiceConfigsPath .. "/ESRI/ESRI_Imagery_World_2D.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo.asset new file mode 100644 index 0000000000..1cde8cd46b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_viirs_combo.asset @@ -0,0 +1,38 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "ESRI_VIIRS_Combo", + Name = "ESRI VIIRS Combo", + Type = "ByLevelTileLayer", + LevelTileProviders = { + { + MaxLevel = 4, + TileProvider = { + Identifier = "Temporal_VIIRS_SNPP", + Name = "Temporal VIIRS SNPP", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "VIIRS_SNPP_CorrectedReflectance_TrueColor", + "2015-11-24", + "Today", + "1d", + "250m", + "jpg" + ), + PadTiles = false + } + }, + { + MaxLevel = 22, + TileProvider = { + Identifier = "ESRI_World_Imagery", + Name = "ESRI World Imagery", + FilePath = mapServiceConfigsPath .. "/ESRI/World_Imagery.wms", + PadTiles = false + } + }, + }, + PadTiles = false, +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery.asset new file mode 100644 index 0000000000..05ac0221c3 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/esri_world_imagery.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "ESRI_World_Imagery", + Name = "ESRI World Imagery", + FilePath = mapServiceConfigsPath .. "/ESRI/World_Imagery.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/ghrsst_l4_g1sst_sea_surface_temperature_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/ghrsst_l4_g1sst_sea_surface_temperature_temporal.asset new file mode 100644 index 0000000000..0d8d9070f5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/ghrsst_l4_g1sst_sea_surface_temperature_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "GHRSST_L4_MUR_Sea_Surface_Temperature_Temporal", + Name = "GHRSST L4 MUR Sea Surface Temperature (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "GHRSST_L4_MUR_Sea_Surface_Temperature", + "2002-06-01", + "Yesterday", + "1d", + "1km", + "png" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/ghrsst_l4_mur_sea_surface_temperature_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/ghrsst_l4_mur_sea_surface_temperature_temporal.asset new file mode 100644 index 0000000000..dd648c68c3 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/ghrsst_l4_mur_sea_surface_temperature_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "Terra_Modis_Temporal", + Name = "Terra Modis (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "MODIS_Terra_CorrectedReflectance_TrueColor", + "2000-02-24", + "Yesterday", + "1d", + "250m", + "jpg" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/modis_terra_chlorophyll_a_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/modis_terra_chlorophyll_a_temporal.asset new file mode 100644 index 0000000000..1bc027c5a3 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/modis_terra_chlorophyll_a_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "MODIS_Terra_Chlorophyll_A_Temporal", + Name = "MODIS Terra Chlorophyll A (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "MODIS_Terra_Chlorophyll_A", + "2013-07-02", + "Yesterday", + "1d", + "1km", + "png" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/terra_modis_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/terra_modis_temporal.asset new file mode 100644 index 0000000000..dd648c68c3 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/terra_modis_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "Terra_Modis_Temporal", + Name = "Terra Modis (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "MODIS_Terra_CorrectedReflectance_TrueColor", + "2000-02-24", + "Yesterday", + "1d", + "250m", + "jpg" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_snpp_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_snpp_temporal.asset new file mode 100644 index 0000000000..634fdd0c2a --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/colorlayers/viirs_snpp_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "VIIRS_SNPP_Temporal", + Name = "VIIRS SNPP (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "VIIRS_SNPP_CorrectedReflectance_TrueColor", + "2015-11-24", + "Yesterday", + "1d", + "250m", + "jpg" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/earth/layers/default_layers.asset new file mode 100644 index 0000000000..03e3dd4b7c --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/default_layers.asset @@ -0,0 +1,48 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/esri_viirs_combo").layer, + asset.require(colorLayersPath .. "/esri_world_imagery").layer, + asset.require(colorLayersPath .. "/esri_imagery_world_2d").layer, + asset.require(colorLayersPath .. "/viirs_snpp_temporal").layer, + asset.require(colorLayersPath .. "/aqua_modis_temporal").layer, + asset.require(colorLayersPath .. "/terra_modis_temporal").layer, + asset.require(colorLayersPath .. "/bmng_utah").layer, + asset.require(colorLayersPath .. "/bmng_sweden").layer, + asset.require(colorLayersPath .. "/amsr2_gcom_w1_sea_ice_concentration_temporal").layer, + asset.require(colorLayersPath .. "/modis_terra_chlorophyll_a_temporal").layer, + asset.require(colorLayersPath .. "/ghrsst_l4_g1sst_sea_surface_temperature_temporal").layer, + asset.require(colorLayersPath .. "/ghrsst_l4_mur_sea_surface_temperature_temporal").layer +} + +local heightLayersPath = "./heightlayers" +local heightLayers = { + asset.require(heightLayersPath .. "/terrain_tileset").layer +} + +local nightLayersPath = "./nightlayers" +local nightLayers = { + asset.require(nightLayersPath .. "/earth_at_night_2012").layer, + asset.require(nightLayersPath .. "/earth_at_night_temporal").layer +} + +local overlaysPath = "./overlays" +local overlays = { + asset.require(overlaysPath .. "/coastlines").layer, + asset.require(overlaysPath .. "/reference_features").layer, + asset.require(overlaysPath .. "/reference_labels").layer, + asset.require(overlaysPath .. "/tile_indices").layer, + asset.require(overlaysPath .. "/size_reference").layer +} + +local waterMasksPath = "./watermasks" +local waterMasks = { + asset.require(waterMasksPath .. "/gebco_sweden").layer, + asset.require(waterMasksPath .. "/gebco_utah").layer, + asset.require(waterMasksPath .. "/modis_water_mask").layer +} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/heightlayers/blue_marble_height_fallback.asset b/data/assets/scene/solarsystem/planets/earth/layers/heightlayers/blue_marble_height_fallback.asset new file mode 100644 index 0000000000..0ea5928e43 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/heightlayers/blue_marble_height_fallback.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../earth_textures").TexturesPath + +local layer = { + Name = "Earth Bluemarble Height", + Identifier = "Earth_Bluemarble_Height", + FilePath = texturesPath .. "/earth_bluemarble_height.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/heightlayers/terrain_tileset.asset b/data/assets/scene/solarsystem/planets/earth/layers/heightlayers/terrain_tileset.asset new file mode 100644 index 0000000000..d943d69ab4 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/heightlayers/terrain_tileset.asset @@ -0,0 +1,10 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Terrain_tileset", + Name = "Terrain tileset", + FilePath = mapServiceConfigsPath .. "/ESRI/Terrain.wms", + TilePixelSize = 64, +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_2012.asset b/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_2012.asset new file mode 100644 index 0000000000..fb3fe68019 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_2012.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Earth_at_Night_2012", + Name = "Earth at Night 2012", + FilePath = mapServiceConfigsPath .. "/GIBS/night/VIIRS_CityLights_2012.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_temporal.asset b/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_temporal.asset new file mode 100644 index 0000000000..f5ddd9009b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_at_night_temporal.asset @@ -0,0 +1,15 @@ +local layer = { + Identifier = "Earth_at_Night_Temporal", + Name = "Earth at Night (Temporal)", + Type = "TemporalTileLayer", + FilePath = openspace.globebrowsing.createTemporalGibsGdalXml( + "VIIRS_SNPP_DayNightBand_ENCC", + "2012-05-08", + "Yesterday", + "1d", + "500m", + "png" + ) +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_night_texture.asset b/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_night_texture.asset new file mode 100644 index 0000000000..4d11cbff30 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/nightlayers/earth_night_texture.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../earth_textures").TexturesPath + +local layer = { + Identifier = "Earth_Night", + Name = "Earth Night", + FilePath = texturesPath .. "/earth_night.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/overlays/coastlines.asset b/data/assets/scene/solarsystem/planets/earth/layers/overlays/coastlines.asset new file mode 100644 index 0000000000..e97bc82db2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/overlays/coastlines.asset @@ -0,0 +1,8 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Coastlines", + FilePath = mapServiceConfigsPath .. "/GIBS/overlays/Coastlines.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/overlays/reference_features.asset b/data/assets/scene/solarsystem/planets/earth/layers/overlays/reference_features.asset new file mode 100644 index 0000000000..10b6d5762f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/overlays/reference_features.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Reference_Features", + Name = "Reference Features", + FilePath = mapServiceConfigsPath .. "/GIBS/overlays/Reference_Features.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/overlays/reference_labels.asset b/data/assets/scene/solarsystem/planets/earth/layers/overlays/reference_labels.asset new file mode 100644 index 0000000000..0254f65792 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/overlays/reference_labels.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Reference_Labels", + Name = "Reference Labels", + FilePath = mapServiceConfigsPath .. "/GIBS/overlays/Reference_Labels.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/overlays/size_reference.asset b/data/assets/scene/solarsystem/planets/earth/layers/overlays/size_reference.asset new file mode 100644 index 0000000000..6c91588e40 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/overlays/size_reference.asset @@ -0,0 +1,10 @@ +local earthAsset = asset.require("./../../earth") + +local layer ={ + Identifier = "Size_Reference", + Name = "Size Reference", + Type = "SizeReferenceTileLayer", + Radii = earthAsset.Earth.Renderable.Radii +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/overlays/tile_indices.asset b/data/assets/scene/solarsystem/planets/earth/layers/overlays/tile_indices.asset new file mode 100644 index 0000000000..5957fd348d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/overlays/tile_indices.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Tile_Indices", + Name = "Tile Indices", + Type = "TileIndexTileLayer" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/watermasks/gebco_sweden.asset b/data/assets/scene/solarsystem/planets/earth/layers/watermasks/gebco_sweden.asset new file mode 100644 index 0000000000..99090e404e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/watermasks/gebco_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Name = "Gebco [Sweden]", + Identifier = "Gebco_Sweden", + FilePath = mapServiceConfigsPath .. "/LiU/Gebco.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/watermasks/gebco_utah.asset b/data/assets/scene/solarsystem/planets/earth/layers/watermasks/gebco_utah.asset new file mode 100644 index 0000000000..3b48b71fb2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/watermasks/gebco_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Name = "Gebco [Utah]", + Identifier = "Gebco_Utah", + FilePath = mapServiceConfigsPath .. "/Utah/Gebco.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/layers/watermasks/modis_water_mask.asset b/data/assets/scene/solarsystem/planets/earth/layers/watermasks/modis_water_mask.asset new file mode 100644 index 0000000000..56acd3c123 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/layers/watermasks/modis_water_mask.asset @@ -0,0 +1,9 @@ +local mapServiceConfigsPath = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "MODIS_Water_Mask", + Name = "MODIS Water Mask", + FilePath = mapServiceConfigsPath .. "/GIBS/water/MODIS_Water_Mask.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/default_layers.asset b/data/assets/scene/solarsystem/planets/earth/moon/default_layers.asset new file mode 100644 index 0000000000..ca781487ae --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/default_layers.asset @@ -0,0 +1,16 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./moon') +local globeIdentifier = globeAsset.Moon.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/wac_utah').layer +local heightLayer = asset.require('./layers/heightlayers/loladem_utah').layer + +colorLayer.Enabled = true +heightLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/clemuvvis_sweden.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/clemuvvis_sweden.asset new file mode 100644 index 0000000000..0a4ebb7b8f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/clemuvvis_sweden.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "ClemUvvis_Sweden", + Name = "Clem Uvvis [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Clem_Uvvis.wms", + Settings = { + Gamma = 1.14, + Multiplier = 1.4 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/clemuvvis_utah.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/clemuvvis_utah.asset new file mode 100644 index 0000000000..ea9a14da82 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/clemuvvis_utah.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "ClemUvvis_Utah", + Name = "Clem Uvvis [Utah]", + FilePath = mapServiceConfigs .. "/Utah/ClemUvvis.wms", + Settings = { + Gamma = 1.14, + Multiplier = 1.4 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/kaguya_sweden.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/kaguya_sweden.asset new file mode 100644 index 0000000000..21962f4389 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/kaguya_sweden.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Kaguya_Sweden", + Name = "Kaguya [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Kaguya.vrt", + Settings = { + Gamma = 1.0, + Multiplier = 1.23 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/kaguya_utah.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/kaguya_utah.asset new file mode 100644 index 0000000000..d2353246aa --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/kaguya_utah.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Kaguya_Utah", + Name = "Kaguya [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Kaguya.vrt", + Settings = { + Gamma = 1.0, + Multiplier = 1.23 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_clr_shade_sweden.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_clr_shade_sweden.asset new file mode 100644 index 0000000000..ed3d24f7c8 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_clr_shade_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Lola_Clr_Shade_Sweden", + Name = "Lola Color Shade [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Lola_Clr_Shade.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_clr_shade_utah.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_clr_shade_utah.asset new file mode 100644 index 0000000000..bc96ae1118 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_clr_shade_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Lola_Clr_Shade_Utah", + Name = "Lola Color Shade [Utah]", + FilePath = mapServiceConfigs .. "/Utah/LolaClrShade.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_shade_sweden.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_shade_sweden.asset new file mode 100644 index 0000000000..7b2e7e98a2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_shade_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Lola_Shade_Sweden", + Name = "Lola Shade [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Lola_Shade.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_shade_utah.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_shade_utah.asset new file mode 100644 index 0000000000..d110a913c9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/lola_shade_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Lola_Shade_Utah", + Name = "Lola Shade [Utah]", + FilePath = mapServiceConfigs .. "/Utah/LolaShade.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/uvvishybrid_sweden.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/uvvishybrid_sweden.asset new file mode 100644 index 0000000000..1e7f03e2a2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/uvvishybrid_sweden.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "UvvisHybrid_Sweden", + Name = "Uvvis Hybrid [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Uvvis_Hybrid.wms", + Settings = { + Gamma = 0.52, + Multiplier = 0.65 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/uvvishybrid_utah.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/uvvishybrid_utah.asset new file mode 100644 index 0000000000..95dd87ecf8 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/uvvishybrid_utah.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "UvvisHybrid_Utah", + Name = "Uvvis Hybrid [Utah]", + FilePath = mapServiceConfigs .. "/Utah/UvvisHybrid.wms", + Settings = { + Gamma = 0.52, + Multiplier = 0.65 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/wac_sweden.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/wac_sweden.asset new file mode 100644 index 0000000000..3ac1e5a080 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/wac_sweden.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "WAC_Sweden", + Name = "WAC [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/WAC.wms", + Settings = { Gamma = 0.84 } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/wac_utah.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/wac_utah.asset new file mode 100644 index 0000000000..ae192546cb --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/colorlayers/wac_utah.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "WAC_Utah", + Name = "WAC [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Wac.wms", + Settings = { Gamma = 0.84 } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/default_layers.asset new file mode 100644 index 0000000000..5a28a62054 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/default_layers.asset @@ -0,0 +1,31 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/wac_utah").layer, + asset.require(colorLayersPath .. "/wac_sweden").layer, + asset.require(colorLayersPath .. "/clemuvvis_utah").layer, + asset.require(colorLayersPath .. "/clemuvvis_sweden").layer, + asset.require(colorLayersPath .. "/uvvishybrid_utah").layer, + asset.require(colorLayersPath .. "/uvvishybrid_sweden").layer, + asset.require(colorLayersPath .. "/kaguya_utah").layer, + asset.require(colorLayersPath .. "/kaguya_sweden").layer, + asset.require(colorLayersPath .. "/lola_clr_shade_utah").layer, + asset.require(colorLayersPath .. "/lola_clr_shade_sweden").layer, + asset.require(colorLayersPath .. "/lola_shade_utah").layer, + asset.require(colorLayersPath .. "/lola_shade_sweden").layer +} + +local heightLayersPath = "./heightlayers" +local heightLayers = { + asset.require(heightLayersPath .. "/loladem_utah").layer, + asset.require(heightLayersPath .. "/loladem_sweden").layer +} + +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/heightlayers/loladem_sweden.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/heightlayers/loladem_sweden.asset new file mode 100644 index 0000000000..e3298925b5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/heightlayers/loladem_sweden.asset @@ -0,0 +1,11 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "LolaDem_Sweden", + Name = "Lola DEM [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Lola_DEM.wms", + TilePixelSize = 64, + Settings = { Multiplier = 0.5 } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/layers/heightlayers/loladem_utah.asset b/data/assets/scene/solarsystem/planets/earth/moon/layers/heightlayers/loladem_utah.asset new file mode 100644 index 0000000000..50f040dcd8 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/layers/heightlayers/loladem_utah.asset @@ -0,0 +1,11 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "LolaDem_Utah", + Name = "Lola DEM [Utah]", + FilePath = mapServiceConfigs .. "/Utah/LolaDem.wms", + TilePixelSize = 64, + Settings = { Multiplier = 0.5 } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/earth/moon/map_service_configs/LiU/Kaguya.vrt b/data/assets/scene/solarsystem/planets/earth/moon/map_service_configs/LiU/Kaguya.vrt new file mode 100644 index 0000000000..e7ad44a020 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/map_service_configs/LiU/Kaguya.vrt @@ -0,0 +1,28 @@ + + GEOGCS["GCS_Moon_2000",DATUM["D_Moon_2000",SPHEROID["Moon_2000_IAU_IAG",1737400.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + -1.8000000000000000e+02, 2.4414062500000000e-04, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -2.4414062500000000e-04 + + Gray + + Kaguya.wms + 1 + + + + + + + Alpha + 0 + + Kaguya.wms + 1 + + + + 255 + 0 + 0 + + + diff --git a/data/assets/scene/solarsystem/planets/earth/moon/map_service_configs/Utah/Kaguya.vrt b/data/assets/scene/solarsystem/planets/earth/moon/map_service_configs/Utah/Kaguya.vrt new file mode 100644 index 0000000000..e7ad44a020 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/map_service_configs/Utah/Kaguya.vrt @@ -0,0 +1,28 @@ + + GEOGCS["GCS_Moon_2000",DATUM["D_Moon_2000",SPHEROID["Moon_2000_IAU_IAG",1737400.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + -1.8000000000000000e+02, 2.4414062500000000e-04, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -2.4414062500000000e-04 + + Gray + + Kaguya.wms + 1 + + + + + + + Alpha + 0 + + Kaguya.wms + 1 + + + + 255 + 0 + 0 + + + diff --git a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset index 57ed5eddad..3859cf2b28 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/moon.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/moon.asset @@ -3,11 +3,8 @@ local transforms = asset.require('scene/solarsystem/planets/earth/transforms') local sunAsset = asset.require('scene/solarsystem/sun/sun') local earthAsset = asset.require('../earth') asset.require('spice/base') -asset.request('./trail') - - - -local mapServiceConfigs = asset.localResource("map_service_configs") +asset.require('./trail') +local labelsPath = asset.require('./moon_labels').LabelsPath local Moon = { Identifier = "Moon", @@ -28,89 +25,7 @@ local Moon = { Type = "RenderableGlobe", Radii = 1738140, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "WAC_Utah", - Name = "WAC [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Wac.wms", - Enabled = true - }, - { - Identifier = "WAC_Sweden", - Name = "WAC [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/WAC.wms" - }, - { - Identifier = "ClemUvvis_Utah", - Name = "Clem Uvvis [Utah]", - FilePath = mapServiceConfigs .. "/Utah/ClemUvvis.wms" - }, - { - Identifier = "ClemUvvis_Sweden", - Name = "Clem Uvvis [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Clem_Uvvis.wms" - }, - { - Identifier = "UvvisHybrid_Utah", - Name = "Uvvis Hybrid [Utah]", - FilePath = mapServiceConfigs .. "/Utah/UvvisHybrid.wms" - }, - { - Identifier = "UvvisHybrid_Sweden", - Name = "Uvvis Hybrid [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Uvvis_Hybrid.wms" - }, - { - Identifier = "Kaguya_Utah", - Name = "Kaguya [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Kaguya.wms" - }, - { - Identifier = "Kaguya_Sweden", - Name = "Kaguya [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Kaguya.wms" - }, - { - Identifier = "Lola_Clr_Shade_Utah", - Name = "Lola Clear Shade [Utah]", - FilePath = mapServiceConfigs .. "/Utah/LolaClrShade.wms" - }, - { - Identifier = "Lola_Clr_Shade_Sweden", - Name = "Lola Clear Shade [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Lola_Clr_Shade.wms" - }, - { - Identifier = "Lola_Shade_Utah", - Name = "Lola Shade [Utah]", - FilePath = mapServiceConfigs .. "/Utah/LolaShade.wms" - }, - { - Identifier = "Lola_Shade_Sweden", - Name = "Lola Shade [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Lola_Shade.wms" - }, - }, - HeightLayers = { - { - Identifier = "LolaDem_Utah", - Name = "Lola DEM [Utah]", - FilePath = mapServiceConfigs .. "/Utah/LolaDem.wms", - Enabled = true, - TilePixelSize = 64, - Settings = { Multiplier = 0.5 } - }, - { - Identifier = "LolaDem_Sweden", - Name = "Lola DEM [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Lola_DEM.wms", - TilePixelSize = 64, - Settings = { Multiplier = 0.5 } - } - - } - }, + Layers = {}, ShadowGroup = { Source1 = { Name = sunAsset.Sun.Name, @@ -120,6 +35,22 @@ local Moon = { Name = earthAsset.Earth.Name, Radius = 6.371E6 } + }, + Labels = { + Enable = false, + FileName = labelsPath .. "/moon.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, GUI = { diff --git a/data/assets/scene/solarsystem/planets/earth/moon/moon_labels.asset b/data/assets/scene/solarsystem/planets/earth/moon/moon_labels.asset new file mode 100644 index 0000000000..ea360826f2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/moon/moon_labels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Moon Labels", + Type = "HttpSynchronization", + Identifier = "moon_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) \ No newline at end of file diff --git a/data/assets/scene/solarsystem/planets/earth/moon/trail.asset b/data/assets/scene/solarsystem/planets/earth/moon/trail.asset index fe707fff53..bd96ce84ac 100644 --- a/data/assets/scene/solarsystem/planets/earth/moon/trail.asset +++ b/data/assets/scene/solarsystem/planets/earth/moon/trail.asset @@ -16,7 +16,8 @@ local MoonTrail = { }, Color = { 0.5, 0.3, 0.3 }, Period = 27, - Resolution = 1000 + Resolution = 1000, + Tag = { "moonTrail_solarSystem", "moonTrail_terrestrial", "moonTrail_earth" } }, GUI = { Name = "Moon Trail", diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset index 734a0c2a75..93056ec693 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/amateur.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Amateur Radio", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset index d914346b3e..62ddde179b 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/experimental.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Experimental", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset index a4af6800e8..5a2b92bbeb 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/geostationary.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Geostationary", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset index 743df69502..187da196dc 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/globalstar.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "GlobalStar", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset index b3a28b5644..968c7a0d52 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/gorizont.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Gorizont", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset index ff2ced1cee..6c63a7a152 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/intelsat.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Intelsat", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset index 860fb7b4eb..9aef4acfa4 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Iridium", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset index a58ef236a6..0acefd60bb 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/iridium_next.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Iridium NEXT", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset index 57028fd4f0..faa5e257cd 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/molniya.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Molniya", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset index 2897921252..46a00682df 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/orbcomm.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Orbcomm", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset index 0968d8f30a..a389e514db 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/other_comm.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Other comm", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset index 7133629c93..61b2511d13 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/raduga.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Raduga", @@ -8,17 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset b/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset index fc6e0461bb..5589bc9f2d 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/communications/ses.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "SES", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_asat.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_asat.asset new file mode 100644 index 0000000000..0335bc5466 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_asat.asset @@ -0,0 +1,15 @@ +local assetHelper = asset.require('util/asset_helper') +local shared = asset.require('util/tle_helper') + +local group = { + Title = "Indian ASAT test Debris", + Url = "http://www.celestrak.com/NORAD/elements/2019-006.txt", + TrailColor = { 0.25, 0.35, 0.45 } +} + +local tle = shared.downloadTLEFile(asset, group.Url, group.Title) + + +local objectNames = {} + +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset index 755dbdc921..ca65fa548c 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_breezem.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Breeze-M Breakup", @@ -12,12 +12,4 @@ 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) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset index e7d80fa019..f6ac4c803a 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_fengyun.asset @@ -1,10 +1,10 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Fengyun Debris", Url = "http://www.celestrak.com/NORAD/elements/1999-025.txt", - TrailColor = { 0.25, 0.35, 0.45 } + TrailColor = { 0.784, 1.0, 0.737 } } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) @@ -12,12 +12,4 @@ 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) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset index 603d15b12b..4d4ee16f8a 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_iridium33.asset @@ -1,10 +1,10 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Iridium 33 Debris", Url = "http://www.celestrak.com/NORAD/elements/iridium-33-debris.txt", - TrailColor = { 0.25, 0.35, 0.45 } + TrailColor = { 0.8, 0.0, 0.3 } } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) @@ -12,12 +12,4 @@ 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) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset index 847047bf67..6d84fd8247 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/debris_kosmos2251.asset @@ -1,10 +1,10 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Kosmos 2251 Debris", Url = "http://www.celestrak.com/NORAD/elements/cosmos-2251-debris.txt", - TrailColor = { 0.25, 0.35, 0.45 } + TrailColor = { 0.66, 0.8, 0.5 } } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) @@ -12,12 +12,4 @@ 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) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/cartesian_volume.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/cartesian_volume.asset new file mode 100644 index 0000000000..27f651d20f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/cartesian_volume.asset @@ -0,0 +1,38 @@ +-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_VOLUME enabled + +-- Before using this asset, +-- the volume data itself needs to be generated, +-- using the task 'data/tasks/volume/debristasks/generate_debris_volume.task' + +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require("scene/solarsystem/planets/earth/transforms") + +local maxApogee = 2 * 10946320; + +local volume = { + Identifier = "DebrisVolume - Cartesian", + Parent = transforms.EarthInertial.Identifier, + Renderable = { + Type = "RenderableTimeVaryingVolume", + SourceDirectory = asset.localResource("generatedCartesian"), + TransferFunction = asset.localResource("transferfunction.txt"), + StepSize = 0.01, + MinValue = 0, + MaxValue = 1, + GridType = "Cartesian", + SecondsBefore = 50*365*24*60*60, + SecondsAfter = 50*365*24*60*60 + }, + GUI = { + Path = "/Volumes" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = maxApogee -- do not multiply this. That will not show real representation. + } + } +} + +local objects = { volume } +assetHelper.registerSceneGraphNodes(asset, objects) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/spherical_volume.asset b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/spherical_volume.asset new file mode 100644 index 0000000000..85abc72975 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/spherical_volume.asset @@ -0,0 +1,38 @@ +-- This asset requires OpenSpace to be built with the OPENSPACE_MODULE_VOLUME enabled + +-- Before using this asset, +-- the volume data itself needs to be generated, +-- using the task 'data/tasks/volume/debristasks/generate_debris_volume.task' + +local assetHelper = asset.require('util/asset_helper') +local transforms = asset.require("scene/solarsystem/planets/earth/transforms") + +local maxApogee = 10946320; + +local volume = { + Identifier = "DebrisVolume - Spherical", + Parent = transforms.EarthInertial.Identifier, + Renderable = { + Type = "RenderableTimeVaryingVolume", + SourceDirectory = asset.localResource("generated"), + TransferFunction = asset.localResource("transferfunction.txt"), + StepSize = 0.01, + MinValue = 0, + MaxValue = 1, + GridType = "Spherical", + SecondsBefore = 50*365*24*60*60, + SecondsAfter = 50*365*24*60*60 + }, + GUI = { + Path = "/Volumes" + }, + Transform = { + Scale = { + Type = "StaticScale", + Scale = maxApogee --do not multiply this. That will not show real representation. + } + } +} + +local objects = { volume } +assetHelper.registerSceneGraphNodes(asset, objects) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/transferfunction.txt b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/transferfunction.txt new file mode 100644 index 0000000000..48c714f102 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/satellites/debris/volume/transferfunction.txt @@ -0,0 +1,6 @@ +width 1024 +lower 0.0 +upper 1.0 +mappingkey 0.02 40 160 40 0 +mappingkey 0.14 40 40 240 50 +mappingkey 0.3 200 80 0 250 diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset index dd3c90564d..6a74e9e875 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/brightest.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "100 Brightest", @@ -8,16 +8,4 @@ local group = { } 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) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset index b780584955..b53e0fa281 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/cubesats.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "CubeSat", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset new file mode 100644 index 0000000000..841a2536d9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/iss.asset @@ -0,0 +1,120 @@ +local assetHelper = asset.require('util/asset_helper') +local satelliteHelper = asset.require('util/tle_helper') +local transforms = asset.require('scene/solarsystem/planets/earth/transforms') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local url = "https://celestrak.com/satcat/tle.php?CATNR=25544" +local identifier = "ISS" +local filename = "ISS.txt" +local nodes = {} +local tle = satelliteHelper.downloadTLEFile(asset, url, identifier, filename) + +local models = asset.syncedResource({ + Name = "ISS Models", + Type = "HttpSynchronization", + Identifier = "iss_model", + Version = 2 +}) + +local initializeAndAddNodes = function() + local lineElement = satelliteHelper.makeSingleLineElement(tle, filename) + local period = satelliteHelper.getPeriodFromElement(lineElement) + local path = tle .. "/" .. filename + + local iss = { + Identifier = "ISS", + Parent = transforms.EarthInertial.Identifier, + BoundingSphere = 30, + Transform = { + Translation = { + Type = "TLETranslation", + Body = identifier, + Observer = transforms.EarthInertial.Identifier, + File = path, + LineNumber = 1 + }, + Rotation = { + Type = "SpiceRotation", + SourceFrame = "GALACTIC", + DestinationFrame = "J2000", + } + }, + Tag = { "earth_satellite", "ISS" }, + GUI = { + Path = "/Solar System/Planets/Earth/Satellites/ISS" + } + } + + local parentNode = { + Identifier = "ISSparentNode", + Parent = iss.Identifier, + Transform = { + Rotation = { + Type = "FixedRotation", + Attached = "ISSparentNode", + XAxis = { 0.01, -1.0, 0.56 }, + XAxisOrthogonal = true, + YAxis = transforms.EarthInertial.Identifier + } + }, + GUI = { + Name = "ISSparentNode", + Path = "/Solar System/Planets/Earth/Satellites/ISS", + Hidden = true, + } + } + + local list = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "10", "11", + "13", "14", "15", "16", "17", "19", "21", "22", "23", "24", "25", + "foilsilver", "olive", "basemetal", "white_20", "plasticblack", "ecostresswhite", + "plain"} + + local nodes = { iss, parentNode } + for i, info in ipairs(list) do + n = assetHelper.createModelPart( + parentNode.Identifier, + sunTransforms.SolarSystemBarycenter.Identifier, + models, + info, + info .. ".png", + true + ) + table.insert(nodes, n) + end + + local issTrail = { + Identifier = identifier .. "_trail", + Parent = transforms.EarthInertial.Identifier, + Renderable = { + Type = "RenderableTrailOrbit", + Translation = { + Type = "TLETranslation", + Body = identifier, + Observer = transforms.EarthInertial.Identifier, + File = path, + LineNumber = 1, + RenderBinMode = "PostDeferredTransparent" + }, + Color = { 0.9, 0.6715, 0.0 }, + Fade = 1.5, + Period = period, + Resolution = 320 + }, + Tag = { "earth_satellite", "ISS" }, + GUI = { + Name = "ISS Trail", + Path = "/Solar System/Planets/Earth/Satellites/ISS" + } + } + + table.insert(nodes, issTrail) + return nodes +end + +asset.onInitialize(function () + nodes = initializeAndAddNodes() + for _, node in ipairs(nodes) do + openspace.addSceneGraphNode(node) + end + openspace.setPropertyValueSingle("Scene.ISSparentNode.Rotation.yAxis-InvertObject", true) +end) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset index 0b0f7f05ef..eba2695caa 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/military.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Military", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset index 8e66e3d36d..a389e6510d 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/other.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Other", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset index bccc163bde..64204ffd3f 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/radar.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Radar Calibration", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset index b16833dde5..f9f974a730 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/spacestations.asset @@ -1,23 +1,11 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "SpaceStations", Url = "http://celestrak.com/NORAD/elements/stations.txt", - TrailColor = { 0.9, 0.0, 0.0 } + TrailColor = { 0.9, 0.1, 0.0 } } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset index 79edd04285..506dd7bb48 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/misc/tle-new.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Last 30 Days", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset index 194b84b0ce..47fe0930be 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/beidou.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Beidou", @@ -8,16 +8,4 @@ local group = { } 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) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset index 24296abcd6..f3c2d976f3 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/galileo.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Galileo", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset index 6442b71d53..b0223450c3 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/glosnass.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Glosnass", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset index b58801b01c..e08e162862 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/gps.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "GPS", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset index 1a279f5f78..efccb05950 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/musson.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Russian LEO Navigation", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset index fa001847a2..3be4a576ec 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/nnss.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Navy Navigation Satellite System", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset index c7f7b6401d..58458638c4 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/navigation/sbas.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Satellite Based Augmentation System", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites.asset index 44c81c4ef8..601b4033f4 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites.asset @@ -1 +1 @@ -asset.request('./satellites_interesting') +asset.require('./satellites_interesting') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_all.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_all.asset index cb663ed946..312d2f2cfb 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_all.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_all.asset @@ -1,8 +1,8 @@ -asset.request('./satellites_communications') +asset.require('./satellites_communications') -- The debris contains a **lot** of nodes, so we disable it on default --- asset.request('./satellites_debris') -asset.request('./satellites_interesting') -asset.request('./satellites_misc') -asset.request('./satellites_navigation') -asset.request('./satellites_science') -asset.request('./satellites_weather') +-- asset.require('./satellites_debris') +asset.require('./satellites_interesting') +asset.require('./satellites_misc') +asset.require('./satellites_navigation') +asset.require('./satellites_science') +asset.require('./satellites_weather') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_communications.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_communications.asset index 78080e6557..872322c03c 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_communications.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_communications.asset @@ -1,13 +1,13 @@ -asset.request('./communications/geostationary') -asset.request('./communications/intelsat') -asset.request('./communications/ses') -asset.request('./communications/iridium') -asset.request('./communications/iridium_next') -asset.request('./communications/orbcomm') -asset.request('./communications/globalstar') -asset.request('./communications/amateur') -asset.request('./communications/experimental') -asset.request('./communications/other_comm') -asset.request('./communications/gorizont') -asset.request('./communications/raduga') -asset.request('./communications/molniya') +asset.require('./communications/geostationary') +asset.require('./communications/intelsat') +asset.require('./communications/ses') +asset.require('./communications/iridium') +asset.require('./communications/iridium_next') +asset.require('./communications/orbcomm') +asset.require('./communications/globalstar') +asset.require('./communications/amateur') +asset.require('./communications/experimental') +asset.require('./communications/other_comm') +asset.require('./communications/gorizont') +asset.require('./communications/raduga') +asset.require('./communications/molniya') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_debris.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_debris.asset index e4902c1725..03feae1272 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_debris.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_debris.asset @@ -1,4 +1,5 @@ -asset.request('./debris/debris_breezem') -asset.request('./debris/debris_fengyun') -asset.request('./debris/debris_iridium33') -asset.request('./debris/debris_kosmos2251') +asset.require('./debris/debris_asat') +asset.require('./debris/debris_breezem') +asset.require('./debris/debris_fengyun') +asset.require('./debris/debris_iridium33') +asset.require('./debris/debris_kosmos2251') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_interesting.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_interesting.asset index 230ded9c65..71151f4358 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_interesting.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_interesting.asset @@ -1,5 +1,6 @@ -asset.request('./misc/brightest') -asset.request('./communications/geostationary') -asset.request('./navigation/gps') -asset.request('./misc/spacestations') -asset.request('./misc/tle-new') +asset.require('./misc/brightest') +asset.require('./communications/geostationary') +asset.require('./navigation/gps') +asset.require('./misc/spacestations') +asset.require('./misc/iss') +asset.require('./misc/tle-new') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_misc.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_misc.asset index 117ad486e8..bd4c0d88b9 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_misc.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_misc.asset @@ -1,4 +1,4 @@ -asset.request('./misc/military') -asset.request('./misc/radar') -asset.request('./misc/cubesats') -asset.request('./misc/other') +asset.require('./misc/military') +asset.require('./misc/radar') +asset.require('./misc/cubesats') +asset.require('./misc/other') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_navigation.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_navigation.asset index 2707ea06b4..6765ad4118 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_navigation.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_navigation.asset @@ -1,7 +1,7 @@ -asset.request('./navigation/beidou') -asset.request('./navigation/galileo') -asset.request('./navigation/glosnass') -asset.request('./navigation/gps') -asset.request('./navigation/musson') -asset.request('./navigation/nnss') -asset.request('./navigation/sbas') +asset.require('./navigation/beidou') +asset.require('./navigation/galileo') +asset.require('./navigation/glosnass') +asset.require('./navigation/gps') +asset.require('./navigation/musson') +asset.require('./navigation/nnss') +asset.require('./navigation/sbas') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_science.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_science.asset index 8e8d0a3e0f..cb1ecee8e3 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_science.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_science.asset @@ -1,4 +1,4 @@ -asset.request('./science/spaceearth') -asset.request('./science/geodetic') -asset.request('./science/engineering') -asset.request('./science/education') +asset.require('./science/spaceearth') +asset.require('./science/geodetic') +asset.require('./science/engineering') +asset.require('./science/education') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_shared.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_shared.asset deleted file mode 100644 index 7bd1566701..0000000000 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_shared.asset +++ /dev/null @@ -1,169 +0,0 @@ -local transforms = asset.require('scene/solarsystem/planets/earth/transforms') - -local satImageFolder = asset.syncedResource({ - Name = "Satellite Image Files", - Type = "HttpSynchronization", - Identifier = "tle_satellites_images", - Version = 1 -}) - -function downloadTLEFile(sceneAsset, url, name) - local identifier = name - identifier = identifier:gsub(" ", "") - identifier = identifier:gsub("&", "") - identifier = identifier:gsub("-", "") - return sceneAsset.syncedResource({ - Name = "Satellite TLE Data (" .. name .. ")", - Type = "UrlSynchronization", - Identifier = "satellite_tle_data_" .. identifier, - Url = url - }) -end - -local addSatelliteGroupObjects = function(group, tleFolder, shouldAddDuplicates) - function numLinesInFile(filename) - local ctr = 0 - for _ in io.lines(filename) do ctr = ctr + 1 end - return ctr - end - - -- Check format of a set of 3 TLE file lines and return nonzero if there is a format error - function isValidTLEFileFormat(lineArr) - function isEmpty(s) return s == nil or s == '' end - - if isEmpty(lineArr[1]) or isEmpty(lineArr[2]) or isEmpty(lineArr[3]) then - return false - end - if string.sub(lineArr[2], 1, 2) ~= "1 " then - return false - end - if string.sub(lineArr[3], 1, 2) ~= "2 " then - return false - end - return true - end - - function getSat(title, file, lineNum, textureFile, group) - return { - Identifier = title, - Parent = transforms.EarthInertial.Identifier, - Renderable = { - Type = "RenderablePlaneImageLocal", - Enabled = false, - Size = 3e4, - Origin = "Center", - Body = "TLE", - Billboard = true, - Texture = textureFile - }, - Transform = { - Translation = { - Type = "TLETranslation", - Body = title, - Observer = transforms.EarthInertial.Identifier, - File = file, - LineNumber = lineNum - }, - Scale = { - Type = "StaticScale", - Scale = 1 - } - }, - Tag = { "earth_satellite_" .. group, "earth_satellite_" .. group .. "_marker" }, - GUI = { - Path = "/Solar System/Planets/Earth/Satellites" - } - } - end - - function getSatTrail(title, file, lineNum, per, color, group) - return { - Identifier = title .. "_trail", - Parent = transforms.EarthInertial.Identifier, - Renderable = { - Type = "RenderableTrailOrbit", - Translation = { - Type = "TLETranslation", - Body = title, - Observer = transforms.EarthInertial.Identifier, - File = file, - LineNumber = lineNum - }, - Color = color, - Period = per, - Resolution = 160 - }, - Tag = { "earth_satellite_" .. group, "earth_satellite_" .. group .. "_trail"}, - GUI = { - Path = "/Solar System/Planets/Earth/Satellites" - } - } - end - - - local filename = group.Url:match("([^/]+)$") - local filenameSansExt = filename:gsub(filename:match("(%.%w+)$"), "") - - local path = tleFolder .. "/" .. filename - local texture = satImageFolder .. "/" .. "satB.png" - - - local file = io.open(path, "r") - assert(file, "File not found: " .. path) - - local obj = {} - - --now loop through the tle file and get each set of 3 lines - for n = 1, numLinesInFile(path), 3 do - local line = { - file:read('*l'), --title line - file:read('*l'), - file:read('*l') - } - assert(isValidTLEFileFormat(line), "TLE file syntax error on line " .. n .. ": " .. path) - - -- Trim string - line[1] = line[1]:gsub("^%s*(.-)%s*$", "%1") - line[1] = line[1]:gsub("%s+", "_") - line[1] = line[1]:gsub("[%-()]", "") - local title = line[1] - - -- Get period from correct location of the string - local per = tonumber(string.sub(line[3], 53, 63)) - -- Trail for 2x a single revolution - per = 1.0 / per * 2.0 - - local satName = filenameSansExt .. "_" .. title - - local shouldAddNotes = true - if openspace.hasSceneGraphNode(satName) then - if shouldAddDuplicates then - local originalSatName = satName - local i = 1 - while openspace.hasSceneGraphNode(satName) do - satName = originalSatName .. "_" .. tostring(i) - i = i + 1 - end - else - shouldAddNotes = false - end - end - - if shouldAddNotes then - -- Register satellite object and trail - local sat_var = getSat(satName, path, n, texture, group.Title) - openspace.addSceneGraphNode(sat_var) - table.insert(obj, sat_var.Identifier) - - local satTrail_var = getSatTrail(satName, path, n, per, group.TrailColor, group.Title) - openspace.addSceneGraphNode(satTrail_var) - table.insert(obj, satTrail_var.Identifier) - end - end - - return obj -end - -asset.export("satImageFolder", satImageFolder) -asset.export("downloadTLEFile", downloadTLEFile) -asset.export("addSatelliteGroupObjects", addSatelliteGroupObjects) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_weather.asset b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_weather.asset index c464cb4a6f..fe272e6816 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/satellites_weather.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/satellites_weather.asset @@ -1,10 +1,10 @@ -asset.request('./weather/argos') -asset.request('./weather/dmc') -asset.request('./weather/earth_resources') -asset.request('./weather/goes') -asset.request('./weather/noaa') -asset.request('./weather/planet') -asset.request('./weather/sarsat') -asset.request('./weather/spire') -asset.request('./weather/tdrss') -asset.request('./weather/weather') +asset.require('./weather/argos') +asset.require('./weather/dmc') +asset.require('./weather/earth_resources') +asset.require('./weather/goes') +asset.require('./weather/noaa') +asset.require('./weather/planet') +asset.require('./weather/sarsat') +asset.require('./weather/spire') +asset.require('./weather/tdrss') +asset.require('./weather/weather') diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset index 6d0cdee19a..d7a42c5fde 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/education.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Education", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset index d5c563a9c3..faa6febc16 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/engineering.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Engineering", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset index 4e4cd2a0d2..d2613c699e 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/geodetic.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Geodect", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset b/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset index 454e5ac748..e6d3513857 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/science/spaceearth.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Space & Earth Science", @@ -8,15 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset index 9920953d7b..75d572299e 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/argos.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "ARGOS", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset index 31e8ff2724..eb95d7e6e1 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/dmc.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Disaster Monitoring", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset index 6028cb5fc0..e3ad206277 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/earth_resources.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Earth Resources", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset index 0f782c2750..55a2584643 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/goes.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "GOES", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset index 8c744a0b9c..85c7f97798 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/noaa.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "NOAA", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset index 3224c9b0e0..bb5f00625b 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/planet.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Planet", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset index 0b6399b9b7..64ef4004e5 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/sarsat.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Search & Rescue (SARSAT)", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset index ed058860c3..92c25df702 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/spire.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Spire", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset index 6ccbeede95..0ec30cab29 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/tdrss.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Tracking and Data Relay Satellite System (TDRSS)", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset b/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset index 362798b181..c23e0910b6 100644 --- a/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset +++ b/data/assets/scene/solarsystem/planets/earth/satellites/weather/weather.asset @@ -1,5 +1,5 @@ local assetHelper = asset.require('util/asset_helper') -local shared = asset.require('../satellites_shared') +local shared = asset.require('util/tle_helper') local group = { Title = "Weather", @@ -8,16 +8,4 @@ local group = { } local tle = shared.downloadTLEFile(asset, group.Url, group.Title) - - -local objectNames = {} - -asset.onInitialize(function () - objectNames = shared.addSatelliteGroupObjects(group, tle, false) -end) - -asset.onDeinitialize(function () - for _, n in ipairs(objectNames) do - openspace.removeSceneGraphNode(n) - end -end) +shared.registerSatelliteGroupObjects(asset, group, tle, true) diff --git a/data/assets/scene/solarsystem/planets/earth/transforms.asset b/data/assets/scene/solarsystem/planets/earth/transforms.asset index 39fe3a9304..c0052befb6 100644 --- a/data/assets/scene/solarsystem/planets/earth/transforms.asset +++ b/data/assets/scene/solarsystem/planets/earth/transforms.asset @@ -10,7 +10,7 @@ local EarthBarycenter = { Transform = { Translation = { Type = "SpiceTranslation", - Target = "EARTH", + Target = "EARTH BARYCENTER", Observer = "SUN" } }, @@ -21,10 +21,27 @@ local EarthBarycenter = { } } +local EarthCenter = { + Identifier = "EarthCenter", + Parent = EarthBarycenter.Identifier, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = "EARTH", + Observer = "EARTH BARYCENTER" + } + }, + GUI = { + Name = "Earth Center", + Path = "/Solar System/Planets/Earth", + Hidden = true + } +} + local EarthInertial = { -- The default reference frame for Earth-orbiting satellites Identifier = "EarthInertial", - Parent = EarthBarycenter.Identifier, + Parent = EarthCenter.Identifier, Transform = { Rotation = { Type = "SpiceRotation", @@ -41,7 +58,7 @@ local EarthInertial = { local EarthIAU = { Identifier = "EarthIAU", - Parent = EarthBarycenter.Identifier, + Parent = EarthCenter.Identifier, Transform = { Rotation = { Type = "SpiceRotation", @@ -58,6 +75,7 @@ local EarthIAU = { assetHelper.registerSceneGraphNodesAndExport(asset, { EarthBarycenter, + EarthCenter, EarthInertial, EarthIAU }) diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset index 2075bbe6c8..cf1828b9de 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto.asset @@ -1,17 +1,9 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') asset.require("spice/base") -asset.request('./trail') +asset.require('./trail') local kernel = asset.require('../kernels').jup310 - - - -local textures = asset.syncedResource({ - Name = "Callisto Textures", - Type = "HttpSynchronization", - Identifier = "callisto_textures", - Version = 1 -}) +local labelsPath = asset.require('../jupiter_globelabels').LabelsPath local Callisto = { Identifier = "Callisto", @@ -34,14 +26,22 @@ local Callisto = { Type = "RenderableGlobe", Radii = 2410000, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/callisto.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/callisto.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 40.0, + LabelsSize = 10.5, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 15000000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" }, diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto_textures.asset new file mode 100644 index 0000000000..c1d6a77a78 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/callisto_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Callisto Textures", + Type = "HttpSynchronization", + Identifier = "callisto_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/default_layers.asset new file mode 100644 index 0000000000..12e7d431d9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./callisto') +local globeIdentifier = globeAsset.Callisto.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/callisto_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/colorlayers/callisto_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/colorlayers/callisto_texture.asset new file mode 100644 index 0000000000..2d04dd4f4e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/colorlayers/callisto_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../callisto_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/callisto.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/default_layers.asset new file mode 100644 index 0000000000..7ae26c9112 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/callisto/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/callisto_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/jupiter/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/default_layers.asset new file mode 100644 index 0000000000..a1a548fbca --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./jupiter') +local globeIdentifier = globeAsset.Jupiter.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/jupiter_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset new file mode 100644 index 0000000000..6d3fbe2115 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./europa') +local globeIdentifier = globeAsset.Europa.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/voyager_global_mosaic').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset index ee30b306ad..8e296655a5 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/europa.asset @@ -1,19 +1,9 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') asset.require("spice/base") -asset.request('./trail') +asset.require('./trail') local kernel = asset.require('../kernels').jup310 - - -local map_service_configs = asset.localResource("map_service_configs") - - -local textures = asset.syncedResource({ - Name = "Europa Textures", - Type = "HttpSynchronization", - Identifier = "europa_textures", - Version = 1 -}) +local labelsPath = asset.require('../jupiter_globelabels').LabelsPath local Europa = { Identifier = "Europa", @@ -36,21 +26,22 @@ local Europa = { Type = "RenderableGlobe", Radii = 1560800, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/europa.jpg", - -- Enabled = true - }, - { - Identifier = "Voyager_Global_Mosaic", - Name = "Voyager Global Mosaic [Sweden]", - FilePath = map_service_configs .. "/LiU/Voyager_GalileoSSI_global_mosaic_500m.wms", - BlendMode = "Color", - Enabled = true - }, - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/europa.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 40.0, + LabelsSize = 10.5, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 15000000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" }, diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/europa_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/europa_textures.asset new file mode 100644 index 0000000000..ebd8095845 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/europa_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Europa Textures", + Type = "HttpSynchronization", + Identifier = "europa_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/europa_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/europa_texture.asset new file mode 100644 index 0000000000..f7a1b0e405 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/europa_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../europa_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/europa.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic.asset new file mode 100644 index 0000000000..8588352efa --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/colorlayers/voyager_global_mosaic.asset @@ -0,0 +1,10 @@ +local map_service_configs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Voyager_Global_Mosaic", + Name = "Voyager Global Mosaic [Sweden]", + FilePath = map_service_configs .. "/LiU/Voyager_GalileoSSI_global_mosaic_500m.wms", + BlendMode = "Color", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/jupiter/europa/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/default_layers.asset new file mode 100644 index 0000000000..3019fc9938 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/europa/layers/default_layers.asset @@ -0,0 +1,16 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/europa_texture").layer, + asset.require(colorLayersPath .. "/voyager_global_mosaic").layer +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/default_layers.asset new file mode 100644 index 0000000000..192d7d119b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./ganymede') +local globeIdentifier = globeAsset.Ganymede.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/ganymede_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset index 7f61f4d7e1..530745e4b7 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede.asset @@ -1,17 +1,9 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') asset.require("spice/base") -asset.request('./trail') +asset.require('./trail') local kernel = asset.require('../kernels').jup310 - - - -local textures = asset.syncedResource({ - Name = "Ganymede Textures", - Type = "HttpSynchronization", - Identifier = "ganymede_textures", - Version = 1 -}) +local labelsPath = asset.require('../jupiter_globelabels').LabelsPath local Ganymede = { Identifier = "Ganymede", @@ -34,14 +26,22 @@ local Ganymede = { Type = "RenderableGlobe", Radii = 2631000, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/ganymede.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/ganymede.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 40.0, + LabelsSize = 10.5, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 15000000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = {1.0, 1.0, 0.0} } }, Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" }, diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede_textures.asset new file mode 100644 index 0000000000..e96a231214 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/ganymede_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Ganymede Textures", + Type = "HttpSynchronization", + Identifier = "ganymede_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/layers/colorlayers/ganymede_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/layers/colorlayers/ganymede_texture.asset new file mode 100644 index 0000000000..7ad7aeab2c --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/layers/colorlayers/ganymede_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../ganymede_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/ganymede.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/jupiter/ganymede/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/ganymede/layers/default_layers.asset new file mode 100644 index 0000000000..757bebd1fa --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/ganymede/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/ganymede_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/io/default_layers.asset new file mode 100644 index 0000000000..7c3e2c7fb9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/io/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./io') +local globeIdentifier = globeAsset.Io.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/io_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset index a5e7c63ecd..55ecb7a35b 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/io/io.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/io/io.asset @@ -1,17 +1,9 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') asset.require("spice/base") -asset.request('./trail') +asset.require('./trail') local kernel = asset.require('../kernels').jup310 - - - -local textures = asset.syncedResource({ - Name = "Io Textures", - Type = "HttpSynchronization", - Identifier = "io_textures", - Version = 1 -}) +local labelsPath = asset.require('../jupiter_globelabels').LabelsPath local Io = { Identifier = "Io", @@ -28,20 +20,28 @@ local Io = { Target = "IO", Observer = "JUPITER BARYCENTER", Kernels = kernel - }, + } }, Renderable = { Type = "RenderableGlobe", Radii = 1821600, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/io.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/io.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 40.0, + LabelsSize = 10.5, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 15000000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_jupiter" }, diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/io_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/io/io_textures.asset new file mode 100644 index 0000000000..e6d7b81991 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/io/io_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Io Textures", + Type = "HttpSynchronization", + Identifier = "io_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/layers/colorlayers/io_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/io/layers/colorlayers/io_texture.asset new file mode 100644 index 0000000000..e3bef0c607 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/io/layers/colorlayers/io_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../io_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/io.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/jupiter/io/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/io/layers/default_layers.asset new file mode 100644 index 0000000000..7e7f5a4366 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/io/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/io_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset index b15a546a5e..a581d7f1c0 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter.asset @@ -1,16 +1,7 @@ local transforms = asset.require('./transforms') local assetHelper = asset.require('util/asset_helper') asset.require("spice/base") -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Jupiter Textures", - Type = "HttpSynchronization", - Identifier = "jupiter_textures", - Version = 1 -}) +asset.require('./trail') local Jupiter = { Identifier = "Jupiter", @@ -20,25 +11,13 @@ local Jupiter = { Type = "SpiceRotation", SourceFrame = "IAU_JUPITER", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", Radii = { 71492000.0, 71492000.0, 66854000.0 }, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/jupiter.jpg", - Enabled = true - } - } - } + Layers = {} }, Tag = { "planet_solarSystem", "planet_giants" }, GUI = { @@ -46,6 +25,25 @@ local Jupiter = { } } +local JupiterLabel = { + Identifier = "JupiterLabel", + Parent = Jupiter.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Jupiter", + FontSize = 100.0, + LabelSize = 8.6, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive" + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Jupiter Label", + Path = "/Solar System/Planets/Jupiter" + } +} - -assetHelper.registerSceneGraphNodesAndExport(asset, { Jupiter }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Jupiter, JupiterLabel }) diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter_globelabels.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter_globelabels.asset new file mode 100644 index 0000000000..92fbf9efea --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter_globelabels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Callisto Labels", + Type = "HttpSynchronization", + Identifier = "jupiter_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) diff --git a/data/assets/scene/solarsystem/planets/jupiter/jupiter_textures.asset b/data/assets/scene/solarsystem/planets/jupiter/jupiter_textures.asset new file mode 100644 index 0000000000..421670579f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/jupiter_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Jupiter Textures", + Type = "HttpSynchronization", + Identifier = "jupiter_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/jupiter/layers/colorlayers/jupiter_texture.asset b/data/assets/scene/solarsystem/planets/jupiter/layers/colorlayers/jupiter_texture.asset new file mode 100644 index 0000000000..1ecbef043e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/layers/colorlayers/jupiter_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../jupiter_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/jupiter.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/jupiter/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/jupiter/layers/default_layers.asset new file mode 100644 index 0000000000..0f96d790c5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/jupiter/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/jupiter_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset b/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset index 157b5dbbfd..7938f89387 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor/carpo_group.asset @@ -14,7 +14,7 @@ local carpoGroup = { { Identifier = "Carpo", Parent = { - Name = parentIdentifier, + Identifier = parentIdentifier, Spice = parentSpice }, Spice = "CARPO", diff --git a/data/assets/scene/solarsystem/planets/jupiter/minor_moons.asset b/data/assets/scene/solarsystem/planets/jupiter/minor_moons.asset index 90a1812f3f..0609399eef 100644 --- a/data/assets/scene/solarsystem/planets/jupiter/minor_moons.asset +++ b/data/assets/scene/solarsystem/planets/jupiter/minor_moons.asset @@ -1,8 +1,8 @@ -asset.request('./minor/ananke_group') -asset.request('./minor/carme_group') -asset.request('./minor/carpo_group') -asset.request('./minor/himalia_group') -asset.request('./minor/inner_group') -asset.request('./minor/other_groups') -asset.request('./minor/pasiphae_group') -asset.request('./minor/themisto_group') +asset.require('./minor/ananke_group') +asset.require('./minor/carme_group') +asset.require('./minor/carpo_group') +asset.require('./minor/himalia_group') +asset.require('./minor/inner_group') +asset.require('./minor/other_groups') +asset.require('./minor/pasiphae_group') +asset.require('./minor/themisto_group') diff --git a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset index 2850e528ca..d0a465ea2a 100644 --- a/data/assets/scene/solarsystem/planets/mars/atmosphere.asset +++ b/data/assets/scene/solarsystem/planets/mars/atmosphere.asset @@ -16,6 +16,8 @@ local Atmosphere = { PlanetRadius = 3386.190, PlanetAverageGroundReflectance = 0.1, GroundRadianceEmittion = 0.37, + SunIntensity = 13.1, + MieScatteringExtinctionPropCoefficient = 0.23862, Rayleigh = { Coefficients = { -- Wavelengths are given in 10^-9m diff --git a/data/assets/scene/solarsystem/planets/mars/default_layers.asset b/data/assets/scene/solarsystem/planets/mars/default_layers.asset new file mode 100644 index 0000000000..6b638a6777 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/default_layers.asset @@ -0,0 +1,21 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./mars') +local globeIdentifier = globeAsset.Mars.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorFallbackLayer = asset.require('./layers/colorlayers/mars_texture').layer +colorFallbackLayer.Enabled = true + +local colorLayer = asset.require('./layers/colorlayers/moc_wa_color_utah').layer +local heightLayer = asset.require('./layers/heightlayers/mola_utah').layer + +colorLayer.Enabled = true +colorLayer.Fallback = colorFallbackLayer + +heightLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.asset new file mode 100644 index 0000000000..36d34e90df --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_blended_01.asset @@ -0,0 +1,14 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "CTX_blended_01", + Name = "CTX Blended beta01", + FilePath = mapServiceConfigs .. "/ESRI/CTX/CTXblended.vrt", + BlendMode = "Color", + Settings = { + Gamma = 2.14, + Multiplier = 1.54 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_mosaic_sweden.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_mosaic_sweden.asset new file mode 100644 index 0000000000..6663ea3c82 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_mosaic_sweden.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "CTX_Mosaic_Sweden", + Name = "CTX Mosaic [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/CTX.wms", + BlendMode = "Color" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_mosaic_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_mosaic_utah.asset new file mode 100644 index 0000000000..862c5bdc7d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/ctx_mosaic_utah.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "CTX_Mosaic_Utah", + Name = "CTX Mosaic [Utah]", + FilePath = mapServiceConfigs .. "/Utah/CTX.wms", + BlendMode = "Color" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mars_texture.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mars_texture.asset new file mode 100644 index 0000000000..b2ed3af406 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mars_texture.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../mars_textures").TexturesPath + +local layer = { + Identifier = "Mars_Texture", + Name = "Mars Texture", + FilePath = texturesPath .. "/mars.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/moc_wa_color_liu.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/moc_wa_color_liu.asset new file mode 100644 index 0000000000..c06516d76c --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/moc_wa_color_liu.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "MOC_WA_Color_LiU", + Name = "MOC WA Color [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Color.wms", + Settings = { + Gamma = 1.6, + Multiplier = 1.07 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/moc_wa_color_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/moc_wa_color_utah.asset new file mode 100644 index 0000000000..ad8531e54b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/moc_wa_color_utah.asset @@ -0,0 +1,15 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local texturesPath = asset.require("./../../mars_textures").TexturesPath + +local layer = { + Identifier = "MOC_WA_Color_Utah", + Name = "MOC WA Color [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Mars_Color.wms", + Settings = { + Gamma = 1.6, + Multiplier = 1.07 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_hrsc_sweden.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_hrsc_sweden.asset new file mode 100644 index 0000000000..3c373f4fc1 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_hrsc_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "MOLA_HRSC_Sweden", + Name = "MOLA HRSC [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Mola_HRSC.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_hrsc_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_hrsc_utah.asset new file mode 100644 index 0000000000..46c06cacfa --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_hrsc_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "MOLA_HRSC_Utah", + Name = "MOLA HRSC [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Mola_HRSC.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_pseudo_color_sweden.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_pseudo_color_sweden.asset new file mode 100644 index 0000000000..684f753349 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_pseudo_color_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "MOLA_Pseudo_Color_Sweden", + Name = "MOLA Pseudo Color [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Mola_PseudoColor.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_pseudo_color_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_pseudo_color_utah.asset new file mode 100644 index 0000000000..b0359121fa --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/mola_pseudo_color_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "MOLA_Pseudo_Color_Utah", + Name = "MOLA Pseudo Color [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Mola_PseudoColor.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_day_sweden.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_day_sweden.asset new file mode 100644 index 0000000000..e5fa9856cc --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_day_sweden.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Themis_IR_Day_Sweden", + Name = "Themis IR Day [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Themis_IR_Day.wms", + BlendMode = "Color" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_day_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_day_utah.asset new file mode 100644 index 0000000000..f8705906b6 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_day_utah.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Themis_IR_Day_Utah", + Name = "Themis IR Day [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Themis_IR_Day.wms", + BlendMode = "Color" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_night_sweden.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_night_sweden.asset new file mode 100644 index 0000000000..20321c5382 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_night_sweden.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Themis_IR_Night_Sweden", + Name = "Themis IR Night [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Themis_IR_Night.wms", + BlendMode = "Color" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_night_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_night_utah.asset new file mode 100644 index 0000000000..f9ccf0f2f7 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/themis_ir_night_utah.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Themis_IR_Night_Utah", + Name = "Themis IR Night [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Themis_IR_Night.wms", + BlendMode = "Color" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/viking_mdim_sweden.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/viking_mdim_sweden.asset new file mode 100644 index 0000000000..911ef40e8b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/viking_mdim_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Viking_MDIM_Sweden", + Name = "Viking MDIM [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/MDIM.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/viking_mdim_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/viking_mdim_utah.asset new file mode 100644 index 0000000000..b0f9131d49 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/colorlayers/viking_mdim_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Viking_MDIM_Utah", + Name = "Viking MDIM [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Mdim.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/mars/layers/default_layers.asset new file mode 100644 index 0000000000..13dba5d2ee --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/default_layers.asset @@ -0,0 +1,41 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/moc_wa_color_utah").layer, + asset.require(colorLayersPath .. "/moc_wa_color_liu").layer, + asset.require(colorLayersPath .. "/viking_mdim_utah").layer, + asset.require(colorLayersPath .. "/viking_mdim_sweden").layer, + asset.require(colorLayersPath .. "/mola_pseudo_color_utah").layer, + asset.require(colorLayersPath .. "/mola_pseudo_color_sweden").layer, + asset.require(colorLayersPath .. "/mola_hrsc_utah").layer, + asset.require(colorLayersPath .. "/mola_hrsc_sweden").layer, + asset.require(colorLayersPath .. "/themis_ir_day_utah").layer, + asset.require(colorLayersPath .. "/themis_ir_day_sweden").layer, + asset.require(colorLayersPath .. "/themis_ir_night_utah").layer, + asset.require(colorLayersPath .. "/themis_ir_night_sweden").layer, + asset.require(colorLayersPath .. "/ctx_mosaic_utah").layer, + asset.require(colorLayersPath .. "/ctx_mosaic_sweden").layer, + asset.require(colorLayersPath .. "/ctx_blended_01").layer +} + +local heightLayersPath = "./heightlayers" +local heightLayers = { + asset.require(heightLayersPath .. "/mola").layer, + asset.require(heightLayersPath .. "/mola_europe").layer, + asset.require(heightLayersPath .. "/mola_utah").layer, +} + +local nightLayers = {} + +local overlaysPath = "./overlays" +local overlays = { + asset.require(overlaysPath .. "/indices").layer, + asset.require(overlaysPath .. "/size_reference").layer, +} + +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola.asset b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola.asset new file mode 100644 index 0000000000..bd2bd0b7df --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Mola", + Name = "Mola Elevation", + FilePath = mapServiceConfigs .. "/Mars_MGS_MOLA_DEM.wms", + TilePixelSize = 90 +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola_europe.asset b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola_europe.asset new file mode 100644 index 0000000000..8173417a7e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola_europe.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Mola_Europe", + Name = "Mola Elevation [Europe]", + FilePath = mapServiceConfigs .. "/LiU/Mola_Elevation.wms", + TilePixelSize = 90 +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola_utah.asset b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola_utah.asset new file mode 100644 index 0000000000..e68601a547 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/heightlayers/mola_utah.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Mola_Utah", + Name = "Mola Elevation [Utah]", + FilePath = mapServiceConfigs .. "/Utah/Mola_Elevation.wms", + TilePixelSize = 90 +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/overlays/indices.asset b/data/assets/scene/solarsystem/planets/mars/layers/overlays/indices.asset new file mode 100644 index 0000000000..992916926f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/overlays/indices.asset @@ -0,0 +1,6 @@ +local layer = { + Identifier = "Indices", + Type = "TileIndexTileLayer" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/layers/overlays/size_reference.asset b/data/assets/scene/solarsystem/planets/mars/layers/overlays/size_reference.asset new file mode 100644 index 0000000000..0b2fbf071f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/layers/overlays/size_reference.asset @@ -0,0 +1,10 @@ +local marsAsset = asset.require("./../../mars") + +local layer ={ + Identifier = "Size_Reference", + Name = "Size Reference", + Type = "SizeReferenceTileLayer", + Radii = marsAsset.Mars.Renderable.Radii +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mdim.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mdim.wms deleted file mode 100644 index 350934bdc7..0000000000 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mdim.wms +++ /dev/null @@ -1,23 +0,0 @@ - - - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mars/Mdim/tile/${z}/${y}/${x} - - - -180.0 - 90.0 - 180.0 - -90.0 - 92160 - 46080 - 7 - top - - GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] - 360 - 360 - 3 - 10 - 400,204,404 - true - 5 - diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mola_Elevation.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mola_Elevation.wms deleted file mode 100644 index 75f50e4234..0000000000 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mola_Elevation.wms +++ /dev/null @@ -1,24 +0,0 @@ - - - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mars/MolaElevation/tile/${z}/${y}/${x} - - - -180.0 - 90.0 - 180.0 - -90.0 - 46080 - 23040 - 6 - top - - GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] - 360 - 360 - 1 - Int16 - 10 - 400,204,404 - true - 5 - diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mola_PseudoColor.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mola_PseudoColor.wms deleted file mode 100644 index a72a5b8fd3..0000000000 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Mola_PseudoColor.wms +++ /dev/null @@ -1,23 +0,0 @@ - - - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mars/MolaPseudoColor/tile/${z}/${y}/${x} - - - -180.0 - 90.0 - 180.0 - -90.0 - 46080 - 23040 - 6 - top - - GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] - 360 - 360 - 3 - 10 - 400,204,404 - true - 5 - diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Themis_IR_Day.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Themis_IR_Day.wms deleted file mode 100644 index bb8c28f2ce..0000000000 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Themis_IR_Day.wms +++ /dev/null @@ -1,23 +0,0 @@ - - - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mars/ThemisIRDay/tile/${z}/${y}/${x} - - - -180.0 - 90.0 - 180.0 - -90.0 - 213390 - 106695 - 9 - top - - GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] - 256 - 256 - 1 - 10 - 400,204,404 - true - 5 - diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Themis_IR_Night.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Themis_IR_Night.wms deleted file mode 100644 index e6e249f089..0000000000 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/Themis_IR_Night.wms +++ /dev/null @@ -1,23 +0,0 @@ - - - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mars/ThemisIRNight/tile/${z}/${y}/${x} - - - -180.0 - 90.0 - 180.0 - -90.0 - 213388 - 71130 - 9 - top - - GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] - 256 - 256 - 1 - 10 - 400,204,404 - true - 5 - diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.info b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.info new file mode 100644 index 0000000000..4f06d09ec6 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.info @@ -0,0 +1,5 @@ +Name = "CTX Blended beta01" +Identifier = "CTXblended" +Description = "Seam-corrected and seam-mapped mosaic of Mars CTX created by Jay Dixon at The Murray Lab" +HeightFile = nil +ColorFile = "CTXblended.vrt" diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/CTX.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.tif similarity index 62% rename from data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/CTX.wms rename to data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.tif index 148dc55d16..6025d7c7bd 100644 --- a/data/assets/scene/solarsystem/planets/mars/map_service_configs/AWS/CTX.wms +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.tif @@ -1,18 +1,18 @@ - - - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mars/CTX/tile/${z}/${y}/${x} - - - -180.0 90.0 - 180.0 -90.0 - 4194304 2097152 - 12 top - - GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] - 512 512 - 2 - 5 - 400,204,404 - true - 5 - + + + http://astro.arcgis.com/arcgis/rest/services/OnMars/CTX/MapServer/tile/${z}/${y}/${x} + + + -180.0 90.0 + 180.0 -90.0 + 4194304 2097152 + 12 top + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + 512 + 512 + 1 + 5 + + 404,400 + diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.vrt b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.vrt new file mode 100644 index 0000000000..8b81d03b3e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/CTX/CTXblended.vrt @@ -0,0 +1,28 @@ + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + -8.1000000000000000e+02, 8.5830688476562500e-05, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -8.5830688476562500e-05 + + 0.00000000000000E+00 + Gray + + CTXblended.tif + 1 + + + + 0 + + + + 0 + Alpha + + CTXblended.tif + 1 + + + + 0:0,1:255,255:255 + + + diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISELS.tif b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISELS.tif new file mode 100644 index 0000000000..3e8c92cd05 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISELS.tif @@ -0,0 +1,18 @@ + + + http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISELS/base/MapServer/tile/${z}/${y}/${x} + + + -180 90 + 180 -90 + 83886080 41943040 + 17 top + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + 512 + 512 + 1 + 5 + + 404,400 + diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISELS.vrt b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISELS.vrt new file mode 100644 index 0000000000..40a9f2d8c6 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISELS.vrt @@ -0,0 +1,29 @@ + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + -1.8000000000000000e+02, 4.2915344238281250e-06, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.2915344238281250e-06 + + 0 + Gray + + HiRISELS.tif + 1 + + + + 0 + + + + Alpha + 0 + + HiRISELS.tif + 1 + + + + 255 + 0 + + + diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.tif b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.tif new file mode 100644 index 0000000000..f557be2ac1 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.tif @@ -0,0 +1,17 @@ + + + http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/ImageServer/tile/${z}/${y}/${x} + + + -180 90 + 180 -90 + 20971520 10485760 + 15 top + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]] + 512 512 + 1 Int16 + + 5 + 404,400 + diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.wms b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.wms new file mode 100644 index 0000000000..bedcb068e0 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/HiRISE_DEM.wms @@ -0,0 +1,17 @@ + + + http://astro.arcgis.com/arcgis/rest/services/OnMars/HiRISE_DEM/ImageServer/tile/${z}/${y}/${x} + + + -180 90 + 180 -90 + 20971520 10485760 + 15 top + + GEOGCS["GCS_Mars_2000_Sphere",DATUM["D_Mars_2000_Sphere",SPHEROID["Mars_2000_Sphere_IAU_IAG",3396190,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]] + 512 512 + 1 Int16 + + 5 + 404,400 + diff --git a/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/OnMarsHiRISE.info b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/OnMarsHiRISE.info new file mode 100644 index 0000000000..04aa1e0926 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/map_service_configs/ESRI/HiRISE/OnMarsHiRISE.info @@ -0,0 +1,5 @@ +Name="HiRISE Local Set" +Identifier="OnMarsHiRISELS" +Description="HiRISE Stereo Pairs" +ColorFile="HiRISELS.vrt" +HeightFile="HiRISE_DEM.wms" \ No newline at end of file diff --git a/data/assets/scene/solarsystem/planets/mars/mars.asset b/data/assets/scene/solarsystem/planets/mars/mars.asset index 0325b61df2..666f90e7bd 100644 --- a/data/assets/scene/solarsystem/planets/mars/mars.asset +++ b/data/assets/scene/solarsystem/planets/mars/mars.asset @@ -1,181 +1,12 @@ local transforms = asset.require('./transforms') local assetHelper = asset.require('util/asset_helper') asset.require("spice/base") -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Mars Textures", - Type = "HttpSynchronization", - Identifier = "mars_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('./mars_globelabels').LabelsPath -- local marsRadii = { 3396190.0, 3396190.0, 3376200.0 } local marsRadii = { 3396190.0, 3396190.0, 3396190.0 } -local mapServiceConfigs = asset.localResource("map_service_configs") - -local color_layers = { - { - Identifier = "MOC_WA_Color_Utah", - Name = "MOC WA Color [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Mars_Color.wms", - Enabled = true, - Fallback = { - Name = "Mars Texture", - FilePath = textures .. "/mars.jpg", - Enabled = true - } - }, - { - Identifier = "MOC_WA_Color_LiU", - Name = "MOC WA Color [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Color.wms", - Fallback = { - Name = "Mars Texture", - FilePath = textures .. "/mars.jpg", - Enabled = true - } - }, - { - Identifier = "Viking_MDIM_Utah", - Name = "Viking MDIM [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Mdim.wms" - }, - { - Identifier = "Viking_MDIM_Sweden", - Name = "Viking MDIM [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/MDIM.wms" - }, - { - Identifier = "Viking_MDIM_AWS", - Name = "Viking MDIM [AWS]", - FilePath = mapServiceConfigs .. "/AWS/Mdim.wms" - }, - { - Identifier = "MOLA_Pseudo_Color_Utah", - Name = "MOLA Pseudo Color [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Mola_PseudoColor.wms" - }, - { - Identifier = "MOLA_Pseudo_Color_Sweden", - Name = "MOLA Pseudo Color [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Mola_PseudoColor.wms" - }, - { - Identifier = "MOLA_Pseudo_Color_AWS", - Name = "MOLA Pseudo Color [AWS]", - FilePath = mapServiceConfigs .. "/AWS/Mola_PseudoColor.wms" - }, - { - Identifier = "MOLA_HRSC_Utah", - Name = "MOLA HRSC [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Mola_HRSC.wms" - }, - { - Identifier = "MOLA_HRSC_Sweden", - Name = "MOLA HRSC [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Mola_HRSC.wms" - }, - { - Identifier = "Themis_IR_Day_Utah", - Name = "Themis IR Day [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Themis_IR_Day.wms", - BlendMode = "Color" - }, - { - Identifier = "Themis_IR_Day_Sweden", - Name = "Themis IR Day [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Themis_IR_Day.wms", - BlendMode = "Color" - }, - { - Identifier = "Themis_IR_Day_AWS", - Name = "Themis IR Day [AWS]", - FilePath = mapServiceConfigs .. "/AWS/Themis_IR_Day.wms", - BlendMode = "Color" - }, - { - Identifier = "Themis_IR_Night_Utah", - Name = "Themis IR Night [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Themis_IR_Night.wms", - BlendMode = "Color" - }, - { - Identifier = "Themis_IR_Night_Sweden", - Name = "Themis IR Night [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Themis_IR_Night.wms", - BlendMode = "Color" - }, - { - Identifier = "Themis_IR_Night_AWS", - Name = "Themis IR Night [AWS]", - FilePath = mapServiceConfigs .. "/AWS/Themis_IR_Night.wms", - BlendMode = "Color" - }, - { - Identifier = "CTX_Mosaic_Utah", - Name = "CTX Mosaic [Utah]", - FilePath = mapServiceConfigs .. "/Utah/CTX.wms", - BlendMode = "Color" - }, - { - Identifier = "CTX_Mosaic_Sweden", - Name = "CTX Mosaic [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/CTX.wms", - BlendMode = "Color" - }, - { - Identifier = "CTX_Mosaic_AWS", - Name = "CTX Mosaic [AWS]", - FilePath = mapServiceConfigs .. "/AWS/CTX.wms", - BlendMode = "Color" - } -} - -local overlay_layers = { - { - Identifier = "Indices", - Type = "TileIndexTileLayer" - }, - { - Identifier = "Size_Reference", - Name = "Size Reference", - Type = "SizeReferenceTileLayer", - Radii = marsRadii - } -} - -local height_layers = { - { - Identifier = "Mola", - Name = "Mola Elevation", - FilePath = mapServiceConfigs .. "/Mars_MGS_MOLA_DEM.wms", - TilePixelSize = 90 - }, - { - Identifier = "Mola_Europe", - Name = "Mola Elevation [Europe]", - FilePath = mapServiceConfigs .. "/LiU/Mola_Elevation.wms", - TilePixelSize = 90 - }, - { - Identifier = "Mola_Utah", - Name = "Mola Elevation [Utah]", - FilePath = mapServiceConfigs .. "/Utah/Mola_Elevation.wms", - Enabled = true, - TilePixelSize = 90 - }, - { - Identifier = "Mola_AWS", - Name = "Mola Elevation [AWS]", - FilePath = mapServiceConfigs .. "/AWS/Mola_Elevation.wms", - TilePixelSize = 90 - } -} - local Mars = { Identifier = "Mars", Parent = transforms.MarsBarycenter.Identifier, @@ -184,20 +15,28 @@ local Mars = { Type = "SpiceRotation", SourceFrame = "IAU_MARS", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", Radii = marsRadii, SegmentsPerPatch = 90, - Layers = { - ColorLayers = color_layers, - Overlays = overlay_layers, - HeightLayers = height_layers + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/mars.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "planet_solarSystem", "planet_terrestrial" }, @@ -206,6 +45,31 @@ local Mars = { } } +local MarsLabel = { + Identifier = "MarsLabel", + Parent = Mars.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Mars", + FontSize = 100.0, + LabelSize = 8.5, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive", + TransformationMatrix = { + 1.0, 0.0, 0.0, -8.0E6, + 0.0, 1.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 1.0E7, + 0.0, 0.0, 0.0, 1.0 + }, + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Mars Label", + Path = "/Solar System/Planets/Mars" + } +} - -assetHelper.registerSceneGraphNodesAndExport(asset, { Mars }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Mars, MarsLabel }) diff --git a/data/assets/scene/solarsystem/planets/mars/mars_globelabels.asset b/data/assets/scene/solarsystem/planets/mars/mars_globelabels.asset new file mode 100644 index 0000000000..9ac0a372d7 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/mars_globelabels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Mars Labels", + Type = "HttpSynchronization", + Identifier = "mars_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) diff --git a/data/assets/scene/solarsystem/planets/mars/mars_textures.asset b/data/assets/scene/solarsystem/planets/mars/mars_textures.asset new file mode 100644 index 0000000000..946d20314a --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mars/mars_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Mars Textures", + Type = "HttpSynchronization", + Identifier = "mars_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/mars/moons/deimos.asset b/data/assets/scene/solarsystem/planets/mars/moons/deimos.asset index c880bf8b08..0b27982a7d 100644 --- a/data/assets/scene/solarsystem/planets/mars/moons/deimos.asset +++ b/data/assets/scene/solarsystem/planets/mars/moons/deimos.asset @@ -30,7 +30,7 @@ local Deimos = { }, Renderable = { Type = "RenderableGlobe", - Radii = { 15, 12.2, 11 }, + Radii = { 15000, 12200, 11000 }, SegmentsPerPatch = 90, Layers = { } diff --git a/data/assets/scene/solarsystem/planets/mars/moons/phobos.asset b/data/assets/scene/solarsystem/planets/mars/moons/phobos.asset index ff97e74ce2..899b674980 100644 --- a/data/assets/scene/solarsystem/planets/mars/moons/phobos.asset +++ b/data/assets/scene/solarsystem/planets/mars/moons/phobos.asset @@ -30,7 +30,7 @@ local Phobos = { }, Renderable = { Type = "RenderableGlobe", - Radii = { 27, 22, 18 }, + Radii = { 27000, 22000, 18000 }, SegmentsPerPatch = 90, Layers = { } diff --git a/data/assets/scene/solarsystem/planets/mercury/default_layers.asset b/data/assets/scene/solarsystem/planets/mercury/default_layers.asset new file mode 100644 index 0000000000..c5c16d56ab --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./mercury') +local globeIdentifier = globeAsset.Mercury.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/messenger_bdr_utah').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/alsimap_02122015.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/alsimap_02122015.asset new file mode 100644 index 0000000000..30ae327b17 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/alsimap_02122015.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../mercury_textures").TexturesPath + +local layer = { + Identifier = "alsimap_02122015", + FilePath = texturesPath .. "/alsimap_02122015.png", + BlendMode = "Multiply", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/casimap_02122015.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/casimap_02122015.asset new file mode 100644 index 0000000000..b7a5efe5b9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/casimap_02122015.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../mercury_textures").TexturesPath + +local layer = { + Identifier = "casimap_02122015", + FilePath = texturesPath .. "/casimap_02122015.png", + BlendMode = "Multiply", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/fesimap_02122015.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/fesimap_02122015.asset new file mode 100644 index 0000000000..2c840f0c33 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/fesimap_02122015.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../mercury_textures").TexturesPath + +local layer = { + Identifier = "fesimap_02122015", + FilePath = texturesPath .. "/fesimap_02122015.png", + BlendMode = "Multiply", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_sweden.asset new file mode 100644 index 0000000000..9228509d5b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_sweden.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_BDR_Sweden", + Name = "Messenger BDR [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_BDR.wms", + TilePixelSize = 360, +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_utah.asset new file mode 100644 index 0000000000..d5f385400a --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_bdr_utah.asset @@ -0,0 +1,10 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_BDR_Utah", + Name = "Messenger BDR [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerBDR.wms", + TilePixelSize = 360, +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hie_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hie_sweden.asset new file mode 100644 index 0000000000..431f348d0b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hie_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_HIE_Sweden", + Name = "Messenger HIE [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_HIE.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hie_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hie_utah.asset new file mode 100644 index 0000000000..2736325f1b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hie_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_HIE_Utah", + Name = "Messenger HIE [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerHIE.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hiw_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hiw_sweden.asset new file mode 100644 index 0000000000..1f708c19a5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hiw_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_HIW_Sweden", + Name = "Messenger HIW [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_HIW.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hiw_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hiw_utah.asset new file mode 100644 index 0000000000..ee4ecbefb2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_hiw_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_HIW_Utah", + Name = "Messenger HIW [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerHIW.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_loi_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_loi_sweden.asset new file mode 100644 index 0000000000..c24b408cb9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_loi_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_LOI_Sweden", + Name = "Messenger LOI [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_LOI.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_loi_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_loi_utah.asset new file mode 100644 index 0000000000..3885121ee8 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_loi_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_LOI_Utah", + Name = "Messenger LOI [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerLOI.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdis_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdis_sweden.asset new file mode 100644 index 0000000000..378619ad62 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdis_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_MDIS_Sweden", + Name = "Messenger MDIS [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_MDIS.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdis_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdis_utah.asset new file mode 100644 index 0000000000..dfd9331221 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdis_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_MDIS_Utah", + Name = "Messenger MDIS [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerMDIS.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdr_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdr_utah.asset new file mode 100644 index 0000000000..e16f48f019 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mdr_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_MDR_Utah", + Name = "Messenger MDR [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerMDR.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic2_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic2_sweden.asset new file mode 100644 index 0000000000..4362d45eaf --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic2_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_Mosaic2_Sweden", + Name = "Messenger Mosaic2 [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_Mosaic_2.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic2_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic2_utah.asset new file mode 100644 index 0000000000..e24c75f7d5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic2_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_Mosaic2_Utah", + Name = "Messenger Mosaic2 [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerMosaic2.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic_sweden.asset new file mode 100644 index 0000000000..b02bbc4a9d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic_sweden.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_Mosaic_Sweden", + Name = "Messenger Mosaic [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_Mosaic.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic_utah.asset new file mode 100644 index 0000000000..6947cf1ebc --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mosaic_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_Mosaic_Utah", + Name = "Messenger Mosaic [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerMosaic.wms" +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mp3_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mp3_utah.asset new file mode 100644 index 0000000000..2274f16cce --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_mp3_utah.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_MP3_Utah", + Name = "Messenger MP3 [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerMP3.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_shade_sweden.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_shade_sweden.asset new file mode 100644 index 0000000000..2e3787f465 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_shade_sweden.asset @@ -0,0 +1,14 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_SHADE_Sweden", + Name = "Messenger SHADE [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/Messenger_SHADE.wms", + Settings = { + Gamma = 1.33, + Multiplier = 1.15 + }, + BlendMode = "Multiply", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_shade_utah.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_shade_utah.asset new file mode 100644 index 0000000000..4946d96510 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/messenger_shade_utah.asset @@ -0,0 +1,14 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Messenger_SHADE_Utah", + Name = "Messenger SHADE [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MessengerSHADE.wms", + Settings = { + Gamma = 1.33, + Multiplier = 1.15 + }, + BlendMode = "Multiply", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/mgsimap_02122015.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/mgsimap_02122015.asset new file mode 100644 index 0000000000..29af7bc52d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/mgsimap_02122015.asset @@ -0,0 +1,13 @@ +local texturesPath = asset.require("./../../mercury_textures").TexturesPath + +local layer = { + Identifier = "mgsimap_02122015", + FilePath = texturesPath .. "/mgsimap_02122015.png", + Settings = { + Gamma = 1.33, + Multiplier = 1.15 + }, + BlendMode = "Multiply", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/ssimap_02122015.asset b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/ssimap_02122015.asset new file mode 100644 index 0000000000..e72608c91b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/colorlayers/ssimap_02122015.asset @@ -0,0 +1,9 @@ +local texturesPath = asset.require("./../../mercury_textures").TexturesPath + +local layer = { + Identifier = "ssimap_02122015", + FilePath = texturesPath .. "/ssimap_02122015.png", + BlendMode = "Multiply", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/mercury/layers/default_layers.asset new file mode 100644 index 0000000000..6a272985f8 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/layers/default_layers.asset @@ -0,0 +1,48 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + --mdis + asset.require(colorLayersPath .. "/messenger_mdis_utah").layer, + asset.require(colorLayersPath .. "/messenger_mdis_sweden").layer, + --mossaic + asset.require(colorLayersPath .. "/messenger_mosaic_utah").layer, + asset.require(colorLayersPath .. "/messenger_mosaic_sweden").layer, + --mosaic2 aka 8 color + asset.require(colorLayersPath .. "/messenger_mosaic2_utah").layer, + asset.require(colorLayersPath .. "/messenger_mosaic2_sweden").layer, + --bdr + asset.require(colorLayersPath .. "/messenger_bdr_utah").layer, + asset.require(colorLayersPath .. "/messenger_bdr_sweden").layer, + --mdr + asset.require(colorLayersPath .. "/messenger_mdr_utah").layer, + --mp3 + asset.require(colorLayersPath .. "/messenger_mp3_utah").layer, + --hie + asset.require(colorLayersPath .. "/messenger_hie_utah").layer, + asset.require(colorLayersPath .. "/messenger_hie_sweden").layer, + --hiw + asset.require(colorLayersPath .. "/messenger_hiw_utah").layer, + asset.require(colorLayersPath .. "/messenger_hiw_sweden").layer, + --loi + asset.require(colorLayersPath .. "/messenger_loi_utah").layer, + asset.require(colorLayersPath .. "/messenger_loi_sweden").layer, + --shade + asset.require(colorLayersPath .. "/messenger_shade_utah").layer, + asset.require(colorLayersPath .. "/messenger_shade_sweden").layer, + --local textures, these are mineral abundance maps + asset.require(colorLayersPath .. "/alsimap_02122015").layer, + asset.require(colorLayersPath .. "/casimap_02122015").layer, + asset.require(colorLayersPath .. "/fesimap_02122015").layer, + asset.require(colorLayersPath .. "/mgsimap_02122015").layer, + asset.require(colorLayersPath .. "/ssimap_02122015").layer +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/mercury/map_service_configs/AWS/MessengerMosaic.wms b/data/assets/scene/solarsystem/planets/mercury/map_service_configs/AWS/MessengerMosaic.wms deleted file mode 100644 index 15c7e11d5f..0000000000 --- a/data/assets/scene/solarsystem/planets/mercury/map_service_configs/AWS/MessengerMosaic.wms +++ /dev/null @@ -1,21 +0,0 @@ - - - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mercury/MessengerMosaic/tile/${z}/${y}/${x} - - - -180.0 - 90.0 - 180.0 - -90.0 - 23054 - 11527 - 6 - top - - GEOGCS["GCS_Mercury_2015",DATUM["D_Mercury_2015",SPHEROID["Mercury_2015",2439400.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] - 256 - 256 - 3 - 10 - 5 - diff --git a/data/assets/scene/solarsystem/planets/mercury/mercury.asset b/data/assets/scene/solarsystem/planets/mercury/mercury.asset index 30b8c3fadf..771c819783 100644 --- a/data/assets/scene/solarsystem/planets/mercury/mercury.asset +++ b/data/assets/scene/solarsystem/planets/mercury/mercury.asset @@ -1,193 +1,9 @@ local assetHelper = asset.require('util/asset_helper') local transforms = asset.require('./transforms') +local labelsPath = asset.require('./mercury_globelabels').LabelsPath asset.require("spice/base") -asset.request('./trail') - -local textures = asset.syncedResource({ - Name = "Mercury Textures", - Type = "HttpSynchronization", - Identifier = "mercury_abundance_textures", - Version = 1 -}) - -local mapServiceConfigs = asset.localResource("map_service_configs") - -local color_layers = { - --mdis - { - Identifier = "Messenger_MDIS_Utah", - Name = "Messenger MDIS [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerMDIS.wms", - Enabled = false - }, - { - Identifier = "Messenger_MDIS_Sweden", - Name = "Messenger MDIS [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_MDIS.wms", - }, - { - Identifier = "Messenger_MDIS_AWS", - Name = "Messenger MDIS [AWS]", - FilePath = mapServiceConfigs .. "/AWS/MessengerMdis.wms" - }, - --mossaic - { - Identifier = "Messenger_Mosaic_Utah", - Name = "Messenger Mosaic [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerMosaic.wms" - }, - { - Identifier = "Messenger_Mosaic_Sweden", - Name = "Messenger Mosaic [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_Mosaic.wms" - }, - { - Identifier = "Messenger_Mosaic_AWS", - Name = "Messenger Mosaic [AWS]", - FilePath = mapServiceConfigs .. "/AWS/MessengerMosaic.wms" - }, - --bdr - { - Identifier = "Messenger_BDR_Utah", - Name = "Messenger BDR [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerBDR.wms", - TilePixelSize = 360, - Enabled = true - }, - { - Identifier = "Messenger_BDR_Sweden", - Name = "Messenger BDR [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_BDR.wms", - TilePixelSize = 360, - Enabled = false - }, - --mdr - { - Identifier = "Messenger_MDR_Utah", - Name = "Messenger MDR [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerMDR.wms", - Enabled = false - }, - --mp3 - { - Identifier = "Messenger_MP3_Utah", - Name = "Messenger MP3 [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerMP3.wms", - Enabled = false - }, - --hie - { - Identifier = "Messenger_HIE_Utah", - Name = "Messenger HIE [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerHIE.wms", - Enabled = false - }, - { - Identifier = "Messenger_HIE_Sweden", - Name = "Messenger HIE [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_HIE.wms", - Enabled = false - }, - --hiw - { - Identifier = "Messenger_HIW_Utah", - Name = "Messenger HIW [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerHIW.wms", - Enabled = false - }, - { - Identifier = "Messenger_HIW_Sweden", - Name = "Messenger HIW [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_HIW.wms", - Enabled = false - }, - --loi - { - Identifier = "Messenger_LOI_Utah", - Name = "Messenger LOI [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerLOI.wms", - Enabled = false - }, - { - Identifier = "Messenger_LOI_Sweden", - Name = "Messenger LOI [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_LOI.wms", - Enabled = false - }, - --shade - { - Identifier = "Messenger_SHADE_Utah", - Name = "Messenger SHADE [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerSHADE.wms", - Settings = { - Gamma = 1.33, - Multiplier = 1.15 - }, - BlendMode = "Multiply", - Enabled = false - }, - { - Identifier = "Messenger_SHADE_Sweden", - Name = "Messenger SHADE [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_SHADE.wms", - Settings = { - Gamma = 1.33, - Multiplier = 1.15 - }, - BlendMode = "Multiply", - Enabled = false - }, - --mosaic2 aka 8 color - { - Identifier = "Messenger_Mosaic2_Utah", - Name = "Messenger Mosaic2 [Utah]", - FilePath = mapServiceConfigs .. "/Utah/MessengerMosaic2.wms", - Enabled = false - }, - { - Identifier = "Messenger_Mosaic2_Sweden", - Name = "Messenger Mosaic2 [Sweden]", - FilePath = mapServiceConfigs .. "/LiU/Messenger_Mosaic_2.wms", - Enabled = false - }, - --local textures, these are mineral abundance maps - { - Identifier = "alsimap_02122015", - FilePath = textures .. "/alsimap_02122015.png", - Enabled = false, - BlendMode = "Multiply", - }, - { - Identifier = "casimap_02122015", - FilePath = textures .. "/casimap_02122015.png", - Enabled = false, - BlendMode = "Multiply", - }, - { - Identifier = "fesimap_02122015", - FilePath = textures .. "/fesimap_02122015.png", - Enabled = false, - BlendMode = "Multiply", - }, - { - Identifier = "mgsimap_02122015", - FilePath = textures .. "/mgsimap_02122015.png", - Enabled = false, - Settings = { - Gamma = 1.33, - Multiplier = 1.15 - }, - BlendMode = "Multiply", - - }, - { - Identifier = "ssimap_02122015", - FilePath = textures .. "/ssimap_02122015.png", - Enabled = false, - BlendMode = "Multiply", - } -} +asset.require('./trail') local Mercury = { Identifier = "Mercury", @@ -197,10 +13,6 @@ local Mercury = { Type = "SpiceRotation", SourceFrame = "IAU_MERCURY", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { @@ -210,8 +22,21 @@ local Mercury = { Body = "MERCURY", CameraMinHeight = 300, SegmentsPerPatch = 64, - Layers = { - ColorLayers = color_layers + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/Mercury.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 40.0, + LabelsSize = 10.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + FadeInStartingDistance = 40000000.0, + FadeOutStartingDistance = 80000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1500000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "planet_solarSystem", "planet_terrestrial" }, @@ -220,5 +45,25 @@ local Mercury = { } } +local MercuryLabel = { + Identifier = "MercuryLabel", + Parent = Mercury.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Mercury", + FontSize = 100.0, + LabelSize = 8.3, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive" + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Mercury Label", + Path = "/Solar System/Planets/Mercury" + } +} -assetHelper.registerSceneGraphNodesAndExport(asset, { Mercury }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Mercury, MercuryLabel }) diff --git a/data/assets/scene/solarsystem/planets/mercury/mercury_globelabels.asset b/data/assets/scene/solarsystem/planets/mercury/mercury_globelabels.asset new file mode 100644 index 0000000000..49b6148dfa --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/mercury_globelabels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Mercury Labels", + Type = "HttpSynchronization", + Identifier = "mercury_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) \ No newline at end of file diff --git a/data/assets/scene/solarsystem/planets/mercury/mercury_textures.asset b/data/assets/scene/solarsystem/planets/mercury/mercury_textures.asset new file mode 100644 index 0000000000..cc275ee677 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/mercury/mercury_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Mercury Textures", + Type = "HttpSynchronization", + Identifier = "mercury_abundance_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/neptune/default_layers.asset b/data/assets/scene/solarsystem/planets/neptune/default_layers.asset new file mode 100644 index 0000000000..73888f0f5d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/neptune/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./neptune') +local globeIdentifier = globeAsset.Neptune.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/neptune_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/neptune/layers/colorlayers/neptune_texture.asset b/data/assets/scene/solarsystem/planets/neptune/layers/colorlayers/neptune_texture.asset new file mode 100644 index 0000000000..c1b26cc630 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/neptune/layers/colorlayers/neptune_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../neptune_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/neptune.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/neptune/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/neptune/layers/default_layers.asset new file mode 100644 index 0000000000..05b5a24c3d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/neptune/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/neptune_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/neptune/major_moons.asset b/data/assets/scene/solarsystem/planets/neptune/major_moons.asset index 118e2f71b9..a6b9ebde18 100644 --- a/data/assets/scene/solarsystem/planets/neptune/major_moons.asset +++ b/data/assets/scene/solarsystem/planets/neptune/major_moons.asset @@ -1 +1 @@ -asset.request('./triton') +asset.require('./triton') diff --git a/data/assets/scene/solarsystem/planets/neptune/neptune.asset b/data/assets/scene/solarsystem/planets/neptune/neptune.asset index 450b1fa4c7..ee3f021892 100644 --- a/data/assets/scene/solarsystem/planets/neptune/neptune.asset +++ b/data/assets/scene/solarsystem/planets/neptune/neptune.asset @@ -1,14 +1,7 @@ local assetHelper = asset.require('util/asset_helper') local transforms = asset.require('./transforms') asset.require("spice/base") -asset.request('./trail') - -local textures = asset.syncedResource({ - Name = "Neptune textures", - Type = "HttpSynchronization", - Identifier = "neptune_textures", - Version = 1 -}) +asset.require('./trail') local Neptune = { Identifier = "Neptune", @@ -18,25 +11,13 @@ local Neptune = { Type = "SpiceRotation", SourceFrame = "IAU_NEPTUNE", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", Radii = { 24764000.0, 24764000.0, 24314000.0 }, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/neptune.jpg", - Enabled = true - } - } - } + Layers = {} }, Tag = { "planet_solarSystem", "planet_giants" }, GUI = { @@ -44,4 +25,25 @@ local Neptune = { } } -assetHelper.registerSceneGraphNodesAndExport(asset, { Neptune }) +local NeptuneLabel = { + Identifier = "NeptuneLabel", + Parent = Neptune.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Neptune", + FontSize = 100.0, + LabelSize = 8.8, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive" + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Neptune Label", + Path = "/Solar System/Planets/Neptune" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { Neptune, NeptuneLabel }) diff --git a/data/assets/scene/solarsystem/planets/neptune/neptune_textures.asset b/data/assets/scene/solarsystem/planets/neptune/neptune_textures.asset new file mode 100644 index 0000000000..9674b1dde9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/neptune/neptune_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Neptune textures", + Type = "HttpSynchronization", + Identifier = "neptune_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/planets.asset b/data/assets/scene/solarsystem/planets/planets.asset new file mode 100644 index 0000000000..fd537c3f98 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/planets.asset @@ -0,0 +1,34 @@ +asset.require('./mercury/mercury') + +asset.require('./venus/venus') +asset.require('./venus/atmosphere') + +asset.require('./earth/earth') +asset.require('./earth/atmosphere') +asset.require('./earth/markers') +asset.require('./earth/moon/moon') + +asset.require('./mars/mars') +asset.require('./mars/atmosphere') + +asset.require('./jupiter/jupiter') +asset.require('./jupiter/major_moons') + +asset.require('./saturn/saturn') +asset.require('./saturn/major_moons') + +asset.require('./uranus/uranus') +asset.require('./uranus/major_moons') + +asset.require('./neptune/neptune') +asset.require('./neptune/major_moons') + + +asset.meta = { + Name = "Planets", + Version = "1.0", + Description = [[ Collection of planets in the solar system ]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license" +} diff --git a/data/assets/scene/solarsystem/planets/saturn/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/default_layers.asset new file mode 100644 index 0000000000..8c4825f46b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./saturn') +local globeIdentifier = globeAsset.Saturn.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/saturn_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/dione/default_layers.asset new file mode 100644 index 0000000000..493ddb6abd --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/dione/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./dione') +local globeIdentifier = globeAsset.Dione.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/dione_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset index e5ed17e5f6..38e136eba1 100644 --- a/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset +++ b/data/assets/scene/solarsystem/planets/saturn/dione/dione.asset @@ -1,16 +1,8 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Dione textures", - Type = "HttpSynchronization", - Identifier = "dione_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('../saturn_globelabels').LabelsPath local Dione = { Identifier = "Dione", @@ -32,14 +24,22 @@ local Dione = { Type = "RenderableGlobe", Radii = 561400, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/dione.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/dione.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" }, diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/dione_textures.asset b/data/assets/scene/solarsystem/planets/saturn/dione/dione_textures.asset new file mode 100644 index 0000000000..d104446236 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/dione/dione_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Dione textures", + Type = "HttpSynchronization", + Identifier = "dione_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/layers/colorlayers/dione_texture.asset b/data/assets/scene/solarsystem/planets/saturn/dione/layers/colorlayers/dione_texture.asset new file mode 100644 index 0000000000..d78b99e7d8 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/dione/layers/colorlayers/dione_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../dione_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/dione.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/dione/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/dione/layers/default_layers.asset new file mode 100644 index 0000000000..6986fc0ef8 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/dione/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/dione_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/default_layers.asset new file mode 100644 index 0000000000..92787efed3 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./enceladus') +local globeIdentifier = globeAsset.Enceladus.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/global_mosaic_100m_hpf').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset index 178fa5d5ef..d27fc30a25 100644 --- a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus.asset @@ -1,18 +1,8 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Enceladus textures", - Type = "HttpSynchronization", - Identifier = "enceladus_textures", - Version = 1 -}) - -local mapServiceConfigsPath = asset.localResource("map_service_configs") +asset.require('./trail') +local labelsPath = asset.require('../saturn_globelabels').LabelsPath local Enceladus = { Identifier = "Enceladus", @@ -34,19 +24,22 @@ local Enceladus = { Type = "RenderableGlobe", Radii = 252000, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/enceladus.jpg", - }, - { - Identifier = "Global_Mosaic_100m_HPF", - Name = "Cassini Global Mosaic 100m HPF", - FilePath = mapServiceConfigsPath .. "/Cassini_ISS_Global_Mosaic_100m_HPF.wms", - Enabled = true, - }, - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/enceladus.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" }, diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus_textures.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus_textures.asset new file mode 100644 index 0000000000..bec59acc1e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/enceladus_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Enceladus textures", + Type = "HttpSynchronization", + Identifier = "enceladus_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/colorlayers/enceladus_texture.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/colorlayers/enceladus_texture.asset new file mode 100644 index 0000000000..af65066152 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/colorlayers/enceladus_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../enceladus_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/enceladus.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/colorlayers/global_mosaic_100m_hpf.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/colorlayers/global_mosaic_100m_hpf.asset new file mode 100644 index 0000000000..2fd6950a08 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/colorlayers/global_mosaic_100m_hpf.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Global_Mosaic_100m_HPF", + Name = "Cassini Global Mosaic 100m HPF", + FilePath = mapServiceConfigs .. "/Cassini_ISS_Global_Mosaic_100m_HPF.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/default_layers.asset new file mode 100644 index 0000000000..eb72c8ae92 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/enceladus/layers/default_layers.asset @@ -0,0 +1,16 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/enceladus_texture").layer, + asset.require(colorLayersPath .. "/global_mosaic_100m_hpf").layer +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/default_layers.asset new file mode 100644 index 0000000000..5efddbf4e2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/default_layers.asset @@ -0,0 +1,12 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./hyperion') +local globeIdentifier = globeAsset.Hyperion.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +-- @TODO: when we have a working texture, set it to enabled here + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset index f469c320e8..8698e41e73 100644 --- a/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset +++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/hyperion.asset @@ -1,7 +1,7 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') +asset.require('./trail') diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/layers/default_layers.asset new file mode 100644 index 0000000000..1351a03d9f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/layers/default_layers.asset @@ -0,0 +1,11 @@ +local colorLayers = {} +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset b/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset index 7f34aed667..e8a3533014 100644 --- a/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset +++ b/data/assets/scene/solarsystem/planets/saturn/hyperion/trail.asset @@ -28,4 +28,4 @@ local HyperionTrail = { -assetHelper.registerSceneGraphNodesAndExport(asset, { MimasTrail }) +assetHelper.registerSceneGraphNodesAndExport(asset, { HyperionTrail }) diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/default_layers.asset new file mode 100644 index 0000000000..b442574563 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./iapetus') +local globeIdentifier = globeAsset.Iapetus.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/iapetus_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset index f57014adce..20dc032e50 100644 --- a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus.asset @@ -1,16 +1,8 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Iapetus textures", - Type = "HttpSynchronization", - Identifier = "iapetus_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('../saturn_globelabels').LabelsPath local Iapetus = { Identifier = "Iapetus", @@ -32,14 +24,22 @@ local Iapetus = { Type = "RenderableGlobe", Radii = 734000, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/iapetus.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/iapetus.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" }, diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus_textures.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus_textures.asset new file mode 100644 index 0000000000..da00c7b4c7 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/iapetus_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Iapetus textures", + Type = "HttpSynchronization", + Identifier = "iapetus_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/layers/colorlayers/iapetus_texture.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/layers/colorlayers/iapetus_texture.asset new file mode 100644 index 0000000000..755ef8ea4f --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/layers/colorlayers/iapetus_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../iapetus_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/iapetus.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/iapetus/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/iapetus/layers/default_layers.asset new file mode 100644 index 0000000000..5b79b35739 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/iapetus/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/iapetus_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/layers/colorlayers/saturn_texture.asset b/data/assets/scene/solarsystem/planets/saturn/layers/colorlayers/saturn_texture.asset new file mode 100644 index 0000000000..adbd907eec --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/layers/colorlayers/saturn_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../saturn_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/saturn.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/layers/default_layers.asset new file mode 100644 index 0000000000..c981abc34d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/saturn_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/major_moons.asset b/data/assets/scene/solarsystem/planets/saturn/major_moons.asset index 08162dfd0f..e14aa30f56 100644 --- a/data/assets/scene/solarsystem/planets/saturn/major_moons.asset +++ b/data/assets/scene/solarsystem/planets/saturn/major_moons.asset @@ -1,8 +1,8 @@ -asset.request('./dione/dione') -asset.request('./enceladus/enceladus') -asset.request('./hyperion/hyperion') -asset.request('./iapetus/iapetus') -asset.request('./mimas/mimas') -asset.request('./rhea/rhea') -asset.request('./tethys/tethys') -asset.request('./titan/titan') +asset.require('./dione/dione') +asset.require('./enceladus/enceladus') +asset.require('./hyperion/hyperion') +asset.require('./iapetus/iapetus') +asset.require('./mimas/mimas') +asset.require('./rhea/rhea') +asset.require('./tethys/tethys') +asset.require('./titan/titan') diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/default_layers.asset new file mode 100644 index 0000000000..5c2545c96e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./mimas') +local globeIdentifier = globeAsset.Mimas.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/mimas_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/layers/colorlayers/mimas_texture.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/layers/colorlayers/mimas_texture.asset new file mode 100644 index 0000000000..cf574d1665 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/layers/colorlayers/mimas_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../mimas_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/mimas.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/layers/default_layers.asset new file mode 100644 index 0000000000..43f8f772b7 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/mimas_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset index 8e2368e228..b453f6b0fa 100644 --- a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas.asset @@ -1,16 +1,8 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Mimas textures", - Type = "HttpSynchronization", - Identifier = "mimas_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('../saturn_globelabels').LabelsPath local Mimas = { Identifier = "Mimas", @@ -32,14 +24,22 @@ local Mimas = { Type = "RenderableGlobe", Radii = 198000, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/mimas.jpg", - Enabled = true - } - } + Layers = { }, + Labels = { + Enable = false, + FileName = labelsPath .. "/mimas.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" }, diff --git a/data/assets/scene/solarsystem/planets/saturn/mimas/mimas_textures.asset b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas_textures.asset new file mode 100644 index 0000000000..d77e912051 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/mimas/mimas_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Mimas textures", + Type = "HttpSynchronization", + Identifier = "mimas_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/minor_moons.asset b/data/assets/scene/solarsystem/planets/saturn/minor_moons.asset index fbdc302cff..ba7da9ccbc 100644 --- a/data/assets/scene/solarsystem/planets/saturn/minor_moons.asset +++ b/data/assets/scene/solarsystem/planets/saturn/minor_moons.asset @@ -1,4 +1,4 @@ -asset.request('./minor/gallic_group') -asset.request('./minor/inuit_group') -asset.request('./minor/norse_group') -asset.request('./minor/other_group') +asset.require('./minor/gallic_group') +asset.require('./minor/inuit_group') +asset.require('./minor/norse_group') +asset.require('./minor/other_group') diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/default_layers.asset new file mode 100644 index 0000000000..ed174452bb --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./rhea') +local globeIdentifier = globeAsset.Rhea.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/rhea_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/layers/colorlayers/rhea_texture.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/layers/colorlayers/rhea_texture.asset new file mode 100644 index 0000000000..208f091020 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/layers/colorlayers/rhea_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../rhea_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/rhea.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/layers/default_layers.asset new file mode 100644 index 0000000000..37e222486c --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/rhea_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset index df6150a831..faed079a9d 100644 --- a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea.asset @@ -1,16 +1,8 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Rhea textures", - Type = "HttpSynchronization", - Identifier = "rhea_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('../saturn_globelabels').LabelsPath local Rhea = { Identifier = "Rhea", @@ -32,14 +24,22 @@ local Rhea = { Type = "RenderableGlobe", Radii = 765000, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/rhea.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/rhea.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" }, diff --git a/data/assets/scene/solarsystem/planets/saturn/rhea/rhea_textures.asset b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea_textures.asset new file mode 100644 index 0000000000..e6b1e10677 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/rhea/rhea_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Rhea textures", + Type = "HttpSynchronization", + Identifier = "rhea_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/saturn.asset b/data/assets/scene/solarsystem/planets/saturn/saturn.asset index d9ea30dac3..16dd8c7700 100644 --- a/data/assets/scene/solarsystem/planets/saturn/saturn.asset +++ b/data/assets/scene/solarsystem/planets/saturn/saturn.asset @@ -1,9 +1,7 @@ local transforms = asset.require('./transforms') local assetHelper = asset.require('util/asset_helper') asset.require("spice/base") -asset.request('./trail') - - +asset.require('./trail') local textures = asset.syncedResource({ Type = "HttpSynchronization", @@ -20,25 +18,22 @@ local Saturn = { Type = "SpiceRotation", SourceFrame = "IAU_SATURN", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", Radii = { 60268000, 60268000, 54364000 }, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/saturn.jpg", - Enabled = true - } - } - } + Layers = {}, + Rings = { + Texture = textures .. "/saturn_rings.png", + Size = 140445000, + Offset = { 74500 / 140445.100671159, 1.0 }, -- min / max extend + }, + Shadows = { + Enabled = true, + DistanceFraction = 40.0 + } }, Tag = { "planet_solarSystem", "planet_giants" }, GUI = { @@ -46,21 +41,25 @@ local Saturn = { } } -local SaturnRings = { - Identifier = "SaturnRings", +local SaturnLabel = { + Identifier = "SaturnLabel", Parent = Saturn.Identifier, Renderable = { - Type = "RenderableRings", - Texture = textures .. "/saturn_rings.png", - Size = 140445000, - Offset = { 74500 / 140445.100671159, 1.0 } -- min / max extend + Enabled = false, + Type = "RenderableLabels", + LabelText = "Saturn", + FontSize = 100.0, + LabelSize = 8.7, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + BlendMode = "Additive", + LabelOrientationOption = "Camera View Direction" }, + Tag = { "solarsystem_labels" }, GUI = { - Name = "Saturn Rings", + Name = "Saturn Label", Path = "/Solar System/Planets/Saturn" } } - - -assetHelper.registerSceneGraphNodesAndExport(asset, { Saturn, SaturnRings }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Saturn, SaturnLabel }) diff --git a/data/assets/scene/solarsystem/planets/saturn/saturn_globelabels.asset b/data/assets/scene/solarsystem/planets/saturn/saturn_globelabels.asset new file mode 100644 index 0000000000..1fb85efda5 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/saturn_globelabels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Dione Labels", + Type = "HttpSynchronization", + Identifier = "saturn_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/saturn_textures.asset b/data/assets/scene/solarsystem/planets/saturn/saturn_textures.asset new file mode 100644 index 0000000000..188f3d61fd --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/saturn_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Type = "HttpSynchronization", + Name = "Saturn textures", + Identifier = "saturn_textures", + Version = 3 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/default_layers.asset new file mode 100644 index 0000000000..e1aa178b97 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./tethys') +local globeIdentifier = globeAsset.Tethys.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/tethys_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/layers/colorlayers/tethys_texture.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/layers/colorlayers/tethys_texture.asset new file mode 100644 index 0000000000..e7fc7e3bd6 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/layers/colorlayers/tethys_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../tethys_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/tethys.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/layers/default_layers.asset new file mode 100644 index 0000000000..d5c7bac2e4 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/tethys_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset index 8f899ff8f8..59dc831c2b 100644 --- a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys.asset @@ -1,16 +1,8 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Tethys textures", - Type = "HttpSynchronization", - Identifier = "tethys_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('../saturn_globelabels').LabelsPath local Tethys = { Identifier = "Tethys", @@ -32,14 +24,22 @@ local Tethys = { Type = "RenderableGlobe", Radii = 531100, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/tethys.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/tethys.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" }, diff --git a/data/assets/scene/solarsystem/planets/saturn/tethys/tethys_textures.asset b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys_textures.asset new file mode 100644 index 0000000000..ac80cf268d --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/tethys/tethys_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Tethys textures", + Type = "HttpSynchronization", + Identifier = "tethys_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/titan/default_layers.asset new file mode 100644 index 0000000000..ae8586f604 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/titan/default_layers.asset @@ -0,0 +1,16 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./titan') +local globeIdentifier = globeAsset.Titan.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require( + './layers/colorlayers/cassini_iss_global_mosaic_4km_liu' +).layer + +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/cassini_iss_global_mosaic_4km_liu.asset b/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/cassini_iss_global_mosaic_4km_liu.asset new file mode 100644 index 0000000000..fa9495110b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/cassini_iss_global_mosaic_4km_liu.asset @@ -0,0 +1,9 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Cassini_ISS_Global_Mosaic_4km_LiU", + Name = "Cassini ISS Global Mosaic [Sweden]", + FilePath = mapServiceConfigs .. "/LiU/ISS_P19658_Mosaic_Global_4km.wms", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/titan_texture.asset b/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/titan_texture.asset new file mode 100644 index 0000000000..31cdf46534 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/titan/layers/colorlayers/titan_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../titan_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/titan.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/saturn/titan/layers/default_layers.asset new file mode 100644 index 0000000000..e64ed8020e --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/titan/layers/default_layers.asset @@ -0,0 +1,16 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/titan_texture").layer, + asset.require(colorLayersPath .. "/cassini_iss_global_mosaic_4km_liu").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset index bc01b1a25f..40d3bfae51 100644 --- a/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset +++ b/data/assets/scene/solarsystem/planets/saturn/titan/titan.asset @@ -1,17 +1,8 @@ local transforms = asset.require('../transforms') local assetHelper = asset.require('util/asset_helper') local kernel = asset.require('../kernels').sat375 -asset.request('./trail') - - -local map_service_configs = asset.localResource("map_service_configs") - -local textures = asset.syncedResource({ - Type = "HttpSynchronization", - Name = "Titan textures", - Identifier = "titan_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('../saturn_globelabels').LabelsPath local Titan = { Identifier = "Titan", @@ -33,20 +24,22 @@ local Titan = { Type = "RenderableGlobe", Radii = 2576000, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/titan.jpg", - -- Enabled = true - }, - { - Identifier = "Cassini_ISS_Global_Mosaic_4km_LiU", - Name = "Cassini ISS Global Mosaic [Sweden]", - FilePath = map_service_configs .. "/LiU/ISS_P19658_Mosaic_Global_4km.wms", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/titan.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 14.0, + LabelsSize = 8.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 1350000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "moon_solarSystem", "moon_giants", "moon_saturn" }, diff --git a/data/assets/scene/solarsystem/planets/saturn/titan/titan_textures.asset b/data/assets/scene/solarsystem/planets/saturn/titan/titan_textures.asset new file mode 100644 index 0000000000..e4c0742701 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/saturn/titan/titan_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Type = "HttpSynchronization", + Name = "Titan textures", + Identifier = "titan_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/uranus/default_layers.asset b/data/assets/scene/solarsystem/planets/uranus/default_layers.asset new file mode 100644 index 0000000000..681f625251 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/uranus/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./uranus') +local globeIdentifier = globeAsset.Uranus.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/uranus_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/uranus/layers/colorlayers/uranus_texture.asset b/data/assets/scene/solarsystem/planets/uranus/layers/colorlayers/uranus_texture.asset new file mode 100644 index 0000000000..cdff4a7cdc --- /dev/null +++ b/data/assets/scene/solarsystem/planets/uranus/layers/colorlayers/uranus_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../uranus_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/uranus.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/uranus/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/uranus/layers/default_layers.asset new file mode 100644 index 0000000000..d385faf202 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/uranus/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/uranus_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/uranus/minor_moons.asset b/data/assets/scene/solarsystem/planets/uranus/minor_moons.asset index d4039d2b0c..83a3d6391f 100644 --- a/data/assets/scene/solarsystem/planets/uranus/minor_moons.asset +++ b/data/assets/scene/solarsystem/planets/uranus/minor_moons.asset @@ -1,3 +1,3 @@ -asset.request('./inner_moons') -asset.request('./irregular_prograde_moons') -asset.request('./irregular_retrograde_moons') +asset.require('./inner_moons') +asset.require('./irregular_prograde_moons') +asset.require('./irregular_retrograde_moons') diff --git a/data/assets/scene/solarsystem/planets/uranus/uranus.asset b/data/assets/scene/solarsystem/planets/uranus/uranus.asset index 03ca0abd60..89421662c2 100644 --- a/data/assets/scene/solarsystem/planets/uranus/uranus.asset +++ b/data/assets/scene/solarsystem/planets/uranus/uranus.asset @@ -1,16 +1,7 @@ local assetHelper = asset.require('util/asset_helper') local transforms = asset.require('./transforms') asset.require("spice/base") -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Uranus Textures", - Type = "HttpSynchronization", - Identifier = "uranus_textures", - Version = 1 -}) +asset.require('./trail') local Uranus = { Identifier = "Uranus", @@ -20,25 +11,13 @@ local Uranus = { Type = "SpiceRotation", SourceFrame = "IAU_URANUS", DestinationFrame = "GALACTIC" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", Radii = { 25559000, 25559000, 24973000 }, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/uranus.jpg", - Enabled = true - } - } - } + Layers = {} }, Tag = { "planet_solarSystem", "planet_giants" }, GUI = { @@ -46,6 +25,25 @@ local Uranus = { } } +local UranusLabel = { + Identifier = "UranusLabel", + Parent = Uranus.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Uranus", + FontSize = 100.0, + LabelSize = 8.7, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive" + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Uranus Label", + Path = "/Solar System/Planets/Uranus" + } +} - -assetHelper.registerSceneGraphNodesAndExport(asset, { Uranus }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Uranus, UranusLabel }) diff --git a/data/assets/scene/solarsystem/planets/uranus/uranus_textures.asset b/data/assets/scene/solarsystem/planets/uranus/uranus_textures.asset new file mode 100644 index 0000000000..ea47aa39a9 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/uranus/uranus_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Uranus Textures", + Type = "HttpSynchronization", + Identifier = "uranus_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/planets/venus/atmosphere.asset b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset new file mode 100644 index 0000000000..a89828ffbc --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/atmosphere.asset @@ -0,0 +1,66 @@ +local transforms = asset.require('./venus') +local assetHelper = asset.require('util/asset_helper') + + + +local Atmosphere = { + Identifier = "VenusAtmosphere", + Parent = transforms.Venus.Identifier, + Renderable = { + Type = "RenderableAtmosphere", + Atmosphere = { + -- Atmosphere radius in Km + AtmosphereRadius = 6121.9, + PlanetRadius = 6051.9, + PlanetAverageGroundReflectance = 0.018, + GroundRadianceEmittion = 0.8, + SunIntensity = 11.47, + --MieScatteringExtinctionPropCoefficient = 0.23862, + Rayleigh = { + Coefficients = { + -- Wavelengths are given in 10^-9m + Wavelengths = { 680, 550, 440 }, + -- Reflection coefficients are given in km^-1 + Scattering = { 19.518E-3, 13.83E-3, 3.65E-3 } + -- In Rayleigh scattering, the coefficients of + -- absorption and scattering are the same. + }, + -- Thichkness of atmosphere if its density were uniform, in Km + H_R = 3.53 + }, + -- Default + Mie = { + Coefficients = { + -- Reflection coefficients are given in km^-1 + Scattering = { 53.61771e-3, 53.61771e-3, 53.61771e-3 }, + -- Extinction coefficients are a fraction of the Scattering coefficients + Extinction = { 53.61771e-3/0.98979, 53.61771e-3/0.98979, 53.61771e-3/0.98979 } + }, + -- Mie Height scale (atmosphere thickness for constant density) in Km + H_M = 5.42, + -- Mie Phase Function Value (G e [-1.0, 1.0]. + -- If G = 1.0, Mie phase function = Rayleigh Phase Function) + G = 0.85 + }, + Image = { + ToneMapping = jToneMapping, + Exposure = 0.4, + Background = 1.8, + Gamma = 1.85 + }, + Debug = { + -- PreCalculatedTextureScale is a float from 1.0 to N, with N > 0.0 and N in Naturals (i.e., 1, 2, 3, 4, 5....) + PreCalculatedTextureScale = 1.0, + SaveCalculatedTextures = false + } + } + }, + GUI = { + Name = "Venus Atmosphere", + Path = "/Solar System/Planets/Venus" + } +} + + + +assetHelper.registerSceneGraphNodesAndExport(asset, { Atmosphere }) diff --git a/data/assets/scene/solarsystem/planets/venus/default_layers.asset b/data/assets/scene/solarsystem/planets/venus/default_layers.asset new file mode 100644 index 0000000000..947f0b00ba --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/default_layers.asset @@ -0,0 +1,16 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./venus') +local globeIdentifier = globeAsset.Venus.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/magellan_mosaic_utah').layer +local heightLayer = asset.require('./layers/heightlayers/magellan').layer + +colorLayer.Enabled = true +heightLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/planets/venus/layers/colorlayers/magellan_mosaic_utah.asset b/data/assets/scene/solarsystem/planets/venus/layers/colorlayers/magellan_mosaic_utah.asset new file mode 100644 index 0000000000..5a3f60094a --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/layers/colorlayers/magellan_mosaic_utah.asset @@ -0,0 +1,13 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Magellan_Mosaic_Utah", + Name = "Magellan Mosaic [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MagellanMosaic.vrt", + BlendMode = "Color", + Settings = { + Gamma = 2.0 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/venus/layers/colorlayers/venus_texture.asset b/data/assets/scene/solarsystem/planets/venus/layers/colorlayers/venus_texture.asset new file mode 100644 index 0000000000..3af2f21bc7 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/layers/colorlayers/venus_texture.asset @@ -0,0 +1,12 @@ +local texturesPath = asset.require("./../../venus_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/venus.jpg", + Settings = { + Opacity = 0.48, + Gamma = 0.48 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/venus/layers/default_layers.asset b/data/assets/scene/solarsystem/planets/venus/layers/default_layers.asset new file mode 100644 index 0000000000..23c322cc8b --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/layers/default_layers.asset @@ -0,0 +1,20 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/venus_texture").layer, + asset.require(colorLayersPath .. "/magellan_mosaic_utah").layer +} + +local heightLayersPath = "./heightlayers" +local heightLayers = { + asset.require(heightLayersPath .. "/magellan").layer, +} + +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/planets/venus/layers/heightlayers/magellan.asset b/data/assets/scene/solarsystem/planets/venus/layers/heightlayers/magellan.asset new file mode 100644 index 0000000000..80d934e6c2 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/layers/heightlayers/magellan.asset @@ -0,0 +1,14 @@ +local mapServiceConfigs = asset.localResource("./../../map_service_configs") + +local layer = { + Identifier = "Magellan", + Name = "Magellan Elevation [Utah]", + FilePath = mapServiceConfigs .. "/Utah/MagellanDEM.wms", + TilePixelSize = 64, + Settings = { + Gamma = 1.72, + Multiplier = 1.1 + } +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/planets/mercury/map_service_configs/AWS/MessengerMdis.wms b/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanDEM.wms similarity index 51% rename from data/assets/scene/solarsystem/planets/mercury/map_service_configs/AWS/MessengerMdis.wms rename to data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanDEM.wms index ff78793136..c8072a6e30 100644 --- a/data/assets/scene/solarsystem/planets/mercury/map_service_configs/AWS/MessengerMdis.wms +++ b/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanDEM.wms @@ -1,18 +1,18 @@ - http://planetarydev-1803629091.us-west-2.elb.amazonaws.com/Mercury/MessengerMdis/tile/${z}/${y}/${x} + http://openspace.sci.utah.edu/Venus/MagellanDEM/tile/${z}/${y}/${x} -180.0 90.0 180.0 -90.0 - 61324 - 30662 - 7 + 8192 + 4096 + 4 top - GEOGCS["GCS_Mercury_2015",DATUM["D_Mercury_2015",SPHEROID["Mercury_2015",2439400.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]] + GEOGCS["GCS_Venus",DATUM["D_Venus",SPHEROID["Venus",6051000,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]] 256 256 1 diff --git a/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanMosaic.vrt b/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanMosaic.vrt new file mode 100644 index 0000000000..7eb41cc198 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanMosaic.vrt @@ -0,0 +1,28 @@ + + GEOGCS["GCS_Venus",DATUM["D_Venus",SPHEROID["Venus_localRadius",6051000,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]] + -1.8000000000000000e+02, 7.1016002272512077e-04, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -7.1011656303583486e-04 + + Gray + + MagellanMosaic.wms + 1 + + + + + + + Alpha + 0 + + MagellanMosaic.wms + 1 + + + + 255 + 0 + 0 + + + diff --git a/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanMosaic.wms b/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanMosaic.wms new file mode 100644 index 0000000000..084e231ea4 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/map_service_configs/Utah/MagellanMosaic.wms @@ -0,0 +1,21 @@ + + + http://openspace.sci.utah.edu/Venus/MagellanMosaic/tile/${z}/${y}/${x} + + + -180.0 + 84.0 + 180.0 + -80.0 + 506928 + 230948 + 9 + top + + GEOGCS["GCS_Venus",DATUM["D_Venus",SPHEROID["Venus_localRadius",6051000,0]],PRIMEM["Reference_Meridian",0],UNIT["Degree",0.0174532925199433]] + 512 + 512 + 1 + 10 + 5 + diff --git a/data/assets/scene/solarsystem/planets/venus/venus.asset b/data/assets/scene/solarsystem/planets/venus/venus.asset index 83c63f838f..d591a30cc1 100644 --- a/data/assets/scene/solarsystem/planets/venus/venus.asset +++ b/data/assets/scene/solarsystem/planets/venus/venus.asset @@ -1,16 +1,8 @@ local assetHelper = asset.require('util/asset_helper') local transforms = asset.require('./transforms') asset.require("spice/base") -asset.request('./trail') - - - -local textures = asset.syncedResource({ - Name = "Venus Textures", - Type = "HttpSynchronization", - Identifier = "venus_textures", - Version = 1 -}) +asset.require('./trail') +local labelsPath = asset.require('./venus_globelabels').LabelsPath local Venus = { Identifier = "Venus", @@ -25,24 +17,29 @@ local Venus = { Type = "SpiceTranslation", Target = "VENUS", Observer = "VENUS BARYCENTER" - }, - Scale = { - Type = "StaticScale", - Scale = 1.0 } }, Renderable = { Type = "RenderableGlobe", - Radii = { 6051900.0, 6051900.0, 6051800.0 }, + --Radii = { 6051900.0, 6051900.0, 6051800.0 }, + Radii = { 6051900.0, 6051900.0, 6051900.0 }, SegmentsPerPatch = 64, - Layers = { - ColorLayers = { - { - Identifier = "Texture", - FilePath = textures .. "/venus.jpg", - Enabled = true - } - } + Layers = {}, + Labels = { + Enable = false, + FileName = labelsPath .. "/venus.labels", + LabelAlignmentOption = "Horizontally", -- or Circularly + LabelsFontSize = 40.0, + LabelsSize = 12.0, + LabelsMinSize = 1.0, + LabelsMaxSize = 1500.0, + ProximityEnabled = false, + LabelsFadeInEnabled = true, + FadeInStartingDistance = 500000.0, + FadeOutStartingDistance = 1000000.0, + LabelsForceDomeRendering = true, + LabelsDistanceEPS = 3500000.0, + LabelsColor = { 1.0, 1.0, 0.0 } } }, Tag = { "planet_solarSystem", "planet_terrestrial" }, @@ -51,6 +48,26 @@ local Venus = { } } +local VenusLabel = { + Identifier = "VenusLabel", + Parent = Venus.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Venus", + FontSize = 100.0, + LabelSize = 8.4, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive" + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Venus Label", + Path = "/Solar System/Planets/Venus" + } +} -assetHelper.registerSceneGraphNodesAndExport(asset, { Venus }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Venus, VenusLabel }) diff --git a/data/assets/scene/solarsystem/planets/venus/venus_globelabels.asset b/data/assets/scene/solarsystem/planets/venus/venus_globelabels.asset new file mode 100644 index 0000000000..5902e84d19 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/venus_globelabels.asset @@ -0,0 +1,7 @@ +local LabelsPath = asset.syncedResource({ + Name = "Venus Labels", + Type = "HttpSynchronization", + Identifier = "venus_labels", + Version = 1 +}) +asset.export("LabelsPath", LabelsPath) diff --git a/data/assets/scene/solarsystem/planets/venus/venus_textures.asset b/data/assets/scene/solarsystem/planets/venus/venus_textures.asset new file mode 100644 index 0000000000..a9e47905d1 --- /dev/null +++ b/data/assets/scene/solarsystem/planets/venus/venus_textures.asset @@ -0,0 +1,7 @@ +local TexturesPath = asset.syncedResource({ + Name = "Venus Textures", + Type = "HttpSynchronization", + Identifier = "venus_textures", + Version = 1 +}) +asset.export("TexturesPath", TexturesPath) diff --git a/data/assets/scene/solarsystem/sssb/amor_asteroid.asset b/data/assets/scene/solarsystem/sssb/amor_asteroid.asset new file mode 100644 index 0000000000..99658a50f5 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/amor_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'amor_asteroid', 'sssb_data_amor_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_amor_asteroid.csv', "Amor Asteroids", filepath, { 1.0, 1.0, 1.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 4 +object.Renderable.TrailFade = 11 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Amor Asteroids", + Version = "1.0", + Description = [[ Earth-approaching Near-Earth-Asteroids with orbits exterior to Earth's but interior to Mars'. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/apollo_asteroid.asset b/data/assets/scene/solarsystem/sssb/apollo_asteroid.asset new file mode 100644 index 0000000000..258ff6c01f --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/apollo_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'apollo_asteroid', 'sssb_data_apollo_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_apollo_asteroid.csv', "Apollo Asteroids", filepath, { 0.7, 0.7, 1.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 6 +object.Renderable.TrailFade = 10 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Apollo Asteroids", + Version = "1.0", + Description = [[ Earth-crossing Near-Earth-Asteroids with semi-major axes larger than Earth's. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/aten_asteroid.asset b/data/assets/scene/solarsystem/sssb/aten_asteroid.asset new file mode 100644 index 0000000000..c768ccac07 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/aten_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'aten_asteroid', 'sssb_data_aten_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_aten_asteroid.csv', "Aten Asteroids", filepath, { 0.15, 0.15, 1.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 2 +object.Renderable.TrailFade = 18 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Aten Asteroids", + Version = "1.0", + Description = [[ Earth-crossing Near-Earth-Asteroids with semi-major axes smaller than Earth's. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/atira_asteroid.asset b/data/assets/scene/solarsystem/sssb/atira_asteroid.asset new file mode 100644 index 0000000000..9a7ec7ddaf --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/atira_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'atira_asteroid', 'sssb_data_atira_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_atira_asteroid.csv', "Atira Asteroids", filepath, { 0.5, 0.8, 1.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 2 +object.Renderable.TrailFade = 25 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Atira Asteroids", + Version = "1.0", + Description = [[ Near-Earth-Asteroids whose orbits are contained entirely within the orbit of the Earth. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/c2019y4atlas.asset b/data/assets/scene/solarsystem/sssb/c2019y4atlas.asset new file mode 100644 index 0000000000..27acaa4adf --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/c2019y4atlas.asset @@ -0,0 +1,48 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local orbit = asset.syncedResource({ + Name = "Comet C/2019 Y4 ATLAS", + Type = "HttpSynchronization", + Identifier = "horizons_c2019y4atlas", + Version = 1 +}) .. "/c2019y4atlas.txt" + +local C2019Y4AtlasTrail = { + Identifier = "C2019Y4AtlasTrail", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = orbit + }, + Color = { 0.533333, 0.850980, 0.996078 }, + EnableFade = false, + StartTime = "1950 JAN 1 0:00:00", + EndTime = "2100 JAN 1 00:00:00", + SampleInterval = 35000, + TimeStampSubsampleFactor = 1 + }, + GUI = { + Name = "C2019 Y4 Atlas Trail", + Path = "/Solar System/Comets" + } +} + +local C2019Y4AtlasPosition = { + Identifier = "C2019Y4AtlasPosition", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = orbit + }, + }, + GUI = { + Name = "C 2019 Y4 Atlas", + Path = "/Solar System/Comets" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, {C2019Y4AtlasPosition, C2019Y4AtlasTrail }) diff --git a/data/assets/scene/solarsystem/sssb/centaur_asteroid.asset b/data/assets/scene/solarsystem/sssb/centaur_asteroid.asset new file mode 100644 index 0000000000..1584ab3c91 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/centaur_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'centaur_asteroid', 'sssb_data_centaur_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_centaur_asteroid.csv', "Centaur Asteroids", filepath, { 0.94, 0.96, 0.94 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 6 +object.Renderable.TrailFade = 18 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Centaur Asteroids", + Version = "1.0", + Description = [[ Asteroids with either a perihelion or a semi-major axis between those of the four outer planets. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/chiron-type_comet.asset b/data/assets/scene/solarsystem/sssb/chiron-type_comet.asset new file mode 100644 index 0000000000..faad6f4c8e --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/chiron-type_comet.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'chiron-type_comet', 'sssb_data_chiron-type_comet') +local object = sharedSssb.createSssbGroupObject('sssb_data_chiron-type_comet.csv', "Chiron-type Comets", filepath, { 0.15 ,0.1 ,1.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 10 +object.Renderable.TrailFade = 25 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Chiron-Type Comets", + Version = "1.0", + Description = [[ Comets with a Tisserand's parameter with respect to Jupiter of greater than 3 and a semi-major axis greater than that of Jupiter. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/encke-type_comet.asset b/data/assets/scene/solarsystem/sssb/encke-type_comet.asset new file mode 100644 index 0000000000..8a51d5c041 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/encke-type_comet.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'encke-type_comet', 'sssb_data_encke-type_comet') +local object = sharedSssb.createSssbGroupObject('sssb_data_encke-type_comet.csv', "Encke-type Comets", filepath, { 0.8, 0.34, 1.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 2 +object.Renderable.TrailFade = 23 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Encke-Type Comets", + Version = "1.0", + Description = [[ Comets with a Tisserand's parameter with respect to Jupiter of greater than 3 and a semi-major axis less than that of Jupiter. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/halley-type_comet.asset b/data/assets/scene/solarsystem/sssb/halley-type_comet.asset new file mode 100644 index 0000000000..004ff8ce03 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/halley-type_comet.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'halley-type_comet', 'sssb_data_halley-type_comet') +local object = sharedSssb.createSssbGroupObject('sssb_data_halley-type_comet.csv', "Halley-type Comets", filepath, { 0.66, 0.66, 0.66 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 9 +object.Renderable.TrailFade = 18 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Halley-Type Comets", + Version = "1.0", + Description = [[ Periodic comets with an orbital period between 20 and 200 years. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/inner_main_belt_asteroid.asset b/data/assets/scene/solarsystem/sssb/inner_main_belt_asteroid.asset new file mode 100644 index 0000000000..aef5fba263 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/inner_main_belt_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'inner_main_belt_asteroid', 'sssb_data_inner_main_belt_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_inner_main_belt_asteroid.csv', "Inner Main Asteroid Belt", filepath, { 1.0, 1.0, 0.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 1 +object.Renderable.TrailFade = 0.5 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Inner Main Asteroid Belt", + Version = "1.0", + Description = [[ Asteroids with a semi-major axis less than 2.0 au and a perihelion distance greater than 1.666 au. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/jupiter-family_comet.asset b/data/assets/scene/solarsystem/sssb/jupiter-family_comet.asset new file mode 100644 index 0000000000..2046630045 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/jupiter-family_comet.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'jupiter-family_comet', 'sssb_data_jupiter-family_comet') +local object = sharedSssb.createSssbGroupObject('sssb_data_jupiter-family_comet.csv', "Jupiter-family Comets", filepath, { 0.2, 0.8, 0.2 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 10 +object.Renderable.TrailFade = 28 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Jupiter Family Comets", + Version = "1.0", + Description = [[ Comets with a Tisserand's parameter with respect to Jupiter of between 2 and 3. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/jupiter_trojan_asteroid.asset b/data/assets/scene/solarsystem/sssb/jupiter_trojan_asteroid.asset new file mode 100644 index 0000000000..e12ef74aae --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/jupiter_trojan_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'jupiter_trojan_asteroid', 'sssb_data_jupiter_trojan_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_jupiter_trojan_asteroid.csv', "Jupiter Trojan Asteroids", filepath, { 0.5, 0.8, 0.5 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 1 +object.Renderable.TrailFade = 5 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Jupiter Trojan Asteroids", + Version = "1.0", + Description = [[ Asteroids trapped in Jupiter's L4/L5 Lagrange points (semimajor axis of between 4.6 and 5.5 au), with an eccentricity of less than 0.3. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/main_belt_asteroid.asset b/data/assets/scene/solarsystem/sssb/main_belt_asteroid.asset new file mode 100644 index 0000000000..8154d3643f --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/main_belt_asteroid.asset @@ -0,0 +1,21 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'main_belt_asteroid', 'sssb_data_main_belt_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_main_belt_asteroid.csv', "Main Asteroid Belt", filepath, { 0.0, 0.5, 0.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 1 +object.Renderable.TrailFade = 0.1 +object.Renderable.UpperLimit = 50000 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Main Asteroid Belt", + Version = "1.0", + Description = [[ Asteroids with a semi-major axis of between 2.0 and 3.2 au, and a perihelion distance greater than 1.666 au. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/mars-crossing_asteroid.asset b/data/assets/scene/solarsystem/sssb/mars-crossing_asteroid.asset new file mode 100644 index 0000000000..8bded6abe9 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/mars-crossing_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'mars-crossing_asteroid', 'sssb_data_mars-crossing_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_mars-crossing_asteroid.csv', "Mars-crossing Asteroids", filepath, { 0.814, 0.305, 0.220 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 1 +object.Renderable.TrailFade = 13 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Mars-Crossing Asteroids", + Version = "1.0", + Description = [[ Asteroids that cross the orbit of Mars, with a semi-major axis of less than 3.2 au, and a perihelion distance of between 1.3 and 1.666 au. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/outer_main_belt_asteroid.asset b/data/assets/scene/solarsystem/sssb/outer_main_belt_asteroid.asset new file mode 100644 index 0000000000..a1b5dc806f --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/outer_main_belt_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'outer_main_belt_asteroid', 'sssb_data_outer_main_belt_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_outer_main_belt_asteroid.csv', "Outer Main Asteroid Belt", filepath, { 0.4, 0.4, 1.0 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 1 +object.Renderable.TrailFade = 2 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Outer Main Asteroid Belt", + Version = "1.0", + Description = [[ Asteroids with a semi-major axis of between 3.2 and 4.6 au. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/pha.asset b/data/assets/scene/solarsystem/sssb/pha.asset new file mode 100644 index 0000000000..41639b39a0 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/pha.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'pha', 'sssb_data_pha') +local object = sharedSssb.createSssbGroupObject('sssb_data_pha.csv', "Potentially Hazardous Asteroids", filepath, { 0.98, 0.09, 0.06}) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 3 +object.Renderable.TrailFade = 17 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Potentially-Hazardous Asteroids", + Version = "1.0", + Description = [[ Asteroids that are deemed potentially hazardous to Earth based on their close approaches. All asteroids with an Earth Minimum Orbit Intersection Distance (MOID) of 0.05 au or less, and with an absolute magnitude (H) of 22.0 or less. ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sssb/sssb_shared.asset b/data/assets/scene/solarsystem/sssb/sssb_shared.asset new file mode 100644 index 0000000000..ea494d0fff --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/sssb_shared.asset @@ -0,0 +1,40 @@ +local transforms = asset.require('scene/solarsystem/sun/transforms') + +function downloadSssbDatabaseFile(sceneAsset, name, identifier) + assert(sceneAsset, "'asset' needs to be provided") + assert(name, "'name' needs to be provided") + assert(identifier, "'identifier'needs to be provided") + + return sceneAsset.syncedResource({ + Name = "Small SolarSystem Body Data (" .. name .. ")", + Type = "HttpSynchronization", + Identifier = identifier, + Version = 1 + }) +end + +local createSssbGroupObject = function(filename, guiName, sssbFolder, trailColor) + assert(filename, "'filename' needs to be provided") + assert(sssbFolder, "'sssbFolder' needs to be provided") + trailColor = trailColor or { 0.75, 0.1, 0.1 } + + local filenameSansExt = filename:gsub(filename:match("(%.%w+)$"), "") + return { + Identifier = 'sssb_'..filenameSansExt, + Parent = transforms.SunECLIPJ2000.Identifier, + Renderable = { + Type = "RenderableSmallBody", + Path = sssbFolder.."/"..filename, + Segments = 200, + Color = trailColor, + TrailFade = 0.5, + }, + GUI = { + Path = "/Solar System/Small Bodies", + Name = guiName + } + } +end + +asset.export("downloadSssbDatabaseFile", downloadSssbDatabaseFile) +asset.export("createSssbGroupObject", createSssbGroupObject) diff --git a/data/assets/scene/solarsystem/sssb/swifttuttle.asset b/data/assets/scene/solarsystem/sssb/swifttuttle.asset new file mode 100644 index 0000000000..225c9f5e97 --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/swifttuttle.asset @@ -0,0 +1,46 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local sync = asset.syncedResource({ + Name = "Swift Tuttle Orbit", + Type = "HttpSynchronization", + Identifier = "swift_tuttle_horizons", + Version = 1 +}) + +local SwiftTuttleTrail = { + Identifier = "SwiftTuttleTrail", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = sync .. "/horizons_swifttuttle.dat" + }, + Color = { 0.9, 0.9, 0.0 }, + StartTime = "1879 JUN 27 00:00:00", + EndTime = "2019 JUN 27 00:00:00", + SampleInterval = 60 + }, + GUI = { + Name = "Swift Tuttle Trail", + Path = "/Solar System/SSSB" + } +} + +local SwiftTuttlePosition = { + Identifier = "SwiftTuttlePosition", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = sync .. "/horizons_swifttuttle.dat" + }, + }, + GUI = { + Name = "Swift Tuttle Position", + Path = "/Solar System/SSSB" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { SwiftTuttlePosition, SwiftTuttleTrail }) diff --git a/data/assets/scene/solarsystem/sssb/tesla_roadster.asset b/data/assets/scene/solarsystem/sssb/tesla_roadster.asset new file mode 100644 index 0000000000..ca2a577dff --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/tesla_roadster.asset @@ -0,0 +1,47 @@ +local assetHelper = asset.require('util/asset_helper') +local sunTransforms = asset.require('scene/solarsystem/sun/transforms') + +local orbit = asset.syncedResource({ + Name = "Tesla Roadster Orbit", + Type = "HttpSynchronization", + Identifier = "tesla_horizons", + Version = 1 +}) + +local TeslaRoadsterTrail = { + Identifier = "TeslaRoadsterTrail", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Renderable = { + Type = "RenderableTrailTrajectory", + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = orbit .. "/horizons_tesla.dat" + }, + Color = { 0.9, 0.9, 0.0 }, + StartTime = "2018 FEB 8 00:00:00", + EndTime = "2022 FEB 7 00:00:00", + SampleInterval = 3000, + TimeStampSubsampleFactor = 1 + }, + GUI = { + Name = "Tesla Roadster Trail", + Path = "/Solar System/SSSB" + } +} + +local TeslaPosition = { + Identifier = "TeslaPosition", + Parent = sunTransforms.SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "HorizonsTranslation", + HorizonsTextFile = orbit .. "/horizons_tesla.dat" + }, + }, + GUI = { + Name = "Tesla Roadster", + Path = "/Solar System/SSSB" + } +} + +assetHelper.registerSceneGraphNodesAndExport(asset, { TeslaPosition, TeslaRoadsterTrail }) diff --git a/data/assets/scene/solarsystem/sssb/transneptunian_object_asteroid.asset b/data/assets/scene/solarsystem/sssb/transneptunian_object_asteroid.asset new file mode 100644 index 0000000000..7a8104fadd --- /dev/null +++ b/data/assets/scene/solarsystem/sssb/transneptunian_object_asteroid.asset @@ -0,0 +1,20 @@ +local assetHelper = asset.require('util/asset_helper') +local sharedSssb = asset.require('./sssb_shared') + +local filepath = sharedSssb.downloadSssbDatabaseFile(asset, 'transneptunian_object_asteroid', 'sssb_data_transneptunian_object_asteroid') +local object = sharedSssb.createSssbGroupObject('sssb_data_transneptunian_object_asteroid.csv', "Transneptunian Object Asteroids", filepath, {0.56, 0.64, 0.95 }) +object.Renderable.Enabled = false +object.Renderable.SegmentQuality = 8 +object.Renderable.TrailFade = 10 + +assetHelper.registerSceneGraphNodesAndExport(asset, { object }) + + +asset.meta = { + Name = "Trans-Neptunian Asteroids", + Version = "1.0", + Description = [[ Any minor or dwarf planets in the solar system that orbit the Sun at a greater average distance than Neptune (semi-major axis of 30.1 AU). ]], + Author = "JPL Small-Body Database hosted by California Institute of Technology", + URL = "https://ssd.jpl.nasa.gov/sbdb_query.cgi", + License = "JPL-authored documents are sponsored by NASA under Contract NAS7-030010. All documents available from this server may be protected under the U.S. and Foreign Copyright Laws." +} \ No newline at end of file diff --git a/data/assets/scene/solarsystem/sun.asset b/data/assets/scene/solarsystem/sun.asset index a5a1502544..0d0b462d84 100644 --- a/data/assets/scene/solarsystem/sun.asset +++ b/data/assets/scene/solarsystem/sun.asset @@ -1,2 +1,2 @@ -asset.request('./sun/sun') -asset.request('./sun/glare') +asset.require('./sun/sun') +asset.require('./sun/glare') diff --git a/data/assets/scene/solarsystem/sun/default_layers.asset b/data/assets/scene/solarsystem/sun/default_layers.asset new file mode 100644 index 0000000000..749b68c720 --- /dev/null +++ b/data/assets/scene/solarsystem/sun/default_layers.asset @@ -0,0 +1,13 @@ +local layerHelper = asset.require('util/layer_helper') +local globeAsset = asset.require('./sun') +local globeIdentifier = globeAsset.Sun.Identifier + +-- set enabled and fallback layers +local defaultLayers = asset.require('./layers/default_layers') + +local colorLayer = asset.require('./layers/colorlayers/sun_texture').layer +colorLayer.Enabled = true + +asset.onInitialize(function () + layerHelper.addLayersToGlobe(globeIdentifier, defaultLayers) +end) diff --git a/data/assets/scene/solarsystem/sun/glare.asset b/data/assets/scene/solarsystem/sun/glare.asset index 14e3af3264..57d3a6eed3 100644 --- a/data/assets/scene/solarsystem/sun/glare.asset +++ b/data/assets/scene/solarsystem/sun/glare.asset @@ -14,7 +14,9 @@ local SunGlare = { Origin = "Center", Billboard = true, Texture = textures .. "/halo.png", - BlendMode = "Additive" + BlendMode = "Additive", + Opacity = 0.65, + RenderableType = "PreDeferredTransparency" }, Transform = { Translation = { diff --git a/data/assets/scene/solarsystem/sun/layers/colorlayers/sun_texture.asset b/data/assets/scene/solarsystem/sun/layers/colorlayers/sun_texture.asset new file mode 100644 index 0000000000..24ab11d9ae --- /dev/null +++ b/data/assets/scene/solarsystem/sun/layers/colorlayers/sun_texture.asset @@ -0,0 +1,8 @@ +local texturesPath = asset.require("./../../sun_textures").TexturesPath + +local layer = { + Identifier = "Texture", + FilePath = texturesPath .. "/sun.jpg", +} + +asset.export("layer", layer) diff --git a/data/assets/scene/solarsystem/sun/layers/default_layers.asset b/data/assets/scene/solarsystem/sun/layers/default_layers.asset new file mode 100644 index 0000000000..8e136c5be4 --- /dev/null +++ b/data/assets/scene/solarsystem/sun/layers/default_layers.asset @@ -0,0 +1,15 @@ +local colorLayersPath = "./colorlayers" +local colorLayers = { + asset.require(colorLayersPath .. "/sun_texture").layer, +} + +local heightLayers = {} +local nightLayers = {} +local overlays = {} +local waterMasks = {} + +asset.export("colorLayers", colorLayers) +asset.export("heightLayers", heightLayers) +asset.export("nightLayers", nightLayers) +asset.export("overlays", overlays) +asset.export("waterMasks", waterMasks) diff --git a/data/assets/scene/solarsystem/sun/sun.asset b/data/assets/scene/solarsystem/sun/sun.asset index 3acbccb04a..5fabf2aa61 100644 --- a/data/assets/scene/solarsystem/sun/sun.asset +++ b/data/assets/scene/solarsystem/sun/sun.asset @@ -1,24 +1,16 @@ local assetHelper = asset.require("util/asset_helper") local transforms = asset.require("./transforms") -local textures = asset.require('./sun_textures').TexturesPath asset.require("spice/base") - - local Sun = { Identifier = "Sun", Parent = transforms.SunIAU.Identifier, Renderable = { - Type = "RenderablePlanet", + Type = "RenderableGlobe", Enabled = false, - Frame = "IAU_SUN", - Body = "SUN", - Geometry = { - Type = "SimpleSphere", - Radius = 6.957E8, - Segments = 100 - }, - ColorTexture = textures .. "/sun.jpg", + Radii = { 6.957E8, 6.957E8, 6.957E8 }, + SegmentsPerPatch = 64, + Layers = {}, PerformShading = false }, GUI = { @@ -26,6 +18,32 @@ local Sun = { } } +local SunLabel = { + Identifier = "SunLabel", + Parent = Sun.Identifier, + Renderable = { + Enabled = false, + Type = "RenderableLabels", + LabelText = "Sun", + FontSize = 100.0, + LabelSize = 13.127, + LabelMaxSize = 100.0, + LabelMinSize = 1.0, + LabelOrientationOption = "Camera View Direction", + BlendMode = "Additive", + EnableFading = true, + FadeStartUnit = "Pm", + FadeStartDistance = 2.841, + FadeStartSpeed = 1.375, + FadeEndUnit = "pc", + FadeEndDistance = 1.326, + FadeEndSpeed = 1.0 + }, + Tag = { "solarsystem_labels" }, + GUI = { + Name = "Sun Label", + Path = "/Solar System/Sun" + } +} - -assetHelper.registerSceneGraphNodesAndExport(asset, { Sun }) +assetHelper.registerSceneGraphNodesAndExport(asset, { Sun, SunLabel }) diff --git a/data/assets/scene/solarsystem/sun/transforms.asset b/data/assets/scene/solarsystem/sun/transforms.asset index b80dc222b9..ea76c08add 100644 --- a/data/assets/scene/solarsystem/sun/transforms.asset +++ b/data/assets/scene/solarsystem/sun/transforms.asset @@ -42,6 +42,26 @@ local SunIAU = { } } +local SunECLIPJ2000 = { + Identifier = "SunECLIPJ2000", + Parent = SolarSystemBarycenter.Identifier, + Transform = { + Translation = { + Type = "SpiceTranslation", + Target = "SUN", + Observer = "SSB" + }, + Rotation = { + Type = "SpiceRotation", + SourceFrame = "ECLIPJ2000", + DestinationFrame = "GALACTIC" + } + }, + GUI = { + Name = "SUN J2000", + Path = "/Solar System/Sun", + Hidden = true + } +} - -assetHelper.registerSceneGraphNodesAndExport(asset, { SolarSystemBarycenter, SunIAU }) +assetHelper.registerSceneGraphNodesAndExport(asset, { SolarSystemBarycenter, SunIAU, SunECLIPJ2000 }) diff --git a/data/assets/sync/everything.asset b/data/assets/sync/everything.asset index 8979061ee2..976e7d3027 100644 --- a/data/assets/sync/everything.asset +++ b/data/assets/sync/everything.asset @@ -4,7 +4,7 @@ local assetHelper = asset.require('../util/asset_helper') -assetHelper.requestAll(asset, '../customization') -assetHelper.requestAll(asset, '../scene') -assetHelper.requestAll(asset, '../spice') -assetHelper.requestAll(asset, '../util') +assetHelper.requireAll(asset, '../customization') +assetHelper.requireAll(asset, '../scene') +assetHelper.requireAll(asset, '../spice') +assetHelper.requireAll(asset, '../util') diff --git a/data/assets/util/asset_helper.asset b/data/assets/util/asset_helper.asset index 57ad93420b..0c8bb07cd7 100644 --- a/data/assets/util/asset_helper.asset +++ b/data/assets/util/asset_helper.asset @@ -23,7 +23,7 @@ local registerSceneGraphNodes = function (sceneAsset, nodes, override) override = override or false if not override then if tableLength(nodes) == 0 then - openspace.printWarning("Register function was called with an empty node list. Pass 'true' as third argument to silence this warning.") + openspace.printWarning(sceneAsset.filePath .. ": Register function was called with an empty node list. Pass 'true' as third argument to silence this warning.") return end end @@ -42,12 +42,37 @@ local registerSceneGraphNodes = function (sceneAsset, nodes, override) end) end + +local registerScreenSpaceRenderables = function (sceneAsset, renderables, override) + override = override or false + if not override then + if tableLength(renderables) == 0 then + openspace.printWarning(sceneAsset.filePath .. ": Register function was called with an empty node list. Pass 'true' as third argument to silence this warning.") + return + end + end + + sceneAsset.onInitialize(function () + for i, node in ipairs(renderables) do + openspace.addScreenSpaceRenderable(node) + end + end) + sceneAsset.onDeinitialize(function () + for i = #renderables, 1, -1 do + renderable = renderables[i] + openspace.removeScreenSpaceRenderable(renderable.Identifier) + end + end) +end + local registerDashboardItems = function (dashboardAsset, items) - dashboardAsset.onInitialize(function () + dashboardAsset.onInitialize( + function () for i, item in ipairs(items) do openspace.dashboard.addDashboardItem(item) end - end) + end + ) dashboardAsset.onDeinitialize(function () for i = #items, 1, -1 do item = items[i] @@ -60,7 +85,7 @@ local registerSceneGraphNodesAndExport = function (sceneAsset, nodes, override) override = override or false if not override then if tableLength(nodes) == 0 then - openspace.printWarning("Register function was called with an empty node list. Pass 'true' as third argument to silence this warning.") + openspace.printWarning(sceneAsset.filePath .. ": Register function was called with an empty node list. Pass 'true' as third argument to silence this warning.") return end end @@ -88,15 +113,6 @@ local registerSceneGraphNodesAndExport = function (sceneAsset, nodes, override) end end -local registerInterestingNodes = function (sceneAsset, nodes) - sceneAsset.onInitialize(function () - openspace.markInterestingNodes(nodes) - end) - sceneAsset.onDeinitialize(function () - openspace.removeInterestingNodes(nodes) - end) -end - local requireAll = function (sceneAsset, directory) function string.ends(String,End) return End=='' or string.sub(String,-string.len(End))==End @@ -116,24 +132,61 @@ local requireAll = function (sceneAsset, directory) return result end -local requestAll = function (sceneAsset, directory) - function string.ends(String,End) - return End=='' or string.sub(String,-string.len(End))==End - end - - local files = openspace.walkDirectoryFiles(sceneAsset.localResource('') .. directory, true) - for _, file in pairs(files) do - if file:ends('.asset') then - openspace.printDebug("Requesting: " .. file:sub(file:find(directory), -7)) - sceneAsset.request(file:sub(file:find(directory), -7)) - end - end +local getDefaultLightSources = function (solarSystemBarycenterIdentifier) + local sourceList = { + { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = solarSystemBarycenterIdentifier, + Intensity = 1.0 + }, + { + Identifier = "Camera", + Type = "CameraLightSource", + Intensity = 0.5 + } + } + return sourceList end + +local createModelPart = function (parent, sunLightSourceNode, models, geometry, texture, performShading) + local lightSources = {} + if performShading then + lightSources[1] = { + Type = "SceneGraphLightSource", + Identifier = "Sun", + Node = sunLightSourceNode, + Intensity = 1.0 + } + end + return { + Identifier = parent .. "-" .. geometry, + Parent = parent, + Renderable = { + Type = "RenderableModel", + Geometry = { + Type = "MultiModelGeometry", + GeometryFile = models .. "/" .. geometry .. ".obj" + }, + ColorTexture = models .. "/" .. texture, + LightSources = lightSources, + PerformShading = performShading, + DisableFaceCulling = true + }, + GUI = { + Hidden = true + } + } +end + + + asset.export("registerSceneGraphNodes", registerSceneGraphNodes) asset.export("registerSceneGraphNodesAndExport", registerSceneGraphNodesAndExport) +asset.export("registerScreenSpaceRenderables", registerScreenSpaceRenderables) asset.export("registerSpiceKernels", registerSpiceKernels) asset.export("registerDashboardItems", registerDashboardItems) -asset.export("registerInterestingNodes", registerInterestingNodes) asset.export("requireAll", requireAll) -asset.export("requestAll", requestAll) +asset.export("getDefaultLightSources", getDefaultLightSources) +asset.export("createModelPart", createModelPart) diff --git a/data/assets/util/debug_helper.asset b/data/assets/util/debug_helper.asset index 2a1175ee84..f01d50824d 100644 --- a/data/assets/util/debug_helper.asset +++ b/data/assets/util/debug_helper.asset @@ -61,8 +61,8 @@ local addCartesianAxes = function (specification) local name = specification.Name or specification.Identifier local parent = specification.Parent or "Root" local scale = specification.Scale or 1.0 - local position = specification.Position or {0.0, 0.0, 0.0} - local rotation = specification.Rotation or {0.0, 0.0, 0.0} + local position = specification.Position or { 0.0, 0.0, 0.0 } + local rotation = specification.Rotation or { 0.0, 0.0, 0.0 } local axes = { Identifier = identifier, @@ -84,9 +84,9 @@ local addCartesianAxes = function (specification) Renderable = { Type = "RenderableCartesianAxes", Enabled = true, - XColor = {1.0, 0.0, 0.0, 1.0}, - YColor = {0.0, 1.0, 0.0, 1.0}, - ZColor = {0.0, 0.0, 1.0, 1.0} + XColor = { 1.0, 0.0, 0.0 }, + YColor = { 0.0, 1.0, 0.0 }, + ZColor = { 0.0, 0.0, 1.0 } }, GUI = { Name = name, @@ -128,6 +128,6 @@ end asset.export("addGrid", addGrid) asset.export("registerGrid", registerGrid) -asset.export("addCartesianAxes", addGrid) +asset.export("addCartesianAxes", addCartesianAxes) asset.export("registerCartesianAxes", registerCartesianAxes) diff --git a/data/assets/util/default_keybindings.asset b/data/assets/util/default_keybindings.asset index c0a5d13ece..b6e08b0100 100644 --- a/data/assets/util/default_keybindings.asset +++ b/data/assets/util/default_keybindings.asset @@ -10,14 +10,6 @@ local Keybindings = { GuiPath = "/Native GUI", Local = true }, - { - Key = "F4", - Name = "Show Performance Measurements", - Command = propertyHelper.invert("RenderEngine.PerformanceMeasurements"), - Documentation = "Toogles performance measurements that shows rendering time informations.", - GuiPath = "/Native GUI", - Local = true - }, { Key = "ESC", Name = "Toggle Shutdown", @@ -28,8 +20,16 @@ local Keybindings = { { Key = "PRINT_SCREEN", Name = "Take Screenshot", - Command = "openspace.setPropertyValueSingle('RenderEngine.TakeScreenshot', nil)", - Documentation = "Saves the contents of the screen to a file in the working directory.", + Command = "openspace.takeScreenshot()", + Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory.", + GuiPath = "/Rendering", + Local = true + }, + { + Key = "F12", + Name = "Take Screenshot", + Command = "openspace.takeScreenshot()", + Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory.", GuiPath = "/Rendering", Local = true }, @@ -51,7 +51,7 @@ local Keybindings = { }, { Key = "f", - Name = "Toggle roation friction", + Name = "Toggle Rotation friction", Command = propertyHelper.invert('NavigationHandler.OrbitalNavigator.Friction.RotationalFriction'), Documentation = "Toggles the rotational friction of the camera. If it is disabled, the camera rotates around the focus object indefinitely.", GuiPath = "/Navigation", @@ -76,7 +76,7 @@ local Keybindings = { { Key = "w", Name = "Fade to/from black", - Command = "openspace.toggleFade(3)", + Command = "if openspace.getPropertyValue('RenderEngine.BlackoutFactor') > 0.5 then openspace.setPropertyValueSingle('RenderEngine.BlackoutFactor', 0.0, 3) else openspace.setPropertyValueSingle('RenderEngine.BlackoutFactor', 1.0, 3) end", Documentation = "Toggles the fade to black within 3 seconds or shows the rendering after 3 seconds.", GuiPath = "/Rendering", Local = false @@ -87,7 +87,7 @@ local Keybindings = { Command = propertyHelper.invert('Modules.CefWebGui.Visible'), Documentation = "Toggles the main GUI", GuiPath = "/GUI", - Local = false + Local = true }, { Key = "Shift+Tab", @@ -100,7 +100,7 @@ openspace.setPropertyValueSingle("RenderEngine.ShowVersion", not isEnabled); openspace.setPropertyValueSingle("RenderEngine.ShowCamera", not isEnabled)]], Documentation = "Toggles the dashboard and overlays", GuiPath = "/GUI", - Local = false + Local = true }, { Key = "Alt+R", @@ -108,14 +108,46 @@ openspace.setPropertyValueSingle("RenderEngine.ShowCamera", not isEnabled)]], Command = propertyHelper.invert('RenderEngine.DisableMasterRendering'), Documentation = "Toggles the rendering on master", GuiPath = "/Rendering", - Local = false - } + Local = true + }, + { + Key = "Right", + Name = "Next Delta Time Step (Interpolate)", + Command = "openspace.time.interpolateNextDeltaTimeStep()", + Documentation = "Smoothly interpolates the simulation speed to the next delta time step, if one exists.", + GuiPath = "/Simulation Speed", + Local = true + }, + { + Key = "Shift+Right", + Name = "Next Delta Time Step (Immediate)", + Command = "openspace.time.setNextDeltaTimeStep()", + Documentation = "Immediately set the simulation speed to the next delta time step, if one exists.", + GuiPath = "/Simulation Speed", + Local = true + }, + { + Key = "Left", + Name = "Previous Delta Time Step (Interpolate)", + Command = "openspace.time.interpolatePreviousDeltaTimeStep()", + Documentation = "Smoothly interpolates the simulation speed to the previous delta time step, if one exists.", + GuiPath = "/Simulation Speed", + Local = true + }, + { + Key = "Shift+Left", + Name = "Previous Delta Time Step (Immediate)", + Command = "openspace.time.setPreviousDeltaTimeStep()", + Documentation = "Immediately set the simulation speed to the previous delta time step, if one exists.", + GuiPath = "/Simulation Speed", + Local = true + }, } local DeltaTimeKeys asset.onInitialize(function() - Keys = sceneHelper.bindKeys(Keybindings) + sceneHelper.bindKeys(Keybindings) DeltaTimeKeys = sceneHelper.setDeltaTimeKeys({ -- 1 2 3 4 5 6 7 8 9 0 diff --git a/data/assets/util/generate_bookmarks.asset b/data/assets/util/generate_bookmarks.asset new file mode 100644 index 0000000000..2e3da2a9e3 --- /dev/null +++ b/data/assets/util/generate_bookmarks.asset @@ -0,0 +1,85 @@ +local assetHelper = asset.require('util/asset_helper') + +local getBookmarks = function (guiPath, bookmarkfile) + local genBookmarks = {}; + local notFirstLine = false; + local PARSEC_CONSTANT = 3.0856776E16; + for line in io.lines(openspace.absPath(bookmarkfile)) do + if (notFirstLine) then + local matchstring = '(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-),(.-)$' + local group, name, globe, lat, lon, altitude, x, y, z, scale, linewidth = line:match(matchstring) + + scale = (scale == '' and 75000 or scale) + linewidth = (linewidth == '' and 2.0 or tonumber(linewidth)) + group = (group == '' and globe or group) + + local parent = (globe == '' and 'Root' or globe) + + local sgn = { + Identifier = guiPath .. '-' .. name, + Parent = parent, + Transform = { + Scale = { + Type = 'StaticScale', + Scale = tonumber(scale); + }, + Rotation = { + Type = "StaticRotation", + Rotation = { + -0.05487554, 0.4941095, -0.8676661, + -0.9938214 , -0.1109906, -0.0003515167, + -0.09647644, 0.8622859, 0.4971472 + } + } + }, + Renderable = { + Type = 'RenderableSphericalGrid', + Enabled = false, + Opacity = 0.3, + GridColor = { 0.3, 0.84, 1.0}, + LineWidth = linewidth + }, + GUI = { + Name = name, + Path = '/' .. guiPath + } + } + + if (group ~= '') then + sgn.GUI.Path = sgn.GUI.Path .. '/' .. group + end + + if (globe == '') then + sgn.Transform.Translation = { + Type = 'StaticTranslation', + Position = { + tonumber(x) * PARSEC_CONSTANT, + tonumber(y) * PARSEC_CONSTANT, + tonumber(z) * PARSEC_CONSTANT + } + } + else + sgn.Transform.Translation = { + Type = 'GlobeTranslation', + Globe = globe, + Latitude = tonumber(lat), + Longitude = tonumber(lon) + } + if (altitude == nil) then + sgn.Transform.Translation.UseHeightMap = true; + else + sgn.Transform.Translation.UseHeightMap = false; + sgn.Transform.Translation.Altitude = tonumber(altitude); + end + end + + table.insert(genBookmarks, sgn); + else + notFirstLine = true + end + end + return genBookmarks +end + +asset.export('getBookmarks', getBookmarks) + diff --git a/data/assets/util/ipac.asset b/data/assets/util/ipac.asset new file mode 100644 index 0000000000..5d9140d4eb --- /dev/null +++ b/data/assets/util/ipac.asset @@ -0,0 +1,18 @@ +asset.onInitialize(function() + openspace.clearKeys() + openspace.bindKey("RIGHT", "openspace.navigation.addGlobalRotation(-5.0, 0.0)"); + openspace.bindKey("LEFT", "openspace.navigation.addGlobalRotation(5.0, 0.0)"); + openspace.bindKey("UP", "openspace.navigation.addGlobalRotation(0.0, 5.0)"); + openspace.bindKey("DOWN", "openspace.navigation.addGlobalRotation(0.0, -5.0)"); + + openspace.bindKey("CTRL+RIGHT", "openspace.navigation.addLocalRotation(-5.0, 0.0)"); + openspace.bindKey("CTRL+LEFT", "openspace.navigation.addLocalRotation(5.0, 0.0)"); + openspace.bindKey("CTRL+UP", "openspace.navigation.addLocalRotation(0.0, 5.0)"); + openspace.bindKey("CTRL+DOWN", "openspace.navigation.addLocalRotation(0.0, -5.0)"); + + openspace.bindKey("ALT+UP", "openspace.navigation.addTruckMovement(0.0, 5.0)"); + openspace.bindKey("ALT+DOWN", "openspace.navigation.addTruckMovement(0.0, -5.0)"); + + openspace.bindKey("SPACE", "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Moon');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);") + openspace.bindKey("Z", "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Earth');openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);") +end) diff --git a/data/assets/util/layer_helper.asset b/data/assets/util/layer_helper.asset new file mode 100644 index 0000000000..cb5becc4de --- /dev/null +++ b/data/assets/util/layer_helper.asset @@ -0,0 +1,18 @@ +local addLayersToGlobeByGroup = function(globeIdentifier, group, layers) + for _, layer in ipairs(layers) do + openspace.globebrowsing.addLayer(globeIdentifier, group, layer) + end +end + +-- Assumes a table containing tables with the following names as input: +-- 'colorLayers', 'heightLayers', 'nightLayers', 'overlays', 'waterMasks' +local addLayersToGlobe = function(globeIdentifier, layers) + addLayersToGlobeByGroup(globeIdentifier, 'ColorLayers', layers.colorLayers) + addLayersToGlobeByGroup(globeIdentifier, 'HeightLayers', layers.heightLayers) + addLayersToGlobeByGroup(globeIdentifier, 'NightLayers', layers.nightLayers) + addLayersToGlobeByGroup(globeIdentifier, 'Overlays', layers.overlays) + addLayersToGlobeByGroup(globeIdentifier, 'WaterMasks', layers.waterMasks) +end + +asset.export("addLayersToGlobeByGroup", addLayersToGlobeByGroup) +asset.export("addLayersToGlobe", addLayersToGlobe) diff --git a/data/assets/util/property_helper.asset b/data/assets/util/property_helper.asset index dab5038a2c..50feeeb5d3 100644 --- a/data/assets/util/property_helper.asset +++ b/data/assets/util/property_helper.asset @@ -1,14 +1,14 @@ -- Function that returns the string that inverts the fully qualified boolean property 'property' local invert = function(prop) local escaped_property = "'" .. prop .. "'" - return "openspace.setPropertyValue(" .. escaped_property .. ", not openspace.getPropertyValue(" .. escaped_property .. "));" + return "openspace.setPropertyValueSingle(" .. escaped_property .. ", not openspace.getPropertyValue(" .. escaped_property .. "));" end -- Function that returns the string that increments the 'property' by the 'value' local increment = function(prop, value) local v = value or 1 local escaped_property = "'" .. prop .. "'" - return "openspace.setPropertyValue(" .. escaped_property .. ", openspace.getPropertyValue(" .. escaped_property .. ") + " .. v .. ");" + return "openspace.setPropertyValueSingle(" .. escaped_property .. ", openspace.getPropertyValue(" .. escaped_property .. ") + " .. v .. ");" end -- Function that returns the string that decrements the 'property' by the 'value' @@ -21,7 +21,7 @@ local fade = function(prop, value, duration) assert(type(duration) == "number", "duration must be a number") local escaped_property = "'" .. prop .. "'" - return "openspace.setPropertyValue(" .. escaped_property ..", " .. tostring(value) .. ", " .. tostring(duration) .. ")" + return "openspace.setPropertyValueSingle(" .. escaped_property ..", " .. tostring(value) .. ", " .. tostring(duration) .. ")" end local fadeOut = function(prop, duration) diff --git a/data/assets/util/scene_helper.asset b/data/assets/util/scene_helper.asset index c752797403..9e7a87cc3c 100644 --- a/data/assets/util/scene_helper.asset +++ b/data/assets/util/scene_helper.asset @@ -1,18 +1,22 @@ -local bindKeys = function(t) - for i, k in ipairs(t) do - local bindFunction +local bindKeys = function(t, ignoreWarning) + ignoreWarning = ignoreWarning or false + for _, k in ipairs(t) do + assert(k.Key, 'No key provided') + assert(k.Command, 'No command provided for key ' .. k.Key) + + k.Name = k.Name or k.Key + k.GuiPath = k.GuiPath or '' + + local currentKey = openspace.getKeyBinding(k.Key) + if (next(currentKey) ~= nil) and (not ignoreWarning) then + openspace.printWarning('New keybind for "' .. k.Key .. '" is added, but a previous keybind already existed. If you want to silence this warning, pass "true", to this call to bindKeys') + end + if k.Local then - bindFunction = openspace.bindKeyLocal + openspace.bindKeyLocal(k.Key, k.Command, k.Documentation, k.Name, k.GuiPath) else - bindFunction = openspace.bindKey + openspace.bindKey(k.Key, k.Command, k.Documentation, k.Name, k.GuiPath) end - if k.Name == nil then - k.Name = k.Key - end - if k.GuiPath == nil then - k.GuiPath = "" - end - bindFunction(k.Key, k.Command, k.Documentation, k.Name, k.GuiPath) end end asset.export("bindKeys", bindKeys) @@ -21,16 +25,14 @@ local unbindKeys = function(keys) -- We check against k and k.Key to provide compatability -- for both calls with the same table that goes to bindKeys -- as well as the return values from setDeltaTimeKeys - for i, k in ipairs(keys) do - if k.Key then - openspace.clearKey(k.Key) - else - openspace.clearKey(k) - end + for _, k in ipairs(keys) do + openspace.clearKey(k.Key or k) end end asset.export("unbindKeys", unbindKeys) +local deltaTimeKeys = {} + local setDeltaTimeKeys = function(t) local Keys = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', @@ -44,6 +46,8 @@ local setDeltaTimeKeys = function(t) return end + unbindKeys(deltaTimeKeys) + result = {} for i, v in ipairs(t) do openspace.bindKeyLocal( @@ -56,6 +60,85 @@ local setDeltaTimeKeys = function(t) table.insert(result, Keys[i]) end + deltaTimeKeys = result + return result end asset.export("setDeltaTimeKeys", setDeltaTimeKeys) + + +--shortcut function +local function has_value (tab, val) + for index, value in ipairs(tab) do + -- We grab the first index of our sub-table instead + if value[1] == val then + return true + end + end + + return false +end + +local extractShortcuts = function(names, shortcuts) + local foundShortcuts = {}; + + if type(names) ~= "table" then + openspace.printWarning("scene_helper.extractShortcuts invalid paramater names (not Table)") + end + + if type(shortcuts) ~= "table" then + openspace.printWarning("scene_helper.extractShortcuts invalid paramater shortcuts (not Table)") + end + + for _, shortcut in ipairs(shortcuts) do + for _, name in ipairs(names ) do + if (shortcut.Name == name) then + foundShortcuts[#foundShortcuts+1] = shortcut + end + end + end + + return foundShortcuts +end +asset.export("extractShortcuts", extractShortcuts) + +local createKeyBindFromShortcuts = function(key, shortcuts, guipath, title, documentation) + if type(key) ~= "string" then + openspace.printWarning("scene_helper.createKeyBindFromShortcuts invalid paramater key (not String)") + end + + if type(shortcuts) ~= "table" or #shortcuts == 0 then + openspace.printWarning("scene_helper.createKeyBindFromShortcuts invalid paramater shortcuts (not Table or empty)") + end + + -- if type(guipath) ~= "string" then + -- guipath = shortcuts[0].GuiPath + -- end + + local concatTitle = type(title) ~= "string" + local concatDocumentation = type(documentation) ~= "string" + + local keybind = { + Key = key, + Command = "", + Name = name or "", + Documentation = documentation or "", + GuiPath = guipath or "", + Local = false + } + + for _, shortcut in ipairs(shortcuts) do + keybind.Command = keybind.Command .. shortcut.Command + if concatTitle then + keybind.Name = keybind.Name .. "/" .. shortcut.Name + end + if concatDocumentation then + keybind.Documentation = keybind.Documentation .. "," .. shortcut.Documentation + end + + keybind.Local = keybind.Local and shortcut.Local + end + + return keybind +end +asset.export("createKeyBindFromShortcuts", createKeyBindFromShortcuts) diff --git a/data/assets/util/screenshots_endpoint.asset b/data/assets/util/screenshots_endpoint.asset new file mode 100644 index 0000000000..712b0a5a8b --- /dev/null +++ b/data/assets/util/screenshots_endpoint.asset @@ -0,0 +1,21 @@ +asset.onInitialize(function () + -- Disable the server, add production gui endpoint, and restart server. + -- The temporary disabling avoids restarting the server on each property change. + -- TODO: Add a trigger property to the module to restart the server "manually" + -- and remove automatic restart on each property change, + -- since frequent restarting seems to be unstable on mac. + + local enabled = openspace.getPropertyValue("Modules.WebGui.ServerProcessEnabled") + openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", false) + + local directories = openspace.getPropertyValue("Modules.WebGui.Directories") + directories[#directories + 1] = "screenshots" + directories[#directories + 1] = "${SCREENSHOTS}" + openspace.setPropertyValueSingle("Modules.WebGui.Directories", directories) + openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", enabled) +end) + +asset.onDeinitialize(function () + -- TODO: Remove endpoints. As of 2019-10-29, OpenSpace sometimes + -- crashes when endpoints are removed while the application is closing. +end) \ No newline at end of file diff --git a/data/assets/util/static_server.asset b/data/assets/util/static_server.asset new file mode 100644 index 0000000000..94759f5936 --- /dev/null +++ b/data/assets/util/static_server.asset @@ -0,0 +1,21 @@ +local backendHash = "7ca0a34e9c4c065b7bfad0623db0e322bf3e0af9" +local dataProvider = "data.openspaceproject.com/files/webgui" + +local backend = asset.syncedResource({ + Identifier = "WebGuiBackend", + Name = "Web Gui Backend", + Type = "UrlSynchronization", + Url = dataProvider .. "/backend/" .. backendHash .. "/backend.zip" +}) + +asset.onInitialize(function () + -- Unzip the server bundle + dest = backend .. "/backend" + if not openspace.directoryExists(dest) then + openspace.unzipFile(backend .. "/backend.zip", dest, true) + end + + openspace.setPropertyValueSingle( + "Modules.WebGui.ServerProcessEntryPoint", backend .. "/backend/backend.js" + ) +end) \ No newline at end of file diff --git a/data/assets/util/testing_keybindings.asset b/data/assets/util/testing_keybindings.asset new file mode 100644 index 0000000000..e902f34c37 --- /dev/null +++ b/data/assets/util/testing_keybindings.asset @@ -0,0 +1,23 @@ +--testing_keybindings.asset + +local sceneHelper = asset.require('./scene_helper') +local propertyHelper = asset.require('./property_helper') + +local Keybindings = { + { + Key = "F7", + Name = "Take Screenshot", + Command = "openspace.takeScreenshot()", + Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory.", + GuiPath = "/Rendering", + Local = true + } +} + +asset.onInitialize(function() + Keys = sceneHelper.bindKeys(Keybindings) +end) + +asset.onDeinitialize(function () + sceneHelper.unbindKeys(Keybindings) +end) diff --git a/data/assets/util/tle_helper.asset b/data/assets/util/tle_helper.asset new file mode 100644 index 0000000000..c87a21b231 --- /dev/null +++ b/data/assets/util/tle_helper.asset @@ -0,0 +1,112 @@ +local transforms = asset.require('scene/solarsystem/planets/earth/transforms') +local assetHelper = asset.require('util/asset_helper') + +function downloadTLEFile(sceneAsset, url, name, filename) + local identifier = name + identifier = identifier:gsub(" ", "") + identifier = identifier:gsub("&", "") + identifier = identifier:gsub("-", "") + + local urlSyncTable = { + Name = "Satellite TLE Data (" .. name .. ")", + Type = "UrlSynchronization", + Identifier = "satellite_tle_data_" .. identifier, + Url = url, + Override = true + } + + if (filename ~= '') then + urlSyncTable.Filename = filename + end + + return sceneAsset.syncedResource(urlSyncTable) +end + +-- Check format of a set of 3 TLE file lines and return nonzero if there is a format error +function isValidTLEFileFormat(lineArr) + function isEmpty(s) return s == nil or s == '' end + + if isEmpty(lineArr[1]) or isEmpty(lineArr[2]) or isEmpty(lineArr[3]) then + return false + end + if string.sub(lineArr[2], 1, 2) ~= "1 " then + return false + end + if string.sub(lineArr[3], 1, 2) ~= "2 " then + return false + end + return true +end + +local makeSingleLineElement = function(tle, filename) + local path = tle .. "/" .. filename + local file = io.open(path, "r") + assert(file, "File not found: " .. path) + + local line = { + file:read('*l'), --title line + file:read('*l'), + file:read('*l') + } + + assert(isValidTLEFileFormat(line), "TLE file syntax error on line " .. 1 .. ": " .. path) + + -- Trim string + line[1] = line[1]:gsub("^%s*(.-)%s*$", "%1") + line[1] = line[1]:gsub("%s+", "_") + line[1] = line[1]:gsub("[%-()]", "") + --local title = line[1] + + return line +end + +function numLinesInFile(filename) + local ctr = 0 + for _ in io.lines(filename) do ctr = ctr + 1 end + return ctr +end + +local getPeriodFromElement = function(element) + -- Get period from correct location of the string + local per = tonumber(string.sub(element[3], 53, 63)) + -- Trail for 2x a single revolution + per = 1.0 / per + + return per +end + +function satellites(title, file, color, group) + return { + Identifier = title, + Parent = transforms.EarthInertial.Identifier, + Renderable = { + Type = "RenderableSatellites", + Path = file, + SegmentQuality = 3, + Color = color, + Fade = 1.5, + RenderBinMode = "PostDeferredTransparent" + }, + Tag = { "earth_satellites" }, + GUI = { + Path = "/Solar System/Planets/Earth/Satellites" + } + } +end + +local registerSatelliteGroupObjects = function(containingAsset, group, tleFolder, shouldAddDuplicates) + local filename = group.Url:match("([^/]+)$") + local filenameSansExt = filename:gsub(filename:match("(%.%w+)$"), "") + + local path = tleFolder .. "/" .. filename + + local SatelliteBatch = satellites(filenameSansExt, path, group.TrailColor, group) + assetHelper.registerSceneGraphNodesAndExport(containingAsset, { SatelliteBatch }) +end + +asset.export("downloadTLEFile", downloadTLEFile) +asset.export("isValidTLEFileFormat", isValidTLEFileFormat) +asset.export("numLinesInFile", numLinesInFile) +asset.export("makeSingleLineElement", makeSingleLineElement) +asset.export("getPeriodFromElement", getPeriodFromElement) +asset.export("registerSatelliteGroupObjects", registerSatelliteGroupObjects) diff --git a/data/assets/util/vrt_flipbook_helper.asset b/data/assets/util/vrt_flipbook_helper.asset new file mode 100644 index 0000000000..144a4d5ce7 --- /dev/null +++ b/data/assets/util/vrt_flipbook_helper.asset @@ -0,0 +1,51 @@ +--vrt_slideshow_helper.asset +local createFlipbook = function (assetPrefix, assetGlobe, count) + return { + AssetPrefix = assetPrefix, + AssetGlobe = assetGlobe, + TotalCount = count, + CurrentFlipIndex = -1, + } +end + +local nextFlipbookPage = function (flipbook) + + if (flipbook.CurrentFlipIndex >= 0) then + local assetSring = flipbook.AssetPrefix .. flipbook.CurrentFlipIndex; + openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", false) + end + + if (flipbook.CurrentFlipIndex < flipbook.TotalCount - 1) then + flipbook.CurrentFlipIndex = flipbook.CurrentFlipIndex + 1; + local assetSring = flipbook.AssetPrefix .. flipbook.CurrentFlipIndex; + openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", true) + end +end + +local previousFlipbookPage = function (flipbook) + + if (localIndex == -1) then + return + end + + local localIndex = flipbook.CurrentFlipIndex; + + local assetSring = flipbook.AssetPrefix .. localIndex; + openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", false) + localIndex = localIndex - 1; + + if (localIndex >= 0 ) then + assetSring = flipbook.AssetPrefix .. localIndex; + openspace.setPropertyValueSingle("Scene." .. flipbook.AssetGlobe .. ".Renderable.Layers.ColorLayers.".. assetSring .. ".Enabled", true) + end + + if (localIndex < -1) then + localIndex = -1 + end + flipbook.CurrentFlipIndex = localIndex; + +end + +asset.export('nextFlipbookPage', nextFlipbookPage) +asset.export('previousFlipbookPage', previousFlipbookPage) +asset.export('createFlipbook', createFlipbook) diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset index bee410ad17..ecdb0faae0 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -1,18 +1,11 @@ +asset.require('./static_server') + local guiCustomization = asset.require('customization/gui') -- Select which commit hashes to use for the frontend and backend -local frontendHash = "abf5fe23ef29af408d6c071057f1cc706c9b09a3" -local backendHash = "6e773425b3e90ba93f0090e44427e474fe5c633f" - +local frontendHash = "e520f14d3fffc915b7b900f4fc6d888070f458c4" local dataProvider = "data.openspaceproject.com/files/webgui" -local backend = asset.syncedResource({ - Identifier = "WebGuiBackend", - Name = "Web Gui Backend", - Type = "UrlSynchronization", - Url = dataProvider .. "/backend/" .. backendHash .. "/backend.zip" -}) - local frontend = asset.syncedResource({ Identifier = "WebGuiFrontend", Name = "Web Gui Frontend", @@ -27,23 +20,22 @@ asset.onInitialize(function () openspace.unzipFile(frontend .. "/frontend.zip", dest, true) end - -- Unzip the frontend bundle - dest = backend .. "/backend" - if not openspace.directoryExists(dest) then - openspace.unzipFile(backend .. "/backend.zip", dest, true) - end + -- Disable the server, add production gui endpoint, and restart server. + -- The temporary disabling avoids restarting the server on each property change. + -- TODO: Add a trigger property to the module to restart the server "manually" + -- and remove automatic restart on each property change, + -- since frequent restarting seems to be unstable on mac. - -- Do not serve the files if we are in webgui development mode. - -- In that case, you have to serve the webgui manually, using `npm start`. - if not guiCustomization.webguiDevelopmentMode then - openspace.setPropertyValueSingle( - "Modules.WebGui.ServerProcessEntryPoint", backend .. "/backend/backend.js" - ) - openspace.setPropertyValueSingle( - "Modules.WebGui.WebDirectory", frontend .. "/frontend" - ) - openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", true) - end + local enabled = openspace.getPropertyValue("Modules.WebGui.ServerProcessEnabled") + openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", false) + + local directories = openspace.getPropertyValue("Modules.WebGui.Directories") + directories[#directories + 1] = "frontend" + directories[#directories + 1] = frontend .. '/frontend' + + openspace.setPropertyValueSingle("Modules.WebGui.Directories", directories) + openspace.setPropertyValueSingle("Modules.WebGui.DefaultEndpoint", "frontend") + openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", enabled) -- The GUI contains date and simulation increment, -- so let's remove these from the dashboard. @@ -54,5 +46,49 @@ asset.onInitialize(function () end) asset.onDeinitialize(function () - openspace.setPropertyValueSingle("Modules.WebGui.ServerProcessEnabled", false) + -- Remove the frontend endpoint + local directories = openspace.getPropertyValue("Modules.WebGui.Directories") + local newDirectories = {}; + + -- @TODO(maci, 2019-08-23) see message below + --openspace.setPropertyValueSingle("Modules.WebGui.DefaultEndpoint", "") + + for i = 0, #directories, 2 do + -- @TODO(abock, 2019-08-20) The explicit check for directories[i] is a workaround + -- for an error that was otherwise thrown when directories[i] was nil + if (directories[i] and string.find(directories[i], "frontend") == nil) then + newDirectories[#newDirectories + 1] = directories[i] + newDirectories[#newDirectories + 1] = directories[i + 1] + end + end + -- @TODO(maci, 2019-08-23) setting this value on exit was causing the server to restart + -- on macos, which in turn, stopped the application from exiting. + -- need to address in webguimodule.cpp + --openspace.setPropertyValueSingle("Modules.WebGui.Directories", newDirectories) end) + +function setCefRoute(route) + local port = 4680 + -- As a developer, you can manually serve the webgui from port 4690 + -- with the command `npm start` in the web gui repository + if guiCustomization.webguiDevelopmentMode then + port = 4690 + end + openspace.setPropertyValueSingle( + "Modules.CefWebGui.GuiUrl", + "http://127.0.0.1:" .. port .. "/frontend/#/" .. route + ) +end + + +asset.export("setCefRoute", setCefRoute) + + +asset.meta = { + Name = "WebGUI", + Version = "0.1", + Description = [[ insert CEF rant ]], + Author = "OpenSpace Team", + URL = "http://openspaceproject.com", + License = "MIT license" +} diff --git a/data/assets/voyager.scene b/data/assets/voyager.scene deleted file mode 100644 index c9f274aed1..0000000000 --- a/data/assets/voyager.scene +++ /dev/null @@ -1,85 +0,0 @@ -local assetHelper = asset.require('util/asset_helper') -local sceneHelper = asset.require('util/scene_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.require('scene/solarsystem/planets') -asset.require('scene/solarsystem/planets/jupiter/minor_moons') -asset.require('scene/solarsystem/planets/saturn/minor_moons') -asset.require('scene/solarsystem/planets/uranus/minor_moons') -asset.require('scene/solarsystem/planets/neptune/inner_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_prograde_moons') -asset.require('scene/solarsystem/planets/neptune/irregular_retrograde_moons') -asset.request('scene/digitaluniverse/stars') -asset.request('scene/digitaluniverse/milkyway') -asset.require('scene/solarsystem/missions/voyager/voyager1') -asset.require('scene/solarsystem/missions/voyager/voyager2') - --- Load default key bindings applicable to most scenes -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') -asset.require('util/default_joystick') - -asset.require('util/webgui') - -local VoyagerAsset = asset.require('scene/solarsystem/missions/voyager/voyager1') - -assetHelper.registerDashboardItems(asset, { - { - Type = "DashboardItemDistance", - Identifier = "Voyager1Distance", - GuiName = "Voyager 1 - Earth Distance", - SourceType = "Node", - SourceNodeName = "Voyager_1", - DestinationType = "Node", - DestinationNodeName = "Earth" - }, - { - Type = "DashboardItemDistance", - Identifier = "Voyager2Distance", - GuiName = "Voyager 2 - Earth Distance", - SourceType = "Node", - SourceNodeName = "Voyager_2", - DestinationType = "Node", - DestinationNodeName = "Earth" - } -}) - -asset.onInitialize(function () - openspace.time.setTime("1977 SEP 10 12:00:00") - - openspace.setDefaultGuiSorting() - - sceneHelper.setDeltaTimeKeys({ - 1, 5, 10, 20, 40, 90, 360, 720, 2880, 14400, - 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600 - }) - - openspace.markInterestingNodes({ - "Earth", "Voyager 1", "Voyager 2", "Jupiter", "Saturn", "Uranus", "Neptune" - }) - - openspace.addVirtualProperty( - "BoolProperty", - "Show Trails", - "*Trail.Renderable.Enabled", - "Disable or enable all trails of the scene at the same time", - true, - nil, - nil - ) - - openspace.navigation.setCameraState({ - Focus = VoyagerAsset.Voyager_1.Identifier, - Position = { 526781518487.171326, 257168309890.072144, -1381125204152.817383 }, - Rotation = { -0.106166, 0.981574, -0.084545, 0.134513 }, - }) -end) - -asset.onDeinitialize(function () - openspace.removeVirtualProperty("*Trail.Renderable.Enabled") - openspace.removeInterestingNodes({ - "Earth", "Voyager 1", "Voyager 2", "Jupiter", "Saturn", "Uranus", "Neptune" - }) -end) diff --git a/data/openspace-icon.png b/data/openspace-icon.png new file mode 100644 index 0000000000..ff29eb7f07 Binary files /dev/null and b/data/openspace-icon.png differ diff --git a/data/profiles/apollo8.profile b/data/profiles/apollo8.profile new file mode 100644 index 0000000000..e4cf732215 --- /dev/null +++ b/data/profiles/apollo8.profile @@ -0,0 +1,36 @@ +#Version +1.0 + +#Asset +util/property_helper propertyHelper +base +scene/solarsystem/planets/earth/moon/moon +scene/solarsystem/missions/apollo/8/apollo8 +scene/solarsystem/planets/earth/earth earthAsset + +#Property +setPropertyValueSingle NavigationHandler.OrbitalNavigator.MinimumAllowedDistance 0.000000 + +#Keybinding +E Jump to right before the earthrise photo Set Earthrise time /Missions/Apollo/8 false "openspace.time.setPause(true); openspace.time.setDeltaTime(1); openspace.time.setTime('1968 DEC 24 16:37:31'); openspace.navigation.setNavigationState({Anchor = 'Apollo8', Position = { 1.494592E1, 3.236777E1, -4.171296E1 }, ReferenceFrame = 'Root', Up = { 0.960608E0, -0.212013E0, 0.179675E0 }}); openspace.setPropertyValue('*Trail.Renderable.Enabled', false)" +U Jump to time right before Apollo 8 liftoff, with its trail enabled Set Apollo 8 launch time /Missions/Apollo/8 false "openspace.time.setTime('1968-12-21T12:51:37.00'); openspace.setPropertyValueSingle('Scene.Apollo8LaunchTrail.Renderable.Enabled', true)" +K Toggles Moon Kaguya color layer Toggle Kaguya layer on the Moon /Missions/Apollo false propertyHelper.invert('Scene.Moon.Renderable.Layers.ColorLayers.Kaguya_Utah.Enabled') +T Toggles the trails of the Apollo 8 orbits, focused around the Moon Toggle Apollo 8 orbits /Missions/Apollo/8 false propertyHelper.invert('Scene.Apollo8MoonTrail.Renderable.Enabled') +SHIFT+T Toggles the trails of the Apollo 8 Launch, focused around the Earth Toggle Apollo 8 launch trail /Missions/Apollo/8 false propertyHelper.invert('Scene.Apollo8LaunchTrail.Renderable.Enabled') +CTRL+T Toggles the trails of the full Apollo 8, with Earth's frame of reference Toggles Apollo 8 full trail /Missions/Apollo/8 false propertyHelper.invert('Scene.Apollo8EarthBarycenterTrail.Renderable.Enabled') +S Toggles shading for the Moon Toggle Moon shading /Missions/Apollo false propertyHelper.invert('Scene.Moon.Renderable.PerformShading') +PAGE_UP Set camera focus to Apollo 8 Focus on Apollo 8 /Missions/Apollo/8 false "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo8'); openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +PAGE_DOWN Set camera focus to the Moon Focus on Moon /Missions/Apollo false "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Moon'); openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +HOME Set camera focus to the Earth Focus on Earth /Missions/Apollo false "openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.Anchor', 'Earth'); openspace.setPropertyValueSingle('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" + +#Time +absolute 1968-12-21T12:51:51.0 + +#Camera +goToGeo earthAsset.Earth.Identifier 20 -60 15000000 + +#MarkNodes +Earth +Moon +Apollo8 +Apollo8Launch diff --git a/data/profiles/apollo_sites.profile b/data/profiles/apollo_sites.profile new file mode 100644 index 0000000000..20cad5733f --- /dev/null +++ b/data/profiles/apollo_sites.profile @@ -0,0 +1,35 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/earth/moon/moon moonAsset +scene/solarsystem/missions/apollo/8/apollo8 +scene/solarsystem/missions/apollo/11/apollo11 +scene/solarsystem/missions/apollo/17/lem +scene/solarsystem/missions/apollo/apollo_globebrowsing +scene/solarsystem/missions/apollo/11/lem_flipbook +scene/solarsystem/missions/apollo/insignias_map + +#Property +setPropertyValueSingle Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode 0 +setPropertyValueSingle Scene.Moon.Renderable.PerformShading false + +#Keybinding +m Focus on Moon Focus on Moon /Missions/Apollo false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Moon'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil);" +F9 Disable apollo site on moon when switching Disable Apollo site /Missions/Apollo false "openspace.setPropertyValue('Scene.Moon.Renderable.Layers.ColorLayers.A17_*.Enabled', false); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', false); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', false); openspace.setPropertyValueSingle('Scene.Apollo11MoonTrail.Renderable.Enabled', false); openspace.setPropertyValueSingle('Scene.Apollo11LemTrail.Renderable.Enabled', false); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', false);" +F11 Setup for A11 site Setup A11 site /Missions/Apollo/11 false "openspace.time.setTime('1969 JUL 20 20:17:40'); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_11.Enabled', true); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A11_M177481212_p_longlat.Enabled', true); openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.11); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo11LemPosition'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil); openspace.setPropertyValueSingle('Scene.Apollo11MoonTrail.Renderable.Enabled', true); openspace.setPropertyValueSingle('Scene.Apollo11LemTrail.Renderable.Enabled', true);" +F7 Setup for A17 site Setup A17 site /Missions/Apollo/17 false "openspace.time.setTime('1972 DEC 12 19:47:11'); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.BlendMode', 0.000000); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_travmap.Enabled', true); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.HeightLayers.LRO_NAC_Apollo_17.Enabled', true); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.Enabled', true); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_LEM.BlendMode', 0.000000); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.Enabled', true); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_NAC_Alt_p.BlendMode', 0.000000); openspace.setPropertyValueSingle('Scene.Moon.Renderable.LodScaleFactor', 20.17); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Apollo17LemModel'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil); openspace.setPropertyValueSingle('Scene.Moon.Renderable.Layers.ColorLayers.A17_station7.BlendMode', 0.000000);" + +#Time +absolute 1972 DEC 12 19:47:11 + +#Camera +goToGeo moonAsset.Moon.Identifier 20 -60 15000000 + +#MarkNodes +Moon +Apollo11LemModel +Apollo17LemModel +Apollo11 +Apollo11LunarLander diff --git a/data/profiles/asteroids.profile b/data/profiles/asteroids.profile new file mode 100644 index 0000000000..51d49e7866 --- /dev/null +++ b/data/profiles/asteroids.profile @@ -0,0 +1,34 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/earth/earth earthAsset +scene/solarsystem/sssb/amor_asteroid +scene/solarsystem/sssb/apollo_asteroid +scene/solarsystem/sssb/aten_asteroid +scene/solarsystem/sssb/atira_asteroid +scene/solarsystem/sssb/centaur_asteroid +scene/solarsystem/sssb/chiron-type_comet +scene/solarsystem/sssb/encke-type_comet +scene/solarsystem/sssb/halley-type_comet +scene/solarsystem/sssb/inner_main_belt_asteroid +scene/solarsystem/sssb/jupiter_trojan_asteroid +scene/solarsystem/sssb/jupiter-family_comet +scene/solarsystem/sssb/main_belt_asteroid +scene/solarsystem/sssb/mars-crossing_asteroid +scene/solarsystem/sssb/outer_main_belt_asteroid +scene/solarsystem/sssb/transneptunian_object_asteroid +scene/solarsystem/sssb/pha + +#Time +relative -1d + +#Camera +goToGeo earthAsset.Earth.Identifier 58.5877 16.1924 2.7e12 + +#MarkNodes +Earth +Mars +Moon +Sun diff --git a/data/profiles/dawn.profile b/data/profiles/dawn.profile new file mode 100644 index 0000000000..d61491cc3f --- /dev/null +++ b/data/profiles/dawn.profile @@ -0,0 +1,19 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/missions/dawn/ceres +scene/solarsystem/missions/dawn/dawn DawnAsset +scene/solarsystem/missions/dawn/vesta + +#Time +absolute 2011 AUG 06 00:00:00 + +#Camera +setNavigationState DawnAsset.Dawn.Identifier 526781518487.171326, 257168309890.072144, -1381125204152.817383 + +#MarkNodes +Dawn +Ceres +Vesta diff --git a/data/profiles/default.profile b/data/profiles/default.profile new file mode 100644 index 0000000000..cedf4ad6d7 --- /dev/null +++ b/data/profiles/default.profile @@ -0,0 +1,22 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/earth/earth earthAsset +scene/solarsystem/planets/earth/satellites/satellites + +#Property +setPropertyValue {earth_satellites}.Renderable.Enabled false + +#Time +relative -1d + +#Camera +goToGeo earthAsset.Earth.Identifier 58.5877 16.1924 20000000 + +#MarkNodes +Earth +Mars +Moon +Sun diff --git a/data/profiles/default_full.profile b/data/profiles/default_full.profile new file mode 100644 index 0000000000..6e0644ddde --- /dev/null +++ b/data/profiles/default_full.profile @@ -0,0 +1,28 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/earth/earth +scene/solarsystem/planets/earth/satellites/satellites +scene/solarsystem/planets/jupiter/minor_moons +scene/solarsystem/planets/saturn/minor_moons +scene/solarsystem/planets/uranus/minor_moons +scene/solarsystem/planets/neptune/inner_moons +scene/solarsystem/planets/neptune/irregular_prograde_moons +scene/solarsystem/planets/neptune/irregular_retrograde_moons + +#Property +setPropertyValue {earth_satellites}.Renderable.Enabled false + +#Time +relative -1d + +#Camera +goToGeo "Earth" 58.5877 16.1924 20000000 + +#MarkNodes +Earth +Mars +Moon +Sun diff --git a/data/profiles/gaia.profile b/data/profiles/gaia.profile new file mode 100644 index 0000000000..9b123c9933 --- /dev/null +++ b/data/profiles/gaia.profile @@ -0,0 +1,24 @@ +#Version +1.0 + +#Module +Gaia openspace.printFatal('Could not load gaia profile due to missing module "gaia"') + +#Asset +base +scene/solarsystem/planets/earth/earth +scene/milkyway/gaia/gaiastars +scene/milkyway/gaia/apogee +scene/milkyway/gaia/galah +scene/solarsystem/missions/gaia/gaia +scene/solarsystem/missions/gaia/trail +scene/solarsystem/missions/gaia/dashboard + +#Property +setPropertyValueSingle Scene.Stars.Renderable.Enabled false + +#Camera +setNavigationState "Earth" 1000000000000.0, 1000000000000.0, 1000000000000.0 + +#MarkNodes +Gaia diff --git a/data/profiles/insight.profile b/data/profiles/insight.profile new file mode 100644 index 0000000000..8367730f5e --- /dev/null +++ b/data/profiles/insight.profile @@ -0,0 +1,30 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/missions/insight/edl insightAsset + +#Property +setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false +setPropertyValueSingle Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset -469.300000 +setPropertyValueSingle Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset -470.800006 +setPropertyValueSingle Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled true +setPropertyValueSingle Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Multiplier 2.81690 +setPropertyValueSingle Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Settings.Gamma 0.938970 +setPropertyValueSingle Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Gamma 2.394370 +setPropertyValueSingle Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled true + + +#Keybinding +i Setup Insight landing layers Setup Insight layers /Missions/Insight false "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', -469.300000); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', -470.800006); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Enabled', true); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', true); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Multiplier', 2.816900); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Settings.Gamma', 0.938970); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Gamma', 2.394370); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', true);" +SHIFT+i Undo Insight landing layers setup Unset Insight layers /Missions/Insight false "openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.Mola_Utah.Settings.Offset', 0); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Settings.Offset', 0); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.insight_ctx.Enabled', false); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.HeightLayers.OnMarsHiRISELS.Enabled', false); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Enabled', false); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Multiplier', 1.0); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.OnMarsHiRISELS.Settings.Gamma', 1.0); openspace.setPropertyValueSingle('Scene.Mars.Renderable.Layers.ColorLayers.MOC_WA_Color_Utah.Settings.Gamma', 1.0);" + +#Time +absolute 2018 NOV 26 19:39:03.68 + +#Camera +setNavigationState insightAsset.Insight.Identifier "Root" 8.430115E0, -1.791710E1, 2.813660E0 0.494659E0,0.357162E0,0.792306E0 + +#MarkNodes +Insight diff --git a/data/profiles/juno.profile b/data/profiles/juno.profile new file mode 100644 index 0000000000..e1d1a021d5 --- /dev/null +++ b/data/profiles/juno.profile @@ -0,0 +1,38 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/missions/juno/juno junoAsset + +#Keybinding +1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" +2 Setting the simulation speed to 5 seconds per realtime second Set sim speed 5 /Simulation Speed false "openspace.time.interpolateDeltaTime(5)" +3 Setting the simulation speed to 10 seconds per realtime second Set sim speed 10 /Simulation Speed false "openspace.time.interpolateDeltaTime(10)" +4 Setting the simulation speed to 20 seconds per realtime second Set sim speed 20 /Simulation Speed false "openspace.time.interpolateDeltaTime(20)" +5 Setting the simulation speed to 40 seconds per realtime second Set sim speed 40 /Simulation Speed false "openspace.time.interpolateDeltaTime(40)" +6 Setting the simulation speed to 90 seconds per realtime second Set sim speed 90 /Simulation Speed false "openspace.time.interpolateDeltaTime(90)" +7 Setting the simulation speed to 360 seconds per realtime second Set sim speed 360 /Simulation Speed false "openspace.time.interpolateDeltaTime(360)" +8 Setting the simulation speed to 720 seconds per realtime second Set sim speed 720 /Simulation Speed false "openspace.time.interpolateDeltaTime(720)" +9 Setting the simulation speed to 2880 seconds per realtime second Set sim speed 2880 /Simulation Speed false "openspace.time.interpolateDeltaTime(2880)" +0 Setting the simulation speed to 14400 seconds per realtime second Set sim speed 14400 /Simulation Speed false "openspace.time.interpolateDeltaTime(14400)" +Shift+1 Setting the simulation speed to 28800 seconds per realtime second Set sim speed 28800 /Simulation Speed false "openspace.time.interpolateDeltaTime(28800)" +Shift+2 Setting the simulation speed to 57600 seconds per realtime second Set sim speed 57600 /Simulation Speed false "openspace.time.interpolateDeltaTime(57600)" +Shift+3 Setting the simulation speed to 115200 seconds per realtime second Set sim speed 115200 /Simulation Speed false "openspace.time.interpolateDeltaTime(115200)" +Shift+4 Setting the simulation speed to 230400 seconds per realtime second Set sim speed 230400 /Simulation Speed false "openspace.time.interpolateDeltaTime(230400)" +Shift+5 Setting the simulation speed to 460800 seconds per realtime second Set sim speed 460800 /Simulation Speed false "openspace.time.interpolateDeltaTime(460800)" +Shift+6 Setting the simulation speed to 921600 seconds per realtime second Set sim speed 921600 /Simulation Speed false "openspace.time.interpolateDeltaTime(921600)" +Shift+7 Setting the simulation speed to 1843200 seconds per realtime second Set sim speed 1843200 /Simulation Speed false "openspace.time.interpolateDeltaTime(1843200)" +Shift+8 Setting the simulation speed to 3686400 seconds per realtime second Set sim speed 3686400 /Simulation Speed false "openspace.time.interpolateDeltaTime(3686400)" +Shift+9 Setting the simulation speed to 7372800 seconds per realtime second Set sim speed 7372800 /Simulation Speed false "openspace.time.interpolateDeltaTime(7372800)" +Shift+0 Setting the simulation speed to 14745600 seconds per realtime second Set sim speed 14745600 /Simulation Speed false "openspace.time.interpolateDeltaTime(14745600)" + +#Time +absolute 2016-07-01T10:05:00.00 + +#Camera +setNavigationState junoAsset.Juno.Identifier "Root" 1.243398E8, 7.176068E7, -1.519733E7 -0.377400E0, 0.764573E0, 0.522492E0 + +#MarkNodes +Jupiter +Juno diff --git a/data/profiles/mars.profile b/data/profiles/mars.profile new file mode 100644 index 0000000000..bcd26230b8 --- /dev/null +++ b/data/profiles/mars.profile @@ -0,0 +1,25 @@ +#Version +1.0 + +#Asset +util/scene_helper sceneHelper +base +scene/solarsystem/missions/perseverance/perseverance +scene/solarsystem/missions/perseverance/shortcuts perseveranceShortcuts +scene/solarsystem/missions/insight/edl insightAsset +scene/solarsystem/missions/insight/shortcuts insightShortcuts + +#Camera +goToGeo "Mars" 58.5877 16.1924 8000000 + +#MarkNodes +Mars +Insight +Perseverance + +#AdditionalScripts +local insightEDLShortcuts = sceneHelper.extractShortcuts({"Insight Height Offset", "Enable HiRISE", "Insight EDL Time", "Insight EDL NavigationState"}, insightShortcuts.Shortcuts) +local insightDisableShortcuts = sceneHelper.extractShortcuts({"Default Height Offset", "Disable HiRISE"}, insightShortcuts.Shortcuts) +local PerseverenceLandedShortcuts = sceneHelper.extractShortcuts({"Perseverance Height Offset", "Perseverance landed time", "Enable HiRISE"}, perseveranceShortcuts.Shortcuts) +local Keybindings = { sceneHelper.createKeyBindFromShortcuts("i", insightEDLShortcuts, "/Missions/Insight", "Set and goto Insight Landing", "Setup scene for insight EDL" ), sceneHelper.createKeyBindFromShortcuts("SHIFT+i", insightDisableShortcuts, "/Missions/Insight", "Unset Insight Landing", "Disable Mars layer settings used for insight EDL" ), sceneHelper.createKeyBindFromShortcuts("p", PerseverenceLandedShortcuts, "/Missions/Perseverance" )} +sceneHelper.bindKeys(Keybindings) diff --git a/data/profiles/messenger.profile b/data/profiles/messenger.profile new file mode 100644 index 0000000000..bdbb7d2722 --- /dev/null +++ b/data/profiles/messenger.profile @@ -0,0 +1,43 @@ +#Version +1.0 + +#Module +Volume asset.require('scene/solarsystem/missions/messenger/mercurymagnetosphere') openspace.printWarning("Volume module is not loaded, skipping asset: mercurymagnetosphere") + +#Asset +base +scene/solarsystem/missions/messenger/dashboard +scene/solarsystem/missions/messenger/messengerSC + +#Keybinding +1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" +2 Setting the simulation speed to 5 seconds per realtime second Set sim speed 5 /Simulation Speed false "openspace.time.interpolateDeltaTime(5)" +3 Setting the simulation speed to 10 seconds per realtime second Set sim speed 10 /Simulation Speed false "openspace.time.interpolateDeltaTime(10)" +4 Setting the simulation speed to 20 seconds per realtime second Set sim speed 20 /Simulation Speed false "openspace.time.interpolateDeltaTime(20)" +5 Setting the simulation speed to 40 seconds per realtime second Set sim speed 40 /Simulation Speed false "openspace.time.interpolateDeltaTime(40)" +6 Setting the simulation speed to 90 seconds per realtime second Set sim speed 90 /Simulation Speed false "openspace.time.interpolateDeltaTime(90)" +7 Setting the simulation speed to 360 seconds per realtime second Set sim speed 360 /Simulation Speed false "openspace.time.interpolateDeltaTime(360)" +8 Setting the simulation speed to 720 seconds per realtime second Set sim speed 720 /Simulation Speed false "openspace.time.interpolateDeltaTime(720)" +9 Setting the simulation speed to 2880 seconds per realtime second Set sim speed 2880 /Simulation Speed false "openspace.time.interpolateDeltaTime(2880)" +0 Setting the simulation speed to 14400 seconds per realtime second Set sim speed 14400 /Simulation Speed false "openspace.time.interpolateDeltaTime(14400)" +Shift+1 Setting the simulation speed to 28800 seconds per realtime second Set sim speed 28800 /Simulation Speed false "openspace.time.interpolateDeltaTime(28800)" +Shift+2 Setting the simulation speed to 57600 seconds per realtime second Set sim speed 57600 /Simulation Speed false "openspace.time.interpolateDeltaTime(57600)" +Shift+3 Setting the simulation speed to 115200 seconds per realtime second Set sim speed 115200 /Simulation Speed false "openspace.time.interpolateDeltaTime(115200)" +Shift+4 Setting the simulation speed to 230400 seconds per realtime second Set sim speed 230400 /Simulation Speed false "openspace.time.interpolateDeltaTime(230400)" +Shift+5 Setting the simulation speed to 460800 seconds per realtime second Set sim speed 460800 /Simulation Speed false "openspace.time.interpolateDeltaTime(460800)" +Shift+6 Setting the simulation speed to 921600 seconds per realtime second Set sim speed 921600 /Simulation Speed false "openspace.time.interpolateDeltaTime(921600)" +Shift+7 Setting the simulation speed to 1843200 seconds per realtime second Set sim speed 1843200 /Simulation Speed false "openspace.time.interpolateDeltaTime(1843200)" +Shift+8 Setting the simulation speed to 3686400 seconds per realtime second Set sim speed 3686400 /Simulation Speed false "openspace.time.interpolateDeltaTime(3686400)" +Shift+9 Setting the simulation speed to 7372800 seconds per realtime second Set sim speed 7372800 /Simulation Speed false "openspace.time.interpolateDeltaTime(7372800)" +Shift+0 Setting the simulation speed to 14745600 seconds per realtime second Set sim speed 14745600 /Simulation Speed false "openspace.time.interpolateDeltaTime(14745600)" + +#Time +absolute 2011 MAY 13 00:05:18 + +#Camera +setNavigationState "Mercury" "Root" 2.423690E11, 1.979038E11, -2.241483E10 -0.492046E0, 0.666088E0, 0.560551E0 + +#MarkNodes +Mercury +Messenger +Sun diff --git a/data/profiles/newhorizons.profile b/data/profiles/newhorizons.profile new file mode 100644 index 0000000000..f7be9639a7 --- /dev/null +++ b/data/profiles/newhorizons.profile @@ -0,0 +1,64 @@ +#Version +1.0 + +#Asset +util/property_helper propertyHelper +util/renderable_helper renderableHelper +base +scene/solarsystem/missions/newhorizons/newhorizons +scene/solarsystem/missions/newhorizons/model +scene/solarsystem/missions/newhorizons/dashboard + +#Property +setPropertyValueSingle NavigationHandler.OrbitalNavigator.FollowAnchorNodeRotationDistance 20.000000 +setPropertyValueSingle Scene.Pluto.Renderable.Enabled false +setPropertyValueSingle Scene.Charon.Renderable.Enabled false +setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false + +#Keybinding +a Sets the focus of the camera on 'NewHorizons'. Focus on New Horizons /New Horizons false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +SHIFT+a Sets the focus of the camera on 'NewHorizons'. Anchor at New Horizons, Aim at Pluto /New Horizons false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'NewHorizons');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', 'Pluto');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +s Sets the focus of the camera on 'Pluto' Focus on Pluto /New Horizons false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Pluto') ;openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +d Sets the focus of the camera on 'Charon'. Focus on New Charon /New Horizons false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Charon');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', '');openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +F7 Toggles New Horizons image projection. Toggle NH Image Projection /New Horizons false [[local enabled = openspace.getPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.PerformProjection'); openspace.setPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.PerformProjection', not enabled); openspace.setPropertyValue('Scene.CharonProjection.Renderable.ProjectionComponent.PerformProjection', not enabled)]] +F8 Removes all image projections from Pluto and Charon. Clear image projections /New Horizons false "openspace.setPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.ClearAllProjections', true); openspace.setPropertyValue('Scene.CharonProjection.Renderable.ProjectionComponent.ClearAllProjections', true)" +F9 Jumps to the 14th of July 2015 at 0900 UTC and clears all projections. Reset time and projections /New Horizons false "openspace.time.setTime('2015-07-14T09:00:00.00');openspace.setPropertyValue('Scene.PlutoProjection.Renderable.ProjectionComponent.ClearAllProjections', true);openspace.setPropertyValue('Scene.CharonProjection.Renderable.ProjectionComponent.ClearAllProjections', true)" +KP_8 Increases the height map exaggeration on Pluto. Pluto HeightExaggeration + /New Horizons false propertyHelper.increment('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000) +CTRL+I Increases the height map exaggeration on Pluto. Pluto HeightExaggeration + /New Horizons false propertyHelper.increment('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000) +KP_2 Decreases the height map exaggeration on Pluto. Pluto HeightExaggeration - /New Horizons false propertyHelper.decrement('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000) +CTRL+K Decreases the height map exaggeration on Pluto. Pluto HeightExaggeration - /New Horizons false propertyHelper.decrement('Scene.PlutoProjection.Renderable.HeightExaggeration', 5000) +KP_9 Increases the height map exaggeration on Charon. Charon HeightExaggeration + /New Horizons false propertyHelper.increment('Scene.CharonProjection.Renderable.HeightExaggeration', 5000) +CTRL+O Increases the height map exaggeration on Charon. Charon HeightExaggeration + /New Horizons false propertyHelper.increment('Scene.CharonProjection.Renderable.HeightExaggeration', 5000) +KP_3 Decreases the height map exaggeration on Charon. Charon HeightExaggeration - /New Horizons false propertyHelper.decrement('Scene.CharonProjection.Renderable.HeightExaggeration', 5000) +CTRL+L Decreases the height map exaggeration on Charon. Charon HeightExaggeration - /New Horizons false propertyHelper.decrement('Scene.CharonProjection.Renderable.HeightExaggeration', 5000) +o Toggles the visibility of the trail behind Pluto. Toggle Pluto Trail /New Horizons false propertyHelper.invert('Scene.PlutoBarycentricTrail.Renderable.Enabled') +j Toggles the visibility of the text labels of Pluto, Charon, Hydra, Nix, Kerberos, and Styx. Toggle Pluto Labels /New Horizons false renderableHelper.toggle('Scene.PlutoText') .. renderableHelper.toggle('Scene.CharonText') .. renderableHelper.toggle('Scene.HydraText') .. renderableHelper.toggle('Scene.NixText') .. renderableHelper.toggle('Scene.KerberosText') .. renderableHelper.toggle('Scene.StyxText') +l Toggles the visibility of the labels for the New Horizons instruments. Toggle New Horizons Labels /New Horizons false propertyHelper.fadeInOut('Scene.Labels.Renderable.Opacity', 2.0) +m Draws the instrument field of views in a solid color or as lines. Toggle instrument FOVs /New Horizons false propertyHelper.invert('Scene.NH_LORRI.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_LEISA.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN1.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_MVIC_PAN2.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_MVIC_RED.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_MVIC_BLUE.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_MVIC_FT.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_MVIC_METHANE.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_RALPH_MVIC_NIR.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_ALICE_AIRGLOW.Renderable.SolidDraw') .. propertyHelper.invert('Scene.NH_ALICE_SOC.Renderable.SolidDraw') +Shift+t Toggles the visibility of the shadow visualization of Pluto and Charon. Toggle Shadows /New Horizons false renderableHelper.toggle('Scene.PlutoShadow') .. renderableHelper.toggle('Scene.CharonShadow') +t Toggles the trail of New Horizons. Toggle NH Trail /New Horizons false renderableHelper.toggle('Scene.NewHorizonsTrailPluto') +h Disables visibility of the trails Hide Trails /Rendering false "local list = openspace.getProperty('*Trail.Renderable.Enabled'); for _,v in pairs(list) do openspace.setPropertyValueSingle(v, not openspace.getPropertyValue(v)) end" +1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" +2 Setting the simulation speed to 5 seconds per realtime second Set sim speed 5 /Simulation Speed false "openspace.time.interpolateDeltaTime(5)" +3 Setting the simulation speed to 10 seconds per realtime second Set sim speed 10 /Simulation Speed false "openspace.time.interpolateDeltaTime(10)" +4 Setting the simulation speed to 20 seconds per realtime second Set sim speed 20 /Simulation Speed false "openspace.time.interpolateDeltaTime(20)" +5 Setting the simulation speed to 40 seconds per realtime second Set sim speed 40 /Simulation Speed false "openspace.time.interpolateDeltaTime(40)" +6 Setting the simulation speed to 60 seconds per realtime second Set sim speed 60 /Simulation Speed false "openspace.time.interpolateDeltaTime(60)" +7 Setting the simulation speed to 120 seconds per realtime second Set sim speed 120 /Simulation Speed false "openspace.time.interpolateDeltaTime(120)" +8 Setting the simulation speed to 360 seconds per realtime second Set sim speed 360 /Simulation Speed false "openspace.time.interpolateDeltaTime(360)" +9 Setting the simulation speed to 540 seconds per realtime second Set sim speed 540 /Simulation Speed false "openspace.time.interpolateDeltaTime(540)" +0 Setting the simulation speed to 1080 seconds per realtime second Set sim speed 1080 /Simulation Speed false "openspace.time.interpolateDeltaTime(1080)" +Shift+1 Setting the simulation speed to 2160 seconds per realtime second Set sim speed 2160 /Simulation Speed false "openspace.time.interpolateDeltaTime(2160)" +Shift+2 Setting the simulation speed to 4320 seconds per realtime second Set sim speed 4320 /Simulation Speed false "openspace.time.interpolateDeltaTime(4320)" +Shift+3 Setting the simulation speed to 8640 seconds per realtime second Set sim speed 8640 /Simulation Speed false "openspace.time.interpolateDeltaTime(8640)" + +#Time +absolute 2015-07-14T08:00:00.00 + +#Camera +setNavigationState "NewHorizons" "Root" -6.572656E1, -7.239404E1, -2.111890E1 0.102164, -0.362945, 0.926193 + +#MarkNodes +Pluto +NewHorizons +Charon diff --git a/data/profiles/osirisrex.profile b/data/profiles/osirisrex.profile new file mode 100644 index 0000000000..c7b783877e --- /dev/null +++ b/data/profiles/osirisrex.profile @@ -0,0 +1,48 @@ +#Version +1.0 + +#Asset +util/property_helper propertyHelper +base +scene/solarsystem/missions/osirisrex/model OsirisRexAsset +scene/solarsystem/missions/osirisrex/osirisrex +scene/solarsystem/missions/osirisrex/dashboard + +#Property +setPropertyValueSingle NavigationHandler.OrbitalNavigator.FollowAnchorNodeRotationDistance 20.000000 +setPropertyValueSingle Scene.Pluto.Renderable.Enabled false +setPropertyValueSingle Scene.Charon.Renderable.Enabled false +setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false + +#Keybinding +a Sets the focus of the camera on 'OsirisRex' Focus on OsirisRex /Missions/Osiris Rex false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'OsirisRex'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +s Sets the focus of the camera on 'Bennu' Focus on Bennu /Missions/Osiris Rex false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'BennuBarycenter'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +F8 Sets the time to the approach at Bennu Set Bennu approach time /Missions/Osiris Rex false "openspace.printInfo('Set time: Approach'); openspace.time.setTime('2018-SEP-11 21:31:01.183')" +F9 Sets the time to the preliminary survey of Bennu Set Bennu survey time /Missions/Osiris Rex false "openspace.printInfo('Set time: Preliminary Survey'); openspace.time.setTime('2018-NOV-20 01:13:12.183')" +F10 Sets the time to the orbital B event Set orbital B event time /Missions/Osiris Rex false "openspace.printInfo('Set time: Orbital B'); openspace.time.setTime('2019-APR-08 10:35:27.186')" +F11 Sets the time to the recon event Set recon event time /Missions/Osiris Rex false "openspace.printInfo('Set time: Recon'); openspace.time.setTime('2019-MAY-25 03:50:31.195')" +q Toggles the visibility of the text marking the location of the Sun Toggle Sun marker /Missions/Osiris Rex false propertyHelper.invert('Scene.SunMarker.Renderable.Enabled') +1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" +2 Setting the simulation speed to 5 seconds per realtime second Set sim speed 5 /Simulation Speed false "openspace.time.interpolateDeltaTime(5)" +3 Setting the simulation speed to 10 seconds per realtime second Set sim speed 10 /Simulation Speed false "openspace.time.interpolateDeltaTime(10)" +4 Setting the simulation speed to 20 seconds per realtime second Set sim speed 20 /Simulation Speed false "openspace.time.interpolateDeltaTime(20)" +5 Setting the simulation speed to 40 seconds per realtime second Set sim speed 40 /Simulation Speed false "openspace.time.interpolateDeltaTime(40)" +6 Setting the simulation speed to 60 seconds per realtime second Set sim speed 60 /Simulation Speed false "openspace.time.interpolateDeltaTime(60)" +7 Setting the simulation speed to 120 seconds per realtime second Set sim speed 120 /Simulation Speed false "openspace.time.interpolateDeltaTime(120)" +8 Setting the simulation speed to 360 seconds per realtime second Set sim speed 360 /Simulation Speed false "openspace.time.interpolateDeltaTime(360)" +9 Setting the simulation speed to 540 seconds per realtime second Set sim speed 540 /Simulation Speed false "openspace.time.interpolateDeltaTime(540)" +0 Setting the simulation speed to 1080 seconds per realtime second Set sim speed 1080 /Simulation Speed false "openspace.time.interpolateDeltaTime(1080)" +Shift+1 Setting the simulation speed to 2160 seconds per realtime second Set sim speed 2160 /Simulation Speed false "openspace.time.interpolateDeltaTime(2160)" +Shift+2 Setting the simulation speed to 4320 seconds per realtime second Set sim speed 4320 /Simulation Speed false "openspace.time.interpolateDeltaTime(4320)" +Shift+3 Setting the simulation speed to 8640 seconds per realtime second Set sim speed 8640 /Simulation Speed false "openspace.time.interpolateDeltaTime(8640)" + +#Time +absolute 2018 10 30 23:00:00.500 + +#Camera +setNavigationState OsirisRexAsset.OsirisRex.Identifier 26974590199.661884, 76314608558.908020, -127086452897.101791 + +#MarkNodes +OsirisRex +BennuBarycenter +Earth diff --git a/data/profiles/rosetta.profile b/data/profiles/rosetta.profile new file mode 100644 index 0000000000..dd27b61191 --- /dev/null +++ b/data/profiles/rosetta.profile @@ -0,0 +1,39 @@ +#Version +1.0 + +#Module +Volume asset.require('scene/solarsystem/missions/messenger/mercurymagnetosphere') openspace.printWarning("Volume module is not loaded, skipping asset: mercurymagnetosphere") + +#Asset +util/property_helper propertyHelper +util/renderable_helper renderableHelper +base +scene/solarsystem/missions/rosetta/67p Comet67PAsset +scene/solarsystem/missions/rosetta/rosetta +scene/solarsystem/missions/rosetta/dashboard + +#Property +setPropertyValue Scene.67P.Renderable.PerformShading false +setPropertyValue Scene.ImagePlaneRosetta.Renderable.Enabled false + +#Keybinding +a Sets the focus of the camera on '67P' Focus on 67P /Missions/Rosetta false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', '67P'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +s Sets the focus of the camera on 'Rosetta' Focus on Rosetta /Missions/Rosetta false "openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Anchor', 'Rosetta'); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.Aim', ''); openspace.setPropertyValue('NavigationHandler.OrbitalNavigator.RetargetAnchor', nil)" +F6 Jumps to the time when the Philae lander is released. Set lander release time /Missions/Rosetta false "openspace.time.setTime('2014-11-12T08:20:00.00')" +Shift+F6 Jumps to the time of initial approach of Rosetta to 67P. Set initial approach time /Missions/Rosetta false "openspace.time.setTime('2014-08-01T03:05:18.101')" +F8 Removes all image projections from 67P. Clear 67P projections /Missions/Rosetta false "openspace.setPropertyValue('Scene.67P.Renderable.ProjectionComponent.ClearAllProjections', true)" +e Toggles the visibility of all trails further from the Sun than 67P. Toggle outer planetary trails /Missions/Rosetta false renderableHelper.toggle('Scene.JupiterTrail')..renderableHelper.toggle('Scene.SaturnTrail')..renderableHelper.toggle('Scene.UranusTrail')..renderableHelper.toggle('Scene.NeptuneTrail') +i Toggles the visibility of the free floating image plane. Toggle image plane /Missions/Rosetta false renderableHelper.toggle('Scene.ImagePlaneRosetta') +o Toggles the visibility of Philae's trail. Toggle Philae trail /Missions/Rosetta false renderableHelper.toggle('Scene.PhilaeTrail') +p Enables or disables the image projection on 67P. Toggle 67P projection /Missions/Rosetta false propertyHelper.invert('Scene.67P.Renderable.ProjectionComponent.PerformProjection') + +#Time +absolute 2014-08-01T03:05:00.000 + +#Camera +setNavigationState Comet67PAsset.Comet67P.Identifier "Root" -7.294781E5 , -6.657894E5, 2.509047E6 0.146529E0, 0.944727E0, 0.293290E0 + +#MarkNodes +67P +Rosetta +Philae diff --git a/data/profiles/touch.profile b/data/profiles/touch.profile new file mode 100644 index 0000000000..8fe818c78b --- /dev/null +++ b/data/profiles/touch.profile @@ -0,0 +1,26 @@ +#Version +1.0 + +#Module +Touch local webGui = asset.require('util/webgui'); webGui.setCefRoute("ontouch") openspace.printFatal('Could not load scene due to missing module "touch"') + +#Asset +base +scene/solarsystem/planets/earth/earth earthAsset +util/webgui + +#Property +setPropertyValueSingle Scene.Pluto.Renderable.Enabled false +setPropertyValueSingle Scene.Charon.Renderable.Enabled false +setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false + +#Time +relative -1d + +#Camera +setNavigationState earthAsset.Earth.Identifier 58.5877,16.1924,20000000 + +#MarkNodes +Earth +Mars +Moon diff --git a/data/profiles/voyager.profile b/data/profiles/voyager.profile new file mode 100644 index 0000000000..a95f48581e --- /dev/null +++ b/data/profiles/voyager.profile @@ -0,0 +1,56 @@ +#Version +1.0 + +#Asset +base +scene/solarsystem/planets/jupiter/minor_moons +scene/solarsystem/planets/saturn/minor_moons +scene/solarsystem/planets/uranus/minor_moons +scene/solarsystem/planets/neptune/inner_moons +scene/solarsystem/planets/neptune/irregular_prograde_moons +scene/solarsystem/planets/neptune/irregular_retrograde_moons +scene/solarsystem/missions/voyager/voyager1 VoyagerAsset +scene/solarsystem/missions/voyager/voyager2 +scene/solarsystem/missions/voyager/dashboard + +#Keybinding +1 Setting the simulation speed to 1 seconds per realtime second Set sim speed 1 /Simulation Speed false "openspace.time.interpolateDeltaTime(1)" +2 Setting the simulation speed to 5 seconds per realtime second Set sim speed 5 /Simulation Speed false "openspace.time.interpolateDeltaTime(5)" +3 Setting the simulation speed to 10 seconds per realtime second Set sim speed 10 /Simulation Speed false "openspace.time.interpolateDeltaTime(10)" +4 Setting the simulation speed to 20 seconds per realtime second Set sim speed 20 /Simulation Speed false "openspace.time.interpolateDeltaTime(20)" +5 Setting the simulation speed to 40 seconds per realtime second Set sim speed 40 /Simulation Speed false "openspace.time.interpolateDeltaTime(40)" +6 Setting the simulation speed to 90 seconds per realtime second Set sim speed 90 /Simulation Speed false "openspace.time.interpolateDeltaTime(90)" +7 Setting the simulation speed to 360 seconds per realtime second Set sim speed 360 /Simulation Speed false "openspace.time.interpolateDeltaTime(360)" +8 Setting the simulation speed to 720 seconds per realtime second Set sim speed 720 /Simulation Speed false "openspace.time.interpolateDeltaTime(720)" +9 Setting the simulation speed to 2880 seconds per realtime second Set sim speed 2880 /Simulation Speed false "openspace.time.interpolateDeltaTime(2880)" +0 Setting the simulation speed to 14400 seconds per realtime second Set sim speed 14400 /Simulation Speed false "openspace.time.interpolateDeltaTime(14400)" +Shift+1 Setting the simulation speed to 28800 seconds per realtime second Set sim speed 28800 /Simulation Speed false "openspace.time.interpolateDeltaTime(28800)" +Shift+2 Setting the simulation speed to 57600 seconds per realtime second Set sim speed 57600 /Simulation Speed false "openspace.time.interpolateDeltaTime(57600)" +Shift+3 Setting the simulation speed to 115200 seconds per realtime second Set sim speed 115200 /Simulation Speed false "openspace.time.interpolateDeltaTime(115200)" +Shift+4 Setting the simulation speed to 230400 seconds per realtime second Set sim speed 230400 /Simulation Speed false "openspace.time.interpolateDeltaTime(230400)" +Shift+5 Setting the simulation speed to 460800 seconds per realtime second Set sim speed 460800 /Simulation Speed false "openspace.time.interpolateDeltaTime(460800)" +Shift+6 Setting the simulation speed to 921600 seconds per realtime second Set sim speed 921600 /Simulation Speed false "openspace.time.interpolateDeltaTime(921600)" +Shift+7 Setting the simulation speed to 1843200 seconds per realtime second Set sim speed 1843200 /Simulation Speed false "openspace.time.interpolateDeltaTime(1843200)" +Shift+8 Setting the simulation speed to 3686400 seconds per realtime second Set sim speed 3686400 /Simulation Speed false "openspace.time.interpolateDeltaTime(3686400)" +Shift+9 Setting the simulation speed to 7372800 seconds per realtime second Set sim speed 7372800 /Simulation Speed false "openspace.time.interpolateDeltaTime(7372800)" +Shift+0 Setting the simulation speed to 14745600 seconds per realtime second Set sim speed 14745600 /Simulation Speed false "openspace.time.interpolateDeltaTime(14745600)" + +#Property +setPropertyValueSingle Scene.Pluto.Renderable.Enabled false +setPropertyValueSingle Scene.Charon.Renderable.Enabled false +setPropertyValueSingle Scene.PlutoBarycenterTrail.Renderable.Enabled false + +#Time +absolute 1977 SEP 10 12:00:00 + +#Camera +setNavigationState VoyagerAsset.Voyager_1.Identifier "Root" 526781518487.171326, 257168309890.072144, -1381125204152.817383 + +#MarkNodes +Earth +Voyager 1 +Voyager 2 +Jupiter +Saturn +Uranus +Neptune diff --git a/data/tasks/volume/debristasks/generate_cartesian_volume.task b/data/tasks/volume/debristasks/generate_cartesian_volume.task new file mode 100644 index 0000000000..337b49213a --- /dev/null +++ b/data/tasks/volume/debristasks/generate_cartesian_volume.task @@ -0,0 +1,13 @@ +return {{ + Type = "GenerateDebrisVolumeTask", + Dimensions = {48, 48, 48}, + LowerDomainBound = {-0.5, -0.5, -0.5}, + UpperDomainBound = {0.5, 0.5, 0.5}, + InputPath = "${SYNC}/url/satellite_tle_data_DebrisAll/files/allDebrisInOneTLE.txt", + StartTime = "2019-07-27T10:00:00", + TimeStep = "2", + EndTime = "2019-07-27T12:00:00", + GridType = "Cartesian", + RawVolumeOutput = "${DATA}/assets/scene/solarsystem/planets/earth/satellites/debris/volume/generatedCartesian/singleDebris.rawvolume", + DictionaryOutput = "${DATA}/assets/scene/solarsystem/planets/earth/satellites/debris/volume/generatedCartesian/singleDebris.dictionary" +}} diff --git a/data/tasks/volume/debristasks/generate_spherical_volume.task b/data/tasks/volume/debristasks/generate_spherical_volume.task new file mode 100644 index 0000000000..f24acbcc4b --- /dev/null +++ b/data/tasks/volume/debristasks/generate_spherical_volume.task @@ -0,0 +1,13 @@ +return {{ + Type = "GenerateDebrisVolumeTask", + Dimensions = {45, 30, 40}, + LowerDomainBound = {0, 0, 0}, + UpperDomainBound = {1, math.pi, 2 * math.pi}, + InputPath = "${SYNC}/url/satellite_tle_data_DebrisAll/files/allDebrisInOneTLE.txt", + StartTime = "2019-07-27T10:00:00", + TimeStep = "2", + EndTime = "2019-07-27T12:00:00", + GridType = "Spherical", + RawVolumeOutput = "${DATA}/assets/scene/solarsystem/planets/earth/satellites/debris/volume/generated/singleDebris.rawvolume", + DictionaryOutput = "${DATA}/assets/scene/solarsystem/planets/earth/satellites/debris/volume/generated/singleDebris.dictionary" +}} diff --git a/data/web/common/base.js b/data/web/common/base.js deleted file mode 100644 index b362bc94fc..0000000000 --- a/data/web/common/base.js +++ /dev/null @@ -1,4 +0,0 @@ -function parseJson(elementId) { - var jsonElement = document.getElementById(elementId); - return JSON.parse(jsonElement.innerHTML); -} diff --git a/data/web/documentation/factory.hbs b/data/web/documentation/factory.hbs new file mode 100644 index 0000000000..6fec23432e --- /dev/null +++ b/data/web/documentation/factory.hbs @@ -0,0 +1,24 @@ +{{#each data}} +
+
+

+ + {{name}} + +

+ {{#each classes}} +
+
+ +
+
+ {{/each}} +
+
+{{/each}} diff --git a/data/web/common/handlebars-v4.0.5.js b/data/web/documentation/handlebars-v4.0.5.js similarity index 100% rename from data/web/common/handlebars-v4.0.5.js rename to data/web/documentation/handlebars-v4.0.5.js diff --git a/data/web/keybindings/keybinding.hbs b/data/web/documentation/keybinding.hbs similarity index 95% rename from data/web/keybindings/keybinding.hbs rename to data/web/documentation/keybinding.hbs index cca289cb31..e4b09f066d 100644 --- a/data/web/keybindings/keybinding.hbs +++ b/data/web/documentation/keybinding.hbs @@ -1,3 +1,4 @@ +{{#each data}}
@@ -11,3 +12,4 @@
+{{/each}} diff --git a/data/web/documentation/main.hbs b/data/web/documentation/main.hbs index e96f942df9..f84d4d782b 100644 --- a/data/web/documentation/main.hbs +++ b/data/web/documentation/main.hbs @@ -8,8 +8,10 @@ {{#each documentation}}
  • - {{name}} + {{name}}
  • + {{/each}} @@ -18,15 +20,8 @@

    OpenSpace Documentation

    Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}

    - - {{#each documentation}} -
    -
    -

    {{name}}

    - {{> documentation}} -
    -
    - {{/each}} +
    +
    diff --git a/data/web/properties/property.hbs b/data/web/documentation/property.hbs similarity index 100% rename from data/web/properties/property.hbs rename to data/web/documentation/property.hbs diff --git a/data/web/documentation/propertylist.hbs b/data/web/documentation/propertylist.hbs new file mode 100644 index 0000000000..95a2854bbc --- /dev/null +++ b/data/web/documentation/propertylist.hbs @@ -0,0 +1,13 @@ +{{#each data}} +
    +
    +

    {{name}}

    + {{#each properties}} + {{> property}} + {{/each}} + {{#each propertyOwners}} + {{> propertyOwners}} + {{/each}} +
    +
    +{{/each}} diff --git a/data/web/properties/propertyowner.hbs b/data/web/documentation/propertyowners.hbs similarity index 93% rename from data/web/properties/propertyowner.hbs rename to data/web/documentation/propertyowners.hbs index 2417eceaf3..c889651ae7 100644 --- a/data/web/properties/propertyowner.hbs +++ b/data/web/documentation/propertyowners.hbs @@ -10,9 +10,8 @@ {{> property}} {{/each}} {{#each propertyOwners}} - {{> propertyOwner}} + {{> propertyOwners}} {{/each}} - diff --git a/data/web/documentation/scenelicense.hbs b/data/web/documentation/scenelicense.hbs new file mode 100644 index 0000000000..ee9bce0479 --- /dev/null +++ b/data/web/documentation/scenelicense.hbs @@ -0,0 +1,16 @@ +{{#each data}} +
    +
    +
    +

    +

    Asset - {{name}}

    +

    {{description}}

    +

    Version - {{version}}

    +

    Author - {{author}}

    +

    Associated URL - {{url}}

    +

    Filepath - {{path}}

    +

    +
    +
    +
    +{{/each}} diff --git a/data/web/documentation/script.js b/data/web/documentation/script.js index 00bd699b00..de1f726e0a 100644 --- a/data/web/documentation/script.js +++ b/data/web/documentation/script.js @@ -1,22 +1,105 @@ +var parseJson = (elementId) => { + var jsonElement = document.getElementById(elementId); + return JSON.parse(jsonElement.innerHTML); +}; + +var urlifyFunction = (options, context) => { + var data = context.data; + + var identifier = options.replace(/ /g, ''); + // while (data) { + // data = data._parent + // if (data && data.key !== undefined) { + // identifier = data.key + "-" + identifier; + // } + // } + + return identifier; +}; + + +var copyTextToClipboard = (text) => { + var textArea = document.createElement("textarea"); + textArea.style.position = 'fixed'; + textArea.style.top = 0; + textArea.style.left = 0; + + textArea.style.width = '2em'; + textArea.style.height = '2em'; + + textArea.style.padding = 0; + + textArea.style.border = 'none'; + textArea.style.outline = 'none'; + textArea.style.boxShadow = 'none'; + + textArea.style.background = 'transparent'; + textArea.value = text; + + document.body.appendChild(textArea); + + textArea.select(); + document.execCommand('copy'); + + document.body.removeChild(textArea); +} + + +var sidebarNavigate = (index) => { + var subtreeSelector = "#index" + index + "-subtree"; + + if ((currentDocumentation == documentation[index]) + && (document.querySelector(subtreeSelector).innerHTML != "") ) + { + var subtreeSelector = "#index" + index + "-subtree"; + document.querySelector(subtreeSelector).innerHTML = ""; + return; + } + currentDocumentation = documentation[index]; + var template = templates[currentDocumentation.identifier]; + var html = template(currentDocumentation); + document.getElementById('current-documentation-container').innerHTML = html; + //empty existing subtreee + document.querySelectorAll('.sidebar-subtree').forEach((e) => {e.innerHTML = ''}); + //create current subtree + var subTreeHTML = ""; + for (var i = 0; i < currentDocumentation.data.length; ++i) { + var entry = currentDocumentation.data[i]; + var entryProp = "name"; + if (!entry[entryProp]) { + entryProp = "library"; + if (!entry[entryProp]) { + entryProp = "key"; + } + } + + var entryValue = entry[entryProp]; + var entryURL = entryValue; + switch (currentDocumentation.identifier) { + case 'scripting': + entryURL = "openspace" + (entryValue ? "." + entryValue : ""); + entryValue = entryURL; + break; + default: + entryURL = urlifyFunction(entryValue, entry); + } + + subTreeHTML += "
  • "; + subTreeHTML += "" + entryValue + ""; + subTreeHTML += "
  • "; + } + + //find our subtree and fill it with data + document.querySelector(subtreeSelector).innerHTML = subTreeHTML; +}; + window.onload = function () { var mainTemplateElement = document.getElementById('mainTemplate'); var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML); - var documentationTemplateElement = document.getElementById('documentationTemplate'); - Handlebars.registerPartial('documentation', documentationTemplateElement.innerHTML); + window.registerTemplates(); - Handlebars.registerHelper('urlify', function(options, context) { - var data = context.data; - var identifier = options.replace(" ", "-").toLowerCase(); - - while (data = data._parent) { - if (data.key !== undefined) { - identifier = data.key + "-" + identifier; - } - } - - return identifier; - }); + Handlebars.registerHelper('urlify', urlifyFunction); Handlebars.registerHelper('level', function(options, context) { var data = context.data; @@ -31,15 +114,31 @@ window.onload = function () { return level; }); - documentation.sort(function (a, b) { - return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0); - }); + for (var i = 0; i < documentation.length; i++) { + documentation[i].data.sort(function (a, b) { + return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0); + }); + + if (documentation[i].identifier == "propertylist") { + for (var j = 0; j < documentation[i].data.length; j++) { + if (documentation[i].data[j].name == "Scene") { + documentation[i].data.splice(j, 1); + } + } + } + + } + + currentDocumentation = documentation[3]; var data = { documentation: documentation, - version: version + version: version, + currentDocumentation: currentDocumentation } + var templates = {}; + var contents = mainTemplate(data); document.body.innerHTML = contents; -} \ No newline at end of file +} diff --git a/data/web/documentation/scripting.hbs b/data/web/documentation/scripting.hbs new file mode 100644 index 0000000000..984a92ed02 --- /dev/null +++ b/data/web/documentation/scripting.hbs @@ -0,0 +1,28 @@ +{{#each data}} +
    +
    +

    + + openspace{{#if library}}.{{library}}{{/if}} + +

    + {{#each functions}} +
    + +
    + {{/each}} +
    +
    +{{/each}} diff --git a/data/web/common/style.css b/data/web/documentation/style.css similarity index 100% rename from data/web/common/style.css rename to data/web/documentation/style.css index b22e07cb61..08cea11009 100644 --- a/data/web/common/style.css +++ b/data/web/documentation/style.css @@ -146,12 +146,12 @@ body { width: 280px; margin: 0; padding: 0; - list-style: none; } .sidebar-nav li { text-indent: 20px; line-height: 40px; + list-style: none; } .sidebar-nav li a { diff --git a/data/web/documentation/documentation.hbs b/data/web/documentation/toplevel.hbs similarity index 82% rename from data/web/documentation/documentation.hbs rename to data/web/documentation/toplevel.hbs index b22165447b..3701dd057a 100644 --- a/data/web/documentation/documentation.hbs +++ b/data/web/documentation/toplevel.hbs @@ -1,3 +1,7 @@ +{{#each data}} +
    +
    +

    {{name}}

    {{#each entries}}
    @@ -14,7 +18,7 @@

    {{description}}

    {{documentation}}

    {{#with restrictions}} - {{>documentation}} + {{>toplevel}} {{/with}} {{#if reference}} {{#if reference.found}} @@ -27,3 +31,6 @@
    {{/each}} +
    +
    +{{/each}} \ No newline at end of file diff --git a/data/web/factories/factory.hbs b/data/web/factories/factory.hbs deleted file mode 100644 index 7c73a9462f..0000000000 --- a/data/web/factories/factory.hbs +++ /dev/null @@ -1,13 +0,0 @@ -{{#each classes}} -
    -
    - -
    -
    -{{/each}} diff --git a/data/web/factories/main.hbs b/data/web/factories/main.hbs deleted file mode 100644 index 56f1a3187d..0000000000 --- a/data/web/factories/main.hbs +++ /dev/null @@ -1,35 +0,0 @@ -
    - - -
    -
    -

    OpenSpace Factories

    -

    Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}

    - {{#each factories}} -
    -
    -

    - - {{name}} - -

    - {{> factory}} -
    -
    - {{/each}} -
    -
    -
    diff --git a/data/web/factories/script.js b/data/web/factories/script.js deleted file mode 100644 index 02322b7f3e..0000000000 --- a/data/web/factories/script.js +++ /dev/null @@ -1,45 +0,0 @@ -window.onload = function () { - var mainTemplateElement = document.getElementById('mainTemplate'); - var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML); - - var factoryTemplateElement = document.getElementById('factoryTemplate'); - Handlebars.registerPartial('factory', factoryTemplateElement.innerHTML); - - Handlebars.registerHelper('urlify', function(options, context) { - var data = context.data; - var identifier = options.replace(" ", "-").toLowerCase(); - - while (data = data._parent) { - if (data.key !== undefined) { - identifier = data.key + "-" + identifier; - } - } - - return identifier; - }); - - Handlebars.registerHelper('level', function(options, context) { - var data = context.data; - var level = 0; - - while (data = data._parent) { - if (data.key !== undefined) { - ++level; - } - } - - return level; - }); - - factories.sort(function (a, b) { - return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0); - }); - - var data = { - factories: factories, - version: version - } - - var contents = mainTemplate(data); - document.body.innerHTML = contents; -} \ No newline at end of file diff --git a/data/web/keybindings/main.hbs b/data/web/keybindings/main.hbs deleted file mode 100644 index ba1de9fdd0..0000000000 --- a/data/web/keybindings/main.hbs +++ /dev/null @@ -1,9 +0,0 @@ -
    -
    -

    OpenSpace Keybindings

    -

    Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}

    - {{#each keybindings}} - {{> keybinding}} - {{/each}} -
    -
    \ No newline at end of file diff --git a/data/web/keybindings/script.js b/data/web/keybindings/script.js deleted file mode 100644 index 018d49eb48..0000000000 --- a/data/web/keybindings/script.js +++ /dev/null @@ -1,45 +0,0 @@ -window.onload = function () { - var mainTemplateElement = document.getElementById('mainTemplate'); - var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML); - - var keybindingTemplateElement = document.getElementById('keybindingTemplate'); - Handlebars.registerPartial('keybinding', keybindingTemplateElement.innerHTML); - - Handlebars.registerHelper('urlify', function(options, context) { - var data = context.data; - var identifier = options.replace(" ", "-").toLowerCase(); - - while (data = data._parent) { - if (data.key !== undefined) { - identifier = data.key + "-" + identifier; - } - } - - return identifier; - }); - - Handlebars.registerHelper('level', function(options, context) { - var data = context.data; - var level = 0; - - while (data = data._parent) { - if (data.key !== undefined) { - ++level; - } - } - - return level; - }); - - keybindings.sort(function (a, b) { - return a.key < b.key ? -1 : (a.key > b.key ? 1 : 0); - }); - - var data = { - keybindings: keybindings, - version: version - } - - var contents = mainTemplate(data); - document.body.innerHTML = contents; -} \ No newline at end of file diff --git a/data/web/luascripting/main.hbs b/data/web/luascripting/main.hbs deleted file mode 100644 index 1d67289346..0000000000 --- a/data/web/luascripting/main.hbs +++ /dev/null @@ -1,35 +0,0 @@ -
    - - -
    -
    -

    OpenSpace Lua Scripting

    -

    Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}

    - {{#each scripting}} - - {{/each}} -
    -
    -
    diff --git a/data/web/luascripting/script.js b/data/web/luascripting/script.js deleted file mode 100644 index da7dede2e4..0000000000 --- a/data/web/luascripting/script.js +++ /dev/null @@ -1,45 +0,0 @@ -window.onload = function () { - var mainTemplateElement = document.getElementById('mainTemplate'); - var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML); - - var scriptingTemplateElement = document.getElementById('scriptingTemplate'); - Handlebars.registerPartial('scripting', scriptingTemplateElement.innerHTML); - - Handlebars.registerHelper('urlify', function(options, context) { - var data = context.data; - var identifier = options.replace(" ", "-").toLowerCase(); - - while (data = data._parent) { - if (data.key !== undefined) { - identifier = data.key + "-" + identifier; - } - } - - return identifier; - }); - - Handlebars.registerHelper('level', function(options, context) { - var data = context.data; - var level = 0; - - while (data = data._parent) { - if (data.key !== undefined) { - ++level; - } - } - - return level; - }); - - scripting.sort(function (a, b) { - return a.library < b.library ? -1 : (a.library > b.library ? 1 : 0); - }); - - var data = { - scripting: scripting, - version: version - } - - var contents = mainTemplate(data); - document.body.innerHTML = contents; -} \ No newline at end of file diff --git a/data/web/luascripting/scripting.hbs b/data/web/luascripting/scripting.hbs deleted file mode 100644 index 00e35ab6d4..0000000000 --- a/data/web/luascripting/scripting.hbs +++ /dev/null @@ -1,17 +0,0 @@ -{{#each functions}} -
    - -
    -{{/each}} diff --git a/data/web/properties/main.hbs b/data/web/properties/main.hbs deleted file mode 100644 index ae6024b98f..0000000000 --- a/data/web/properties/main.hbs +++ /dev/null @@ -1,37 +0,0 @@ -
    - - -
    -
    -

    OpenSpace Scene Properties

    -

    Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}

    - - {{#each propertyOwners}} -
    -
    -

    {{name}}

    - {{#each properties}} - {{> property}} - {{/each}} - {{#each propertyOwners}} - {{> propertyOwner}} - {{/each}} -
    -
    - {{/each}} -
    -
    -
    diff --git a/data/web/properties/script.js b/data/web/properties/script.js deleted file mode 100644 index 642d860c05..0000000000 --- a/data/web/properties/script.js +++ /dev/null @@ -1,73 +0,0 @@ -function copyTextToClipboard(text) { - var textArea = document.createElement("textarea"); - textArea.style.position = 'fixed'; - textArea.style.top = 0; - textArea.style.left = 0; - - textArea.style.width = '2em'; - textArea.style.height = '2em'; - - textArea.style.padding = 0; - - textArea.style.border = 'none'; - textArea.style.outline = 'none'; - textArea.style.boxShadow = 'none'; - - textArea.style.background = 'transparent'; - textArea.value = text; - - document.body.appendChild(textArea); - - textArea.select(); - document.execCommand('copy'); - - document.body.removeChild(textArea); -} - -window.onload = function () { - var mainTemplateElement = document.getElementById('mainTemplate'); - var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML); - - var propertyOwnerTemplateElement = document.getElementById('propertyOwnerTemplate'); - Handlebars.registerPartial('propertyOwner', propertyOwnerTemplateElement.innerHTML); - - var propertyTemplateElement = document.getElementById('propertyTemplate'); - Handlebars.registerPartial('property', propertyTemplateElement.innerHTML); - - Handlebars.registerHelper('urlify', function(options, context) { - var data = context.data; - var identifier = options.replace(" ", "-").toLowerCase(); - - while (data = data._parent) { - if (data.key !== undefined) { - identifier = data.key + "-" + identifier; - } - } - return identifier; - }); - - Handlebars.registerHelper('level', function(options, context) { - var data = context.data; - var level = 0; - - while (data = data._parent) { - if (data.key !== undefined) { - ++level; - } - } - - return level; - }); - - propertyOwners.sort(function (a, b) { - return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0); - }); - - var data = { - propertyOwners: propertyOwners, - version: version - } - - var contents = mainTemplate(data); - document.body.innerHTML = contents; -} diff --git a/data/web/scenelicense/main.hbs b/data/web/scenelicense/main.hbs deleted file mode 100644 index 786b51a823..0000000000 --- a/data/web/scenelicense/main.hbs +++ /dev/null @@ -1,9 +0,0 @@ -
    -
    -

    OpenSpace Scene License Information

    -

    Version: {{version.[0]}}.{{version.[1]}}.{{version.[2]}}

    - {{#each sceneLicenses}} - {{> scenelicense}} - {{/each}} -
    -
    \ No newline at end of file diff --git a/data/web/scenelicense/scenelicense.hbs b/data/web/scenelicense/scenelicense.hbs deleted file mode 100644 index 2bd8e98d20..0000000000 --- a/data/web/scenelicense/scenelicense.hbs +++ /dev/null @@ -1,16 +0,0 @@ -
    -
    -
    -

    - - {{module}} - -

    {{name}}

    -
    -

    {{attribution}}

    -

    {{url}}

    -

    {{licenseText}}

    -

    -
    -
    -
    diff --git a/data/web/scenelicense/script.js b/data/web/scenelicense/script.js deleted file mode 100644 index 9e1e815d80..0000000000 --- a/data/web/scenelicense/script.js +++ /dev/null @@ -1,41 +0,0 @@ -window.onload = function () { - var mainTemplateElement = document.getElementById('mainTemplate'); - var mainTemplate = Handlebars.compile(mainTemplateElement.innerHTML); - - var sceneLicenseTemplate = document.getElementById('sceneLicenseTemplate'); - Handlebars.registerPartial('scenelicense', sceneLicenseTemplate.innerHTML); - - Handlebars.registerHelper('urlify', function(options, context) { - var data = context.data; - var identifier = options.replace(" ", "-").toLowerCase(); - - while (data = data._parent) { - if (data.key !== undefined) { - identifier = data.key + "-" + identifier; - } - } - - return identifier; - }); - - Handlebars.registerHelper('level', function(options, context) { - var data = context.data; - var level = 0; - - while (data = data._parent) { - if (data.key !== undefined) { - ++level; - } - } - - return level; - }); - - var data = { - sceneLicenses: sceneLicenses, - version: version - } - - var contents = mainTemplate(data); - document.body.innerHTML = contents; -} \ No newline at end of file diff --git a/ext/ghoul b/ext/ghoul index 762119b312..bd812defd7 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 762119b31279f028790e82d643dcd4ba3f4db5eb +Subproject commit bd812defd787ad34119cfe7ecef2be71a7a1553e diff --git a/ext/json/json.hpp b/ext/json/json.hpp index 6dfc1831fa..5003a4fa2d 100644 --- a/ext/json/json.hpp +++ b/ext/json/json.hpp @@ -1,11 +1,12 @@ /* __ _____ _____ _____ __| | __| | | | JSON for Modern C++ -| | |__ | | | | | | version 2.1.1 +| | |__ | | | | | | version 3.6.1 |_____|_____|_____|_|___| https://github.com/nlohmann/json Licensed under the MIT License . -Copyright (c) 2013-2017 Niels Lohmann . +SPDX-License-Identifier: MIT +Copyright (c) 2013-2019 Niels Lohmann . Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -26,45 +27,445 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef NLOHMANN_JSON_HPP -#define NLOHMANN_JSON_HPP +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ -#include // all_of, copy, fill, find, for_each, none_of, remove, reverse, transform -#include // array +#define NLOHMANN_JSON_VERSION_MAJOR 3 +#define NLOHMANN_JSON_VERSION_MINOR 6 +#define NLOHMANN_JSON_VERSION_PATCH 1 + +#include // all_of, find, for_each #include // assert -#include // isdigit #include // and, not, or -#include // isfinite, labs, ldexp, signbit #include // nullptr_t, ptrdiff_t, size_t -#include // int64_t, uint64_t -#include // abort, strtod, strtof, strtold, strtoul, strtoll, strtoull -#include // strlen -#include // forward_list -#include // function, hash, less +#include // hash, less #include // initializer_list -#include // setw -#include // istream, ostream -#include // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator -#include // numeric_limits -#include // locale -#include // map -#include // addressof, allocator, allocator_traits, unique_ptr +#include // istream, ostream +#include // random_access_iterator_tag +#include // unique_ptr #include // accumulate -#include // stringstream -#include // domain_error, invalid_argument, out_of_range -#include // getline, stoi, string, to_string -#include // add_pointer, conditional, decay, enable_if, false_type, integral_constant, is_arithmetic, is_base_of, is_const, is_constructible, is_convertible, is_default_constructible, is_enum, is_floating_point, is_integral, is_nothrow_move_assignable, is_nothrow_move_constructible, is_pointer, is_reference, is_same, is_scalar, is_signed, remove_const, remove_cv, remove_pointer, remove_reference, true_type, underlying_type -#include // declval, forward, make_pair, move, pair, swap +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap #include // vector +// #include + + +#include + +// #include + + +#include // transform +#include // array +#include // and, not +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include + + +#include // exception +#include // runtime_error +#include // to_string + +// #include + + +#include // size_t + +namespace nlohmann +{ +namespace detail +{ +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +} // namespace nlohmann + + +namespace nlohmann +{ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/*! +@brief general exception of the @ref basic_json class + +This class is an extension of `std::exception` objects with a member @a id for +exception ids. It is used as the base class for all exceptions thrown by the +@ref basic_json class. This class can hence be used as "wildcard" to catch +exceptions. + +Subclasses: +- @ref parse_error for exceptions indicating a parse error +- @ref invalid_iterator for exceptions indicating errors with iterators +- @ref type_error for exceptions indicating executing a member function with + a wrong type +- @ref out_of_range for exceptions indicating access out of the defined range +- @ref other_error for exceptions indicating other library errors + +@internal +@note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. +@endinternal + +@liveexample{The following code shows how arbitrary library exceptions can be +caught.,exception} + +@since version 3.0.0 +*/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/*! +@brief exception indicating a parse error + +This exception is thrown by the library when a parse error occurs. Parse errors +can occur during the deserialization of JSON text, CBOR, MessagePack, as well +as when using JSON Patch. + +Member @a byte holds the byte index of the last read character in the input +file. + +Exceptions have ids 1xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. +json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. +json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. +json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. +json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. +json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. +json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. +json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. +json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. +json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. +json.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding BSON record type is not implemented (yet). + +@note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + +@liveexample{The following code shows how a `parse_error` exception can be +caught.,parse_error} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] pos the position where the error occurred (or with + chars_read_total=0 if the position cannot be + determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, const position_t& pos, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + position_string(pos) + ": " + what_arg; + return parse_error(id_, pos.chars_read_total, w.c_str()); + } + + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at byte " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} + + static std::string position_string(const position_t& pos) + { + return " at line " + std::to_string(pos.lines_read + 1) + + ", column " + std::to_string(pos.chars_read_current_line); + } +}; + +/*! +@brief exception indicating errors with iterators + +This exception is thrown if iterators passed to a library function do not match +the expected semantics. + +Exceptions have ids 2xx. + +name / id | example message | description +----------------------------------- | --------------- | ------------------------- +json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. +json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. +json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. +json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. +json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. +json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. +json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. +json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. +json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. +json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + +@liveexample{The following code shows how an `invalid_iterator` exception can be +caught.,invalid_iterator} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class invalid_iterator : public exception +{ + public: + static invalid_iterator create(int id_, const std::string& what_arg) + { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating executing a member function with a wrong type + +This exception is thrown in case of a type error; that is, a library function is +executed on a JSON value whose type does not match the expected semantics. + +Exceptions have ids 3xx. + +name / id | example message | description +----------------------------- | --------------- | ------------------------- +json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. +json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. +json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t &. +json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. +json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. +json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. +json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. +json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. +json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. +json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. +json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. +json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. +json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. +json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. +json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | +json.exception.type_error.317 | JSON value cannot be serialized to requested format | The dynamic type of the object cannot be represented in the requested serialization format (e.g. a raw `true` or `null` JSON object cannot be serialized to BSON) | + +@liveexample{The following code shows how a `type_error` exception can be +caught.,type_error} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref out_of_range for exceptions indicating access out of the defined range +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class type_error : public exception +{ + public: + static type_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating access out of the defined range + +This exception is thrown in case a library function is called on an input +parameter that exceeds the expected range, for instance in case of array +indices or nonexisting object keys. + +Exceptions have ids 4xx. + +name / id | example message | description +------------------------------- | --------------- | ------------------------- +json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. +json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. +json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. +json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. +json.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. | +json.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. | +json.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string | + +@liveexample{The following code shows how an `out_of_range` exception can be +caught.,out_of_range} + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class out_of_range : public exception +{ + public: + static out_of_range create(int id_, const std::string& what_arg) + { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating other library errors + +This exception is thrown in case of errors that cannot be classified with the +other exception types. + +Exceptions have ids 5xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + +@sa - @ref exception for the base class of the library exceptions +@sa - @ref parse_error for exceptions indicating a parse error +@sa - @ref invalid_iterator for exceptions indicating errors with iterators +@sa - @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa - @ref out_of_range for exceptions indicating access out of the defined range + +@liveexample{The following code shows how an `other_error` exception can be +caught.,other_error} + +@since version 3.0.0 +*/ +class other_error : public exception +{ + public: + static other_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // pair + +// This file contains all internal macro definitions +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + // exclude unsupported compilers -#if defined(__clang__) - #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 - #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" - #endif -#elif defined(__GNUC__) - #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 - #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif #endif #endif @@ -89,17 +490,333 @@ SOFTWARE. #define JSON_DEPRECATED #endif +// allow for portable nodiscard warnings +#if defined(__has_cpp_attribute) + #if __has_cpp_attribute(nodiscard) + #define JSON_NODISCARD [[nodiscard]] + #elif __has_cpp_attribute(gnu::warn_unused_result) + #define JSON_NODISCARD [[gnu::warn_unused_result]] + #else + #define JSON_NODISCARD + #endif +#else + #define JSON_NODISCARD +#endif + // allow to disable exceptions -#if not defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS) +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) #define JSON_THROW(exception) throw exception #define JSON_TRY try #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) #else + #include #define JSON_THROW(exception) std::abort() #define JSON_TRY if(true) #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) #endif +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// manual branch prediction +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_LIKELY(x) __builtin_expect(x, 1) + #define JSON_UNLIKELY(x) __builtin_expect(x, 0) +#else + #define JSON_LIKELY(x) x + #define JSON_UNLIKELY(x) x +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// #include + + +#include // not +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type + +namespace nlohmann +{ +namespace detail +{ +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +template +using uncvref_t = typename std::remove_cv::type>::type; + +// implementation of C++14 index_sequence and affiliates +// source: https://stackoverflow.com/a/32223343 +template +struct index_sequence +{ + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +template +struct merge_and_renumber; + +template +struct merge_and_renumber, index_sequence> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + +template +struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + +template<> struct make_index_sequence<0> : index_sequence<> {}; +template<> struct make_index_sequence<1> : index_sequence<0> {}; + +template +using index_sequence_for = make_index_sequence; + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static constexpr T value{}; +}; + +template +constexpr T static_const::value; +} // namespace detail +} // namespace nlohmann + +// #include + + +#include // not +#include // numeric_limits +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval + +// #include + + +#include // random_access_iterator_tag + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; +} // namespace detail +} // namespace nlohmann + +// #include + + +namespace nlohmann +{ +namespace detail +{ +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; +} // namespace detail +} // namespace nlohmann + +// #include + +// #include + +// #include + + +#include + +// #include + + +// http://en.cppreference.com/w/cpp/experimental/is_detected +namespace nlohmann +{ +namespace detail +{ +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template