diff --git a/src/FlightMap/Images/cOGPointer.svg b/src/FlightMap/Images/cOGPointer.svg
index 22123eb9515e871423687e3637854c21908b5f56..5720b1c6045b06391949cad7587c2e198111990b 100644
--- a/src/FlightMap/Images/cOGPointer.svg
+++ b/src/FlightMap/Images/cOGPointer.svg
@@ -17,10 +17,10 @@
enable-background="new 0 0 288 288"
xml:space="preserve"
inkscape:version="0.91 r13725"
- sodipodi:docname="cOGPointer .svg">image/svg+xml
\ No newline at end of file
diff --git a/src/FlightMap/Widgets/QGCCompassWidget.qml b/src/FlightMap/Widgets/QGCCompassWidget.qml
index c52990d063c4f31e4b15880e2c035acda379edff..a0a4769e3ef857d265019c9c67f0a8851ac03a5d 100644
--- a/src/FlightMap/Widgets/QGCCompassWidget.qml
+++ b/src/FlightMap/Widgets/QGCCompassWidget.qml
@@ -57,12 +57,12 @@ Item {
return vehicle && _showAdditionalIndicatorsCompass && !isNaN(_headingToNextWP)
}
- function isNorthUpLocked(){
- return _lockNorthUpCompass
+ function isNoseUpLocked(){
+ return _lockNoseUpCompass
}
readonly property bool _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass.value
- readonly property bool _lockNorthUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNorthUpCompass.value
+ readonly property bool _lockNoseUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNoseUpCompass.value
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
@@ -80,16 +80,17 @@ Item {
anchors.fill: parent
visible: false
+
Image {
- id: nextWPPointer
- source: isHeadingToNextWPOK() ? "/qmlimages/compassDottedLine.svg":""
+ id: cOGPointer
+ source: isCOGAngleOK() ? "/qmlimages/cOGPointer.svg" : ""
mipmap: true
fillMode: Image.PreserveAspectFit
anchors.fill: parent
sourceSize.height: parent.height
transform: Rotation {
- property var _angle: isNorthUpLocked()?_headingToNextWP-_heading:_headingToNextWP
+ property var _angle:isNoseUpLocked()?_courseOverGround-_heading:_courseOverGround
origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2
angle: _angle
@@ -97,36 +98,21 @@ Item {
}
Image {
- id: cOGPointer
- source: isCOGAngleOK() ? "/qmlimages/cOGPointer.svg" : ""
+ id: nextWPPointer
+ source: isHeadingToNextWPOK() ? "/qmlimages/compassDottedLine.svg":""
mipmap: true
fillMode: Image.PreserveAspectFit
anchors.fill: parent
sourceSize.height: parent.height
transform: Rotation {
- property var _angle:isNorthUpLocked()?_courseOverGround-_heading:_courseOverGround
+ property var _angle: isNoseUpLocked()?_headingToNextWP-_heading:_headingToNextWP
origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2
angle: _angle
}
}
- Image {
- id: pointer
- width: size * 0.65
- source: vehicle ? vehicle.vehicleImageCompass : ""
- mipmap: true
- sourceSize.width: width
- fillMode: Image.PreserveAspectFit
- anchors.centerIn: parent
- transform: Rotation {
- origin.x: pointer.width / 2
- origin.y: pointer.height / 2
- angle: isNorthUpLocked()?0:_heading
- }
- }
-
Image {
id: homePointer
width: size * 0.1
@@ -137,12 +123,28 @@ Item {
sourceSize.width: width
transform: Translate {
- property double _angle: isNorthUpLocked()?-_heading+_headingToHome:_headingToHome
+ property double _angle: isNoseUpLocked()?-_heading+_headingToHome:_headingToHome
x: size/2.3 * Math.sin((_angle)*(3.14/180))
y: - size/2.3 * Math.cos((_angle)*(3.14/180))
}
}
+ Image {
+ id: pointer
+ width: size * 0.65
+ source: vehicle ? vehicle.vehicleImageCompass : ""
+ mipmap: true
+ sourceSize.width: width
+ fillMode: Image.PreserveAspectFit
+ anchors.centerIn: parent
+ transform: Rotation {
+ origin.x: pointer.width / 2
+ origin.y: pointer.height / 2
+ angle: isNoseUpLocked()?0:_heading
+ }
+ }
+
+
QGCColoredImage {
id: compassDial
source: "/qmlimages/compassInstrumentDial.svg"
@@ -154,7 +156,7 @@ Item {
transform: Rotation {
origin.x: compassDial.width / 2
origin.y: compassDial.height / 2
- angle: isNorthUpLocked()?-_heading:0
+ angle: isNoseUpLocked()?-_heading:0
}
}
diff --git a/src/Settings/FlyView.SettingsGroup.json b/src/Settings/FlyView.SettingsGroup.json
index 2b43456d5d2746150b3e87d77dda45966819bc82..703afde6218809187a031b6d0f42c57af8583e3a 100644
--- a/src/Settings/FlyView.SettingsGroup.json
+++ b/src/Settings/FlyView.SettingsGroup.json
@@ -32,9 +32,9 @@
"defaultValue": false
},
{
- "name": "lockNorthUpCompass",
- "shortDescription": "Lock North up on Compass",
+ "name": "lockNoseUpCompass",
+ "shortDescription": "Lock Compass Nose-Up",
"type": "bool",
- "defaultValue": true
+ "defaultValue": false
}
]
diff --git a/src/Settings/FlyViewSettings.cc b/src/Settings/FlyViewSettings.cc
index c3ba1a475f6e71bf80e4c6e8614caed01cc9ddfc..45898b008b95655b326fa09ffc43012205f91219 100644
--- a/src/Settings/FlyViewSettings.cc
+++ b/src/Settings/FlyViewSettings.cc
@@ -22,4 +22,4 @@ DECLARE_SETTINGSFACT(FlyViewSettings, guidedMaximumAltitude)
DECLARE_SETTINGSFACT(FlyViewSettings, showLogReplayStatusBar)
DECLARE_SETTINGSFACT(FlyViewSettings, alternateInstrumentPanel)
DECLARE_SETTINGSFACT(FlyViewSettings, showAdditionalIndicatorsCompass)
-DECLARE_SETTINGSFACT(FlyViewSettings, lockNorthUpCompass)
+DECLARE_SETTINGSFACT(FlyViewSettings, lockNoseUpCompass)
diff --git a/src/Settings/FlyViewSettings.h b/src/Settings/FlyViewSettings.h
index ec24e599ecae530e368bb49497ef98d4b406ca81..7830d45d63d8750099680ef392131e1a2e5f0e35 100644
--- a/src/Settings/FlyViewSettings.h
+++ b/src/Settings/FlyViewSettings.h
@@ -24,5 +24,5 @@ public:
DEFINE_SETTINGFACT(showLogReplayStatusBar)
DEFINE_SETTINGFACT(alternateInstrumentPanel)
DEFINE_SETTINGFACT(showAdditionalIndicatorsCompass)
- DEFINE_SETTINGFACT(lockNorthUpCompass)
+ DEFINE_SETTINGFACT(lockNoseUpCompass)
};
diff --git a/src/ui/preferences/GeneralSettings.qml b/src/ui/preferences/GeneralSettings.qml
index 4fedfdcd26321ccbdb834c04533a99db105faa1d..3359c937015e9abf2fef2dc8f52c720846b997f3 100644
--- a/src/ui/preferences/GeneralSettings.qml
+++ b/src/ui/preferences/GeneralSettings.qml
@@ -483,11 +483,11 @@ Rectangle {
property Fact _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass
}
FactCheckBox {
- text: qsTr("Lock North up on Compass")
- visible: _lockNorthUpCompass.visible
- fact: _lockNorthUpCompass
+ text: qsTr("Lock Compass Nose-Up")
+ visible: _lockNoseUpCompass.visible
+ fact: _lockNoseUpCompass
- property Fact _lockNorthUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNorthUpCompass
+ property Fact _lockNoseUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNoseUpCompass
}