Added Synoptic Analysis, UV Imagers, and Spectrometric Coronagraph

This commit is contained in:
Marco Dalla Tiezza
2024-06-25 00:38:00 +02:00
parent b8e6075aa0
commit ccc6e99a7f
7 changed files with 465 additions and 54 deletions

49
ui/SpaceWeatherSSA.qml Normal file
View File

@@ -0,0 +1,49 @@
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
Page {
id: spaceWeatherSSA
anchors.fill: parent
objectName: "spaceWeatherSSA"
function loadDrapReport(poseidon_data) {
checkUrlExists(poseidon_data['URL']['SYNOPTIC_MAP'], function(exists) {
if (exists) {
imageBox.source = poseidon_data['URL']['SYNOPTIC_MAP']
} else {
imageBox.source = "qrc:///images/artemis_not_available.svg"
}
})
}
function checkUrlExists(url, callback) {
var xhr = new XMLHttpRequest()
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
callback(xhr.status === 200)
}
}
xhr.open("HEAD", url, true)
xhr.send()
}
ColumnLayout {
anchors.fill: parent
anchors.rightMargin: 10
anchors.leftMargin: 10
anchors.bottomMargin: 10
anchors.topMargin: 10
Image {
id: imageBox
Layout.fillHeight: true
Layout.fillWidth: true
fillMode: Image.PreserveAspectFit
}
}
}