Commit 07aed8ff authored by Don Gagne's avatar Don Gagne

Merge pull request #2900 from DonLakeFlyer/GPSIndicator

Update gps indicator to hdop, new hdop boundaries
parents 27216843 f1bf5ab7
......@@ -1283,6 +1283,10 @@ VehicleGPSFactGroup::VehicleGPSFactGroup(QObject* parent)
_addFact(&_courseOverGroundFact, _courseOverGroundFactName);
_addFact(&_lockFact, _lockFactName);
_addFact(&_countFact, _countFactName);
_hdopFact.setRawValue(std::numeric_limits<float>::quiet_NaN());
_vdopFact.setRawValue(std::numeric_limits<float>::quiet_NaN());
_courseOverGroundFact.setRawValue(std::numeric_limits<float>::quiet_NaN());
}
void VehicleGPSFactGroup::setVehicle(Vehicle* vehicle)
......
......@@ -243,7 +243,7 @@ Rectangle {
color: colorWhite
}
QGCLabel {
text: activeVehicle ? (activeVehicle.gps.hdop.value < 10000 ? activeVehicle.gps.hdop.valueString : "N/A") : "N/A"
text: activeVehicle ? activeVehicle.gps.hdop.valueString : "--.--"
color: colorWhite
}
QGCLabel {
......@@ -251,7 +251,7 @@ Rectangle {
color: colorWhite
}
QGCLabel {
text: activeVehicle ? (activeVehicle.gps.vdop.value < 10000 ? activeVehicle.gps.vdop.valueString : "N/A") : "N/A"
text: activeVehicle ? activeVehicle.gps.vdop.valueString : "--.--"
color: colorWhite
}
QGCLabel {
......@@ -259,7 +259,7 @@ Rectangle {
color: colorWhite
}
QGCLabel {
text: activeVehicle ? activeVehicle.gps.courseOverGround.valueString : "N/A"
text: activeVehicle ? activeVehicle.gps.courseOverGround.valueString : "--.--"
color: colorWhite
}
}
......
......@@ -35,13 +35,13 @@ Row {
spacing: tbSpacing * 2
function getSatStrength(hdop) {
if (hdop < 3)
if (hdop <= 1.0)
return 100
if (hdop < 6)
if (hdop <= 1.4)
return 75
if (hdop < 11)
if (hdop <= 1.8)
return 50
if (hdop < 21)
if (hdop <= 3.0)
return 25
return 0
}
......@@ -181,8 +181,8 @@ Row {
}
}
QGCLabel {
text: (activeVehicle && activeVehicle.gps.count.value >= 0) ? activeVehicle.gps.count.valueString : ""
visible: (activeVehicle && activeVehicle.gps.count.value >= 0)
text: activeVehicle ? activeVehicle.gps.hdop.valueString : ""
visible: activeVehicle && !isNaN(activeVehicle.gps.hdop.value)
font.pixelSize: tbFontSmall
color: colorWhite
anchors.top: parent.top
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment