From 4eec1224bd2678430e7e9d37e203178764231751 Mon Sep 17 00:00:00 2001 From: lm Date: Wed, 17 Aug 2011 08:29:56 +0200 Subject: [PATCH] Improved HIL slightly --- src/comm/QGCFlightGearLink.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index 1c015a709..2c5252998 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -279,6 +279,7 @@ bool QGCFlightGearLink::disconnectSimulation() **/ bool QGCFlightGearLink::connectSimulation() { + if (!mav) return false; socket = new QUdpSocket(this); //Check if we are using a multicast-address @@ -377,6 +378,8 @@ processCall << "--disable-random-objects"; processCall << "--disable-ai-models"; processCall << "--wind=0@0"; processCall << "--fdm=jsb"; +processCall << QString("--lat=%1").arg(mav->getLatitude()); +processCall << QString("--lon=%1").arg(mav->getLongitude()); // Add new argument with this: processCall << ""; processCall << QString("--aircraft=%2").arg(aircraft); -- 2.22.0