Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
0cdd04cc
Commit
0cdd04cc
authored
Jan 09, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
321
parent
e7ca9e92
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
109 additions
and
8 deletions
+109
-8
bugs.txt
bugs.txt
+0
-1
issues.txt
issues.txt
+0
-2
main.cpp
...Projects/CircularSurveyOptimisation/optimisation/main.cpp
+29
-0
main.qml
...Projects/CircularSurveyOptimisation/optimisation/main.qml
+32
-0
optimisation.pro
.../CircularSurveyOptimisation/optimisation/optimisation.pro
+37
-0
qml.qrc
...oProjects/CircularSurveyOptimisation/optimisation/qml.qrc
+5
-0
CircularSurveyComplexItem.cc
src/Wima/CircularSurveyComplexItem.cc
+6
-5
No files found.
bugs.txt
deleted
100644 → 0
View file @
e7ca9e92
error when loading wima file
issues.txt
deleted
100644 → 0
View file @
e7ca9e92
if polygon vertex clicked: remove circle option
can't switch between polygons on first insert
microProjects/CircularSurveyOptimisation/optimisation/main.cpp
0 → 100644
View file @
0cdd04cc
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "CircularSurveyComplexItem.h"
#include <QQmlContext>
#include <QObject>
int
main
(
int
argc
,
char
*
argv
[])
{
QCoreApplication
::
setAttribute
(
Qt
::
AA_EnableHighDpiScaling
);
QGuiApplication
app
(
argc
,
argv
);
QQmlApplicationEngine
engine
;
CircularSurveyComplexItem
survey
;
const
QUrl
url
(
QStringLiteral
(
"qrc:/main.qml"
));
QObject
::
connect
(
&
engine
,
&
QQmlApplicationEngine
::
objectCreated
,
&
app
,
[
url
](
QObject
*
obj
,
const
QUrl
&
objUrl
)
{
if
(
!
obj
&&
url
==
objUrl
)
QCoreApplication
::
exit
(
-
1
);
},
Qt
::
QueuedConnection
);
engine
.
rootContext
()
->
setContextProperty
(
"survey"
,
&
survey
);
engine
.
load
(
url
);
return
app
.
exec
();
}
microProjects/CircularSurveyOptimisation/optimisation/main.qml
0 → 100644
View file @
0cdd04cc
import
QtQuick
2.11
import
QtQuick
.
Window
2.11
import
QtLocation
5.5
import
"
../../../src/WimaView
"
Window
{
visible
:
true
width
:
640
height
:
480
title
:
qsTr
(
"
Hello World
"
)
Map
{
id
:
map
anchors.fill
:
parent
plugin
:
Plugin
{
name
:
"
osm
"
// "mapboxgl", "esri", ...
// specify plugin parameters if necessary
// PluginParameter {
// name:
// value:
// }
}
Repeater
{
model
:
survey
SphericalSurveyMapVisual
{
map
:
map
}
}
}
}
microProjects/CircularSurveyOptimisation/optimisation/optimisation.pro
0 → 100644
View file @
0cdd04cc
QT
+=
quick
QT
+=
positioning
CONFIG
+=
c
++
11
#
The
following
define
makes
your
compiler
emit
warnings
if
you
use
#
any
Qt
feature
that
has
been
marked
deprecated
(
the
exact
warnings
#
depend
on
your
compiler
).
Refer
to
the
documentation
for
the
#
deprecated
API
to
know
how
to
port
your
code
away
from
it
.
DEFINES
+=
QT_DEPRECATED_WARNINGS
#
You
can
also
make
your
code
fail
to
compile
if
it
uses
deprecated
APIs
.
#
In
order
to
do
so
,
uncomment
the
following
line
.
#
You
can
also
select
to
disable
deprecated
APIs
only
up
to
a
certain
version
of
Qt
.
#
DEFINES
+=
QT_DISABLE_DEPRECATED_BEFORE
=
0
x060000
#
disables
all
the
APIs
deprecated
before
Qt
6.0
.
0
SOURCES
+=
\
main
.
cpp
RESOURCES
+=
qml
.
qrc
#
Additional
import
path
used
to
resolve
QML
modules
in
Qt
Creator
'
s
code
model
QML_IMPORT_PATH
=
$$
PWD
/../../../
src
/
WimaView
#
Additional
import
path
used
to
resolve
QML
modules
just
for
Qt
Quick
Designer
QML_DESIGNER_IMPORT_PATH
=
#
Default
rules
for
deployment
.
qnx
:
target
.
path
=
/
tmp
/
$$
{
TARGET
}
/
bin
else
:
unix
:
!
android
:
target
.
path
=
/
opt
/
$$
{
TARGET
}
/
bin
!
isEmpty
(
target
.
path
)
:
INSTALLS
+=
target
INCLUDEPATH
+=
$$
PWD
/../../../
src
/
Wima
INCLUDEPATH
+=
$$
PWD
/../../../
src
/
MissionManager
INCLUDEPATH
+=
$$
PWD
/../../../
src
/
comm
INCLUDEPATH
+=
$$
PWD
/../../../
libs
/
mavlink
/
include
/
mavlink
/
v2
.
0
/
microProjects/CircularSurveyOptimisation/optimisation/qml.qrc
0 → 100644
View file @
0cdd04cc
<RCC>
<qresource prefix="/">
<file>main.qml</file>
</qresource>
</RCC>
src/Wima/CircularSurveyComplexItem.cc
View file @
0cdd04cc
...
...
@@ -365,6 +365,7 @@ void CircularSurveyComplexItem::_rebuildTransectsPhase1()
using
namespace
PolygonCalculus
;
using
namespace
PlanimetryCalculus
;
// rebuild not necessary?
if
(
!
_isInitialized
||
_referencePointBeingChanged
)
return
;
...
...
@@ -429,11 +430,11 @@ void CircularSurveyComplexItem::_rebuildTransectsPhase1()
// fetch input data
double
dalpha
=
_deltaAlpha
.
rawValue
().
toDouble
()
/
180.0
*
M_PI
;
// radiants
double
dr
=
_deltaR
.
rawValue
().
toDouble
();
// meter
double
lmin
=
_transectMinLength
.
rawValue
().
toDouble
();
double
r_min
=
dr
;
// meter
double
r_max
=
(
*
std
::
max_element
(
distances
.
begin
(),
distances
.
end
()));
// meter
double
dalpha
=
_deltaAlpha
.
rawValue
().
toDouble
()
/
180.0
*
M_PI
;
// radiants
double
dr
=
_deltaR
.
rawValue
().
toDouble
();
// meter
double
lmin
=
_transectMinLength
.
rawValue
().
toDouble
();
double
r_min
=
dr
;
// meter
double
r_max
=
(
*
std
::
max_element
(
distances
.
begin
(),
distances
.
end
()));
// meter
QPointF
origin
(
0
,
0
);
IntersectType
type
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment