mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Ref T268, allow to log loopback situations
* those are situations reported back from simulator * and can be logged
This commit is contained in:
@@ -296,7 +296,7 @@ namespace BlackSimPlugin
|
||||
else
|
||||
{
|
||||
this->triggerAutoTraceSendId();
|
||||
const CStatusMessage msg = CStatusMessage(this).error("Can not request AI position: '%1'") << callsign.asString();
|
||||
const CStatusMessage msg = CStatusMessage(this).error("Cannot request AI position: '%1'") << callsign.asString();
|
||||
CLogMessage::preformatted(msg);
|
||||
}
|
||||
return hr == S_OK;
|
||||
@@ -659,9 +659,10 @@ namespace BlackSimPlugin
|
||||
// we only remember near ground
|
||||
if (remoteAircraftData.aboveGroundFt() < 250)
|
||||
{
|
||||
CElevationPlane elevation(remoteAircraftData.latitudeDeg, remoteAircraftData.longitudeDeg, remoteAircraftData.elevationFt);
|
||||
elevation.setSinglePointRadius();
|
||||
this->rememberElevationAndCG(cs, simObject.getAircraftModelString(), elevation, CLength(remoteAircraftData.cgToGroundFt, CLengthUnit::ft()));
|
||||
const CElevationPlane elevation(remoteAircraftData.latitudeDeg, remoteAircraftData.longitudeDeg, remoteAircraftData.elevationFt, CElevationPlane::singlePointRadius());
|
||||
const CLength cg(remoteAircraftData.cgToGroundFt, CLengthUnit::ft());
|
||||
this->rememberElevationAndCG(cs, simObject.getAircraftModelString(), elevation, cg);
|
||||
this->addLoopbackSituation(cs, elevation, cg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -860,16 +860,23 @@ namespace BlackSimPlugin
|
||||
Q_ASSERT_X(verticalOffsetsMeters.size() == size, Q_FUNC_INFO, "Wrong CG");
|
||||
}
|
||||
|
||||
const CCallsignSet logCallsigns = this->getLogCallsigns();
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
const CCallsign cs(callsigns[i]);
|
||||
if (!m_xplaneAircraftObjects.contains(cs)) { continue; }
|
||||
|
||||
const CXPlaneMPAircraft xpAircraft = m_xplaneAircraftObjects[cs];
|
||||
|
||||
const CAltitude elevationAlt(elevationsMeters[i], CLengthUnit::m(), CLengthUnit::ft());
|
||||
const CElevationPlane elevation(CLatitude(latitudesDeg[i], CAngleUnit::deg()), CLongitude(longitudesDeg[i], CAngleUnit::deg()), elevationAlt, CElevationPlane::singlePointRadius());
|
||||
const CLength cg(verticalOffsetsMeters[i], CLengthUnit::m(), CLengthUnit::ft());
|
||||
this->rememberElevationAndCG(cs, xpAircraft.getAircraftModelString(), elevation, cg);
|
||||
|
||||
// loopback
|
||||
if (logCallsigns.contains(cs))
|
||||
{
|
||||
this->addLoopbackSituation(cs, elevation, cg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user