GUI cleanups

This commit is contained in:
2021-03-12 13:26:31 -05:00
parent d5662d6cd3
commit 38d86cab1c
6 changed files with 16 additions and 16 deletions

View File

@ -97,10 +97,10 @@ class Ui_MainWindow(object):
self.txtAltitude.setFrameShadow(QFrame.Sunken)
self.label_9 = QLabel(self.centralwidget)
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.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.setObjectName(u"txtMode")
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.txtVDOP.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.txtMode.setText(QCoreApplication.translate("MainWindow", u"0", None))
self.label_6.setText(QCoreApplication.translate("MainWindow", u"Grid:", None))

View File

@ -11,7 +11,6 @@ from time import strftime, time
from gps import *
import gpxpy
from PySide2.QtGui import *
from PySide2.QtWidgets import QApplication, QMainWindow, QGraphicsEllipseItem, QFileDialog, QGraphicsScene, QGraphicsProxyWidget
from PySide2.QtCore import QObject, Slot, Signal, QThread, QDir, QRect
@ -111,7 +110,7 @@ class QtGPSWindow(MainWindow):
self.orange = QColor(255,80,0)
self.yellow = QColor(255,211,0)
self.green = QColor(0,255,0)
self.green = QColor(0,0,255)
self.blue = QColor(0,0,255)
self.scene = QtWidgets.QGraphicsScene()
self.viewSatellites.setScene(self.scene)
@ -177,22 +176,22 @@ class QtGPSWindow(MainWindow):
if azim >= 360 or elev < -10 or elev > 90:
continue;
cname = 'black'
cname = '#000000'
color = self.black
if snr < 12:
cname = 'gray'
cname = '#808080'
color = self.gray
elif snr < 30:
cname = 'red'
cname = '#ff0000'
color = self.red
elif snr < 36:
cname = 'yellow'
cname = '#ffd300'
color = self.yellow
elif snr < 42:
color = 'green'
color = '#00ff00'
color = self.green
else:
color = 'blue'
color = '#0000ff'
color = self.blue
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.scatter(theta, radius, c=colors, s=area, cmap=None, alpha=0.75)
polar.set_rorigin(90.0)
polar.set_xticklabels([])
polar.set_yticklabels([])
for i, prn in enumerate(prns):
polar.annotate(str(prn), (theta[i], radius[i]))

View File

@ -318,20 +318,20 @@
<widget class="QLabel" name="label_9">
<property name="geometry">
<rect>
<x>140</x>
<x>130</x>
<y>120</y>
<width>49</width>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>meters</string>
<string>m (WGS84)</string>
</property>
</widget>
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>140</x>
<x>130</x>
<y>160</y>
<width>49</width>
<height>16</height>

View File

@ -7,4 +7,4 @@ sudo apt-get -y --ignore-missing install python3-all python3-dev python3-tk idle
# Python addons
sudo -H pip install --upgrade pip
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