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
65a28f6e
Commit
65a28f6e
authored
Feb 26, 2020
by
DoinLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
3d800c7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
MapFitFunctions.qml
src/FlightMap/Widgets/MapFitFunctions.qml
+8
-15
No files found.
src/FlightMap/Widgets/MapFitFunctions.qml
View file @
65a28f6e
...
...
@@ -62,8 +62,14 @@ Item {
var
east
=
normalizeLon
(
coordList
[
0
].
longitude
)
var
west
=
east
for
(
var
i
=
1
;
i
<
coordList
.
length
;
i
++
)
{
var
lat
=
normalizeLat
(
coordList
[
i
].
latitude
)
var
lon
=
normalizeLon
(
coordList
[
i
].
longitude
)
var
lat
=
coordList
[
i
].
latitude
var
lon
=
coordList
[
i
].
longitude
if
(
isNaN
(
lat
)
||
lat
==
0
||
isNan
(
lon
)
||
lon
==
0
)
{
// Be careful of invalid coords which can happen when items are not yet complete
continue
}
lat
=
normalizeLat
(
lat
)
lon
=
normalizeLon
(
lat
)
north
=
Math
.
max
(
north
,
lat
)
south
=
Math
.
min
(
south
,
lat
)
east
=
Math
.
max
(
east
,
lon
)
...
...
@@ -110,19 +116,6 @@ Item {
// Being called prior to controller.start
return
}
/*
for (var i=1; i<_missionController.visualItems.count; i++) {
var missionItem = _missionController.visualItems.get(i)
if (missionItem.specifiesCoordinate && !missionItem.isStandaloneCoordinate) {
console.log(missionItem.boundingCube.pointNW)
console.log(missionItem.boundingCube.pointSE)
var loc = QtPositioning.rectangle(missionItem.boundingCube.pointNW, missionItem.boundingCube.pointSE)
console.log(loc)
map.visibleRegion = loc
return
}
}
*/
var
coordList
=
[
]
addMissionItemCoordsForFit
(
coordList
)
fitMapViewportToAllCoordinates
(
coordList
)
...
...
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