From 9b77afa95d5d086ed8817c8a636968ff5930ee9f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 5 May 2025 14:28:08 +0200 Subject: [PATCH 01/11] Correctly display geodetic distances for objects with a bounding and interactionsphere of 0 --- src/util/ellipsoid.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/util/ellipsoid.cpp b/src/util/ellipsoid.cpp index 32585a853f..cabead0eb0 100644 --- a/src/util/ellipsoid.cpp +++ b/src/util/ellipsoid.cpp @@ -36,7 +36,11 @@ namespace { namespace openspace { Ellipsoid::Ellipsoid(glm::dvec3 radii) : _radii(std::move(radii)) { - updateInternalCache(); + // If the radii is equal to 0, all of the calculations below fail and result in nan's + // being raised all over the place + if (glm::length(radii) > 0.0) { + updateInternalCache(); + } } void Ellipsoid::updateInternalCache() { @@ -90,7 +94,7 @@ glm::dvec3 Ellipsoid::geodeticSurfaceNormalForGeocentricallyProjectedPoint( const glm::dvec3& p) const { const glm::dvec3 normal = p * _cached.oneOverRadiiSquared; - return glm::normalize(normal); + return glm::length(normal) > 0.0 ? glm::normalize(normal) : normal; } glm::dvec3 Ellipsoid::geodeticSurfaceNormal(const Geodetic2& geodetic2) const { @@ -143,10 +147,12 @@ double Ellipsoid::greatCircleDistance(const Geodetic2& p1, const Geodetic2& p2) Geodetic2 Ellipsoid::cartesianToGeodetic2(const glm::dvec3& p) const { const glm::dvec3 normal = geodeticSurfaceNormalForGeocentricallyProjectedPoint(p); - return { - std::asin(normal.z / glm::length(normal)), - std::atan2(normal.y, normal.x) - }; + return glm::length(normal) ? + Geodetic2 { + std::asin(normal.z / glm::length(normal)), + std::atan2(normal.y, normal.x) + } : + Geodetic2 { 0.0, 0.0 }; } glm::dvec3 Ellipsoid::cartesianSurfacePosition(const Geodetic2& geodetic2) const { From bc715e1a749bb2b7624f305bcf228ac83d6574f4 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 5 May 2025 14:41:05 +0200 Subject: [PATCH 02/11] Turn ResetTileProviders in RenderableGlobe into a button --- modules/globebrowsing/src/renderableglobe.cpp | 7 ++++--- modules/globebrowsing/src/renderableglobe.h | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/globebrowsing/src/renderableglobe.cpp b/modules/globebrowsing/src/renderableglobe.cpp index fb5229535c..2f550172d0 100644 --- a/modules/globebrowsing/src/renderableglobe.cpp +++ b/modules/globebrowsing/src/renderableglobe.cpp @@ -604,7 +604,7 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) , _debugProperties({ BoolProperty(ShowChunkEdgeInfo, false), BoolProperty(LevelProjectedAreaInfo, true), - BoolProperty(ResetTileProviderInfo, false), + TriggerProperty(ResetTileProviderInfo), BoolProperty(PerformFrustumCullingInfo, true), IntProperty(ModelSpaceRenderingInfo, 14, 1, 22), IntProperty(DynamicLodIterationCountInfo, 16, 4, 128) @@ -728,6 +728,7 @@ RenderableGlobe::RenderableGlobe(const ghoul::Dictionary& dictionary) _debugPropertyOwner.addProperty(_debugProperties.showChunkEdges); _debugPropertyOwner.addProperty(_debugProperties.levelByProjectedAreaElseDistance); + _debugProperties.resetTileProviders.onChange([&]() { _resetTileProviders = true; }); _debugPropertyOwner.addProperty(_debugProperties.resetTileProviders); _debugPropertyOwner.addProperty(_debugProperties.performFrustumCulling); _debugPropertyOwner.addProperty(_debugProperties.modelSpaceRenderingCutoffLevel); @@ -998,9 +999,9 @@ void RenderableGlobe::update(const UpdateData& data) { _cachedModelTransform = translation * rotation * scaling; _cachedInverseModelTransform = glm::inverse(_cachedModelTransform); - if (_debugProperties.resetTileProviders) { + if (_resetTileProviders) [[unlikely]] { _layerManager.reset(); - _debugProperties.resetTileProviders = false; + _resetTileProviders = false; } if (_ringsComponent) { diff --git a/modules/globebrowsing/src/renderableglobe.h b/modules/globebrowsing/src/renderableglobe.h index ce0192e4d3..3473c593af 100644 --- a/modules/globebrowsing/src/renderableglobe.h +++ b/modules/globebrowsing/src/renderableglobe.h @@ -240,7 +240,7 @@ private: struct { properties::BoolProperty showChunkEdges; properties::BoolProperty levelByProjectedAreaElseDistance; - properties::BoolProperty resetTileProviders; + properties::TriggerProperty resetTileProviders; properties::BoolProperty performFrustumCulling; properties::IntProperty modelSpaceRenderingCutoffLevel; properties::IntProperty dynamicLodIterationCount; @@ -300,6 +300,7 @@ private: bool _nLayersIsDirty = true; bool _allChunksAvailable = true; bool _layerManagerDirty = true; + bool _resetTileProviders = false; size_t _iterationsOfAvailableData = 0; size_t _iterationsOfUnavailableData = 0; Layer* _lastChangedLayer = nullptr; From 2c77efbde1cd77ca2b06bfc1efbee12d0368538e Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 5 May 2025 19:49:34 +0200 Subject: [PATCH 03/11] Compile fix for Linux arch (#3642) --- src/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3c341a8b82..ddc9b49769 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -466,6 +466,17 @@ target_include_directories(openspace-core target_link_libraries(openspace-core PUBLIC nlohmann_json) +if (UNIX) + # On Arch Linux, if you have the package `oneapi` installed, this influences including + # the header and causes the header /usr/include/oneapi/tbb/task_group.h be + # pulled in, causing a compile problem + target_compile_definitions( + openspace-core + PUBLIC "_GLIBCXX_USE_TBB_PAR_BACKEND=0" + PUBLIC "_PSTL_PAR_BACKEND_SERIAL" + ) +endif () + target_precompile_headers(openspace-core PRIVATE From 517e44db5a4b9d0c3b6b4bd7721b53f0ccf186ca Mon Sep 17 00:00:00 2001 From: Anders Lundkvist <57524362+lundkvistarn@users.noreply.github.com> Date: Mon, 5 May 2025 15:31:02 -0400 Subject: [PATCH 04/11] Add time varying dashboard item text class (#3621) New dashboard item class, DashboardItemTimeVaryingText, designed to display numeric values from a JSON time series, dynamically updating based on time. Also added examples for this. Useful for displaying dynamic values like KP index or solar wind parameters in sync with time. --------- Co-authored-by: Alexander Bock --- .../data/dummydata.json | 9 + .../timevaryingtext.asset | 16 ++ .../timevaryingtext_styled.asset | 19 ++ modules/base/CMakeLists.txt | 2 + modules/base/basemodule.cpp | 5 + .../dashboarditemtimevaryingtext.cpp | 186 ++++++++++++++++++ .../dashboard/dashboarditemtimevaryingtext.h | 61 ++++++ 7 files changed, 298 insertions(+) create mode 100644 data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/data/dummydata.json create mode 100644 data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext.asset create mode 100644 data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext_styled.asset create mode 100644 modules/base/dashboard/dashboarditemtimevaryingtext.cpp create mode 100644 modules/base/dashboard/dashboarditemtimevaryingtext.h diff --git a/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/data/dummydata.json b/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/data/dummydata.json new file mode 100644 index 0000000000..a655d1f0de --- /dev/null +++ b/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/data/dummydata.json @@ -0,0 +1,9 @@ +{ + "data": [ + [ "2024-05-10T00:00:00Z", 2.33 ], + [ "2024-05-10T03:00:00Z", 3 ], + [ "2024-05-10T06:00:00Z", 3 ], + [ "2024-05-10T09:00:00Z", 2.67 ], + [ "2024-05-10T12:00:00Z", 2.33 ] + ] +} diff --git a/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext.asset b/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext.asset new file mode 100644 index 0000000000..48230275c8 --- /dev/null +++ b/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext.asset @@ -0,0 +1,16 @@ +-- Basic +-- This example shows how to create a time-varying text dashboard item. + +local Item = { + Type = "DashboardItemTimeVaryingText", + Identifier = "DashboardItemTimeVaryingText_Example", + DataFile = asset.resource("data/dummydata.json"), +} + +asset.onInitialize(function() + openspace.dashboard.addDashboardItem(Item) +end) + +asset.onDeinitialize(function() + openspace.dashboard.removeDashboardItem(Item) +end) diff --git a/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext_styled.asset b/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext_styled.asset new file mode 100644 index 0000000000..71f258da82 --- /dev/null +++ b/data/assets/examples/dashboarditem/dashboarditemtimevaryingtext/timevaryingtext_styled.asset @@ -0,0 +1,19 @@ +-- Styled +-- This example shows how to create a time-varying text dashboard item. +-- It has a custom font size and text before the time varying text. + +local Item = { + Type = "DashboardItemTimeVaryingText", + Identifier = "DashboardItemTimeVaryingText_Example-Styled", + DataFile = asset.resource("data/dummydata.json"), + FormatString = "Observed KP index: {}", + FontSize = 40 +} + +asset.onInitialize(function() + openspace.dashboard.addDashboardItem(Item) +end) + +asset.onDeinitialize(function() + openspace.dashboard.removeDashboardItem(Item) +end) diff --git a/modules/base/CMakeLists.txt b/modules/base/CMakeLists.txt index e5bf991e66..d2f82ed79f 100644 --- a/modules/base/CMakeLists.txt +++ b/modules/base/CMakeLists.txt @@ -38,6 +38,7 @@ set(HEADER_FILES dashboard/dashboarditemsimulationincrement.h dashboard/dashboarditemspacing.h dashboard/dashboarditemtext.h + dashboard/dashboarditemtimevaryingtext.h dashboard/dashboarditemvelocity.h lightsource/cameralightsource.h lightsource/scenegraphlightsource.h @@ -112,6 +113,7 @@ set(SOURCE_FILES dashboard/dashboarditemsimulationincrement.cpp dashboard/dashboarditemspacing.cpp dashboard/dashboarditemtext.cpp + dashboard/dashboarditemtimevaryingtext.cpp dashboard/dashboarditemvelocity.cpp lightsource/cameralightsource.cpp lightsource/scenegraphlightsource.cpp diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp index 4a8addc05f..d359e51057 100644 --- a/modules/base/basemodule.cpp +++ b/modules/base/basemodule.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -145,6 +146,9 @@ void BaseModule::internalInitialize(const ghoul::Dictionary&) { ); fDashboard->registerClass("DashboardItemSpacing"); fDashboard->registerClass("DashboardItemText"); + fDashboard->registerClass( + "DashboardItemTimeVaryingText" + ); fDashboard->registerClass("DashboardItemVelocity"); @@ -264,6 +268,7 @@ std::vector BaseModule::documentations() const { DashboardItemSimulationIncrement::Documentation(), DashboardItemSpacing::Documentation(), DashboardItemText::Documentation(), + DashboardItemTimeVaryingText::Documentation(), DashboardItemVelocity::Documentation(), CameraLightSource::Documentation(), diff --git a/modules/base/dashboard/dashboarditemtimevaryingtext.cpp b/modules/base/dashboard/dashboarditemtimevaryingtext.cpp new file mode 100644 index 0000000000..84b07dc527 --- /dev/null +++ b/modules/base/dashboard/dashboarditemtimevaryingtext.cpp @@ -0,0 +1,186 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2025 * + * * + * 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 +#include +#include +#include +#include +#include +#include +#include + +namespace { + constexpr openspace::properties::Property::PropertyInfo FormatStringInfo = { + "FormatString", + "Format String", + "The format text describing how this dashboard item renders its text. This text " + "must contain exactly one {} which is a placeholder that will be replaced " + "with the values read from the file provided in `DataFile`", + openspace::properties::Property::Visibility::AdvancedUser + }; + + constexpr openspace::properties::Property::PropertyInfo DataFileInfo = { + "DataFile", + "Data File Path", + "The file path to the JSON data.", + openspace::properties::Property::Visibility::User + }; + + // This `DashboardItem` displays text based on the content of a provided data file. The + // value that is displayed depends on the current in-game simulation time. + // The JSON must contain a 'data' array with timestamp-value pairs. Example format: + // {\"data\": [[\"2024-05-10T00:00:00Z\", 2.33], [\"2024-05-10T03:00:00Z\", 3.0]]} + struct [[codegen::Dictionary(DashboardItemTimeVaryingText)]] Parameters { + // [[codegen::verbatim(FormatStringInfo.description)]] + std::optional formatString; + + // [[codegen::verbatim(DataFileInfo.description)]] + std::string dataFile; + }; +#include "dashboarditemtimevaryingtext_codegen.cpp" +} // namespace + +namespace openspace { + +documentation::Documentation DashboardItemTimeVaryingText::Documentation() { + return codegen::doc( + "base_dashboarditem_timevaryingtext", + DashboardTextItem::Documentation() + ); +} + +DashboardItemTimeVaryingText::DashboardItemTimeVaryingText( + const ghoul::Dictionary& dictionary) + : DashboardTextItem(dictionary) + , _formatString(FormatStringInfo, "{}") + , _dataFile(DataFileInfo, "") +{ + const Parameters p = codegen::bake(dictionary); + + _formatString = p.formatString.value_or(_formatString); + addProperty(_formatString); + + _dataFile = absPath(p.dataFile).string(); + addProperty(_dataFile); + + _dataFile.onChange([this]() { + loadDataFromJson(_dataFile); + }); + + loadDataFromJson(_dataFile); +} + +void DashboardItemTimeVaryingText::update() { + if (_startTimes.empty()) { + _buffer.clear(); + return; + } + + double current = global::timeManager->time().j2000Seconds(); + double first = _startTimes.front(); + double last = _sequenceEndTime; + + if (current >= first && current < last) { + int newIdx = updateActiveTriggerTimeIndex(current); + if (newIdx != _activeTriggerTimeIndex) { + _activeTriggerTimeIndex = newIdx; + double timeKey = _startTimes[_activeTriggerTimeIndex]; + double value = _data[timeKey]; + + std::ostringstream oss; + oss << value; + std::string valueString = oss.str(); + try { + _buffer = std::vformat(_formatString.value(), + std::make_format_args(valueString)); + } + catch (const std::format_error&) { + LERRORC("DashboardItemTimeVaryingText", "Illegal format string"); + } + } + } + else { + _activeTriggerTimeIndex = -1; + _buffer.clear(); + } +} + +void DashboardItemTimeVaryingText::loadDataFromJson(const std::string& filePath) { + std::ifstream file = std::ifstream(filePath); + if (!file.is_open()) { + throw ghoul::RuntimeError(std::format( + "Time varying text, '{}' is not a valid JSON file", + filePath + )); + return; + } + + nlohmann::json jsonData; + file >> jsonData; + + if (jsonData.find("data") == jsonData.end()) { + throw ghoul::RuntimeError(std::format( + "Error loading JSON file. No 'data' was found in '{}'", filePath + )); + } + + _data.clear(); + _startTimes.clear(); + + for (const nlohmann::json& item : jsonData["data"]) { + const std::string& timeString = item[0].get(); + double j2000Time = Time::convertTime(timeString); + double value = item[1].get(); + _data[j2000Time] = value; + _startTimes.push_back(j2000Time); + } + + std::sort(_startTimes.begin(), _startTimes.end()); + computeSequenceEndTime(); +} + +void DashboardItemTimeVaryingText::computeSequenceEndTime() { + if (_startTimes.size() > 1) { + double first = _startTimes.front(); + double last = _startTimes.back(); + double avgDuration = (last - first) / static_cast(_startTimes.size() - 1); + // Extend end time so the last value remains visible for one more interval + _sequenceEndTime = last + avgDuration; + } +} + +int DashboardItemTimeVaryingText::updateActiveTriggerTimeIndex(double currentTime) const { + auto it = std::upper_bound(_startTimes.begin(), _startTimes.end(), currentTime); + if (it != _startTimes.end()) { + if (it != _startTimes.begin()) { + return static_cast(std::distance(_startTimes.begin(), it)) - 1; + } + return 0; + } + return static_cast(_startTimes.size()) - 1; +} +}// namespace openspace diff --git a/modules/base/dashboard/dashboarditemtimevaryingtext.h b/modules/base/dashboard/dashboarditemtimevaryingtext.h new file mode 100644 index 0000000000..dda5efba25 --- /dev/null +++ b/modules/base/dashboard/dashboarditemtimevaryingtext.h @@ -0,0 +1,61 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2025 * + * * + * 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_MODULE_BASE___DASHBOARDITEMTIMEVARYINGTEXT___H__ + #define __OPENSPACE_MODULE_BASE___DASHBOARDITEMTIMEVARYINGTEXT___H__ + + #include + + #include + + namespace openspace { + + namespace documentation { struct Documentation; } + + class DashboardItemTimeVaryingText : public DashboardTextItem { + public: + explicit DashboardItemTimeVaryingText(const ghoul::Dictionary& dictionary); + ~DashboardItemTimeVaryingText() override = default; + + void update() override; + + static documentation::Documentation Documentation(); + + private: + void loadDataFromJson(const std::string& filePath); + void computeSequenceEndTime(); + int updateActiveTriggerTimeIndex(double currentTime) const; + + properties::StringProperty _formatString; + properties::StringProperty _dataFile; + + std::unordered_map _data; + std::vector _startTimes; + + int _activeTriggerTimeIndex = -1; + double _sequenceEndTime = 0.0; + }; + } // namespace openspace + + #endif // __OPENSPACE_MODULE_BASE___DASHBOARDITEMTIMEVARYINGTEXT___H__ From 586ed978e860869212847227080bf8d6129d8e36 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 6 May 2025 09:36:23 +0200 Subject: [PATCH 05/11] Update ghoul repository to update tinyprocesslibrary --- ext/ghoul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ghoul b/ext/ghoul index f02810ad2f..1d884cabf3 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit f02810ad2f77166711f4503060e20745f0d808c6 +Subproject commit 1d884cabf3fa03955d123dfcae3eb83be747a0e7 From 1d56563412f84e79a0d02a0bb4a0899541e003fc Mon Sep 17 00:00:00 2001 From: Emma Broman Date: Tue, 6 May 2025 18:17:41 +0200 Subject: [PATCH 06/11] Move profile name from top bar center to File menu (#3628) * Add more profile meta info to profile topic, and gueard for nonexisting meta entry * Add punctuation to end of profile descriptions * Cleanup * Apply suggestions from code review Co-authored-by: Alexander Bock * Update GUI hash --------- Co-authored-by: Alexander Bock --- data/assets/util/webgui.asset | 2 +- data/profiles/asteroids.profile | 2 +- data/profiles/default.profile | 2 +- data/profiles/eclipse.profile | 2 +- data/profiles/missions/apollo.profile | 2 +- data/profiles/missions/artemis.profile | 2 +- data/profiles/missions/bepicolombo.profile | 2 +- data/profiles/missions/dawn.profile | 2 +- data/profiles/missions/gaia.profile | 2 +- data/profiles/missions/juice.profile | 2 +- data/profiles/missions/juno.profile | 2 +- data/profiles/missions/jwst.profile | 2 +- data/profiles/missions/mars.profile | 2 +- data/profiles/missions/messenger.profile | 2 +- data/profiles/missions/newhorizons.profile | 2 +- data/profiles/missions/osirisrex.profile | 2 +- data/profiles/missions/rosetta.profile | 2 +- data/profiles/missions/voyager.profile | 2 +- .../spaceweather/bastilleday2000.profile | 2 +- .../spaceweather/solarstorm2012.profile | 2 +- modules/server/src/topics/profiletopic.cpp | 21 +++++++++++++++---- 21 files changed, 37 insertions(+), 24 deletions(-) diff --git a/data/assets/util/webgui.asset b/data/assets/util/webgui.asset index 9d1e878e79..be2750b846 100644 --- a/data/assets/util/webgui.asset +++ b/data/assets/util/webgui.asset @@ -4,7 +4,7 @@ local guiCustomization = asset.require("customization/gui") -- Select which commit hashes to use for the UI frontend -local frontendHash = "f899267b30691a10c8833c0afccc16976797d0fe" +local frontendHash = "8c454895b301ba2d9d1b845b5ba506d3f4c887b9" -- The name of the file to download from the server local file = "frontend.zip" diff --git a/data/profiles/asteroids.profile b/data/profiles/asteroids.profile index dad2d12e39..b4f8ef1704 100644 --- a/data/profiles/asteroids.profile +++ b/data/profiles/asteroids.profile @@ -59,7 +59,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This profile shows approximately 936,000 asteroids from the JPL Horizons Small-Body Database (SBDB). Included in this profile (and defined on our wiki): Amor Asteroids, Apollo Asteroids, Aten Asteroids, Atira Asteroids, Centaur Asteroids, Chiron-Type Comets, Encke-Type Comets, Halley-Type Comets, Inner Main Asteroid Belt Asteroids, Jupiter Family Comets, Jupiter Trojan Asteroids, Main Asteroid Belt Asteroids, Mars-Crossing Asteroids, Outer Main Asteroid Belt Asteroids, Potentially Hazardous Asteroids (PHAs), and Trans-Neptunian Asteroids", + "description": "This profile shows approximately 936,000 asteroids from the JPL Horizons Small-Body Database (SBDB). Included in this profile (and defined on our wiki): Amor Asteroids, Apollo Asteroids, Aten Asteroids, Atira Asteroids, Centaur Asteroids, Chiron-Type Comets, Encke-Type Comets, Halley-Type Comets, Inner Main Asteroid Belt Asteroids, Jupiter Family Comets, Jupiter Trojan Asteroids, Main Asteroid Belt Asteroids, Mars-Crossing Asteroids, Outer Main Asteroid Belt Asteroids, Potentially Hazardous Asteroids (PHAs), and Trans-Neptunian Asteroids.", "license": "MIT License", "name": "Asteroids", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/default.profile b/data/profiles/default.profile index dca3c7137c..b1f6b22d7e 100644 --- a/data/profiles/default.profile +++ b/data/profiles/default.profile @@ -59,7 +59,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "Default OpenSpace Profile. Adds Earth satellites not contained in other profiles", + "description": "Default OpenSpace Profile. Adds Earth satellites not contained in other profiles.", "license": "MIT License", "name": "Default", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/eclipse.profile b/data/profiles/eclipse.profile index 783ec91734..8c791c5c44 100644 --- a/data/profiles/eclipse.profile +++ b/data/profiles/eclipse.profile @@ -44,7 +44,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "OpenSpace profile to highlight solar eclipses on the Earth from 1900 to 2100", + "description": "OpenSpace profile to highlight solar eclipses on the Earth from 1900 to 2100.", "license": "MIT License", "name": "Default", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/apollo.profile b/data/profiles/missions/apollo.profile index bc436ca7ba..d03fff35df 100644 --- a/data/profiles/missions/apollo.profile +++ b/data/profiles/missions/apollo.profile @@ -82,7 +82,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This profile contains all the apollo assets in openspace. Apollo 8,11,17 and some associated materials. ", + "description": "This profile contains all the apollo assets in openspace. Apollo 8,11,17 and some associated materials.", "license": "MIT License", "name": "Apollo", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/artemis.profile b/data/profiles/missions/artemis.profile index 9bae7133cb..b2a49ca58c 100644 --- a/data/profiles/missions/artemis.profile +++ b/data/profiles/missions/artemis.profile @@ -56,7 +56,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "Artemis Profile. Adds the Orion capsule (Artemis-1) model with an estimated trajectery", + "description": "Artemis Profile. Adds the Orion capsule (Artemis-1) model with an estimated trajectery.", "license": "MIT License", "name": "Artemis", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/bepicolombo.profile b/data/profiles/missions/bepicolombo.profile index b221976fb6..0cb052f72b 100644 --- a/data/profiles/missions/bepicolombo.profile +++ b/data/profiles/missions/bepicolombo.profile @@ -43,7 +43,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "Default OpenSpace Profile. Adds Earth satellites not contained in other profiles", + "description": "Default OpenSpace Profile. Adds Earth satellites not contained in other profiles.", "license": "MIT License", "name": "Default", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/dawn.profile b/data/profiles/missions/dawn.profile index b8185af582..605b1ba9af 100644 --- a/data/profiles/missions/dawn.profile +++ b/data/profiles/missions/dawn.profile @@ -49,7 +49,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "work in progress profile for the dawn mission", + "description": "A work in progress profile for the dawn mission.", "license": "MIT License", "name": "Dawn", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/gaia.profile b/data/profiles/missions/gaia.profile index e2c9b83b4e..e85b8027aa 100644 --- a/data/profiles/missions/gaia.profile +++ b/data/profiles/missions/gaia.profile @@ -34,7 +34,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This scene contains a new rendering method to show the massive ESA Gaia stars dataset. By default, it loads the few million stars of the Gaia DR2 that contain radial velocities", + "description": "This scene contains a new rendering method to show the massive ESA Gaia stars dataset. By default, it loads the few million stars of the Gaia DR2 that contain radial velocities.", "license": "MIT License", "name": "Gaia", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/juice.profile b/data/profiles/missions/juice.profile index 2f6701ca4d..c169a5d245 100644 --- a/data/profiles/missions/juice.profile +++ b/data/profiles/missions/juice.profile @@ -50,7 +50,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "Juice profile that visualizes the currently best known trajectory for the JUICE mission the Jupiter and its moons. See https://sci.esa.int/documents/33960/35865/1567260128466-JUICE_Red_Book_i1.0.pdf for more information about the JUICE mission. Currently, only the Janus and NavCam instruments are included in this profile, but the other instruments are available for a custom profile. Some of these are not behaving correctly, which will be addressed later", + "description": "Juice profile that visualizes the currently best known trajectory for the JUICE mission the Jupiter and its moons. See https://sci.esa.int/documents/33960/35865/1567260128466-JUICE_Red_Book_i1.0.pdf for more information about the JUICE mission. Currently, only the Janus and NavCam instruments are included in this profile, but the other instruments are available for a custom profile. Some of these are not behaving correctly, which will be addressed later.", "license": "MIT License", "name": "Juice", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/juno.profile b/data/profiles/missions/juno.profile index 0f89af68af..3c8f67d74f 100644 --- a/data/profiles/missions/juno.profile +++ b/data/profiles/missions/juno.profile @@ -48,7 +48,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "work in progress scene for juno", + "description": "A work in progress profile for Juno.", "license": "MIT License", "name": "Juno", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/jwst.profile b/data/profiles/missions/jwst.profile index f3b5236abd..9f62f427f7 100644 --- a/data/profiles/missions/jwst.profile +++ b/data/profiles/missions/jwst.profile @@ -122,7 +122,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "James Webb Space Telescope Profile. Adds the James Webb Space Telescope model with an estimated trajectery", + "description": "James Webb Space Telescope Profile. Adds the James Webb Space Telescope model with an estimated trajectory.", "license": "MIT License", "name": "James Webb Space Telescope", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/mars.profile b/data/profiles/missions/mars.profile index 45eb1ebfbd..26f2c3f48c 100644 --- a/data/profiles/missions/mars.profile +++ b/data/profiles/missions/mars.profile @@ -54,7 +54,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This profile shows the landing of the NASA InSight lander on Mars. The final minutes of the approach are shown with the lander finishing on the surface of Mars. This profile also includes the landing trail and model for the Mars2020 rover Perseverence. ", + "description": "This profile shows the landing of the NASA InSight lander on Mars. The final minutes of the approach are shown with the lander finishing on the surface of Mars. This profile also includes the landing trail and model for the Mars2020 rover Perseverence.", "license": "MIT License", "name": "Mars", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/messenger.profile b/data/profiles/missions/messenger.profile index 866d8d8e16..6f5c5d66a0 100644 --- a/data/profiles/missions/messenger.profile +++ b/data/profiles/missions/messenger.profile @@ -42,7 +42,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This scene contains model and trajectory of the NASA MESSENGER spacecraft with craft pointing data from 2011-03 to 2011-06. In addition, a rendering of Mercury's magnetosphere based on data recorded by MESSENGER can be enabled and viewed around the planet. Along with the mission data, additional maps were added to Mercury showing mineral abundances on the surface and a multi-color mosaic from the MDIS instrument", + "description": "This scene contains model and trajectory of the NASA MESSENGER spacecraft with pointing data from 2011-03 to 2011-06. In addition, a rendering of Mercury's magnetosphere based on data recorded by MESSENGER can be enabled and viewed around the planet. Along with the mission data, additional maps were added to Mercury showing mineral abundances on the surface and a multi-color mosaic from the MDIS instrument.", "license": "MIT License", "name": "Messenger", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/newhorizons.profile b/data/profiles/missions/newhorizons.profile index 6d550f166b..a204b8e176 100644 --- a/data/profiles/missions/newhorizons.profile +++ b/data/profiles/missions/newhorizons.profile @@ -125,7 +125,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This profile shows the acquisition of NASA New Horizons' images of the Plutonian system in July 2015. The profile starts at around 10:00 on July 14th, around 10 minutes before a new image campaign starts. By selecting Pluto as the Origin and moving time faster, you can see the imprint of the instrument's field-of-view on the planetary surface and see the images being projected. A timer on the top left of the screen shows when the next image is being taken", + "description": "This profile shows the acquisition of NASA New Horizons' images of the Plutonian system in July 2015. The profile starts at around 10:00 on July 14th, around 10 minutes before a new image campaign starts. By selecting Pluto as the Origin and moving time faster, you can see the imprint of the instrument's field-of-view on the planetary surface and see the images being projected. A timer on the top left of the screen shows when the next image is being taken.", "license": "MIT License", "name": "New Horizons", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/osirisrex.profile b/data/profiles/missions/osirisrex.profile index 9ae61c4e06..cac5189551 100644 --- a/data/profiles/missions/osirisrex.profile +++ b/data/profiles/missions/osirisrex.profile @@ -77,7 +77,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This profile demonstrates the entire lifetime of the NASA OSIRIS-REx spacecraft on its way to the asteroid Bennu and its subsequent journey back to Earth. The profile starts at Earth around the time of the spacecraft's launch and has information throughout the entire mission until its landing back on Earth in Utah. The models of OSIRIS-REx and Bennu are available, as well as a preliminary instrument timing, which uses the same image projection technique as employed in New Horizons and Rosetta", + "description": "This profile demonstrates the entire lifetime of the NASA OSIRIS-REx spacecraft on its way to the asteroid Bennu and its subsequent journey back to Earth. The profile starts at Earth around the time of the spacecraft's launch and has information throughout the entire mission until its landing back on Earth in Utah. The models of OSIRIS-REx and Bennu are available, as well as a preliminary instrument timing, which uses the same image projection technique as employed in New Horizons and Rosetta.", "license": "MIT License", "name": "Osiris-Rex", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/rosetta.profile b/data/profiles/missions/rosetta.profile index 569eeb553b..6d843407a7 100644 --- a/data/profiles/missions/rosetta.profile +++ b/data/profiles/missions/rosetta.profile @@ -90,7 +90,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "The Rosetta scene shows the entire mission of ESA's Rosetta spacecraft around comet 67P, also known as Churyumov-Gerasimenko. The spacecraft's images are projected onto the comet and the separation of the Philae lander is visible as well", + "description": "The Rosetta scene shows the entire mission of ESA's Rosetta spacecraft around comet 67P, also known as Churyumov-Gerasimenko. The spacecraft's images are projected onto the comet and the separation of the Philae lander is visible as well.", "license": "MIT License", "name": "Rosetta", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/missions/voyager.profile b/data/profiles/missions/voyager.profile index 82445923cd..03d4eb7483 100644 --- a/data/profiles/missions/voyager.profile +++ b/data/profiles/missions/voyager.profile @@ -83,7 +83,7 @@ ], "meta": { "author": "OpenSpace Team", - "description": "This scene contains the NASA Voyager 1 and Voyager 2 missions as they were launched from Earth in the 1970s and observed the gas giants in the Solar System. The spacecraft models are included and are pointed accurately throughout the mission. Position and orientation information are available until the second half of the 21st century", + "description": "This scene contains the NASA Voyager 1 and Voyager 2 missions as they were launched from Earth in the 1970s and observed the gas giants in the Solar System. The spacecraft models are included and are pointed accurately throughout the mission. Position and orientation information are available until the second half of the 21st century.", "license": "MIT License", "name": "Voyager", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/spaceweather/bastilleday2000.profile b/data/profiles/spaceweather/bastilleday2000.profile index 33390c2d72..5b91a06709 100644 --- a/data/profiles/spaceweather/bastilleday2000.profile +++ b/data/profiles/spaceweather/bastilleday2000.profile @@ -110,7 +110,7 @@ ], "meta": { "author": "CCMC", - "description": "This profile is showing the Coronal mass ejection of the bastille day 2000-07-14. The profile is data intensive and will require a powerful GPU", + "description": "This profile is showing the Coronal mass ejection of the bastille day 2000-07-14. The profile is data intensive and will require a powerful GPU.", "license": "MIT License", "name": "Bastille day 2000", "url": "https://www.openspaceproject.com", diff --git a/data/profiles/spaceweather/solarstorm2012.profile b/data/profiles/spaceweather/solarstorm2012.profile index 4c051f7f0b..56f2cc3035 100644 --- a/data/profiles/spaceweather/solarstorm2012.profile +++ b/data/profiles/spaceweather/solarstorm2012.profile @@ -63,7 +63,7 @@ ], "meta": { "author": "Community Coordinated Modeling Center, NASA Goddard", - "description": "This profile is showing several coronal mass ejection (CMEs) during July 2012, where the last one was incredible intense. Its strength was comparable to the most intense CME in recorded history, the Carrington Event of 1859, which caused damage to electric equipment world wide. Luckily this 2012 event missed earth. The event is modeled with ENLIL which spands across the solarsystem, from the Sun to Earth, Batsrus which is showing the interaction of the flow of the solar wind and Earths magnetosphere. There is also one time step of the PFSS model showing the Suns local magnetic structure", + "description": "This profile is showing several coronal mass ejection (CMEs) during July 2012, where the last one was incredible intense. Its strength was comparable to the most intense CME in recorded history, the Carrington Event of 1859, which caused damage to electric equipment world wide. Luckily this 2012 event missed earth. The event is modeled with ENLIL which spands across the solarsystem, from the Sun to Earth, Batsrus which is showing the interaction of the flow of the solar wind and Earths magnetosphere. There is also one time step of the PFSS model showing the Suns local magnetic structure.", "license": "MIT License", "name": "Solar storm 2012", "url": "https://www.openspaceproject.com", diff --git a/modules/server/src/topics/profiletopic.cpp b/modules/server/src/topics/profiletopic.cpp index 06e4c85119..37cbe50cbc 100644 --- a/modules/server/src/topics/profiletopic.cpp +++ b/modules/server/src/topics/profiletopic.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -36,13 +37,25 @@ bool ProfileTopic::isDone() const { } void ProfileTopic::handleJson(const nlohmann::json&) { - const std::string name = global::profile->meta->name.value_or(""); - - const nlohmann::json data = { + // @TODO (2025-04-30, emmbr) If we expose the json converters from profile.cpp, we + // could use those here instead and minimize the risk of getting the serialization of + // the data out of sync + nlohmann::json data = { { "uiPanelVisibility", global::profile->uiPanelVisibility }, { "markNodes", global::profile->markNodes }, - { "name", name } + { "filePath", global::configuration->profile } }; + + if (global::profile->meta.has_value()) { + data["name"] = global::profile->meta->name.value_or(""); + + data["author"] = global::profile->meta->author.value_or(""); + data["description"] = global::profile->meta->description.value_or(""); + data["license"] = global::profile->meta->license.value_or(""); + data["url"] = global::profile->meta->url.value_or(""); + data["version"] = global::profile->meta->version.value_or(""); + } + _connection->sendJson(wrappedPayload(data)); } From d8a9ee87719d7b0a32ab4c709c008d4ba9913b16 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Wed, 7 May 2025 11:21:36 +0200 Subject: [PATCH 07/11] Fix CEF deprecation notice and crash (#3643) According to https://github.com/chromiumembedded/cef/issues/3685, using the so-called "Alloy bootstrap" (which seems to be the default) is deprecated. This causes a warning when starting OpenSpace. In some setups (e.g. an AppImage build on Ubuntu 22.04), the warning is followed by a fatal error and a crash: [0505/213642.653624:FATAL:path_service.cc(265)] Failed to get the path for 1001 Following the migration instructions from the aforementioned ticket solve both the warning and the crash. --- modules/webbrowser/src/cefhost.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/webbrowser/src/cefhost.cpp b/modules/webbrowser/src/cefhost.cpp index 1e3c197cf2..7b7bf7d355 100644 --- a/modules/webbrowser/src/cefhost.cpp +++ b/modules/webbrowser/src/cefhost.cpp @@ -57,6 +57,9 @@ CefHost::CefHost([[maybe_unused]] const std::string& helperLocation) { settings.windowless_rendering_enabled = true; attachDebugSettings(settings); + // cf. https://github.com/chromiumembedded/cef/issues/3685 + setings.chrome_runtime = true; + #ifdef __APPLE__ // Load the CEF framework library at runtime instead of linking directly as required // by the macOS sandbox implementation From 0bec798cb39c2765373283a21312478d3d2e3c7f Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 7 May 2025 14:58:32 +0200 Subject: [PATCH 08/11] Compile fix for CEF fix --- modules/webbrowser/src/cefhost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/webbrowser/src/cefhost.cpp b/modules/webbrowser/src/cefhost.cpp index 7b7bf7d355..e62451e13f 100644 --- a/modules/webbrowser/src/cefhost.cpp +++ b/modules/webbrowser/src/cefhost.cpp @@ -58,7 +58,7 @@ CefHost::CefHost([[maybe_unused]] const std::string& helperLocation) { attachDebugSettings(settings); // cf. https://github.com/chromiumembedded/cef/issues/3685 - setings.chrome_runtime = true; + settings.chrome_runtime = true; #ifdef __APPLE__ // Load the CEF framework library at runtime instead of linking directly as required From 5588395b2af4c56a02daa6b50f456c9413636d84 Mon Sep 17 00:00:00 2001 From: hn-88 Date: Thu, 8 May 2025 11:08:16 +0530 Subject: [PATCH 09/11] Correct cef builds index link. Add arm64 binary download support (#3647) --- modules/webbrowser/cmake/cef_support.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/webbrowser/cmake/cef_support.cmake b/modules/webbrowser/cmake/cef_support.cmake index 784d7a05dc..93fe19cbb3 100644 --- a/modules/webbrowser/cmake/cef_support.cmake +++ b/modules/webbrowser/cmake/cef_support.cmake @@ -33,9 +33,15 @@ function(set_current_cef_build_platform) if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") - set(CEF_PLATFORM "macosx64" PARENT_SCOPE) + if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64") + set(CEF_PLATFORM "macosarm64" PARENT_SCOPE) + else() + set(CEF_PLATFORM "macosx64" PARENT_SCOPE) + endif() elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") - if (CMAKE_SIZEOF_VOID_P MATCHES 8) + if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64") + set(CEF_PLATFORM "linuxarm64" PARENT_SCOPE) + elseif (CMAKE_SIZEOF_VOID_P MATCHES 8) set(CEF_PLATFORM "linux64" PARENT_SCOPE) else () set(CEF_PLATFORM "linux32" PARENT_SCOPE) @@ -52,7 +58,7 @@ endfunction () # Download the CEF binary distribution for |platform| and |version| to # |download_dir|. The |CEF_ROOT| variable will be set in global scope pointing # to the extracted location. -# Visit http://opensource.spotify.com/cefbuilds/index.html for the list of +# Visit https://cef-builds.spotifycdn.com/index.html for the list of # supported platforms and versions. function(download_cef platform version download_dir) From a8d674ff98fd7939362862b6bb510b609b4baa28 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 8 May 2025 08:58:58 +0200 Subject: [PATCH 10/11] Throw correct exception to not crash when an invalid vector is baked (closes #3635) --- support/coding/codegen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/coding/codegen b/support/coding/codegen index 3b2c085fcd..9dc19ab571 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit 3b2c085fcd1be8edc3719aea40d7c4387044322c +Subproject commit 9dc19ab5716d7718198449c519b86b316d434142 From 6a7e40f4efe78f18a6c08af95e1e40240b498deb Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 8 May 2025 09:51:40 +0200 Subject: [PATCH 11/11] Disable rendering of the MacOS menu bar (closes #163) --- apps/OpenSpace/ext/sgct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index bf552217b0..f89856807b 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit bf552217b0b38b8ef7d9534126393255a08afad4 +Subproject commit f89856807bf25c2a821692106656208dd13a16b2