Commit 49fe5bba authored by Pierre TILAK's avatar Pierre TILAK

Change NorthUp Setting, Update SVG res

- NorthUp becomes NoseUp and is disable by default
- Changes on SVG to make them with the same diameter as the CompassDiag
- Change the order of the indicator layouts
parent 701f3da2
...@@ -17,10 +17,10 @@ ...@@ -17,10 +17,10 @@
enable-background="new 0 0 288 288" enable-background="new 0 0 288 288"
xml:space="preserve" xml:space="preserve"
inkscape:version="0.91 r13725" inkscape:version="0.91 r13725"
sodipodi:docname="cOGPointer .svg"><metadata sodipodi:docname="cOGPointer.svg"><metadata
id="metadata11"><rdf:RDF><cc:Work id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs9" /><sodipodi:namedview id="defs9" /><sodipodi:namedview
pagecolor="#ffffff" pagecolor="#ffffff"
bordercolor="#666666" bordercolor="#666666"
...@@ -30,20 +30,20 @@ ...@@ -30,20 +30,20 @@
guidetolerance="10" guidetolerance="10"
inkscape:pageopacity="0" inkscape:pageopacity="0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:window-width="1855" inkscape:window-width="1918"
inkscape:window-height="1056" inkscape:window-height="1059"
id="namedview7" id="namedview7"
showgrid="false" showgrid="false"
inkscape:zoom="2.3177389" inkscape:zoom="0.81944445"
inkscape:cx="103.82028" inkscape:cx="-403.29176"
inkscape:cy="155.36757" inkscape:cy="267.11976"
inkscape:window-x="65" inkscape:window-x="1920"
inkscape:window-y="24" inkscape:window-y="19"
inkscape:window-maximized="1" inkscape:window-maximized="1"
inkscape:current-layer="Layer_3" /><polygon inkscape:current-layer="Layer_3" /><polygon
points="133.2,17.4 154.8,17.4 144,46.2 " points="144,46.2 133.2,17.4 154.8,17.4 "
id="polygon3" id="polygon3"
transform="matrix(-1,0,0,-1,288,104.6)" transform="matrix(-1,0,0,-1,288,54.034031)"
style="fill:#008000" /><rect style="fill:#008000" /><rect
x="135" x="135"
y="270" y="270"
......
...@@ -30,21 +30,21 @@ ...@@ -30,21 +30,21 @@
guidetolerance="10" guidetolerance="10"
inkscape:pageopacity="0" inkscape:pageopacity="0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:window-width="1855" inkscape:window-width="1918"
inkscape:window-height="1056" inkscape:window-height="1059"
id="namedview127" id="namedview127"
showgrid="false" showgrid="false"
inkscape:zoom="3.2777778" inkscape:zoom="3.2013889"
inkscape:cx="59.669563" inkscape:cx="81.386174"
inkscape:cy="175.88441" inkscape:cy="177.0113"
inkscape:window-x="1985" inkscape:window-x="-1"
inkscape:window-y="24" inkscape:window-y="18"
inkscape:window-maximized="1" inkscape:window-maximized="0"
inkscape:current-layer="Layer_2" inkscape:current-layer="Layer_2"
inkscape:snap-bbox="true" inkscape:snap-bbox="true"
inkscape:snap-object-midpoints="true" inkscape:snap-object-midpoints="true"
inkscape:snap-center="true" /><path inkscape:snap-center="true" /><path
style="fill:#ffff00;fill-rule:evenodd;stroke:#ffe400;stroke-width:3.805;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:11.415,3.805;stroke-opacity:1;stroke-dashoffset:0" style="fill:#be781c;fill-opacity:1;fill-rule:evenodd;stroke:#be781c;stroke-width:6.41166306;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:3.29999995;stroke-dasharray:12.82332611,6.41166306;stroke-dashoffset:4.68051403;stroke-opacity:1"
d="m -17.052985,397 0.10597,-112.28426" d="m -17.131076,320.82151 0.10597,-60.58956"
id="path4263" id="path4263"
inkscape:connector-curvature="0" /></svg> inkscape:connector-curvature="0" /></svg>
\ No newline at end of file
...@@ -57,12 +57,12 @@ Item { ...@@ -57,12 +57,12 @@ Item {
return vehicle && _showAdditionalIndicatorsCompass && !isNaN(_headingToNextWP) return vehicle && _showAdditionalIndicatorsCompass && !isNaN(_headingToNextWP)
} }
function isNorthUpLocked(){ function isNoseUpLocked(){
return _lockNorthUpCompass return _lockNoseUpCompass
} }
readonly property bool _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass.value 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 } QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
...@@ -80,16 +80,17 @@ Item { ...@@ -80,16 +80,17 @@ Item {
anchors.fill: parent anchors.fill: parent
visible: false visible: false
Image { Image {
id: nextWPPointer id: cOGPointer
source: isHeadingToNextWPOK() ? "/qmlimages/compassDottedLine.svg":"" source: isCOGAngleOK() ? "/qmlimages/cOGPointer.svg" : ""
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
anchors.fill: parent anchors.fill: parent
sourceSize.height: parent.height sourceSize.height: parent.height
transform: Rotation { transform: Rotation {
property var _angle: isNorthUpLocked()?_headingToNextWP-_heading:_headingToNextWP property var _angle:isNoseUpLocked()?_courseOverGround-_heading:_courseOverGround
origin.x: cOGPointer.width / 2 origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2 origin.y: cOGPointer.height / 2
angle: _angle angle: _angle
...@@ -97,36 +98,21 @@ Item { ...@@ -97,36 +98,21 @@ Item {
} }
Image { Image {
id: cOGPointer id: nextWPPointer
source: isCOGAngleOK() ? "/qmlimages/cOGPointer.svg" : "" source: isHeadingToNextWPOK() ? "/qmlimages/compassDottedLine.svg":""
mipmap: true mipmap: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
anchors.fill: parent anchors.fill: parent
sourceSize.height: parent.height sourceSize.height: parent.height
transform: Rotation { transform: Rotation {
property var _angle:isNorthUpLocked()?_courseOverGround-_heading:_courseOverGround property var _angle: isNoseUpLocked()?_headingToNextWP-_heading:_headingToNextWP
origin.x: cOGPointer.width / 2 origin.x: cOGPointer.width / 2
origin.y: cOGPointer.height / 2 origin.y: cOGPointer.height / 2
angle: _angle 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 { Image {
id: homePointer id: homePointer
width: size * 0.1 width: size * 0.1
...@@ -137,12 +123,28 @@ Item { ...@@ -137,12 +123,28 @@ Item {
sourceSize.width: width sourceSize.width: width
transform: Translate { 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)) x: size/2.3 * Math.sin((_angle)*(3.14/180))
y: - size/2.3 * Math.cos((_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 { QGCColoredImage {
id: compassDial id: compassDial
source: "/qmlimages/compassInstrumentDial.svg" source: "/qmlimages/compassInstrumentDial.svg"
...@@ -154,7 +156,7 @@ Item { ...@@ -154,7 +156,7 @@ Item {
transform: Rotation { transform: Rotation {
origin.x: compassDial.width / 2 origin.x: compassDial.width / 2
origin.y: compassDial.height / 2 origin.y: compassDial.height / 2
angle: isNorthUpLocked()?-_heading:0 angle: isNoseUpLocked()?-_heading:0
} }
} }
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
"defaultValue": false "defaultValue": false
}, },
{ {
"name": "lockNorthUpCompass", "name": "lockNoseUpCompass",
"shortDescription": "Lock North up on Compass", "shortDescription": "Lock Compass Nose-Up",
"type": "bool", "type": "bool",
"defaultValue": true "defaultValue": false
} }
] ]
...@@ -22,4 +22,4 @@ DECLARE_SETTINGSFACT(FlyViewSettings, guidedMaximumAltitude) ...@@ -22,4 +22,4 @@ DECLARE_SETTINGSFACT(FlyViewSettings, guidedMaximumAltitude)
DECLARE_SETTINGSFACT(FlyViewSettings, showLogReplayStatusBar) DECLARE_SETTINGSFACT(FlyViewSettings, showLogReplayStatusBar)
DECLARE_SETTINGSFACT(FlyViewSettings, alternateInstrumentPanel) DECLARE_SETTINGSFACT(FlyViewSettings, alternateInstrumentPanel)
DECLARE_SETTINGSFACT(FlyViewSettings, showAdditionalIndicatorsCompass) DECLARE_SETTINGSFACT(FlyViewSettings, showAdditionalIndicatorsCompass)
DECLARE_SETTINGSFACT(FlyViewSettings, lockNorthUpCompass) DECLARE_SETTINGSFACT(FlyViewSettings, lockNoseUpCompass)
...@@ -24,5 +24,5 @@ public: ...@@ -24,5 +24,5 @@ public:
DEFINE_SETTINGFACT(showLogReplayStatusBar) DEFINE_SETTINGFACT(showLogReplayStatusBar)
DEFINE_SETTINGFACT(alternateInstrumentPanel) DEFINE_SETTINGFACT(alternateInstrumentPanel)
DEFINE_SETTINGFACT(showAdditionalIndicatorsCompass) DEFINE_SETTINGFACT(showAdditionalIndicatorsCompass)
DEFINE_SETTINGFACT(lockNorthUpCompass) DEFINE_SETTINGFACT(lockNoseUpCompass)
}; };
...@@ -483,11 +483,11 @@ Rectangle { ...@@ -483,11 +483,11 @@ Rectangle {
property Fact _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass property Fact _showAdditionalIndicatorsCompass: QGroundControl.settingsManager.flyViewSettings.showAdditionalIndicatorsCompass
} }
FactCheckBox { FactCheckBox {
text: qsTr("Lock North up on Compass") text: qsTr("Lock Compass Nose-Up")
visible: _lockNorthUpCompass.visible visible: _lockNoseUpCompass.visible
fact: _lockNorthUpCompass fact: _lockNoseUpCompass
property Fact _lockNorthUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNorthUpCompass property Fact _lockNoseUpCompass: QGroundControl.settingsManager.flyViewSettings.lockNoseUpCompass
} }
......
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