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
a076f256
Commit
a076f256
authored
Jun 22, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed local global transform
parent
1e90dab4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
HSIDisplay.cc
src/ui/HSIDisplay.cc
+10
-4
HSIDisplay.h
src/ui/HSIDisplay.h
+1
-0
WatchdogProcessView.cc
src/ui/watchdog/WatchdogProcessView.cc
+1
-1
No files found.
src/ui/HSIDisplay.cc
View file @
a076f256
...
...
@@ -70,7 +70,7 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
localAvailable
(
0
),
roll
(
0
),
pitch
(
0
),
yaw
(
0.0
f
),
yaw
(
1.0
f
),
// FIXME Should be 0
bodyXSetCoordinate
(
0.0
f
),
bodyYSetCoordinate
(
0.0
f
),
bodyZSetCoordinate
(
0.0
f
),
...
...
@@ -83,7 +83,8 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
positionLock
(
false
),
attControlEnabled
(
false
),
xyControlEnabled
(
false
),
zControlEnabled
(
false
)
zControlEnabled
(
false
),
mavInitialized
(
false
)
{
connect
(
UASManager
::
instance
(),
SIGNAL
(
activeUASSet
(
UASInterface
*
)),
this
,
SLOT
(
setActiveUAS
(
UASInterface
*
)));
refreshTimer
->
setInterval
(
60
);
...
...
@@ -272,7 +273,7 @@ QPointF HSIDisplay::metricWorldToBody(QPointF world)
{
// First translate to body-centered coordinates
// Rotate around -yaw
QPointF
result
(
cos
(
yaw
)
*
(
world
.
x
()
-
x
)
+
-
sin
(
yaw
)
*
(
world
.
x
()
-
x
),
sin
(
yaw
)
*
(
world
.
y
()
-
y
)
+
cos
(
yaw
)
*
(
world
.
y
()
-
y
));
QPointF
result
(
cos
(
yaw
)
*
(
x
-
world
.
x
())
+
-
sin
(
yaw
)
*
(
x
-
world
.
x
()),
sin
(
yaw
)
*
(
y
-
world
.
y
())
+
cos
(
yaw
)
*
(
y
-
world
.
y
()
));
return
result
;
}
...
...
@@ -400,7 +401,9 @@ void HSIDisplay::setBodySetpointCoordinateXY(double x, double y)
uiXSetCoordinate
=
sp
.
x
();
uiYSetCoordinate
=
sp
.
y
();
if
(
uas
)
qDebug
()
<<
"Attempting to set new setpoint at x: "
<<
x
<<
"metric y:"
<<
y
;
if
(
uas
&&
mavInitialized
)
{
uas
->
setLocalPositionSetpoint
(
uiXSetCoordinate
,
uiYSetCoordinate
,
uiZSetCoordinate
,
uiYawSet
);
qDebug
()
<<
"Setting new setpoint at x: "
<<
x
<<
"metric y:"
<<
y
;
...
...
@@ -445,6 +448,9 @@ void HSIDisplay::updatePositionSetpoints(int uasid, float xDesired, float yDesir
bodyYSetCoordinate
=
yDesired
;
bodyZSetCoordinate
=
zDesired
;
bodyYawSet
=
yawDesired
;
mavInitialized
=
true
;
qDebug
()
<<
"Received setpoint at x: "
<<
x
<<
"metric y:"
<<
y
;
// posXSet = xDesired;
// posYSet = yDesired;
// posZSet = zDesired;
...
...
src/ui/HSIDisplay.h
View file @
a076f256
...
...
@@ -195,6 +195,7 @@ protected:
bool
attControlEnabled
;
bool
xyControlEnabled
;
bool
zControlEnabled
;
bool
mavInitialized
;
///< The MAV is initialized once the setpoint has been received
private:
};
...
...
src/ui/watchdog/WatchdogProcessView.cc
View file @
a076f256
#include "WatchdogProcessView.h"
#include "ui_WatchdogProcessView.h"
WatchdogProcessView
::
WatchdogProcessView
(
QWidget
*
parent
)
:
WatchdogProcessView
::
WatchdogProcessView
(
int
processid
,
QWidget
*
parent
)
:
QWidget
(
parent
),
m_ui
(
new
Ui
::
WatchdogProcessView
)
{
...
...
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