GUI cleanups
This commit is contained in:
@ -97,10 +97,10 @@ class Ui_MainWindow(object):
|
|||||||
self.txtAltitude.setFrameShadow(QFrame.Sunken)
|
self.txtAltitude.setFrameShadow(QFrame.Sunken)
|
||||||
self.label_9 = QLabel(self.centralwidget)
|
self.label_9 = QLabel(self.centralwidget)
|
||||||
self.label_9.setObjectName(u"label_9")
|
self.label_9.setObjectName(u"label_9")
|
||||||
self.label_9.setGeometry(QRect(140, 120, 49, 16))
|
self.label_9.setGeometry(QRect(130, 120, 81, 16))
|
||||||
self.label_13 = QLabel(self.centralwidget)
|
self.label_13 = QLabel(self.centralwidget)
|
||||||
self.label_13.setObjectName(u"label_13")
|
self.label_13.setObjectName(u"label_13")
|
||||||
self.label_13.setGeometry(QRect(140, 160, 49, 16))
|
self.label_13.setGeometry(QRect(130, 160, 49, 16))
|
||||||
self.txtMode = QLabel(self.centralwidget)
|
self.txtMode = QLabel(self.centralwidget)
|
||||||
self.txtMode.setObjectName(u"txtMode")
|
self.txtMode.setObjectName(u"txtMode")
|
||||||
self.txtMode.setGeometry(QRect(130, 40, 49, 16))
|
self.txtMode.setGeometry(QRect(130, 40, 49, 16))
|
||||||
@ -172,7 +172,7 @@ class Ui_MainWindow(object):
|
|||||||
self.txtHDOP.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
self.txtHDOP.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
||||||
self.txtVDOP.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
self.txtVDOP.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
||||||
self.txtAltitude.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
self.txtAltitude.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
||||||
self.label_9.setText(QCoreApplication.translate("MainWindow", u"meters", None))
|
self.label_9.setText(QCoreApplication.translate("MainWindow", u"m (WGS84)", None))
|
||||||
self.label_13.setText(QCoreApplication.translate("MainWindow", u"m/sec", None))
|
self.label_13.setText(QCoreApplication.translate("MainWindow", u"m/sec", None))
|
||||||
self.txtMode.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
self.txtMode.setText(QCoreApplication.translate("MainWindow", u"0", None))
|
||||||
self.label_6.setText(QCoreApplication.translate("MainWindow", u"Grid:", None))
|
self.label_6.setText(QCoreApplication.translate("MainWindow", u"Grid:", None))
|
||||||
|
|||||||
@ -11,7 +11,6 @@ from time import strftime, time
|
|||||||
from gps import *
|
from gps import *
|
||||||
import gpxpy
|
import gpxpy
|
||||||
|
|
||||||
|
|
||||||
from PySide2.QtGui import *
|
from PySide2.QtGui import *
|
||||||
from PySide2.QtWidgets import QApplication, QMainWindow, QGraphicsEllipseItem, QFileDialog, QGraphicsScene, QGraphicsProxyWidget
|
from PySide2.QtWidgets import QApplication, QMainWindow, QGraphicsEllipseItem, QFileDialog, QGraphicsScene, QGraphicsProxyWidget
|
||||||
from PySide2.QtCore import QObject, Slot, Signal, QThread, QDir, QRect
|
from PySide2.QtCore import QObject, Slot, Signal, QThread, QDir, QRect
|
||||||
@ -111,7 +110,7 @@ class QtGPSWindow(MainWindow):
|
|||||||
self.orange = QColor(255,80,0)
|
self.orange = QColor(255,80,0)
|
||||||
self.yellow = QColor(255,211,0)
|
self.yellow = QColor(255,211,0)
|
||||||
self.green = QColor(0,255,0)
|
self.green = QColor(0,255,0)
|
||||||
self.green = QColor(0,0,255)
|
self.blue = QColor(0,0,255)
|
||||||
|
|
||||||
self.scene = QtWidgets.QGraphicsScene()
|
self.scene = QtWidgets.QGraphicsScene()
|
||||||
self.viewSatellites.setScene(self.scene)
|
self.viewSatellites.setScene(self.scene)
|
||||||
@ -177,22 +176,22 @@ class QtGPSWindow(MainWindow):
|
|||||||
if azim >= 360 or elev < -10 or elev > 90:
|
if azim >= 360 or elev < -10 or elev > 90:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
cname = 'black'
|
cname = '#000000'
|
||||||
color = self.black
|
color = self.black
|
||||||
if snr < 12:
|
if snr < 12:
|
||||||
cname = 'gray'
|
cname = '#808080'
|
||||||
color = self.gray
|
color = self.gray
|
||||||
elif snr < 30:
|
elif snr < 30:
|
||||||
cname = 'red'
|
cname = '#ff0000'
|
||||||
color = self.red
|
color = self.red
|
||||||
elif snr < 36:
|
elif snr < 36:
|
||||||
cname = 'yellow'
|
cname = '#ffd300'
|
||||||
color = self.yellow
|
color = self.yellow
|
||||||
elif snr < 42:
|
elif snr < 42:
|
||||||
color = 'green'
|
color = '#00ff00'
|
||||||
color = self.green
|
color = self.green
|
||||||
else:
|
else:
|
||||||
color = 'blue'
|
color = '#0000ff'
|
||||||
color = self.blue
|
color = self.blue
|
||||||
|
|
||||||
txt = "%4u %4u %4u %3u %1u" % (prn, azim, elev, snr, used)
|
txt = "%4u %4u %4u %3u %1u" % (prn, azim, elev, snr, used)
|
||||||
@ -217,6 +216,7 @@ class QtGPSWindow(MainWindow):
|
|||||||
polar = figure.add_subplot(111, projection='polar')
|
polar = figure.add_subplot(111, projection='polar')
|
||||||
polar.scatter(theta, radius, c=colors, s=area, cmap=None, alpha=0.75)
|
polar.scatter(theta, radius, c=colors, s=area, cmap=None, alpha=0.75)
|
||||||
polar.set_rorigin(90.0)
|
polar.set_rorigin(90.0)
|
||||||
|
polar.set_xticklabels([])
|
||||||
polar.set_yticklabels([])
|
polar.set_yticklabels([])
|
||||||
for i, prn in enumerate(prns):
|
for i, prn in enumerate(prns):
|
||||||
polar.annotate(str(prn), (theta[i], radius[i]))
|
polar.annotate(str(prn), (theta[i], radius[i]))
|
||||||
|
|||||||
@ -318,20 +318,20 @@
|
|||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>140</x>
|
<x>130</x>
|
||||||
<y>120</y>
|
<y>120</y>
|
||||||
<width>49</width>
|
<width>81</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>meters</string>
|
<string>m (WGS84)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="label_13">
|
<widget class="QLabel" name="label_13">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>140</x>
|
<x>130</x>
|
||||||
<y>160</y>
|
<y>160</y>
|
||||||
<width>49</width>
|
<width>49</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
|
|||||||
@ -7,4 +7,4 @@ sudo apt-get -y --ignore-missing install python3-all python3-dev python3-tk idle
|
|||||||
# Python addons
|
# Python addons
|
||||||
sudo -H pip install --upgrade pip
|
sudo -H pip install --upgrade pip
|
||||||
sudo -H pip install configparser pyside2
|
sudo -H pip install configparser pyside2
|
||||||
sudo -H pip install --upgrade pyserial numpy scipy scapy gps gpxpy maidenhead virtualenv virtualenvwrapper
|
sudo -H pip install --upgrade pyserial matplotlib numpy scipy scapy gps gpxpy maidenhead virtualenv virtualenvwrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user