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
f929b6cb
Commit
f929b6cb
authored
Jun 10, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed compile warnings, moved MAVLink ids
parent
e771303d
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
200 additions
and
63 deletions
+200
-63
fixedimageoverlay.cpp
lib/QMapControl/src/fixedimageoverlay.cpp
+2
-0
googlesatmapadapter.cpp
lib/QMapControl/src/googlesatmapadapter.cpp
+6
-4
qgroundcontrol.pro
qgroundcontrol.pro
+3
-3
HSIDisplay.cc
src/ui/HSIDisplay.cc
+153
-55
HSIDisplay.h
src/ui/HSIDisplay.h
+36
-1
No files found.
lib/QMapControl/src/fixedimageoverlay.cpp
View file @
f929b6cb
...
...
@@ -46,6 +46,8 @@ namespace qmapcontrol
void
FixedImageOverlay
::
draw
(
QPainter
*
painter
,
const
MapAdapter
*
mapadapter
,
const
QRect
&
viewport
,
const
QPoint
offset
)
{
Q_UNUSED
(
viewport
)
Q_UNUSED
(
offset
)
if
(
!
visible
)
return
;
...
...
lib/QMapControl/src/googlesatmapadapter.cpp
View file @
f929b6cb
...
...
@@ -64,10 +64,12 @@ namespace qmapcontrol
//double lon = ((point.x()/tilesize*numberOfTiles)*360)-180;
//double lat = (((point.y()/tilesize*numberOfTiles)*180)-90)*-1;
qreal
lon
=
(
point
.
x
()
*
(
360.
/
(
numberOfTiles
*
mytilesize
)))
-
180.
;
//double lat = -(point.y()*(180./(numberOfTiles*tilesize)))+90;
//qreal lat = getMercatorLatitude(point.y()*-1*(2*M_PI/(numberOfTiles*tilesize)) + M_PI);
qreal
lat
=
lat
*
180.
/
M_PI
;
qreal
lon
=
(
point
.
x
()
*
(
360.0
/
(
numberOfTiles
*
mytilesize
)))
-
180.0
;
// qreal lat = -(point.y()*(180.0/(numberOfTiles*mytilesize)))+90.0;
// FIXME Looks buggy
qreal
lat
=
getMercatorLatitude
(
point
.
y
()
*-
1
*
(
2
*
M_PI
/
(
numberOfTiles
*
mytilesize
))
+
M_PI
);
//qreal lat = lat *180./M_PI;
return
QPointF
(
lon
,
lat
);
}
...
...
qgroundcontrol.pro
View file @
f929b6cb
...
...
@@ -3,10 +3,10 @@
#
from
http
://
github
.
com
/
pixhawk
/
qmapcontrol
/
#
over
bundled
version
in
lib
directory
#
Version
from
GIT
repository
is
preferred
#
include
(
"../qmapcontrol/QMapControl/QMapControl.pri"
)
#
{
include
(
"../qmapcontrol/QMapControl/QMapControl.pri"
)
#
{
#
Include
bundled
version
if
necessary
include
(
lib
/
QMapControl
/
QMapControl
.
pri
)
message
(
"Including bundled QMapControl version as FALLBACK. This is fine on Linux and MacOS, but not the best choice in Windows"
)
#
include
(
lib
/
QMapControl
/
QMapControl
.
pri
)
#
message
(
"Including bundled QMapControl version as FALLBACK. This is fine on Linux and MacOS, but not the best choice in Windows"
)
QT
+=
network
opengl
svg
xml
phonon
...
...
src/ui/HSIDisplay.cc
View file @
f929b6cb
This diff is collapsed.
Click to expand it.
src/ui/HSIDisplay.h
View file @
f929b6cb
...
...
@@ -51,13 +51,19 @@ public:
public
slots
:
void
setActiveUAS
(
UASInterface
*
uas
);
void
updateSatellite
(
int
uasid
,
int
satid
,
float
azimuth
,
float
direction
,
float
snr
,
bool
used
);
void
updateAttitudeSetpoints
(
UASInterface
*
,
double
rollDesired
,
double
pitchDesired
,
double
yawDesired
,
double
thrustDesired
,
quint64
usec
);
void
updatePositionSetpoints
(
int
uasid
,
double
xDesired
,
double
yDesired
,
double
zDesired
,
quint64
usec
);
void
updateLocalPosition
(
UASInterface
*
,
double
x
,
double
y
,
double
z
,
quint64
usec
);
void
updateGlobalPosition
(
UASInterface
*
,
double
lat
,
double
lon
,
double
alt
,
quint64
usec
);
void
paintEvent
(
QPaintEvent
*
event
);
protected
slots
:
void
paintDisplay
();
void
drawGPS
();
void
drawObjects
();
void
drawBaseLines
(
float
xRef
,
float
yRef
,
float
radius
,
float
yaw
,
const
QColor
&
color
,
QPainter
*
painter
,
bool
solid
);
void
drawPositionSetpoint
(
float
xRef
,
float
yRef
,
float
radius
,
const
QColor
&
color
,
QPainter
*
painter
);
void
drawAttitudeSetpoint
(
float
xRef
,
float
yRef
,
float
radius
,
const
QColor
&
color
,
QPainter
*
painter
);
void
drawAltitudeSetpoint
(
float
xRef
,
float
yRef
,
float
radius
,
const
QColor
&
color
,
QPainter
*
painter
);
protected:
...
...
@@ -103,6 +109,35 @@ protected:
QMap
<
int
,
GPSSatellite
*>
gpsSatellites
;
unsigned
int
satellitesUsed
;
// Current controller values
float
attXSet
;
float
attYSet
;
float
attYawSet
;
float
altitudeSet
;
float
posXSet
;
float
posYSet
;
float
posZSet
;
// Controller saturation values
float
attXSaturation
;
float
attYSaturation
;
float
attYawSaturation
;
float
posXSaturation
;
float
posYSaturation
;
float
altitudeSaturation
;
// Position
float
lat
;
float
lon
;
float
alt
;
quint64
globalAvailable
;
///< Last global position update time
float
x
;
float
y
;
float
z
;
quint64
localAvailable
;
///< Last local position update time
private:
};
...
...
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