Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
7d68c7b6
Commit
7d68c7b6
authored
Feb 17, 2011
by
lm
Browse files
Fixed a small bug where param values in GPS RAW packets were not correctly updating the GCS state
parent
99c25b99
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/uas/UAS.cc
View file @
7d68c7b6
...
...
@@ -605,6 +605,9 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
emit
globalPositionChanged
(
this
,
pos
.
lat
,
pos
.
lon
,
pos
.
alt
,
time
);
emit
valueChanged
(
uasId
,
"gps speed"
,
"m/s"
,
pos
.
v
,
time
);
latitude
=
pos
.
lat
;
longitude
=
pos
.
lon
;
altitude
=
pos
.
alt
;
positionLock
=
true
;
// Check for NaN
...
...
@@ -646,6 +649,9 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
{
emit
globalPositionChanged
(
this
,
pos
.
lat
/
(
double
)
1E7
,
pos
.
lon
/
(
double
)
1E7
,
pos
.
alt
/
1000.0
,
time
);
emit
valueChanged
(
uasId
,
"gps speed"
,
"m/s"
,
pos
.
v
,
time
);
latitude
=
pos
.
lat
/
(
double
)
1E7
;
longitude
=
pos
.
lon
/
(
double
)
1E7
;
altitude
=
pos
.
alt
/
1000.0
;
positionLock
=
true
;
// Check for NaN
...
...
src/ui/map3D/QGCGoogleEarthView.cc
View file @
7d68c7b6
...
...
@@ -30,7 +30,7 @@
QGCGoogleEarthView
::
QGCGoogleEarthView
(
QWidget
*
parent
)
:
QWidget
(
parent
),
updateTimer
(
new
QTimer
(
this
)),
refreshRateMs
(
4
0
),
refreshRateMs
(
10
0
),
mav
(
NULL
),
followCamera
(
true
),
trailEnabled
(
true
),
...
...
@@ -216,7 +216,7 @@ void QGCGoogleEarthView::updateGlobalPosition(UASInterface* uas, double lat, dou
Q_UNUSED
(
usec
);
javaScript
(
QString
(
"addTrailPosition(%1, %2, %3, %4);"
).
arg
(
uas
->
getUASID
()).
arg
(
lat
,
0
,
'f'
,
18
).
arg
(
lon
,
0
,
'f'
,
18
).
arg
(
alt
,
0
,
'f'
,
15
));
//
qDebug() << QString("addTrailPosition(%1, %2, %3, %4);").arg(uas->getUASID()).arg(lat, 0, 'f', 15).arg(lon, 0, 'f', 15).arg(alt, 0, 'f', 15);
qDebug
()
<<
QString
(
"addTrailPosition(%1, %2, %3, %4);"
).
arg
(
uas
->
getUASID
()).
arg
(
lat
,
0
,
'f'
,
15
).
arg
(
lon
,
0
,
'f'
,
15
).
arg
(
alt
,
0
,
'f'
,
15
);
}
void
QGCGoogleEarthView
::
showTrail
(
bool
state
)
...
...
@@ -457,6 +457,8 @@ void QGCGoogleEarthView::updateState()
pitch
=
currMav
->
getPitch
();
yaw
=
currMav
->
getYaw
();
//qDebug() << "SETTING POSITION FOR" << uasId << lat << lon << alt << roll << pitch << yaw;
javaScript
(
QString
(
"setAircraftPositionAttitude(%1, %2, %3, %4, %6, %7, %8);"
)
.
arg
(
uasId
)
.
arg
(
lat
,
0
,
'f'
,
15
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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