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
875034c0
Commit
875034c0
authored
Jul 21, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed trail plotting
parent
14c97a7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
uavitem.cpp
src/libs/opmapcontrol/src/mapwidget/uavitem.cpp
+1
-1
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+17
-10
No files found.
src/libs/opmapcontrol/src/mapwidget/uavitem.cpp
View file @
875034c0
...
...
@@ -86,7 +86,7 @@ namespace mapcontrol
}
else
if
(
trailtype
==
UAVTrailType
::
ByDistance
)
{
if
(
qAbs
(
internals
::
PureProjection
::
DistanceBetweenLatLng
(
lastcoord
,
position
))
>
traildistance
)
if
(
qAbs
(
internals
::
PureProjection
::
DistanceBetweenLatLng
(
lastcoord
,
position
)
*
1000
)
>
traildistance
)
{
trail
->
addToGroup
(
new
TrailItem
(
position
,
altitude
,
color
,
this
));
if
(
!
lasttrailline
.
IsEmpty
())
...
...
src/ui/map/QGCMapWidget.cc
View file @
875034c0
...
...
@@ -26,6 +26,9 @@ QGCMapWidget::~QGCMapWidget()
void
QGCMapWidget
::
showEvent
(
QShowEvent
*
event
)
{
// FIXME XXX this is a hack to trick OPs current 1-system design
SetShowUAV
(
false
);
// Pass on to parent widget
OPMapWidget
::
showEvent
(
event
);
...
...
@@ -67,20 +70,21 @@ void QGCMapWidget::showEvent(QShowEvent* event)
SetFollowMouse
(
true
);
// we want a contiuous mouse position reading
SetShowHome
(
true
);
// display the HOME position on the map
SetShowUAV
(
true
);
// display the UAV position on the map
//
SetShowUAV(true); // display the UAV position on the map
//SetShowDiagnostics(true); // Not needed in flight / production mode
Home
->
SetSafeArea
(
safe_area_radius_list
[
0
]);
// set radius (meters)
Home
->
SetShowSafeArea
(
true
);
// show the safe area
// UAV->SetTrailTime(uav_trail_time_list[0]); // seconds
// UAV->SetTrailDistance(uav_trail_distance_list[1]); // meters
//
//
UAV->SetTrailTime(uav_trail_time_list[0]); // seconds
//
//
UAV->SetTrailDistance(uav_trail_distance_list[1]); // meters
// UAV->SetTrailType(
UAVTrailType::ByTimeElapsed);
// UAV->SetTrailType(
UAVTrailType::ByDistance);
//// UAV->SetTrailType(mapcontrol::
UAVTrailType::ByTimeElapsed);
//// UAV->SetTrailType(mapcontrol::
UAVTrailType::ByDistance);
GPS
->
SetTrailTime
(
uav_trail_time_list
[
0
]);
// seconds
GPS
->
SetTrailDistance
(
uav_trail_distance_list
[
1
]);
// meters
//
GPS->SetTrailTime(uav_trail_time_list[0]); // seconds
//
GPS->SetTrailDistance(uav_trail_distance_list[1]); // meters
// GPS->SetTrailType(UAVTrailType::ByTimeElapsed);
...
...
@@ -245,9 +249,9 @@ void QGCMapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lo
newUAV
->
setParentItem
(
map
);
UAVS
.
insert
(
uas
->
getUASID
(),
newUAV
);
uav
=
GetUAV
(
uas
->
getUASID
());
//
uav->SetTrailTime(1);
//
uav->SetTrailDistance(5);
//
uav->SetTrailType(mapcontrol::UAVTrailType::ByTimeElapsed);
uav
->
SetTrailTime
(
1
);
uav
->
SetTrailDistance
(
5
);
uav
->
SetTrailType
(
mapcontrol
::
UAVTrailType
::
ByTimeElapsed
);
}
// Set new lat/lon position of UAV icon
...
...
@@ -276,6 +280,9 @@ void QGCMapWidget::updateGlobalPosition()
MAV2DIcon
*
newUAV
=
new
MAV2DIcon
(
map
,
this
,
system
);
AddUAV
(
system
->
getUASID
(),
newUAV
);
uav
=
newUAV
;
uav
->
SetTrailTime
(
1
);
uav
->
SetTrailDistance
(
5
);
uav
->
SetTrailType
(
mapcontrol
::
UAVTrailType
::
ByTimeElapsed
);
}
// Set new lat/lon position of UAV icon
...
...
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