refs #272 hacks to get traffic injection working with the current ISimulator interface;

temporary measure until ISimulator interface is refactored
This commit is contained in:
Mathew Sutcliffe
2014-06-26 16:15:45 +01:00
parent 72e350bc3c
commit 4f5e423b17
2 changed files with 4 additions and 1 deletions

View File

@@ -236,13 +236,15 @@ namespace BlackSimPlugin
{
if (! isConnected()) { return; }
m_traffic->addPlane(callsign.asString(), type, "YYY", "YYY"); // TODO livery
addAircraftSituation(callsign, initialSituation);
//addAircraftSituation(callsign, initialSituation);
m_planes.insert(callsign.asString()); // FIXME should not be needed here IMHO
}
void CSimulatorXPlane::addAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign,
const BlackMisc::Aviation::CAircraftSituation &situ)
{
if (! isConnected()) { return; }
if (! m_planes.contains(callsign.asString())) { addRemoteAircraft(callsign, "A320", situ); } // FIXME should not be needed here IMHO
using namespace BlackMisc::PhysicalQuantities;
m_traffic->setPlanePosition(callsign.asString(),
situ.latitude().value(CAngleUnit::deg()),

View File

@@ -88,6 +88,7 @@ namespace BlackSimPlugin
CXBusTrafficProxy *m_traffic { nullptr };
QTimer *m_fastTimer { nullptr };
QTimer *m_slowTimer { nullptr };
QSet<QString> m_planes; // FIXME should not be needed here IMHO
struct // data is written by DBus async method callbacks
{