Added D-Region Absorption Predictions
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
<file>images/icons/documents.svg</file>
|
||||
<file>images/icons/abort.svg</file>
|
||||
<file>images/spectrum_not_available.svg</file>
|
||||
<file>images/artemis_not_available.svg</file>
|
||||
|
||||
<file>ui/Artemis.qml</file>
|
||||
<file>ui/DbManager.qml</file>
|
||||
@@ -37,6 +38,7 @@
|
||||
<file>ui/SignalPage.qml</file>
|
||||
<file>ui/SpaceWeatherCurrentPage.qml</file>
|
||||
<file>ui/SpaceWeatherForecastPage.qml</file>
|
||||
<file>ui/SpaceWeatherDRAPPage.qml</file>
|
||||
|
||||
<file>ui/About.qml</file>
|
||||
|
||||
|
||||
1591
artemis/resources.py
1591
artemis/resources.py
File diff suppressed because it is too large
Load Diff
@@ -12,6 +12,7 @@ class UIspaceweather(QObject):
|
||||
show_ui = Signal()
|
||||
load_poseidon_report = Signal(dict)
|
||||
load_poseidon_forecast_report = Signal(dict)
|
||||
load_poseidon_drap_report = Signal(dict)
|
||||
update_bottom_bar = Signal(str)
|
||||
|
||||
|
||||
@@ -26,6 +27,7 @@ class UIspaceweather(QObject):
|
||||
|
||||
self._window_current = self._window.findChild(QObject, "spaceWeatherCurrentObj")
|
||||
self._window_forecast = self._window.findChild(QObject, "spaceWeatherForecastObj")
|
||||
self._window_drap = self._window.findChild(QObject, "spaceWeatherDRAPObj")
|
||||
|
||||
self._connect()
|
||||
|
||||
@@ -38,6 +40,7 @@ class UIspaceweather(QObject):
|
||||
self.update_bottom_bar.connect(self._window.updateBottomBar)
|
||||
self.load_poseidon_report.connect(self._window_current.loadReport)
|
||||
self.load_poseidon_forecast_report.connect(self._window_forecast.loadForecastReport)
|
||||
self.load_poseidon_drap_report.connect(self._window_drap.loadDrapReport)
|
||||
|
||||
|
||||
def load_spaceweather_ui(self):
|
||||
@@ -55,6 +58,7 @@ class UIspaceweather(QObject):
|
||||
if poseidon_data:
|
||||
self.load_poseidon_report.emit(poseidon_data)
|
||||
self.load_poseidon_forecast_report.emit(poseidon_data)
|
||||
self.load_poseidon_drap_report.emit(poseidon_data)
|
||||
|
||||
self.update_bottom_bar.emit(
|
||||
'Loaded Poseidon report issued on {} at {} UTC'.format(
|
||||
|
||||
1
images/artemis_not_available.svg
Normal file
1
images/artemis_not_available.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 20 KiB |
@@ -50,6 +50,9 @@ Window {
|
||||
TabButton {
|
||||
text: qsTr("Forecasts")
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("DRAP")
|
||||
}
|
||||
}
|
||||
|
||||
StackLayout {
|
||||
@@ -68,6 +71,12 @@ Window {
|
||||
id: spaceWeatherForecastPage
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
SpaceWeatherDRAPPage {
|
||||
id: spaceWeatherDRAPPage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
107
ui/SpaceWeatherDRAPPage.qml
Normal file
107
ui/SpaceWeatherDRAPPage.qml
Normal file
@@ -0,0 +1,107 @@
|
||||
import QtQuick
|
||||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
Page {
|
||||
id: spaceWeatherDRAP
|
||||
anchors.fill: parent
|
||||
|
||||
objectName: "spaceWeatherDRAPObj"
|
||||
|
||||
function loadDrapReport(poseidon_data) {
|
||||
labelRecovery.text = poseidon_data['DRAP']['Recovery Time']
|
||||
labelXrayMsg.text = poseidon_data['DRAP']['XRay Msg']
|
||||
labelProtonMsg.text = poseidon_data['DRAP']['Proton Msg']
|
||||
|
||||
checkUrlExists("https://www.aresvalley.com/poseidon_engine/drap.png", function(exists) {
|
||||
if (exists) {
|
||||
imageBox.source = "https://www.aresvalley.com/poseidon_engine/drap.png"
|
||||
} 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: 20
|
||||
anchors.leftMargin: 20
|
||||
anchors.bottomMargin: 20
|
||||
anchors.topMargin: 20
|
||||
|
||||
Image {
|
||||
id: imageBox
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label {
|
||||
text: qsTr("RECOVERY TIME:")
|
||||
Layout.fillWidth: false
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
}
|
||||
Label {
|
||||
id: labelRecovery
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
font.pointSize: 12
|
||||
font.bold: true
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
|
||||
ColumnLayout {
|
||||
Label {
|
||||
text: qsTr("X-RAY STATUS")
|
||||
}
|
||||
Label {
|
||||
id: labelXrayMsg
|
||||
font.pointSize: 12
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Label {
|
||||
text: qsTr("PROTON STATUS")
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
}
|
||||
Label {
|
||||
id: labelProtonMsg
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
font.pointSize: 12
|
||||
font.bold: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user