diff --git a/WimaDok/Vorlage/.~lock.User Guide WLAN TESTING.docx# b/WimaDok/Vorlage/.~lock.User Guide WLAN TESTING.docx# deleted file mode 100644 index 36e299396e541e80310d70dda0c5e8e1cd5175d8..0000000000000000000000000000000000000000 --- a/WimaDok/Vorlage/.~lock.User Guide WLAN TESTING.docx# +++ /dev/null @@ -1 +0,0 @@ -,valentin,rick,31.01.2020 11:41,file:///home/valentin/.config/libreoffice/4; \ No newline at end of file diff --git a/WimaDok/macros.tex b/WimaDok/macros.tex index 62e6cf761e6585d2c3bd82bb8eed8afc982277e6..822acde212fc7216e85caa01588b3683004d454e 100644 --- a/WimaDok/macros.tex +++ b/WimaDok/macros.tex @@ -1,4 +1,7 @@ +\newcommand{\etc}{etc.\xspace} \newcommand{\qgc}{QGroundControl\xspace} \newcommand{\wima}{WiMA\xspace} \newcommand{\ethz}{ETH Zürich\xspace} \newcommand{\uav}{Unmaned Arial Vehicle\xspace} +\newcommand{\gitrepourl}{\url{https://dummyurl.com}} +\newcommand{\qgcdocurl}{\url{https://docs.qgroundcontrol.com/en/}} diff --git a/WimaDok/main.aux b/WimaDok/main.aux index 021e01e8083ba8669311f64512e5e05f64df1eac..f827c169604211adf9387c9b090a349d467f9db7 100644 --- a/WimaDok/main.aux +++ b/WimaDok/main.aux @@ -5,37 +5,60 @@ \@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Scope}{3}} \@writefile{toc}{\contentsline {section}{\numberline {2}System Description}{3}} \@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Key Features}{3}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Structure of QGroundControl with WiMA-Extension}{3}} -\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Detail view of the QGC 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.}}{4}} -\newlabel{fig:QGCMainButtonExplain}{{1}{4}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}WiMA Main Window}{4}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.3.1}WiMA Tool Strip}{4}} -\newlabel{sec:wimaToolStrip}{{2.3.1}{4}} -\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces WiMA Toolstrip inside WiMA Main Window.}}{4}} -\newlabel{fig:WimaToolstrip}{{2}{4}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.3.2}WiMA Areas}{5}} -\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces WiMA Item Editor at the right edge of the WiMA Main Window.}}{6}} -\newlabel{fig:WimaItemEditor}{{3}{6}} -\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Flight path of a real vehicle (red line).}}{6}} -\newlabel{fig:optimPaht}{{4}{6}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.3.3}The generated Flight Path}{6}} -\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.3.4}Circular Survey}{6}} -\newlabel{sec:circularSurvey}{{2.3.4}{6}} -\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces Adjust the vertex by dragging it's handle.}}{7}} -\newlabel{fig:vertexHandle}{{5}{7}} -\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces Add vertices by hitting the plus sign.}}{7}} -\newlabel{fig:vertexPlus}{{6}{7}} -\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces Move any area by dragging its drag handle.}}{7}} -\newlabel{fig:moveArea}{{7}{7}} -\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces A valid configuration of Measurement, Service Area and Corridor.}}{7}} -\newlabel{fig:validConfig}{{8}{7}} -\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces Checking the Mission radio button displays the mission items.}}{8}} -\newlabel{fig:wimaRadioButtons}{{9}{8}} -\@writefile{lof}{\contentsline {figure}{\numberline {10}{\ignorespaces The flight path generated from the areas depicted in fig. 8\hbox {}.}}{8}} -\newlabel{fig:flightPath}{{10}{8}} -\@writefile{lof}{\contentsline {figure}{\numberline {11}{\ignorespaces An example of a Circular Survey pattern.}}{9}} -\newlabel{fig:circularSurvey}{{11}{9}} -\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}ArduPilot Simulator}{10}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Inventory}{3}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Menus and Instructions}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Brief Summary}{3}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Flight view tool strip. Used to command the vehicle.}}{4}} +\newlabel{fig:flightViewToolStrip}{{1}{4}} +\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Detail view of the QGC 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.}}{4}} +\newlabel{fig:QGCMainButtonExplain}{{2}{4}} +\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Flight view top indicator strip. Show's data about a connected vehicle. Among others satellite count, telemetry quality, battery level etc.\xspace are displayed.}}{5}} +\newlabel{fig:flightViewTopIndicatorStrip}{{3}{5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}WiMA\xspace View}{5}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.1}WiMA Tool Strip}{5}} +\newlabel{sec:wimaToolStrip}{{3.2.1}{5}} +\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces WiMA Toolstrip inside WiMA Main Window.}}{5}} +\newlabel{fig:WimaToolstrip}{{4}{5}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.2}WiMA Areas}{5}} +\newlabel{sec:wimaAreas}{{3.2.2}{5}} +\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces WiMA\xspace area with border polygon. Shown is a measurement area (green).}}{6}} +\newlabel{fig:wimaArea}{{5}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.3}Saving and Loading WiMA\xspace Missions}{6}} +\newlabel{sec:savingLoadingWima}{{3.2.3}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.4}Clearing WiMA\xspace Missions}{6}} +\newlabel{sec:clearingWima}{{3.2.4}{6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.5}Uploading, Downloading and Clearing vehicle Missions}{6}} +\newlabel{sec:uploadDownloadVehicle}{{3.2.5}{6}} +\@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces WiMA Item Editor at the right edge of the WiMA Main Window.}}{7}} +\newlabel{fig:WimaItemEditor}{{6}{7}} +\@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces Flight path of a real vehicle (red line).}}{7}} +\newlabel{fig:optimPaht}{{7}{7}} +\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces Adjust the vertex by dragging it's handle.}}{7}} +\newlabel{fig:vertexHandle}{{8}{7}} +\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces Add vertices by hitting the plus sign.}}{7}} +\newlabel{fig:vertexPlus}{{9}{7}} +\@writefile{lof}{\contentsline {figure}{\numberline {10}{\ignorespaces Move any area by dragging its drag handle.}}{7}} +\newlabel{fig:moveArea}{{10}{7}} +\@writefile{lof}{\contentsline {figure}{\numberline {11}{\ignorespaces A valid configuration of Measurement, Service Area and Corridor.}}{8}} +\newlabel{fig:validConfig}{{11}{8}} +\@writefile{lof}{\contentsline {figure}{\numberline {12}{\ignorespaces WiMA\xspace tool strip save/load dialog.}}{8}} +\newlabel{fig:wimaViewSaveLoad}{{12}{8}} +\@writefile{lof}{\contentsline {figure}{\numberline {13}{\ignorespaces Checking the Mission radio button, on the right hand side, displays the mission items.}}{9}} +\newlabel{fig:wimaRadioButtons}{{13}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.6}Inserting WiMA\xspace Areas}{9}} +\newlabel{sec:insertAreas}{{3.2.6}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.7}Generating a WiMA\xspace flight plan}{9}} +\newlabel{sec:generatingFlightPlan}{{3.2.7}{9}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.8}Navigating the Map}{9}} +\newlabel{sec:navigatingMap}{{3.2.8}{9}} +\@writefile{lof}{\contentsline {figure}{\numberline {14}{\ignorespaces The flight path generated from the areas depicted in fig. 11\hbox {}.}}{10}} +\newlabel{fig:flightPath}{{14}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.9}How to display the generated flight plan}{10}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {3.2.10}Circular Survey}{10}} +\newlabel{sec:circularSurvey}{{3.2.10}{10}} +\@writefile{lof}{\contentsline {figure}{\numberline {15}{\ignorespaces The circular survey item editor. Can be found at the right edge of the screen.}}{11}} +\newlabel{fig:circularSurveyItemEditor}{{15}{11}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}ArduPilot Simulator}{12}} \global\@namedef{scr@dte@section@lastmaxnumwidth}{10.84047pt} \global\@namedef{scr@dte@subsection@lastmaxnumwidth}{18.37163pt} -\global\@namedef{scr@dte@subsubsection@lastmaxnumwidth}{26.8883pt} +\global\@namedef{scr@dte@subsubsection@lastmaxnumwidth}{32.36331pt} diff --git a/WimaDok/main.pdf b/WimaDok/main.pdf index 9ee9de0e413192e6db286020a66386b1e32bdf75..8d77536ae44bf117a759ecabca265b558262dbb4 100644 Binary files a/WimaDok/main.pdf and b/WimaDok/main.pdf differ diff --git a/WimaDok/main.synctex.gz b/WimaDok/main.synctex.gz index 79d06aa7ac0e8fbd448cb3e0a8b16fc3f659c84e..270ea5870134feda950800111f64250bac44dc4c 100644 Binary files a/WimaDok/main.synctex.gz and b/WimaDok/main.synctex.gz differ diff --git a/WimaDok/main.tex b/WimaDok/main.tex index 64961ac903548e223ae79b2e0f6a3e688b3253be..7b3d0cda809d4d82426241368c4608f0a58ebf57 100644 --- a/WimaDok/main.tex +++ b/WimaDok/main.tex @@ -29,7 +29,7 @@ \newpage \section{Introduction} \subsection{Purpose} -The purpose of this document is to introduce the user to \wima (\textbf{Wi}reless \textbf{M}easurement \textbf{A}pplication) integrated in \qgc. \qgc is a ground control station software intended for the remote control of UAVs (\uav). A Documentation of the QGroundControl program can be found under \url{https://docs.qgroundcontrol.com/en/}. The WiMA extends the functionality of QGroundControl to simplify mobile UAV based coverage measurements. +The purpose of this document is to introduce the user to \wima (\textbf{Wi}reless \textbf{M}easurement \textbf{A}pplication) integrated in \qgc. \qgc is a ground control station software intended for the remote control of UAVs (\uav). A Documentation of the \qgc program can be found under \qgcdocurl. The WiMA extends the functionality of \qgc to simplify mobile UAV based coverage measurements. \subsection{Scope} The current goal of the \wima is to provide software able to generate flight plans form minimal user input. This guide contains information about how to use \wima. @@ -42,127 +42,141 @@ The current goal of the \wima is to provide software able to generate flight pla \subsection{Key Features} The extension can generate flight plans based on minimal user input. This is done by defining different areas on a world map. Additionally \wima offers to partition generated flight plans, which gives more flexibility. Partitioning makes it possibly to execute a subset of a flight plan, which makes it less tedious to cover large areas. As a security feature \wima offers a smart return to launch routine. Most return to launch implementations choose the direct path for return, which can be blocked. \wima can automatically calculate a save return path, based on user defined save areas. \wima also offers fast adaption of flight altitude and speed. -The folder "deploy" in the QGroundControl root directory (can be cloned from Gitlab) contains a AppImage of the program. QGroundControl can be launched by double-clicking the AppImage. Currently only a Linux version is available. -\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. +\subsection{Inventory} +The source code can be cloned from the git repository \gitrepourl. The root directory of the project contains the folder "deploy" inside which a \verb|.AppImage| of the program can be found. Under Linux \qgc can be launched from console or by double-clicking the \verb|.AppImage|. It is also possible to build versions for Microsoft Windows, Android or Mac. For this purpose refer to the \qgc documentation under \qgcdocurl. -The \textbf{Plan View Window} is used to create flight plans. They can be stored as \verb|.plan| files or directly be uploaded to a vehicle (either a real one or a simulated one). Flight plans consist of way-points. Each way-point stores, among others, a coordinate (latitude, longitude, altitude) and a command (take off, land, wait for x seconds, etc.). To define a sensible flight plan a sequence of way-points should begin with a take off command and end with a land command. Besides way-points more complex patterns can be defined, which is done by inserting a Survey, a Circular Survey, a Structure Scan or a Corridor Scan. Just try them out! Using the simulator can be very helpful. -The \textbf{Flight View Window} comes in necessary as soon as you want a vehicle to get in action. Once the vehicle established a connection (serial, TCP, UDP, etc.), QGroundControl starts to communicate automatically with it, in most cases. If not, check the settings menu of QGroundControl. A red arrow will appear on the map, showing the vehicles position and orientation. On the top indicator strip, telemetry data will be published. At the left edge a tool strip will be activated, which can be used to command the vehicle. +\section{Menus and Instructions} -The \textbf{WiMA Main Window} is used to automatically generate flight paths from minimal user input. The user can define a Measurement Area, a Service Area (for take off, land, supply tasks, etc.) and a Corridor, which connects the previous two areas. Below the WiMA main window will be described in more detail. +\subsection{Brief Summary} +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 view. Their function will now be briefly summarized. +The \textbf{plan view} is used to create flight plans and is part of standard \qgc. Flight plans can be stored as \verb|.plan| files or directly be uploaded to a vehicle (either a real one or a simulated one). Flight plans consist of way-points. Each way-point stores, among others, a coordinate (latitude, longitude, altitude) and a command (take off, land, wait for x seconds, \etc). To define a sensible flight plan a sequence of way-points should begin with a take off command and end with a land command. Besides way-points more complex patterns can be defined, which is done by inserting a Survey, a Circular Survey, a Structure Scan or a Corridor Scan. + +The \textbf{flight view} comes in necessary as soon as you want a vehicle to get in action. Once the vehicle established a connection (serial, TCP, UDP, \etc), \qgc starts to communicate automatically with it, in most cases. If not, check the settings menu of \qgc. A connected vehicle will appear as a red arrow on the map, showing the vehicles position and orientation. On the top indicator strip (fig. \ref{fig:flightViewTopIndicatorStrip}), telemetry data will be published. At the left edge a tool strip (fig. \ref{fig:flightViewToolStrip}) will be activated, which can be used to command the vehicle. + +The \textbf{\wima view} is used to generate flight paths from minimal user input. The user can define a Measurement Area, a Service Area (for take off, land, supply tasks, etc.) and a Corridor, which connects the other two areas. Furhter the \wima view and flight view will be described. + +\begin{figure} + \includegraphics[width=0.2\textwidth]{pics/flightViewToolStrip} + \centering + \caption{Flight view tool strip. Used to command the vehicle.} + \label{fig:flightViewToolStrip} +\end{figure} \begin{figure}[h!] - \includegraphics[width=\textwidth]{pics/QGCMainWindowCroppedRect} + \includegraphics[width=0.5\textwidth]{pics/QGCMainWindowCroppedRect} \centering \caption{Detail view of the QGC 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} +\begin{figure}[h!] + \includegraphics[width=0.8\textwidth]{pics/flightViewTopIndicatorStrip} + \centering + \caption{Flight view top indicator strip. Show's data about a connected vehicle. Among others satellite count, telemetry quality, battery level \etc are displayed.} + \label{fig:flightViewTopIndicatorStrip} +\end{figure} -\subsection{WiMA Main Window} +\subsection{\wima View} +By clicking the wave symbol (see fig. \ref{fig:QGCMainButtonExplain}; magenta square) the WiMA view appears. After entering, at the left screen edge, the WiMA tool strip will appear (depicted in fig. \ref{fig:WimaToolstrip}). \subsubsection{WiMA Tool Strip} \label{sec:wimaToolStrip} -By clicking the wave symbol (see fig. \ref{fig:QGCMainButtonExplain}; magenta square) the WiMA Main Window appears. After entering, at the left edge, the WiMA tool strip will appear (depicted in fig. \ref{fig:WimaToolstrip}). \begin{wrapfigure}{r}{0.3\textwidth} \centering - \includegraphics[width=0.3\textwidth]{pics/WiMAToolstrip} + \includegraphics[width=0.18\textwidth]{pics/WiMAToolstrip} \caption{WiMA Toolstrip inside WiMA Main Window.} \label{fig:WimaToolstrip} \end{wrapfigure} -Pressing the \textbf{File} button opens a menu which offers saving and loading operations. At one hand all WiMA areas and mission items can be saved using the \verb|.wima| file extension, at the other hand the mission items only can be stored using the \verb|.plan| file extension. The Open button can be used to load previously stored files. Pressing the New button deletes all contents within the WiMA Main Window. Additionally with the Upload, Download and Clear Vehicle Mission button, the mission items (if present) can be uploaded, downloaded or be deleted from the vehicle respectively. - -The \textbf{Measure}, \textbf{Service} and \textbf{Corridor} buttons are used to insert a measurement, service and corridor area, respectively. At the time only one of each area can be inserted. To generate a flight plan, at least a measurement and a service area must be defined. Both must be overlapping. - -To generate a flight plan the \textbf{Calculate} button must be pressed. Further information about how to display the generated flight plan will follow below. In the future this button might be removed and be replaced by a routine which automatically triggers recalculation. However as the flight plan generation can be time consuming on older devices, this button will remain in the near future, up to the point, underlying routines get optimized. +The \wima tool strip is used for load/ save operations as well as editing tasks. The file button can be used to load, save and clear missions. Measurement and service area as well as corridor can be added by clicking the corresponding buttons. The calculate button can be used to regenerate the current mission. However with the current version regeneration is done automatically. The center and zoom buttons are used to navigate the map. -As flight generation is manually triggered the flight plans might look wrong (for e.g. after any kind of manual modification), pressing the \textbf{Calculate} button often will remove errors. If not, please report any bugs. +\subsubsection{WiMA Areas} +\label{sec:wimaAreas} +The three areas, namely the measurement area, the service area and the corridor, can be defined using the corresponding buttons (see \ref{sec:insertAreas}). In the default mode the areas will be displayed as a half transparent polygon surrounded by a white lines. The polygon shape can be altered by using the drag and split handles shown in fig. \ref{fig:vertexHandle}, \ref{fig:vertexPlus} and \ref{fig:moveArea}. All areas will be listed at the right side within the WiMA Item Editor (see fig. \ref{fig:WimaItemEditor}). The WiMA Item Editor can be used to modify area parameters. +The Parameters \verb|Altitude|, \verb|Layers|, and \verb|Layer Dist.| are reserved for future use and don't yet have any impact. The \verb|Offset| parameter changes the distance between the area and its border polygon. The border polygon is a helper to provide sufficient clearance between the area and nearby obstacles, like trees or buildings. The border polygon can be deactivated by unchecking the \verb|Border Polygon| check box. This can be use full for service area and corridor. +Additionally the \wima item editor shows some statistics about the polygon, like area and number of nodes. -The last three buttons, \textbf{Center}, \textbf{In} and \textbf{Out} are used to center the view, and for zooming. +The three areas have the following purpose. The \wima measurement area defines, as the name indicates, the area of interest within which any measurements are performed. See \ref{sec:wimaAreas} for more information about \wima areas. The \wima service area is meant to be the place were takeoff and landing happens as well as battery exchange or repair work. See \ref{sec:wimaAreas} for more information about \wima areas. The \wima corridor connects the measurement area and the service areas and defines a path which the vehicles uses to travel between Service and Measurement Area. -\subsubsection{WiMA Areas} -As all ready mentioned the three areas, namely the Measurement Area, the Service Area and the Corridor, can be defined using the corresponding buttons of the WiMA Tool Strip (see \ref{sec:wimaToolStrip}). +A minimal configuration of areas consists of measurement and service area. In that case the two areas must be overlapping. The corridor can additionally be used to connect measurement and service area if overlapping of those two is not desired. A valid configuration including measurement, service area and corridor could look like in figure \ref{fig:validConfig}. The sum of all three areas is further refereed to as the joined area. \begin{figure}[h!] - \begin{minipage}{0.3\textwidth} - \centering - \includegraphics[width=\textwidth]{pics/WiMAItemEditor} - \caption{WiMA Item Editor at the right edge of the WiMA Main Window.} - \label{fig:WimaItemEditor} - \end{minipage} - \hfill - \begin{minipage}{0.3\textwidth} - \centering - \includegraphics[width=\textwidth]{pics/optimPath} - \caption{Flight path of a real vehicle (red line).} - \label{fig:optimPaht} - \end{minipage} + \includegraphics[width=0.4\textwidth]{pics/wimaArea} + \centering + \caption{\wima area with border polygon. Shown is a measurement area (green).} + \label{fig:wimaArea} +\end{figure} +\begin{figure} + \centering + \includegraphics[width=0.3\textwidth]{pics/WiMAItemEditor} + \caption{WiMA Item Editor at the right edge of the WiMA Main Window.} + \label{fig:WimaItemEditor} \end{figure} - - - +\begin{figure} + \centering + \includegraphics[width=0.3\textwidth]{pics/optimPath} + \caption{Flight path of a real vehicle (red line).} + \label{fig:optimPaht} +\end{figure} \begin{figure} \begin{minipage}{0.3\textwidth} \centering - \includegraphics[width=0.75\textwidth]{pics/VertexHandle} + \includegraphics[width=0.5\textwidth]{pics/VertexHandle} \caption{Adjust the vertex by dragging it's handle.} \label{fig:vertexHandle} \end{minipage} - \hfill + \hfill \begin{minipage}{0.3\textwidth} \centering - \includegraphics[width=0.75\textwidth]{pics/VertexPlus} + \includegraphics[width=0.5\textwidth]{pics/VertexPlus} \caption{Add vertices by hitting the plus sign.} \label{fig:vertexPlus} \end{minipage} \hfill \begin{minipage}{0.3\textwidth} \centering - \includegraphics[width=0.75\textwidth]{pics/MoveArea} + \includegraphics[width=0.5\textwidth]{pics/MoveArea} \caption{Move any area by dragging its drag handle.} \label{fig:moveArea} \end{minipage} \end{figure} +\begin{figure} +\includegraphics[width=0.8\textwidth]{pics/validAreas} +\centering +\caption{A valid configuration of Measurement, Service Area and Corridor.} +\label{fig:validConfig} +\end{figure} +\subsubsection{Saving and Loading \wima Missions} +\label{sec:savingLoadingWima} +Pressing the \verb|File| button (see fig. \ref{fig:wimaViewSaveLoad}) of \wima tool strip (see \ref{sec:wimaToolStrip}) opens a menu offering saving and loading operations. At one hand all \wima areas and mission items can be saved using the \verb|.wima| file extension, at the other hand the mission items only can be stored using the \verb|.plan| file extension. The \verb|Open| button can be used to load previously stored files. +\begin{figure} + \includegraphics[width=0.3\textwidth]{pics/wimaViewSaveLoad} + \centering + \caption{\wima tool strip save/load dialog.} + \label{fig:wimaViewSaveLoad} +\end{figure} +\subsubsection{Clearing \wima Missions} +\label{sec:clearingWima} +Press the \verb|File| button (see fig. \ref{fig:wimaViewSaveLoad}) of \wima tool strip (see \ref{sec:wimaToolStrip}) to open the dialog window. Pressing the \verb|New| button deletes all contents within the WiMA Main Window. +\subsubsection{Uploading, Downloading and Clearing vehicle Missions} +\label{sec:uploadDownloadVehicle} +Press \verb|File| button (see fig. \ref{fig:wimaViewSaveLoad}) of \wima tool strip (see \ref{sec:wimaToolStrip}) to open the dialog window. With the \verb|Upload|, \verb|Download| and \verb|Clear Vehicle Mission| button, the mission items (if present) can be uploaded, downloaded or deleted from the vehicle. -The \textbf{WiMA Measurement Area} defines, as the name indicates, the area of interest within which any measurements are be performed. The area will be displayed as a green shaded rectangle surrounded by a white line, after pressing the Measure button. The area will be listed at the right side within the WiMA Item Editor, after creation (see fig. \ref{fig:WimaItemEditor}). The WiMA Item Editor can be used to modify area parameters. - -% area parameter description here -The Offset parameter (see fig. \ref{fig:WimaItemEditor}) changes the distance between the measurement area and its surrounding polygon. The surrounding polygon is a helper to provide sufficient clearance between the measurement area and obstacles, like trees or buildings. - -% remove later -All other parameters shown in fig. \ref{fig:WimaItemEditor} don't yet have any impact (intended for future use). - -The \textbf{WiMA Service Area} is meant to be the area were takeoff and landing happens as well as battery exchange or (hopefully no) repair work is done, hence the name. - - -The \textbf{WiMA Corridor} connects the two previous areas and defines a corridor which the vehicles uses to travel between Service and Measurement Area. - -The flight plan will be generated such that all way-points are within or at least at the edge of the above mentioned areas. However it should be taken in account, that the vehicle could still leave the save area, even under fully functional operation. Depending on software implementation of the vehicles flight stack (firmware), the flight controller could decide to perform any kind of path optimization. Additionally drifts caused by wind gusts could occur. An example can be seen in fig. \ref{fig:optimPaht}. -The vehicles flight controller has no information about any WiMA Areas, they exist exclusively within the QGroundControl application. - - -All WiMA areas can be shaped by dragging the vertex handles (see fig. \ref{fig:vertexHandle}). New vertices can be created by hitting the plus signs at the edges (see fig. \ref{fig:vertexPlus}). The whole area can be moved by dragging its drag handle (see fig. \ref{fig:moveArea}). - - - -A valid configuration including Measurement, Service Area and Corridor could look like in figure \ref{fig:validConfig}. -\begin{figure} - \includegraphics[width=0.8\textwidth]{pics/validAreas} - \centering - \caption{A valid configuration of Measurement, Service Area and Corridor.} - \label{fig:validConfig} -\end{figure} +\subsubsection{Inserting \wima Areas} +\label{sec:insertAreas} +The \verb|Measure|, \verb|Service| and \verb|Corridor| buttons of the \wima tool strip (see \ref{sec:wimaToolStrip}) are used to insert a measurement, service and corridor area, respectively. Only one of each can be inserted. To generate a flight plan, at least a measurement and a service area must be defined. In that case both must be overlapping. -\subsubsection{The generated Flight Path} +\subsubsection{Generating a \wima flight plan} +\label{sec:generatingFlightPlan} +The current version of \wima automatically updates the flight plan, after terminated user interaction. However using the \verb|Calculate| button (see fig. \ref{fig:wimaViewSaveLoad}) of the \wima tool strip (see \ref{sec:wimaToolStrip}), manual regeneration can be triggered. The flight plan will be generated such that all way-points are within or at least at the edge of the joined\footnote{The joined area is the sum of measurement, service area and corridor (see \ref{sec:wimaAreas}).} area. However it should be taken in account, that the vehicle could still leave the save area, even under fully functional operation. Depending on the software implementation of the vehicles flight stack (firmware), the flight controller could perform a path change. Additionally drifts caused by wind gusts could occur. An example can be seen in fig. \ref{fig:optimPaht}. The vehicles flight controller has no information about any \wima Areas, they exist exclusively within the \qgc application. \begin{figure} \includegraphics[width=0.3\textwidth]{pics/wimaRadioButtons} \centering - \caption{Checking the Mission radio button displays the mission items.} + \caption{Checking the Mission radio button, on the right hand side, displays the mission items.} \label{fig:wimaRadioButtons} \end{figure} \begin{figure} @@ -171,25 +185,34 @@ A valid configuration including Measurement, Service Area and Corridor could loo \caption{The flight path generated from the areas depicted in fig. \ref{fig:validConfig}.} \label{fig:flightPath} \end{figure} -The flight plan can be displayed by checking the mission radio button, as depicted in fig \ref{fig:wimaRadioButtons}. An example of a generated flight path can be seen in figure \ref{fig:flightPath}. Within the green measurement area the program has generated a Circular Survey (see \ref{sec:circularSurvey} for further information). The survey has an entry and an exit point. The program has routed paths from the take off point to the surveys entry point and from the surveys exit point to the landing point. The paths have been chosen to be within the areas and as short as possible. + +\subsubsection{Navigating the Map} +\label{sec:navigatingMap} +The three buttons \verb|Center|, \verb|In| and \verb|Out| (see fig. \ref{fig:wimaViewSaveLoad}) of the \wima tool strip (see \ref{sec:wimaToolStrip}) can be used to center the view to a object of interest, and for zooming. The Map can be navigated by dragging the mouse pointer or touch screen. + +\subsubsection{How to display the generated flight plan} +The flight plan can be displayed by checking the \verb|Mission| radio button above the \wima item editor (see. fig. \ref{fig:wimaRadioButtons}), as depicted in fig \ref{fig:wimaRadioButtons}. An example of a generated flight path can be seen in figure \ref{fig:flightPath}. Within the green measurement area the program has generated a circular survey (see \ref{sec:circularSurvey} ). The survey has an entry and an exit point. The program has routed paths from the take off point to the surveys entry point and from the surveys exit point to the landing point. The paths have been chosen to be within the joined area and to be as short as possible. \subsubsection{Circular Survey} \label{sec:circularSurvey} \begin{figure} - \includegraphics[width=0.8\textwidth]{pics/circularSurvey} + \includegraphics[width=0.25\textwidth]{pics/circularSurveyItemEditor} \centering - \caption{An example of a Circular Survey pattern.} - \label{fig:circularSurvey} + \caption{The circular survey item editor. Can be found at the right edge of the screen.} + \label{fig:circularSurveyItemEditor} \end{figure} -The Circular Survey (see fig. \ref{fig:circularSurvey}) is a flight pattern provided by the WiMA extension. It is similar to the Survey pattern of the standard QGroundControl application. The Circular Survey was adapted for mobile coverage measurements. It consists of circle segments refereed to as transects. Ideally, the transects are connected with each other such that the path between entry and exit point is as short as possible. Currently this goal is approximated by a heuristics. The solution might not always be the global optimum. +The Circular Survey (green area in fig. \ref{fig:flightPath}, containing circular tracks) is a flight pattern provided by \wima. It is similar to the Survey pattern of the standard \qgc application. The Circular Survey was adapted for mobile coverage measurements. It consists of circle segments refereed to as transects. Ideally, the transects are connected with each other such that the path between entry and exit point is as short as possible. Currently this goal is approximated by a heuristics. The solution might not always be the global optimum. The \verb|Reference| point (Circle with R symbol and Reference tag, see fig. \ref{fig:flightPath}) defines the center of the circle segments. It is supposed to be placed on the base stations position. + +Circular survey parameters can be edited with the circular survey editor (see \ref{fig:circularSurveyItemEditor}). The \verb|Altitude| input box adjusts the altitude of the survey's way-points. The distance between adjacent circle segments can be modified by changing the \verb|Delta R| value. The circle segments are approximated by polygonal structures, consisting of way-points. Two arbitrary adjacent way-points of a circle segment have a maximum angle between them. This angle can be adjusted by editing the \verb|Delta Alpha| input box. The \verb|Delta Alpha| value can assume everything between 0.3$^{\circ}$ and 90$^{\circ}$. The higher the value the rougher the circle appears. The survey will contain the less way-points the higher the \verb|Delta R| and the \verb|Delta Alpha| values are. The number of way-points impacts the recreation and upload time. In general the following holds. The less way-points the better. Use only as many way-point as you really need. + +Short transects are often undesired, to remove them, the minimal transect length can be specified by the \verb|Min. Length| value. -The \textbf{Reference} point (Circle with R symbol and Reference tag, see fig. \ref{fig:circularSurvey}) defines the center of the circle segments. It is supposed to be placed on the base stations position. +If it is desired that the UAV flies with the same direction for all transects the \verb|Fixed Direction| check box can be activated. The \verb|Relative Altitude| check box enables relative height. With the \verb|Reverse Path| check box path reversal can be obtained. The \verb|Reset Reference| button the reference handle can be set to the survey area center. This can be helpful if the reference handle is hidden. -The Circular Survey editor (on the left side of the window) offers some options. The \textbf{Altitude} input box adjusts the altitude of the survey. The distance between adjacent circle segments can be modified by changing the \textbf{Delta R} value. The circle segments are approximated by polygonal structures, consisting of way-points. Two arbitrary adjacent way-points of a circle segment have a constant angle between them. This angle can be adjusted by editing the \textbf{Delta Alpha} input box. The Delta Alpha value can assume everything between 0.3$^{\circ}$ and 90$^{\circ}$. The higher the value the rougher the circle appears. The survey will contain the less way-points the higher the Delta R and the Delta Alpha value is. The number of way-points impacts how fast the computer can do recalculations and how long the upload to the UAV takes. In general the following holds: the less way-points the better for the overall performance. - -Sometimes transects are short (e.g. length of less than 3 m). Such ones are often undesired, because the real vehicle will not follow them correctly. To remove them in advance, the minimal transect length can be adjusted by editing the \textbf{Min. Length} value. Transects with a length smaller than Min. Length will be removed. -The \textbf{Rotate Entry Point} button and the \textbf{Relative altitude} check box don't yet have a function. +To reduce calculation effort, the maximum number of way-points can be set using the \verb|Max Waypoints| input box. Transects are hidden and calculations aborted, if the number of way-points exceeds \verb|Max Waypoints|. + +\subsubsection{How to synchronize the Data with Flight View} @@ -197,7 +220,7 @@ The \textbf{Rotate Entry Point} button and the \textbf{Relative altitude} check \subsection{ArduPilot Simulator} For tasks like debugging, program verification or flight plan testing a simulated vehicle can be very useful. It can save time, money and prevent you from excessive sunburns, if you forgot that you are actually outside, starring on your screen, exposed to the hot summer sun. -For this task the ArduPilot simulator can be used. It simulates a vehicle runnig the ArduPilot flight stack (firmware) on your local machine. Data is beeing published by the simulator via UDP and should ideally connect to QGroundControl without any further tweaks. +For this task the ArduPilot simulator can be used. It simulates a vehicle runnig the ArduPilot flight stack (firmware) on your local machine. Data is beeing published by the simulator via UDP and should ideally connect to \qgc without any further tweaks. The simulator is part of the ArduPilot project, which can be downloaded from Github: \url{https://github.com/ArduPilot/ardupilot}. It is recommanded to fork the repository. After cloning the repository, the submodules must be initialized and updated. Execute the following code to do this. diff --git a/WimaDok/main.toc b/WimaDok/main.toc index 35ee46d013d47ad8de9c6b3b8156dbbc3360447a..7bb21a6e71a54493fa264d9a43c814cc8fd7343d 100644 --- a/WimaDok/main.toc +++ b/WimaDok/main.toc @@ -3,10 +3,18 @@ \contentsline {subsection}{\numberline {1.2}Scope}{3} \contentsline {section}{\numberline {2}System Description}{3} \contentsline {subsection}{\numberline {2.1}Key Features}{3} -\contentsline {subsection}{\numberline {2.2}Structure of QGroundControl with WiMA-Extension}{3} -\contentsline {subsection}{\numberline {2.3}WiMA Main Window}{4} -\contentsline {subsubsection}{\numberline {2.3.1}WiMA Tool Strip}{4} -\contentsline {subsubsection}{\numberline {2.3.2}WiMA Areas}{5} -\contentsline {subsubsection}{\numberline {2.3.3}The generated Flight Path}{6} -\contentsline {subsubsection}{\numberline {2.3.4}Circular Survey}{6} -\contentsline {subsection}{\numberline {2.4}ArduPilot Simulator}{10} +\contentsline {subsection}{\numberline {2.2}Inventory}{3} +\contentsline {section}{\numberline {3}Menus and Instructions}{3} +\contentsline {subsection}{\numberline {3.1}Brief Summary}{3} +\contentsline {subsection}{\numberline {3.2}WiMA\xspace View}{5} +\contentsline {subsubsection}{\numberline {3.2.1}WiMA Tool Strip}{5} +\contentsline {subsubsection}{\numberline {3.2.2}WiMA Areas}{5} +\contentsline {subsubsection}{\numberline {3.2.3}Saving and Loading WiMA\xspace Missions}{6} +\contentsline {subsubsection}{\numberline {3.2.4}Clearing WiMA\xspace Missions}{6} +\contentsline {subsubsection}{\numberline {3.2.5}Uploading, Downloading and Clearing vehicle Missions}{6} +\contentsline {subsubsection}{\numberline {3.2.6}Inserting WiMA\xspace Areas}{9} +\contentsline {subsubsection}{\numberline {3.2.7}Generating a WiMA\xspace flight plan}{9} +\contentsline {subsubsection}{\numberline {3.2.8}Navigating the Map}{9} +\contentsline {subsubsection}{\numberline {3.2.9}How to display the generated flight plan}{10} +\contentsline {subsubsection}{\numberline {3.2.10}Circular Survey}{10} +\contentsline {subsection}{\numberline {3.3}ArduPilot Simulator}{12} diff --git a/WimaDok/pics/QGCMainWindowCroppedRect.png b/WimaDok/pics/QGCMainWindowCroppedRect.png index 3924a695fbb7c0b1e87b484cb27e673ec3d16a05..8c937d2eba9d1d634b0724b3092fb0a10b26bf2e 100644 Binary files a/WimaDok/pics/QGCMainWindowCroppedRect.png and b/WimaDok/pics/QGCMainWindowCroppedRect.png differ diff --git a/WimaDok/pics/WiMAItemEditor.png b/WimaDok/pics/WiMAItemEditor.png index eaea9e4a3ddbc65b11c7d752f4286c1e90e9f63d..6e92ed6597acb3c77d0a4038251241f0f457fa9b 100644 Binary files a/WimaDok/pics/WiMAItemEditor.png and b/WimaDok/pics/WiMAItemEditor.png differ diff --git a/WimaDok/pics/WiMAToolstrip.png b/WimaDok/pics/WiMAToolstrip.png index e8b33f57827cfeb5a569171453420b4eb119fe91..7bc5ec4ab5b01ddf9990d91a45f3678995f31bb0 100644 Binary files a/WimaDok/pics/WiMAToolstrip.png and b/WimaDok/pics/WiMAToolstrip.png differ diff --git a/WimaDok/pics/circularSurveyItemEditor.png b/WimaDok/pics/circularSurveyItemEditor.png new file mode 100644 index 0000000000000000000000000000000000000000..ae96482b44c4f2cd8dde07b254dd9bdd9fd33938 Binary files /dev/null and b/WimaDok/pics/circularSurveyItemEditor.png differ diff --git a/WimaDok/pics/flightViewToolStrip.png b/WimaDok/pics/flightViewToolStrip.png new file mode 100644 index 0000000000000000000000000000000000000000..bd9f05a4e4a4d1563b11e64bc75169d4587d5cf1 Binary files /dev/null and b/WimaDok/pics/flightViewToolStrip.png differ diff --git a/WimaDok/pics/flightViewTopIndicatorStrip.png b/WimaDok/pics/flightViewTopIndicatorStrip.png new file mode 100644 index 0000000000000000000000000000000000000000..319b10ccd96589389f39620884bbe0ac2b6be5c0 Binary files /dev/null and b/WimaDok/pics/flightViewTopIndicatorStrip.png differ diff --git a/WimaDok/pics/wimaArea.png b/WimaDok/pics/wimaArea.png new file mode 100644 index 0000000000000000000000000000000000000000..2bf645d75df725d1c32dfb6e59915bedd45451ec Binary files /dev/null and b/WimaDok/pics/wimaArea.png differ diff --git a/WimaDok/pics/wimaViewSaveLoad.png b/WimaDok/pics/wimaViewSaveLoad.png new file mode 100644 index 0000000000000000000000000000000000000000..8a429f9fbebd24f24da8742c133a064fe8166c71 Binary files /dev/null and b/WimaDok/pics/wimaViewSaveLoad.png differ diff --git a/src/PlanView/CircularSurveyItemEditor.qml b/src/PlanView/CircularSurveyItemEditor.qml index 1ed15fdc4c44ae948afddc9a7366f57298529bf8..82d589b8626333a40de1c555cfb62dd2b7e7aba6 100644 --- a/src/PlanView/CircularSurveyItemEditor.qml +++ b/src/PlanView/CircularSurveyItemEditor.qml @@ -138,8 +138,8 @@ Rectangle { visible: transectsHeader.checked FactCheckBox { - text: qsTr("Snake Path") - fact: missionItem.isSnakePath + text: qsTr("Fixed Direction") + fact: missionItem.fixedDirection } QGCCheckBox { diff --git a/src/Wima/CircularSurvey.SettingsGroup.json b/src/Wima/CircularSurvey.SettingsGroup.json index ddbff3458cd03c8ef8314dd2f0162501ca4c8b1a..86781cef248e2b81aff5952f187e925f4e1a8bbd 100644 --- a/src/Wima/CircularSurvey.SettingsGroup.json +++ b/src/Wima/CircularSurvey.SettingsGroup.json @@ -28,8 +28,8 @@ "defaultValue": 5.0 }, { - "name": "IsSnakePath", - "shortDescription": "Determines whether the transects are arranged in a snake or a zig-zag manner.", + "name": "FixedDirection", + "shortDescription": "Determines whether all transects have the same direction or not.", "type": "bool", "defaultValue": 1 }, diff --git a/src/Wima/CircularSurveyComplexItem.cc b/src/Wima/CircularSurveyComplexItem.cc index 01eed20198af1c556219f4b748cb78c6521428f1..24342a4644cc2378ea9c711bac95043ddfca88e7 100644 --- a/src/Wima/CircularSurveyComplexItem.cc +++ b/src/Wima/CircularSurveyComplexItem.cc @@ -8,7 +8,7 @@ const char* CircularSurveyComplexItem::settingsGroup = "CircularSur const char* CircularSurveyComplexItem::deltaRName = "DeltaR"; const char* CircularSurveyComplexItem::deltaAlphaName = "DeltaAlpha"; const char* CircularSurveyComplexItem::transectMinLengthName = "TransectMinLength"; -const char* CircularSurveyComplexItem::isSnakePathName = "IsSnakePath"; +const char* CircularSurveyComplexItem::fixedDirectionName = "FixedDirection"; const char* CircularSurveyComplexItem::reverseName = "Reverse"; const char* CircularSurveyComplexItem::maxWaypointsName = "MaxWaypoints"; @@ -17,7 +17,7 @@ const char* CircularSurveyComplexItem::jsonComplexItemTypeValue = "circula const char* CircularSurveyComplexItem::jsonDeltaRKey = "deltaR"; const char* CircularSurveyComplexItem::jsonDeltaAlphaKey = "deltaAlpha"; const char* CircularSurveyComplexItem::jsonTransectMinLengthKey = "transectMinLength"; -const char* CircularSurveyComplexItem::jsonIsSnakePathKey = "isSnakePath"; +const char* CircularSurveyComplexItem::jsonfixedDirectionKey = "fixedDirection"; const char* CircularSurveyComplexItem::jsonReverseKey = "reverse"; const char* CircularSurveyComplexItem::jsonReferencePointLatKey = "referencePointLat"; const char* CircularSurveyComplexItem::jsonReferencePointLongKey = "referencePointLong"; @@ -30,7 +30,7 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV , _deltaR (settingsGroup, _metaDataMap[deltaRName]) , _deltaAlpha (settingsGroup, _metaDataMap[deltaAlphaName]) , _transectMinLength (settingsGroup, _metaDataMap[transectMinLengthName]) - , _isSnakePath (settingsGroup, _metaDataMap[isSnakePathName]) + , _fixedDirection (settingsGroup, _metaDataMap[fixedDirectionName]) , _reverse (settingsGroup, _metaDataMap[reverseName]) , _maxWaypoints (settingsGroup, _metaDataMap[maxWaypointsName]) , _isInitialized (false) @@ -42,7 +42,7 @@ CircularSurveyComplexItem::CircularSurveyComplexItem(Vehicle *vehicle, bool flyV connect(&_deltaR, &Fact::valueChanged, this, &CircularSurveyComplexItem::_triggerSlowRecalc); connect(&_deltaAlpha, &Fact::valueChanged, this, &CircularSurveyComplexItem::_triggerSlowRecalc); connect(&_transectMinLength, &Fact::valueChanged, this, &CircularSurveyComplexItem::_triggerSlowRecalc); - connect(&_isSnakePath, &Fact::valueChanged, this, &CircularSurveyComplexItem::_triggerSlowRecalc); + connect(&_fixedDirection, &Fact::valueChanged, this, &CircularSurveyComplexItem::_triggerSlowRecalc); connect(&_maxWaypoints, &Fact::valueChanged, this, &CircularSurveyComplexItem::_triggerSlowRecalc); connect(&_reverse, &Fact::valueChanged, this, &CircularSurveyComplexItem::_reverseTransects); connect(this, &CircularSurveyComplexItem::refPointChanged, this, &CircularSurveyComplexItem::_triggerSlowRecalc); @@ -120,7 +120,7 @@ bool CircularSurveyComplexItem::load(const QJsonObject &complexObject, int seque { jsonDeltaRKey, QJsonValue::Double, true }, { jsonDeltaAlphaKey, QJsonValue::Double, true }, { jsonTransectMinLengthKey, QJsonValue::Double, true }, - { jsonIsSnakePathKey, QJsonValue::Bool, true }, + { jsonfixedDirectionKey, QJsonValue::Bool, true }, { jsonReverseKey, QJsonValue::Bool, true }, { jsonReferencePointLatKey, QJsonValue::Double, true }, { jsonReferencePointLongKey, QJsonValue::Double, true }, @@ -158,7 +158,7 @@ bool CircularSurveyComplexItem::load(const QJsonObject &complexObject, int seque _referencePoint.setLongitude (complexObject[jsonReferencePointLongKey].toDouble()); _referencePoint.setLatitude (complexObject[jsonReferencePointLatKey].toDouble()); _referencePoint.setAltitude (complexObject[jsonReferencePointAltKey].toDouble()); - _isSnakePath.setRawValue (complexObject[jsonIsSnakePathKey].toBool()); + _fixedDirection.setRawValue (complexObject[jsonfixedDirectionKey].toBool()); _reverse.setRawValue (complexObject[jsonReverseKey].toBool()); setIsInitialized(true); @@ -186,7 +186,7 @@ void CircularSurveyComplexItem::save(QJsonArray &planItems) saveObject[jsonDeltaRKey] = _deltaR.rawValue().toDouble(); saveObject[jsonDeltaAlphaKey] = _deltaAlpha.rawValue().toDouble(); saveObject[jsonTransectMinLengthKey] = _transectMinLength.rawValue().toDouble(); - saveObject[jsonIsSnakePathKey] = _isSnakePath.rawValue().toBool(); + saveObject[jsonfixedDirectionKey] = _fixedDirection.rawValue().toBool(); saveObject[jsonReverseKey] = _reverse.rawValue().toBool(); saveObject[jsonReferencePointLongKey] = _referencePoint.longitude(); saveObject[jsonReferencePointLatKey] = _referencePoint.latitude(); @@ -317,7 +317,7 @@ void CircularSurveyComplexItem::_rebuildTransectsFast() return; /// optimize path to snake or zig-zag pattern - bool isSnakePattern = _isSnakePath.rawValue().toBool(); + bool fixedDirectionBool = _fixedDirection.rawValue().toBool(); QVector currentSection = transectPath.takeFirst(); if ( currentSection.isEmpty() ) return; @@ -347,7 +347,7 @@ void CircularSurveyComplexItem::_rebuildTransectsFast() } } currentSection = transectPath.takeAt(index); - if (reversePath && isSnakePattern) { + if (reversePath && !fixedDirectionBool) { PolygonCalculus::reversePath(currentSection); } } @@ -406,7 +406,7 @@ void CircularSurveyComplexItem::_rebuildTransectsSlow() return; // optimize path to snake or zig-zag pattern - const bool isSnakePathBool = _isSnakePath.rawValue().toBool(); + const bool fixedDirectionBool = _fixedDirection.rawValue().toBool(); QVector currentSection = transectPath.takeFirst(); if ( currentSection.isEmpty() ) return; QVector optimizedPath(currentSection); bool reversePath = true; // controlls if currentSection gets reversed, has nothing todo with _reverseOnly @@ -422,7 +422,7 @@ void CircularSurveyComplexItem::_rebuildTransectsSlow() QVector tempConnectorPath; bool retVal; - if (reversePath && isSnakePathBool) { + if (reversePath && !fixedDirectionBool) { retVal = PolygonCalculus::shortestPath(surveyPolygon, endVertex, iteratorPath.last(), tempConnectorPath); } else { retVal = PolygonCalculus::shortestPath(surveyPolygon, endVertex, iteratorPath.first(), tempConnectorPath); @@ -442,7 +442,7 @@ void CircularSurveyComplexItem::_rebuildTransectsSlow() } } currentSection = transectPath.takeAt(index); - if (reversePath && isSnakePathBool) { + if (reversePath && !fixedDirectionBool) { PolygonCalculus::reversePath(currentSection); } @@ -700,9 +700,9 @@ Fact *CircularSurveyComplexItem::transectMinLength() return &_transectMinLength; } -Fact *CircularSurveyComplexItem::isSnakePath() +Fact *CircularSurveyComplexItem::fixedDirection() { - return &_isSnakePath; + return &_fixedDirection; } Fact *CircularSurveyComplexItem::reverse() diff --git a/src/Wima/CircularSurveyComplexItem.h b/src/Wima/CircularSurveyComplexItem.h index 642ef04791db93cc9f290674bfb0585b8f58a1f7..75380d7ebc1592fde6c52abc636e59d5d2969f02 100644 --- a/src/Wima/CircularSurveyComplexItem.h +++ b/src/Wima/CircularSurveyComplexItem.h @@ -22,7 +22,7 @@ public: Q_PROPERTY(Fact* deltaR READ deltaR CONSTANT) Q_PROPERTY(Fact* deltaAlpha READ deltaAlpha CONSTANT) Q_PROPERTY(Fact* transectMinLength READ transectMinLength CONSTANT) - Q_PROPERTY(Fact* isSnakePath READ isSnakePath CONSTANT) + Q_PROPERTY(Fact* fixedDirection READ fixedDirection CONSTANT) Q_PROPERTY(Fact* reverse READ reverse CONSTANT) Q_PROPERTY(Fact* maxWaypoints READ maxWaypoints CONSTANT) Q_PROPERTY(bool isInitialized READ isInitialized WRITE setIsInitialized NOTIFY isInitializedChanged) @@ -40,7 +40,7 @@ public: Fact *deltaR(); Fact *deltaAlpha(); Fact *transectMinLength(); - Fact *isSnakePath(); + Fact *fixedDirection(); Fact *reverse(); Fact *maxWaypoints(); // Is true if survey was automatically generated, prevents initialisation from gui. @@ -69,7 +69,7 @@ public: static const char* deltaRName; static const char* deltaAlphaName; static const char* transectMinLengthName; - static const char* isSnakePathName; + static const char* fixedDirectionName; static const char* reverseName; static const char* maxWaypointsName; @@ -77,7 +77,7 @@ public: static const char* jsonDeltaRKey; static const char* jsonDeltaAlphaKey; static const char* jsonTransectMinLengthKey; - static const char* jsonIsSnakePathKey; + static const char* jsonfixedDirectionKey; static const char* jsonReverseKey; static const char* jsonReferencePointLongKey; static const char* jsonReferencePointLatKey; @@ -120,7 +120,7 @@ private: SettingsFact _deltaR; // distance between two neighbour circles SettingsFact _deltaAlpha; // angle discretisation of the circles SettingsFact _transectMinLength; // minimal transect lenght, transects are rejected if they are shorter than this value - SettingsFact _isSnakePath; // bool value, determining if transects are connected in a snake like or zig zag like manner + SettingsFact _fixedDirection; // bool value, determining if transects have fixed direction or not SettingsFact _reverse; // reverses the _transects path SettingsFact _maxWaypoints; // the maximum number of waypoints _transects (TransectStyleComplexItem) can contain (to avoid performance hits) diff --git a/src/WimaView/WimaView.qml b/src/WimaView/WimaView.qml index c3c2c0a5921a341018bea068f49f5421419c03b9..bd429e33660a2165073422919b502452b65864e7 100644 --- a/src/WimaView/WimaView.qml +++ b/src/WimaView/WimaView.qml @@ -1206,13 +1206,12 @@ QGCView { QGCLabel { width: sendSaveGrid.width wrapMode: Text.WordWrap - text: "unsaved changes not yet implemented" - /*masterController.dirty ? + text: masterController.dirty ? (_activeVehicle ? qsTr("You have unsaved changes. You should upload to your vehicle, or save to a file:") : qsTr("You have unsaved changes.") ) : - qsTr("Plan File:")*/ + qsTr("File:") } GridLayout {