1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

OP-1739 Add BeiDou SV display to GCS

This commit is contained in:
Erik Gustavsson 2015-03-01 17:39:05 +01:00
parent 0610262cc3
commit 3a8c13a365
4 changed files with 1285 additions and 1129 deletions

View File

@ -129,7 +129,7 @@ void GpsConstellationWidget::updateSat(int index, int prn, int elevation, int az
-satIcons[index]->boundingRect().center().y());
satIcons[index]->setTransform(QTransform::fromTranslate(opd.x(), opd.y()), false);
// Show normal GPS, SBAS (120 - 158 range) or GLONASS (65 - 96, 255 if unidentified)
// Show normal GPS, SBAS (120 - 158 range), BeiDou (33 - 64, 159 - 163) or GLONASS (65 - 96, 255 if unidentified)
if (prn > 119 && prn < 159) {
if (snr) {
satIcons[index]->setElementId("satellite-sbas");
@ -142,6 +142,12 @@ void GpsConstellationWidget::updateSat(int index, int prn, int elevation, int az
} else {
satIcons[index]->setElementId("sat-glonass-notSeen");
}
} else if ((prn > 32 && prn < 65) || (prn > 158 && prn < 164)) {
if (snr) {
satIcons[index]->setElementId("satellite-beidou");
} else {
satIcons[index]->setElementId("sat-beidou-notSeen");
}
} else {
if (snr) {
satIcons[index]->setElementId("satellite");

View File

@ -1,955 +1,955 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GpsDisplayWidget</class>
<widget class="QWidget" name="GpsDisplayWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>609</width>
<height>606</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayoutTop">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QSplitter" name="splitter">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="childrenCollapsible">
<bool>true</bool>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout" rowstretch="1,0" columnstretch="1,0">
<item row="1" column="1">
<widget class="GpsSnrWidget" name="gpsSnrWidget">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>140</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>237</green>
<blue>237</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>237</green>
<blue>237</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Displays the SNR for each detected sat. GPS satellites are shown in green, GLONASS in cyan and SBAS in orange. Satellite number (PRN) is displayed inside the bar. Sat SNR is displayed above (in dBHz)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,1">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="GpsConstellationWidget" name="gpsSky">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>400</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="backgroundBrush">
<brush brushstyle="NoBrush">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0" rowspan="2">
<layout class="QVBoxLayout" name="infoVerticalLayout" stretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout1" stretch="0,0,1,0,1,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lat_label">
<property name="text">
<string>Coord:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="coord_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="coord_value_2">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="alt_label">
<property name="text">
<string>Alt :</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="coord_value_3">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout2" stretch="0,0,1,0,0,0,1">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="speed_label">
<property name="text">
<string>Speed:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="speed_value">
<property name="text">
<string>Unknown</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="bear_label">
<property name="text">
<string>Heading:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="bear_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout3" stretch="0,0,1">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>H / V / P DOP:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="dop_value">
<property name="text">
<string>0 / 0 / 0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout4" stretch="0,0,1,0,0,0,0,0,0,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="status_label">
<property name="text">
<string>Sats Used:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="status_value">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_17">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fix_label">
<property name="text">
<string>Fix Type:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_20">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fix_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_19">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout5" stretch="0,0">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="time_value">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_18">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="topMargin">
<number>0</number>
</property>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Ignored</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout2" stretch="0,0,0,0,0,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>9</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="connectButton">
<property name="text">
<string>Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="disconnectButton">
<property name="text">
<string>Disconnect</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>9</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGraphicsView" name="flatEarth">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>191</width>
<height>95</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>191</width>
<height>95</height>
</size>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string extracomment="Location of GCS on the Earth">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Location of GCS on the Earth&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="optimizationFlags">
<set>QGraphicsView::DontAdjustForAntialiasing</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="dataStreamGroupBox">
<property name="title">
<string>GPS Data Stream</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::WidgetWidth</enum>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>GpsConstellationWidget</class>
<extends>QGraphicsView</extends>
<header>gpsconstellationwidget.h</header>
</customwidget>
<customwidget>
<class>GpsSnrWidget</class>
<extends>QGraphicsView</extends>
<header>gpssnrwidget.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GpsDisplayWidget</class>
<widget class="QWidget" name="GpsDisplayWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>609</width>
<height>606</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayoutTop">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QSplitter" name="splitter">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="childrenCollapsible">
<bool>true</bool>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout" rowstretch="1,0" columnstretch="1,0">
<item row="1" column="1">
<widget class="GpsSnrWidget" name="gpsSnrWidget">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>140</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>237</green>
<blue>237</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>237</red>
<green>237</green>
<blue>237</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="Base">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>236</red>
<green>236</green>
<blue>236</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Displays the SNR for each detected sat. GPS satellites are shown in green, GLONASS in cyan, BeiDou in red and SBAS in orange. Satellite number (PRN) is displayed inside the bar. Sat SNR is displayed above (in dBHz)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,1">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="GpsConstellationWidget" name="gpsSky">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>400</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(255, 255, 255, 0);</string>
</property>
<property name="frameShape">
<enum>QFrame::Panel</enum>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="backgroundBrush">
<brush brushstyle="NoBrush">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0" rowspan="2">
<layout class="QVBoxLayout" name="infoVerticalLayout" stretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout1" stretch="0,0,1,0,1,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lat_label">
<property name="text">
<string>Coord:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="coord_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="coord_value_2">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="alt_label">
<property name="text">
<string>Alt :</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="coord_value_3">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout2" stretch="0,0,1,0,0,0,1">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="speed_label">
<property name="text">
<string>Speed:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="speed_value">
<property name="text">
<string>Unknown</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="bear_label">
<property name="text">
<string>Heading:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="bear_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line1">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout3" stretch="0,0,1">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>H / V / P DOP:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="dop_value">
<property name="text">
<string>0 / 0 / 0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout4" stretch="0,0,1,0,0,0,0,0,0,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="status_label">
<property name="text">
<string>Sats Used:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="status_value">
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_17">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fix_label">
<property name="text">
<string>Fix Type:</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_20">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>6</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="fix_value">
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_19">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="infoHorizontalLayout5" stretch="0,0">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="time_value">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Unknown</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_18">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="topMargin">
<number>0</number>
</property>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Ignored</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout2" stretch="0,0,0,0,0,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>9</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="connectButton">
<property name="text">
<string>Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="disconnectButton">
<property name="text">
<string>Disconnect</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>9</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGraphicsView" name="flatEarth">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>191</width>
<height>95</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>191</width>
<height>95</height>
</size>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string extracomment="Location of GCS on the Earth">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Location of GCS on the Earth&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="optimizationFlags">
<set>QGraphicsView::DontAdjustForAntialiasing</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="dataStreamGroupBox">
<property name="title">
<string>GPS Data Stream</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTextBrowser" name="textBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::WidgetWidth</enum>
</property>
<property name="acceptRichText">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>GpsConstellationWidget</class>
<extends>QGraphicsView</extends>
<header>gpsconstellationwidget.h</header>
</customwidget>
<customwidget>
<class>GpsSnrWidget</class>
<extends>QGraphicsView</extends>
<header>gpssnrwidget.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@ -1,146 +1,148 @@
#include "gpssnrwidget.h"
GpsSnrWidget::GpsSnrWidget(QWidget *parent) :
QGraphicsView(parent)
{
scene = new QGraphicsScene(this);
setScene(scene);
// Now create 'maxSatellites' satellite icons which we will move around on the map:
for (int i = 0; i < MAX_SATTELITES; i++) {
satellites[i][0] = 0;
satellites[i][1] = 0;
satellites[i][2] = 0;
satellites[i][3] = 0;
boxes[i] = new QGraphicsRectItem();
boxes[i]->setBrush(QColor("Green"));
scene->addItem(boxes[i]);
boxes[i]->hide();
satTexts[i] = new QGraphicsSimpleTextItem("##", boxes[i]);
satTexts[i]->setBrush(QColor("Black"));
satTexts[i]->setFont(QFont("Courier"));
satSNRs[i] = new QGraphicsSimpleTextItem("##", boxes[i]);
satSNRs[i]->setBrush(QColor("Black"));
satSNRs[i]->setFont(QFont("Courier"));
}
}
GpsSnrWidget::~GpsSnrWidget()
{
delete scene;
scene = 0;
}
void GpsSnrWidget::showEvent(QShowEvent *event)
{
Q_UNUSED(event)
scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height());
for (int index = 0; index < MAX_SATTELITES; index++) {
drawSat(index);
}
}
void GpsSnrWidget::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height());
for (int index = 0; index < MAX_SATTELITES; index++) {
drawSat(index);
}
}
void GpsSnrWidget::updateSat(int index, int prn, int elevation, int azimuth, int snr)
{
if (index >= MAX_SATTELITES) {
// A bit of error checking never hurts.
return;
}
// TODO: add range checking
satellites[index][0] = prn;
satellites[index][1] = elevation;
satellites[index][2] = azimuth;
satellites[index][3] = snr;
drawSat(index);
}
void GpsSnrWidget::drawSat(int index)
{
if (index >= MAX_SATTELITES) {
// A bit of error checking never hurts.
return;
}
const int prn = satellites[index][0];
const int snr = satellites[index][3];
if (prn && snr) {
boxes[index]->show();
// When using integer values, width and height are the
// box width and height, but the left and bottom borders are drawn on the box,
// and the top and right borders are drawn just next to the box.
// So the box seems one pixel wider and higher with a border.
// I'm sure there's a good explanation for that :)
// Casting to int rounds down, which is what I want.
// Minus 2 to allow a pixel of white left and right.
int availableWidth = (int)((scene->width() - 2) / MAX_SATTELITES);
// 2 pixels, one on each side.
qreal width = availableWidth - 2;
// SNR = 1-99 (0 is special)..
qreal height = int((scene->height() / 99) * snr + 0.5);
// 1 for showing a pixel of white to the left.
qreal x = availableWidth * index + 1;
// Rember, 0 is at the top.
qreal y = scene->height() - height;
// Compensate for the extra pixel for the border.
boxes[index]->setRect(0, 0, width - 1, height - 1);
boxes[index]->setPos(x, y);
QRectF boxRect = boxes[index]->boundingRect();
// Change color for SBAS sat (Egnos, etc..) 120 - 158 range
// GLONASS range 65-96 or 255
if (prn > 119 && prn < 159) {
boxes[index]->setBrush(QColor("#fd700b"));
} else if ((prn > 64 && prn < 97) || 255 == prn) {
boxes[index]->setBrush(QColor("Cyan"));
} else {
boxes[index]->setBrush(QColor("Green"));
}
QString prnString = QString().number(prn);
if (prnString.length() == 1) {
prnString = "0" + prnString;
}
satTexts[index]->setText(prnString);
QRectF textRect = satTexts[index]->boundingRect();
QTransform matrix;
qreal scale = 0.85 * (boxRect.width() / textRect.width());
matrix.translate(boxRect.width() / 2, boxRect.height());
matrix.scale(scale, scale);
matrix.translate(-textRect.width() / 2, -textRect.height());
satTexts[index]->setTransform(matrix, false);
QString snrString = QString().number(snr);
if (snrString.length() == 1) { // Will probably never happen!
snrString = "0" + snrString;
}
satSNRs[index]->setText(snrString);
textRect = satSNRs[index]->boundingRect();
matrix.reset();
scale = 0.85 * (boxRect.width() / textRect.width());
matrix.translate(boxRect.width() / 2, 0);
matrix.scale(scale, scale);
matrix.translate(-textRect.width() / 2, -textRect.height());
satSNRs[index]->setTransform(matrix, false);
} else {
boxes[index]->hide();
}
}
#include "gpssnrwidget.h"
GpsSnrWidget::GpsSnrWidget(QWidget *parent) :
QGraphicsView(parent)
{
scene = new QGraphicsScene(this);
setScene(scene);
// Now create 'maxSatellites' satellite icons which we will move around on the map:
for (int i = 0; i < MAX_SATTELITES; i++) {
satellites[i][0] = 0;
satellites[i][1] = 0;
satellites[i][2] = 0;
satellites[i][3] = 0;
boxes[i] = new QGraphicsRectItem();
boxes[i]->setBrush(QColor("Green"));
scene->addItem(boxes[i]);
boxes[i]->hide();
satTexts[i] = new QGraphicsSimpleTextItem("##", boxes[i]);
satTexts[i]->setBrush(QColor("Black"));
satTexts[i]->setFont(QFont("Courier"));
satSNRs[i] = new QGraphicsSimpleTextItem("##", boxes[i]);
satSNRs[i]->setBrush(QColor("Black"));
satSNRs[i]->setFont(QFont("Courier"));
}
}
GpsSnrWidget::~GpsSnrWidget()
{
delete scene;
scene = 0;
}
void GpsSnrWidget::showEvent(QShowEvent *event)
{
Q_UNUSED(event)
scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height());
for (int index = 0; index < MAX_SATTELITES; index++) {
drawSat(index);
}
}
void GpsSnrWidget::resizeEvent(QResizeEvent *event)
{
Q_UNUSED(event);
scene->setSceneRect(0, 0, this->viewport()->width(), this->viewport()->height());
for (int index = 0; index < MAX_SATTELITES; index++) {
drawSat(index);
}
}
void GpsSnrWidget::updateSat(int index, int prn, int elevation, int azimuth, int snr)
{
if (index >= MAX_SATTELITES) {
// A bit of error checking never hurts.
return;
}
// TODO: add range checking
satellites[index][0] = prn;
satellites[index][1] = elevation;
satellites[index][2] = azimuth;
satellites[index][3] = snr;
drawSat(index);
}
void GpsSnrWidget::drawSat(int index)
{
if (index >= MAX_SATTELITES) {
// A bit of error checking never hurts.
return;
}
const int prn = satellites[index][0];
const int snr = satellites[index][3];
if (prn && snr) {
boxes[index]->show();
// When using integer values, width and height are the
// box width and height, but the left and bottom borders are drawn on the box,
// and the top and right borders are drawn just next to the box.
// So the box seems one pixel wider and higher with a border.
// I'm sure there's a good explanation for that :)
// Casting to int rounds down, which is what I want.
// Minus 2 to allow a pixel of white left and right.
int availableWidth = (int)((scene->width() - 2) / MAX_SATTELITES);
// 2 pixels, one on each side.
qreal width = availableWidth - 2;
// SNR = 1-99 (0 is special)..
qreal height = int((scene->height() / 99) * snr + 0.5);
// 1 for showing a pixel of white to the left.
qreal x = availableWidth * index + 1;
// Rember, 0 is at the top.
qreal y = scene->height() - height;
// Compensate for the extra pixel for the border.
boxes[index]->setRect(0, 0, width - 1, height - 1);
boxes[index]->setPos(x, y);
QRectF boxRect = boxes[index]->boundingRect();
// Change color for SBAS sat (Egnos, etc..) 120 - 158 range
// GLONASS range 65-96 or 255, BeiDou 33-64 or 159-163
if (prn > 119 && prn < 159) {
boxes[index]->setBrush(QColor("#fd700b"));
} else if ((prn > 64 && prn < 97) || 255 == prn) {
boxes[index]->setBrush(QColor("Cyan"));
} else if ((prn > 32 && prn < 65) || (prn > 158 && prn < 164)) {
boxes[index]->setBrush(QColor("Red"));
} else {
boxes[index]->setBrush(QColor("Green"));
}
QString prnString = QString().number(prn);
if (prnString.length() == 1) {
prnString = "0" + prnString;
}
satTexts[index]->setText(prnString);
QRectF textRect = satTexts[index]->boundingRect();
QTransform matrix;
qreal scale = 0.85 * (boxRect.width() / textRect.width());
matrix.translate(boxRect.width() / 2, boxRect.height());
matrix.scale(scale, scale);
matrix.translate(-textRect.width() / 2, -textRect.height());
satTexts[index]->setTransform(matrix, false);
QString snrString = QString().number(snr);
if (snrString.length() == 1) { // Will probably never happen!
snrString = "0" + snrString;
}
satSNRs[index]->setText(snrString);
textRect = satSNRs[index]->boundingRect();
matrix.reset();
scale = 0.85 * (boxRect.width() / textRect.width());
matrix.translate(boxRect.width() / 2, 0);
matrix.scale(scale, scale);
matrix.translate(-textRect.width() / 2, -textRect.height());
satSNRs[index]->setTransform(matrix, false);
} else {
boxes[index]->hide();
}
}

View File

@ -14,8 +14,8 @@
height="691.54303"
id="svg2"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="gpsEarth_work.svg">
inkscape:version="0.48.4 r9939"
sodipodi:docname="gpsEarth.svg">
<defs
id="defs4">
<linearGradient
@ -907,6 +907,102 @@
y1="353.18066"
x2="148.63506"
y2="481.89807" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3815-6-7"
id="radialGradient3937-6-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.11243486,0.51064271,-0.68854473,-0.15160586,748.65596,-75.556107)"
cx="559.92383"
cy="182.67093"
fx="559.92383"
fy="182.67093"
r="21.496641" />
<linearGradient
id="linearGradient3815-6-7">
<stop
style="stop-color:#f1f4fc;stop-opacity:1;"
offset="0"
id="stop3817-4-6" />
<stop
style="stop-color:#f1f4fc;stop-opacity:0;"
offset="1"
id="stop3819-6-4" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter3985-6-8"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.8285714"
id="feGaussianBlur3987-7-5" />
</filter>
<radialGradient
r="21.496641"
fy="182.67093"
fx="559.92383"
cy="182.67093"
cx="559.92383"
gradientTransform="matrix(-0.11243486,0.51064271,-0.68854473,-0.15160586,748.65596,-75.556107)"
gradientUnits="userSpaceOnUse"
id="radialGradient3207"
xlink:href="#linearGradient3815-6-7"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3815-6-9"
id="radialGradient4015-9-9"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.11243486,0.51064271,-0.68854473,-0.15160586,748.65596,-75.556107)"
cx="559.92383"
cy="182.67093"
fx="559.92383"
fy="182.67093"
r="21.496641" />
<linearGradient
inkscape:collect="always"
id="linearGradient3815-6-9">
<stop
style="stop-color:#f1f4fc;stop-opacity:1;"
offset="0"
id="stop3817-4-7" />
<stop
style="stop-color:#f1f4fc;stop-opacity:0;"
offset="1"
id="stop3819-6-3" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter3985-6-6"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.8285714"
id="feGaussianBlur3987-7-8" />
</filter>
<radialGradient
r="21.496641"
fy="182.67093"
fx="559.92383"
cy="182.67093"
cx="559.92383"
gradientTransform="matrix(-0.11243486,0.51064271,-0.68854473,-0.15160586,748.65596,-75.556107)"
gradientUnits="userSpaceOnUse"
id="radialGradient4023"
xlink:href="#linearGradient3815-6-9"
inkscape:collect="always" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3815-6-7"
id="radialGradient4050"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.11243486,0.51064271,-0.68854473,-0.15160586,748.65596,-75.556107)"
cx="559.92383"
cy="182.67093"
fx="559.92383"
fy="182.67093"
r="21.496641" />
</defs>
<sodipodi:namedview
id="base"
@ -915,16 +1011,16 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.43130409"
inkscape:cx="302.55734"
inkscape:cy="389.84143"
inkscape:zoom="1.2199122"
inkscape:cx="597.90072"
inkscape:cy="457.17106"
inkscape:document-units="px"
inkscape:current-layer="layer10"
inkscape:current-layer="layer13"
showgrid="false"
inkscape:window-width="1280"
inkscape:window-height="928"
inkscape:window-width="2560"
inkscape:window-height="1414"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-y="18"
inkscape:window-maximized="1"
inkscape:snap-object-midpoints="true"
inkscape:object-nodes="false"
@ -943,7 +1039,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@ -1007,7 +1103,7 @@
style="opacity:0.69172932;color:#000000;fill:#616a60;fill-opacity:1;fill-rule:nonzero;stroke:#6a6c69;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter5048);enable-background:accumulate" />
<path
transform="translate(-16.439758,-3.266917)"
d="M 598.0103,404.8544 A 227.28432,227.28432 0 1 1 143.44167,404.8544 A 227.28432,227.28432 0 1 1 598.0103,404.8544 z"
d="m 598.0103,404.8544 c 0,125.52566 -101.75866,227.28432 -227.28432,227.28432 -125.52566,0 -227.28431,-101.75866 -227.28431,-227.28432 0,-125.52566 101.75865,-227.28432 227.28431,-227.28432 125.52566,0 227.28432,101.75866 227.28432,227.28432 z"
sodipodi:ry="227.28432"
sodipodi:rx="227.28432"
sodipodi:cy="404.8544"
@ -1017,7 +1113,7 @@
sodipodi:type="arc" />
<path
transform="matrix(1.0229478,0,0,0.27614188,-24.947098,289.79023)"
d="M 598.0103,404.8544 A 227.28432,227.28432 0 1 1 143.44167,404.8544 A 227.28432,227.28432 0 1 1 598.0103,404.8544 z"
d="m 598.0103,404.8544 c 0,125.52566 -101.75866,227.28432 -227.28432,227.28432 -125.52566,0 -227.28431,-101.75866 -227.28431,-227.28432 0,-125.52566 101.75865,-227.28432 227.28431,-227.28432 125.52566,0 227.28432,101.75866 227.28432,227.28432 z"
sodipodi:ry="227.28432"
sodipodi:rx="227.28432"
sodipodi:cy="404.8544"
@ -1056,14 +1152,14 @@
sodipodi:cy="410.41025"
sodipodi:rx="89.398499"
sodipodi:ry="89.398499"
d="M 451.71402,343.4835 A 89.398499,89.398499 0 1 1 437.72993,333.33041"
d="m 451.71402,343.4835 c 36.96262,32.73378 40.39077,89.23387 7.657,126.19649 -32.73378,36.96262 -89.23387,40.39078 -126.19649,7.657 -36.96262,-32.73377 -40.39077,-89.23386 -7.657,-126.19648 28.33719,-31.99805 75.3601,-39.46142 112.2124,-17.8101"
transform="matrix(1.2638612,0,0,1.2638612,-124.40402,-114.71229)"
sodipodi:start="5.4371862"
sodipodi:end="11.526764"
sodipodi:open="true" />
<path
transform="matrix(1.9716104,0,0,1.9716104,-399.86707,-407.46887)"
d="M 451.12161,342.96352 A 89.398499,89.398499 0 1 1 442.12815,336.08929"
d="m 451.12161,342.96352 c 37.2498,32.4066 41.17599,88.87427 8.76939,126.12407 -32.4066,37.2498 -88.87426,41.17599 -126.12407,8.76939 -37.2498,-32.4066 -41.17598,-88.87427 -8.76938,-126.12407 29.53979,-33.95454 79.71538,-40.65585 117.1306,-15.64362"
sodipodi:ry="89.398499"
sodipodi:rx="89.398499"
sodipodi:cy="410.41025"
@ -1148,7 +1244,7 @@
sodipodi:cy="404.8544"
sodipodi:rx="227.28432"
sodipodi:ry="227.28432"
d="M 598.0103,404.8544 A 227.28432,227.28432 0 1 1 143.44167,404.8544 A 227.28432,227.28432 0 1 1 598.0103,404.8544 z"
d="m 598.0103,404.8544 c 0,125.52566 -101.75866,227.28432 -227.28432,227.28432 -125.52566,0 -227.28431,-101.75866 -227.28431,-227.28432 0,-125.52566 101.75865,-227.28432 227.28431,-227.28432 125.52566,0 227.28432,101.75866 227.28432,227.28432 z"
transform="matrix(1.0185,0,0,1.0185,-23.298188,-10.756724)" />
<path
style="color:#000000;fill:url(#linearGradient5561);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@ -1238,7 +1334,7 @@
inkscape:label="#g3722">
<path
transform="translate(0.08444214,2.2540576e-8)"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
@ -1254,7 +1350,7 @@
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444218,2.2540576e-8)" />
</g>
<g
@ -1270,11 +1366,11 @@
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444214,2.2540576e-8)" />
<path
transform="translate(0.08444218,2.2540576e-8)"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
@ -1295,11 +1391,11 @@
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444214,2.2540576e-8)" />
<path
transform="translate(0.08444218,-2.2540576e-8)"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
@ -1315,7 +1411,7 @@
style="opacity:0.4">
<path
transform="translate(0.08444214,2.2540576e-8)"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
@ -1331,7 +1427,7 @@
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444218,-2.2540576e-8)" />
</g>
<g
@ -1340,7 +1436,7 @@
inkscape:label="#g3722">
<path
transform="translate(0.08444214,2.2540576e-8)"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
@ -1356,7 +1452,7 @@
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444218,2.2540576e-8)" />
</g>
<g
@ -1372,11 +1468,11 @@
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444214,2.2540576e-8)" />
<path
transform="translate(0.08444218,2.2540576e-8)"
d="M 589.99999,195.93361 C 589.99999,207.37379 580.72589,216.64789 569.28571,216.64789 C 557.84552,216.64789 548.57142,207.37379 548.57142,195.93361 C 548.57142,184.49343 557.84552,175.21932 569.28571,175.21932 C 580.72589,175.21932 589.99999,184.49343 589.99999,195.93361 z"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
@ -1385,6 +1481,58 @@
style="fill:url(#radialGradient4055-2);fill-opacity:1;stroke:none;filter:url(#filter3985-6)"
sodipodi:type="arc" />
</g>
<g
style="display:inline"
inkscape:label="#g3722"
transform="matrix(0.93879118,0,0,0.93879118,-73.44061,-70.698335)"
id="satellite-beidou">
<path
sodipodi:type="arc"
style="fill:#ff0000;fill-opacity:1;stroke:#ff5721;stroke-width:1.56471384;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3915-7"
sodipodi:cx="569.28571"
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444214,2.2540576e-8)" />
<path
transform="translate(0.08444218,-2.2540576e-8)"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
sodipodi:cx="569.28571"
id="path3921-2"
style="fill:url(#radialGradient4050);fill-opacity:1;stroke:none;filter:url(#filter3985-6-8)"
sodipodi:type="arc" />
</g>
<g
id="sat-beidou-notSeen"
transform="matrix(0.93879118,0,0,0.93879118,-10.549949,-69.249241)"
inkscape:label="#g3722"
style="opacity:0.4;display:inline">
<path
transform="translate(0.08444214,2.2540576e-8)"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
sodipodi:ry="20.714285"
sodipodi:rx="20.714285"
sodipodi:cy="195.93361"
sodipodi:cx="569.28571"
id="path4003-9"
style="fill:#ff0000;fill-opacity:1;stroke:#ff5721;stroke-width:1.56471384;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
sodipodi:type="arc" />
<path
sodipodi:type="arc"
style="fill:url(#radialGradient4023);fill-opacity:1;stroke:none;filter:url(#filter3985-6-6)"
id="path4009-9"
sodipodi:cx="569.28571"
sodipodi:cy="195.93361"
sodipodi:rx="20.714285"
sodipodi:ry="20.714285"
d="m 589.99999,195.93361 c 0,11.44018 -9.2741,20.71428 -20.71428,20.71428 -11.44019,0 -20.71429,-9.2741 -20.71429,-20.71428 0,-11.44018 9.2741,-20.71429 20.71429,-20.71429 11.44018,0 20.71428,9.27411 20.71428,20.71429 z"
transform="translate(0.08444218,-2.2540576e-8)" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 85 KiB