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
8c54de4a
Commit
8c54de4a
authored
Oct 03, 2012
by
Thomas Gubler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flightgear HIL working on Ubuntu
parent
56190d75
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
QGCFlightGearLink.cc
src/comm/QGCFlightGearLink.cc
+13
-10
UAS.cc
src/uas/UAS.cc
+1
-1
UASView.cc
src/ui/uas/UASView.cc
+2
-1
No files found.
src/comm/QGCFlightGearLink.cc
View file @
8c54de4a
...
...
@@ -230,9 +230,9 @@ void QGCFlightGearLink::readBytes()
double
airspeed
;
time
=
values
.
at
(
0
).
toDouble
();
lat
=
values
.
at
(
1
).
toDouble
();
lon
=
values
.
at
(
2
).
toDouble
();
alt
=
values
.
at
(
3
).
toDouble
();
lat
=
values
.
at
(
1
).
toDouble
()
*
1e7
;
lon
=
values
.
at
(
2
).
toDouble
()
*
1e7
;
alt
=
values
.
at
(
3
).
toDouble
()
*
1e3
;
roll
=
values
.
at
(
4
).
toDouble
();
pitch
=
values
.
at
(
5
).
toDouble
();
yaw
=
values
.
at
(
6
).
toDouble
();
...
...
@@ -244,9 +244,9 @@ void QGCFlightGearLink::readBytes()
yacc
=
values
.
at
(
11
).
toDouble
();
zacc
=
values
.
at
(
12
).
toDouble
();
vx
=
values
.
at
(
13
).
toDouble
();
vy
=
values
.
at
(
14
).
toDouble
();
vz
=
values
.
at
(
15
).
toDouble
();
vx
=
values
.
at
(
13
).
toDouble
()
*
1e2
;
vy
=
values
.
at
(
14
).
toDouble
()
*
1e2
;
vz
=
values
.
at
(
15
).
toDouble
()
*
1e2
;
airspeed
=
values
.
at
(
16
).
toDouble
();
...
...
@@ -322,6 +322,8 @@ bool QGCFlightGearLink::disconnectSimulation()
**/
bool
QGCFlightGearLink
::
connectSimulation
()
{
qDebug
()
<<
"STARTING FLIGHTGEAR LINK"
;
if
(
!
mav
)
return
false
;
socket
=
new
QUdpSocket
(
this
);
connectState
=
socket
->
bind
(
host
,
port
);
...
...
@@ -377,9 +379,9 @@ bool QGCFlightGearLink::connectSimulation()
#endif
#ifdef Q_OS_LINUX
processFgfs
=
"fgfs"
;
fgRoot
=
"/usr/share/
flightgear/data
"
;
fgScenery
=
"/usr/share/
flightgear/data/Scenery-Terrasync
"
;
processFgfs
=
"
/usr/games/
fgfs"
;
fgRoot
=
"/usr/share/
games/flightgear
"
;
fgScenery
=
"/usr/share/
games/flightgear/Scenery
"
;
#endif
// Sanity checks
...
...
@@ -451,7 +453,8 @@ bool QGCFlightGearLink::connectSimulation()
//processCall << "--disable-horizon-effect";
processCall
<<
"--disable-clouds"
;
processCall
<<
"--fdm=jsb"
;
processCall
<<
"--units-meters"
;
processCall
<<
"--units-meters"
;
//XXX: check: the protocol xml has already a conversion from feet to m?
processCall
<<
"--notrim"
;
if
(
mav
->
getSystemType
()
==
MAV_TYPE_QUADROTOR
)
{
// Start all engines of the quad
...
...
src/uas/UAS.cc
View file @
8c54de4a
...
...
@@ -97,7 +97,7 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
paramManager
(
NULL
),
attitudeStamped
(
false
),
lastAttitude
(
0
),
simulation
(
new
QGC
XPlane
Link
(
this
)),
simulation
(
new
QGC
FlightGear
Link
(
this
)),
isLocalPositionKnown
(
false
),
isGlobalPositionKnown
(
false
),
systemIsArmed
(
false
),
...
...
src/ui/uas/UASView.cc
View file @
8c54de4a
...
...
@@ -82,7 +82,7 @@ UASView::UASView(UASInterface* uas, QWidget *parent) :
hilAction
->
setCheckable
(
true
);
// Flightgear is not ready for prime time
hilAction
->
setEnabled
(
false
);
//
hilAction->setEnabled(false);
hilXAction
->
setCheckable
(
true
);
m_ui
->
setupUi
(
this
);
...
...
@@ -503,6 +503,7 @@ void UASView::contextMenuEvent (QContextMenuEvent* event)
{
menu
.
addAction
(
removeAction
);
}
menu
.
addAction
(
hilAction
);
menu
.
addAction
(
hilXAction
);
// XXX Re-enable later menu.addAction(hilXAction);
menu
.
addAction
(
selectAirframeAction
);
...
...
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