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
80e1204f
Commit
80e1204f
authored
Jun 01, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GPS MAV visualization and moving map tested and working
parent
1301c56b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
PxQuadMAV.cc
src/uas/PxQuadMAV.cc
+1
-1
UAS.cc
src/uas/UAS.cc
+1
-1
MapWidget.cc
src/ui/MapWidget.cc
+4
-3
No files found.
src/uas/PxQuadMAV.cc
View file @
80e1204f
...
...
@@ -19,7 +19,7 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message)
UAS
::
receiveMessage
(
link
,
message
);
mavlink_message_t
*
msg
=
&
message
;
qDebug
()
<<
"PX RECEIVED"
<<
msg
->
sysid
<<
msg
->
compid
<<
msg
->
msgid
;
//
qDebug() << "PX RECEIVED" << msg->sysid << msg->compid << msg->msgid;
// Handle your special messages
...
...
src/uas/UAS.cc
View file @
80e1204f
...
...
@@ -117,7 +117,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
addLink
(
link
);
}
qDebug
()
<<
"UAS RECEIVED"
<<
message
.
sysid
<<
message
.
compid
<<
message
.
msgid
;
//
qDebug() << "UAS RECEIVED" << message.sysid << message.compid << message.msgid;
if
(
message
.
sysid
==
uasId
)
{
...
...
src/ui/MapWidget.cc
View file @
80e1204f
...
...
@@ -74,7 +74,7 @@ MapWidget::MapWidget(QWidget *parent) :
QPushButton
*
zoomout
=
new
QPushButton
(
QIcon
(
":/images/actions/list-remove.svg"
),
""
,
this
);
followgps
=
new
QPushButton
(
QIcon
(
":/images/actions/system-lock-screen.svg"
),
""
,
this
);
followgps
->
setCheckable
(
true
);
//
gpsposition = new QLabel();
//
gpsposition = new QLabel();
zoomin
->
setMaximumWidth
(
50
);
zoomout
->
setMaximumWidth
(
50
);
followgps
->
setMaximumWidth
(
50
);
...
...
@@ -114,6 +114,7 @@ MapWidget::~MapWidget()
void
MapWidget
::
addUAS
(
UASInterface
*
uas
)
{
mav
=
uas
;
connect
(
uas
,
SIGNAL
(
globalPositionChanged
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateGlobalPosition
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)));
}
void
MapWidget
::
updateGlobalPosition
(
UASInterface
*
uas
,
double
lat
,
double
lon
,
double
alt
,
quint64
usec
)
...
...
@@ -123,7 +124,7 @@ void MapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lon,
QList
<
Point
*>
points
;
// Points with a circle
// A QPen can be used to customize the
QPen
*
pointpen
=
new
QPen
(
QColor
(
0
,
255
,
0
));
QPen
*
pointpen
=
new
QPen
(
uas
->
getColor
(
));
pointpen
->
setWidth
(
3
);
points
.
append
(
new
CirclePoint
(
lat
,
lon
,
alt
,
uas
->
getUASName
(),
Point
::
Middle
,
pointpen
));
// points.append(new CirclePoint(8.275145, 50.016992, 15, "Wiesbaden-Mainz-Kastel, Johannes-Goßner-Straße", Point::Middle, pointpen));
...
...
@@ -156,7 +157,7 @@ void MapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lon,
void
MapWidget
::
updatePosition
(
float
time
,
double
lat
,
double
lon
)
{
gpsposition
->
setText
(
QString
::
number
(
time
)
+
" / "
+
QString
::
number
(
lat
)
+
" / "
+
QString
::
number
(
lon
));
//
gpsposition->setText(QString::number(time) + " / " + QString::number(lat) + " / " + QString::number(lon));
if
(
followgps
->
isChecked
())
{
mc
->
setView
(
QPointF
(
lat
,
lon
));
...
...
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