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
0032c8d0
Commit
0032c8d0
authored
May 27, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addition of groundSpeed property to UAS
parent
89838e32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
UAS.cc
src/uas/UAS.cc
+1
-0
UAS.h
src/uas/UAS.h
+14
-0
No files found.
src/uas/UAS.cc
View file @
0032c8d0
...
...
@@ -808,6 +808,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
if
((
vel
<
1000000
)
&&
!
isnan
(
vel
)
&&
!
isinf
(
vel
))
{
emit
speedChanged
(
this
,
vel
,
0.0
,
0.0
,
time
);
setGroundSpeed
(
vel
);
}
else
{
...
...
src/uas/UAS.h
View file @
0032c8d0
...
...
@@ -113,6 +113,18 @@ public:
Q_PROPERTY
(
double
pitch
READ
getPitch
WRITE
setPitch
NOTIFY
pitchChanged
)
Q_PROPERTY
(
double
yaw
READ
getYaw
WRITE
setYaw
NOTIFY
yawChanged
)
Q_PROPERTY
(
double
distToWaypoint
READ
getDistToWaypoint
WRITE
setDistToWaypoint
NOTIFY
distToWaypointChanged
)
Q_PROPERTY
(
double
groundSpeed
READ
getGroundSpeed
WRITE
setGroundSpeed
NOTIFY
groundSpeedChanged
)
void
setGroundSpeed
(
double
val
)
{
groundSpeed
=
val
;
emit
groundSpeedChanged
(
val
,
"groundSpeed"
);
emit
valueChanged
(
this
->
uasId
,
"groundSpeed"
,
"m/s"
,
QVariant
(
val
),
getUnixTime
());
}
double
getGroundSpeed
()
const
{
return
groundSpeed
;
}
void
setLocalX
(
double
val
)
{
...
...
@@ -391,6 +403,7 @@ protected: //COMMENTS FOR TEST UNIT
double
speedY
;
///< True speed in Y axis
double
speedZ
;
///< True speed in Z axis
double
distToWaypoint
;
///< Distance to next waypoint
double
groundSpeed
;
///< GPS Groundspeed
double
roll
;
double
pitch
;
double
yaw
;
...
...
@@ -816,6 +829,7 @@ signals:
void
yawChanged
(
double
val
,
QString
name
);
void
satelliteCountChanged
(
double
val
,
QString
name
);
void
distToWaypointChanged
(
double
val
,
QString
name
);
void
groundSpeedChanged
(
double
val
,
QString
name
);
...
...
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