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
355ff4f0
Commit
355ff4f0
authored
Sep 21, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Discovered source of imprecision of wp map updates, can be solved, on track
parent
1337acc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
QGCGoogleEarthView.cc
src/ui/map3D/QGCGoogleEarthView.cc
+13
-7
No files found.
src/ui/map3D/QGCGoogleEarthView.cc
View file @
355ff4f0
...
...
@@ -247,7 +247,7 @@ void QGCGoogleEarthView::updateWaypoint(int uas, Waypoint* wp)
}
else
{
javaScript
(
QString
(
"updateWaypoint(%1,%2,%3,%4,%5,%6);"
).
arg
(
uas
).
arg
(
wpindex
).
arg
(
wp
->
getLatitude
(),
0
,
'f'
,
18
).
arg
(
wp
->
getLongitude
(),
0
,
'f'
,
18
).
arg
(
wp
->
getAltitude
(),
0
,
'f'
,
18
).
arg
(
wp
->
getAction
()));
javaScript
(
QString
(
"updateWaypoint(%1,%2,%3,%4,%5,%6);"
).
arg
(
uas
).
arg
(
wpindex
).
arg
(
wp
->
getLatitude
(),
0
,
'f'
,
22
).
arg
(
wp
->
getLongitude
(),
0
,
'f'
,
22
).
arg
(
wp
->
getAltitude
(),
0
,
'f'
,
22
).
arg
(
wp
->
getAction
()));
//qDebug() << QString("updateWaypoint(%1,%2,%3,%4,%5,%6);").arg(uas).arg(wpindex).arg(wp->getLatitude(), 0, 'f', 18).arg(wp->getLongitude(), 0, 'f', 18).arg(wp->getAltitude(), 0, 'f', 18).arg(wp->getAction());
}
}
...
...
@@ -283,7 +283,7 @@ void QGCGoogleEarthView::updateWaypointList(int uas)
void
QGCGoogleEarthView
::
updateGlobalPosition
(
UASInterface
*
uas
,
double
lat
,
double
lon
,
double
alt
,
quint64
usec
)
{
Q_UNUSED
(
usec
);
javaScript
(
QString
(
"addTrailPosition(%1, %2, %3, %4);"
).
arg
(
uas
->
getUASID
()).
arg
(
lat
,
0
,
'f'
,
18
).
arg
(
lon
,
0
,
'f'
,
18
).
arg
(
alt
,
0
,
'f'
,
15
));
javaScript
(
QString
(
"addTrailPosition(%1, %2, %3, %4);"
).
arg
(
uas
->
getUASID
()).
arg
(
lat
,
0
,
'f'
,
22
).
arg
(
lon
,
0
,
'f'
,
22
).
arg
(
alt
,
0
,
'f'
,
22
));
//qDebug() << QString("addTrailPosition(%1, %2, %3, %4);").arg(uas->getUASID()).arg(lat, 0, 'f', 15).arg(lon, 0, 'f', 15).arg(alt, 0, 'f', 15);
}
...
...
@@ -310,9 +310,11 @@ void QGCGoogleEarthView::showTrail(bool state)
}
// Check if the current trail has to be shown
if
(
!
trailEnabled
&&
state
)
{
if
(
!
trailEnabled
&&
state
)
{
QList
<
UASInterface
*>
mavs
=
UASManager
::
instance
()
->
getUASList
();
foreach
(
UASInterface
*
currMav
,
mavs
)
{
foreach
(
UASInterface
*
currMav
,
mavs
)
{
javaScript
(
QString
(
"showTrail(%1);"
).
arg
(
currMav
->
getUASID
()));
}
}
...
...
@@ -328,10 +330,14 @@ void QGCGoogleEarthView::showWaypoints(bool state)
void
QGCGoogleEarthView
::
follow
(
bool
follow
)
{
ui
->
followAirplaneCheckbox
->
setChecked
(
follow
);
if
(
follow
!=
followCamera
)
{
if
(
follow
)
{
if
(
follow
!=
followCamera
)
{
if
(
follow
)
{
setViewMode
(
VIEW_MODE_CHASE_LOCKED
);
}
else
{
}
else
{
setViewMode
(
VIEW_MODE_SIDE
);
}
}
...
...
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