Commit 17e398a1 authored by Valentin Platzgummer's avatar Valentin Platzgummer

merge with remote master

parents cf5385cf e92b98bb
\relax
\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Documentation}{1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Structure of QGroundControl}{1}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Detail view of the QQC window, which appears after start-up. Marked in red is the button for switching to the plan view window, green indicates the flight view button (current window) and marked in magenta is the button for switching to the WiMA main window.}}{2}}
\newlabel{fig:QGCMainButtonExplain}{{1}{2}}
\documentclass[]{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage{a4wide}
\usepackage{multicol}
%opening
\title{Documentation of the QGroundControl WiMA-Extension}
\author{Valentin Platzgummer}
\begin{document}
\maketitle
\section{Introduction}
Wima is a abbreviation for Wireless Measurement Application.
Dieses Dokument soll einerseits die Funktionen der WiMA-Erweiterung dokumentieren und andererseits den Leser dazu anregen Fehler im Programm zu finden. Das Dokument ist in zwei abschnitte unterteilt. Die eigentliche Dokumentation und Vorschläge welche Funktionen getestet werden sollen. Da die WiMA-Erweiterung noch weiterentwickelt wird, können die Funktionen und das Aussehen des Programms von der in dieser Dokumentation dargestellten Inhalten abweichen.
Der Ordner deploy enthält eine unter Linux ausführbare Datei des Programms, mit dem nahmen "QGroundControl.AppImage".
\section{Documentation}
\subsection{Structure of QGroundControl with WiMA-Extension}
Figure \ref{fig:QGCMainButtonExplain} shows a detail view of the QGC main window. Relevant for this documentation are the flight view, the plan view and the WiMA main window. Their function will now be briefly summarized.
The \textbf{plan view window} is
\begin{figure}
\includegraphics[width=\textwidth]{pics/QGCMainWindowCroppedRect}
\centering
\caption{Detail view of the QQC window, which appears after start-up. Marked in red is the button for switching to the plan view window, green indicates the flight view button (current window) and marked in magenta is the button for switching to the WiMA main window.}
\label{fig:QGCMainButtonExplain}
\end{figure}
\end{document}
No preview for this file type
...@@ -39,7 +39,7 @@ SettingsFact::SettingsFact(QString settingsGroup, FactMetaData* metaData, QObjec ...@@ -39,7 +39,7 @@ SettingsFact::SettingsFact(QString settingsGroup, FactMetaData* metaData, QObjec
if (_visible) { if (_visible) {
QVariant typedValue; QVariant typedValue;
QString errorString; QString errorString;
metaData->convertAndValidateRaw(settings.value(_name, rawDefaultValue), true /* conertOnly */, typedValue, errorString); metaData->convertAndValidateRaw(settings.value(_name, rawDefaultValue), true /* convertOnly */, typedValue, errorString);
_rawValue = typedValue; _rawValue = typedValue;
} else { } else {
// Setting is not visible, force to default value always // Setting is not visible, force to default value always
......
...@@ -104,10 +104,10 @@ Rectangle { ...@@ -104,10 +104,10 @@ Rectangle {
FactTextField { FactTextField {
fact: missionItem.deltaAlpha fact: missionItem.deltaAlpha
Layout.fillWidth: true Layout.fillWidth: true
onUpdated: angleSlider.value = missionItem.deltaAlpha.value //onUpdated: angleSlider.value = missionItem.deltaAlpha.value
} }
QGCSlider { /*QGCSlider {
id: angleSlider id: angleSlider
minimumValue: 0.3 minimumValue: 0.3
maximumValue: 10 maximumValue: 10
...@@ -116,10 +116,10 @@ Rectangle { ...@@ -116,10 +116,10 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.preferredHeight: ScreenTools.defaultFontPixelHeight * 1.5 Layout.preferredHeight: ScreenTools.defaultFontPixelHeight * 1.5
onValueChanged: missionItem.deltaAlpha.value = value
Component.onCompleted: value = missionItem.deltaAlpha.value Component.onCompleted: value = missionItem.deltaAlpha.value
updateValueWhileDragging: true onValueChanged: missionItem.deltaAlpha.value = value
} updateValueWhileDragging: false
}*/
} }
ColumnLayout { ColumnLayout {
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"type": "double", "type": "double",
"units": "Deg", "units": "Deg",
"min": 0.3, "min": 0.3,
"max": 90,
"decimalPlaces": 1, "decimalPlaces": 1,
"defaultValue": 5.0 "defaultValue": 5.0
} }
......
...@@ -26,11 +26,6 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV ...@@ -26,11 +26,6 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV
connect(&_deltaAlpha, &Fact::valueChanged, this, &CircularSurveyComplexItem::_setDirty); connect(&_deltaAlpha, &Fact::valueChanged, this, &CircularSurveyComplexItem::_setDirty);
connect(this, &CircularSurveyComplexItem::refPointChanged, this, &CircularSurveyComplexItem::_setDirty); connect(this, &CircularSurveyComplexItem::refPointChanged, this, &CircularSurveyComplexItem::_setDirty);
_deltaR.setRawValue(_deltaR.rawDefaultValue());
_deltaAlpha.setRawValue(_deltaAlpha.rawDefaultValue());
qDebug() << _deltaAlpha.rawDefaultValue().toDouble();
qDebug() << _deltaAlpha.rawValue().toDouble();
connect(&_updateTimer, &QTimer::timeout, this, &CircularSurveyComplexItem::_updateItem); connect(&_updateTimer, &QTimer::timeout, this, &CircularSurveyComplexItem::_updateItem);
_updateTimer.start(100); _updateTimer.start(100);
} }
...@@ -336,6 +331,8 @@ void CircularSurveyComplexItem::_rebuildTransectsPhase1() ...@@ -336,6 +331,8 @@ void CircularSurveyComplexItem::_rebuildTransectsPhase1()
using namespace PolygonCalculus; using namespace PolygonCalculus;
using namespace PlanimetryCalculus; using namespace PlanimetryCalculus;
if ( _surveyAreaPolygon.count() < 3) if ( _surveyAreaPolygon.count() < 3)
return; return;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "GeoUtilities.h" #include "GeoUtilities.h"
#include "QVector" #include "QVector"
#include "Circle.h" #include "Circle.h"
#include "SettingsFact.h"
class CircularSurveyComplexItem :public TransectStyleComplexItem class CircularSurveyComplexItem :public TransectStyleComplexItem
{ {
......
...@@ -10,13 +10,23 @@ const char* WimaMeasurementArea::WimaMeasurementAreaName = "Measurement ...@@ -10,13 +10,23 @@ const char* WimaMeasurementArea::WimaMeasurementAreaName = "Measurement
WimaMeasurementArea::WimaMeasurementArea(QObject *parent) WimaMeasurementArea::WimaMeasurementArea(QObject *parent)
: WimaArea (parent) : WimaArea (parent)
, _metaDataMap (FactMetaData::createMapFromJsonFile(QStringLiteral(":/json/WimaMeasurementArea.SettingsGroup.json"), this /* QObject parent */))
, _bottomLayerAltitude (SettingsFact(settingsGroup, _metaDataMap[bottomLayerAltitudeName], this /* QObject parent */))
, _numberOfLayers (SettingsFact(settingsGroup, _metaDataMap[numberOfLayersName], this /* QObject parent */))
, _layerDistance (SettingsFact(settingsGroup, _metaDataMap[layerDistanceName], this /* QObject parent */))
, _borderPolygonOffset (SettingsFact(settingsGroup, _metaDataMap[borderPolygonOffsetName], this /* QObject parent */))
{ {
init(); init();
} }
WimaMeasurementArea::WimaMeasurementArea(const WimaMeasurementArea &other, QObject *parent) WimaMeasurementArea::WimaMeasurementArea(const WimaMeasurementArea &other, QObject *parent)
: WimaArea(other, parent) : WimaArea (other, parent)
, _metaDataMap (FactMetaData::createMapFromJsonFile(QStringLiteral(":/json/WimaMeasurementArea.SettingsGroup.json"), this /* QObject parent */))
, _bottomLayerAltitude (SettingsFact(settingsGroup, _metaDataMap[bottomLayerAltitudeName], this /* QObject parent */))
, _numberOfLayers (SettingsFact(settingsGroup, _metaDataMap[numberOfLayersName], this /* QObject parent */))
, _layerDistance (SettingsFact(settingsGroup, _metaDataMap[layerDistanceName], this /* QObject parent */))
, _borderPolygonOffset (SettingsFact(settingsGroup, _metaDataMap[borderPolygonOffsetName], this /* QObject parent */))
{ {
init(); init();
} }
...@@ -150,14 +160,6 @@ void WimaMeasurementArea::recalcBorderPolygon() ...@@ -150,14 +160,6 @@ void WimaMeasurementArea::recalcBorderPolygon()
void WimaMeasurementArea::init() void WimaMeasurementArea::init()
{ {
_metaDataMap = FactMetaData::createMapFromJsonFile(QStringLiteral(":/json/WimaMeasurementArea.SettingsGroup.json"), this /* QObject parent */);
_bottomLayerAltitude = SettingsFact(settingsGroup, _metaDataMap[bottomLayerAltitudeName], this /* QObject parent */);
_numberOfLayers = SettingsFact(settingsGroup, _metaDataMap[numberOfLayersName], this /* QObject parent */);
_layerDistance = SettingsFact(settingsGroup, _metaDataMap[layerDistanceName], this /* QObject parent */);
_borderPolygonOffset = SettingsFact(settingsGroup, _metaDataMap[borderPolygonOffsetName], this /* QObject parent */);
_borderPolygon = new QGCMapPolygon(this);
this->setObjectName(WimaMeasurementAreaName); this->setObjectName(WimaMeasurementAreaName);
connect(this, &WimaMeasurementArea::pathChanged, this, &WimaMeasurementArea::recalcBorderPolygon); connect(this, &WimaMeasurementArea::pathChanged, this, &WimaMeasurementArea::recalcBorderPolygon);
connect(&_borderPolygonOffset, &SettingsFact::rawValueChanged, this, &WimaMeasurementArea::recalcBorderPolygon); connect(&_borderPolygonOffset, &SettingsFact::rawValueChanged, this, &WimaMeasurementArea::recalcBorderPolygon);
......
...@@ -220,16 +220,12 @@ bool WimaPlaner::updateMission() ...@@ -220,16 +220,12 @@ bool WimaPlaner::updateMission()
CircularSurveyComplexItem* OldSurveyPt = nullptr; CircularSurveyComplexItem* OldSurveyPt = nullptr;
QGeoCoordinate oldSurveyRef; QGeoCoordinate oldSurveyRef;
double oldSurveyDeltaR = 0;
double oldSurveyDeltaAlpha = 0;
bool oldSurveyExists = false; bool oldSurveyExists = false;
for (int i = 0; i < _missionController->visualItems()->count(); i++) { for (int i = 0; i < _missionController->visualItems()->count(); i++) {
OldSurveyPt = qobject_cast<CircularSurveyComplexItem*>(missionItems->get(i)); OldSurveyPt = qobject_cast<CircularSurveyComplexItem*>(missionItems->get(i));
if ( OldSurveyPt != nullptr) { if ( OldSurveyPt != nullptr) {
oldSurveyRef = OldSurveyPt->refPoint(); oldSurveyRef = OldSurveyPt->refPoint();
oldSurveyDeltaR = OldSurveyPt->deltaR()->rawValue().toDouble();
oldSurveyDeltaAlpha = OldSurveyPt->deltaAlpha()->rawValue().toDouble();
oldSurveyExists = true; oldSurveyExists = true;
break; break;
} }
...@@ -276,8 +272,6 @@ bool WimaPlaner::updateMission() ...@@ -276,8 +272,6 @@ bool WimaPlaner::updateMission()
} else { } else {
if ( oldSurveyExists ) { if ( oldSurveyExists ) {
survey->setRefPoint(oldSurveyRef); survey->setRefPoint(oldSurveyRef);
survey->deltaR()->setRawValue(oldSurveyDeltaR);
survey->deltaAlpha()->setRawValue(oldSurveyDeltaAlpha);
} else { } else {
survey->setRefPoint(_measurementArea.center()); survey->setRefPoint(_measurementArea.center());
} }
......
...@@ -33,26 +33,10 @@ Rectangle { ...@@ -33,26 +33,10 @@ Rectangle {
property var polygon: areaItem property var polygon: areaItem
property bool initNecesarry: true property bool initNecesarry: true
/*onPolylineInteractiveChanged: {
polyline.interactive = polylineInteractive;
}*/
onPolygonInteractiveChanged: { onPolygonInteractiveChanged: {
polygon.interactive = polygonInteractive; polygon.interactive = polygonInteractive;
} }
/*function editPolyline(){
if (polylineInteractive){
//polyline.interactive = false;
polylineInteractive = false;
//polygonInteractive = true;
}else{
//polyline.interactive = true;
polylineInteractive = true;
//polygonInteractive = false;
}
}*/
...@@ -73,7 +57,7 @@ Rectangle { ...@@ -73,7 +57,7 @@ Rectangle {
Column { Column {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.rightsetI anchors.right: parent.right
spacing: _margin spacing: _margin
visible: settingsHeader.checked visible: settingsHeader.checked
...@@ -87,29 +71,29 @@ Rectangle { ...@@ -87,29 +71,29 @@ Rectangle {
QGCLabel { text: qsTr("Altitude") } QGCLabel { text: qsTr("Altitude") }
FactTextField { FactTextField {
fact: areaItem.bottomLayerAltitude fact: areaItem.bottomLayerAltitude
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter Layout.fillWidth: true
} }
QGCLabel { text: qsTr("Layers") } QGCLabel { text: qsTr("Layers") }
FactTextField { FactTextField {
fact: areaItem.numberOfLayers fact: areaItem.numberOfLayers
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter Layout.fillWidth: true
} }
QGCLabel { text: qsTr("Layer Dist.") } QGCLabel { text: qsTr("Layer Dist.") }
FactTextField { FactTextField {
fact: areaItem.layerDistance fact: areaItem.layerDistance
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter Layout.fillWidth: true
} }
QGCLabel { text: qsTr("Offset") } QGCLabel { text: qsTr("Offset") }
FactTextField { FactTextField {
fact: areaItem.borderPolygonOffset fact: areaItem.borderPolygonOffset
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter Layout.fillWidth: true
} }
......
...@@ -1031,7 +1031,7 @@ QGCView { ...@@ -1031,7 +1031,7 @@ QGCView {
currentIndex: _missionController.currentPlanViewIndex currentIndex: _missionController.currentPlanViewIndex
highlightMoveDuration: 250 highlightMoveDuration: 250
visible: _editingLayer == _layerMission && !planControlColapsed visible: _editingLayer == _layerMission && !planControlColapsed
//-- List Elements_missionController->setCurrentPlanViewIndex(sequenceNumber, true); //-- List Elements
delegate: MissionItemEditor { delegate: MissionItemEditor {
map: editorMap map: editorMap
masterController: _planMasterController masterController: _planMasterController
...@@ -1076,6 +1076,18 @@ QGCView { ...@@ -1076,6 +1076,18 @@ QGCView {
} }
} }
Component {
id: syncLoadFromVehicleOverwrite
QGCViewMessage {
id: syncLoadFromVehicleCheck
message: qsTr("You have unsaved/unsent changes. Loading from the Vehicle will lose these changes. Are you sure you want to load from the Vehicle?")
function accept() {
hideDialog()
masterController.loadFromVehicle()
}
}
}
Component { Component {
id: syncLoadFromFileOverwrite id: syncLoadFromFileOverwrite
QGCViewMessage { QGCViewMessage {
......
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