Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+74
-74
@@ -28,7 +28,7 @@ HandlerParticipantBoobyTrap::HandlerParticipantBoobyTrap(const std::shared_ptr<C
|
||||
, m_timer(new QTimer(this))
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.VirtualMines.HandlerParticipantBoobyTrap"))
|
||||
{
|
||||
INFO_LOG() << "HandlerParticipantBoobyTrap::HandlerParticipantBoobyTrap";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::HandlerParticipantBoobyTrap";
|
||||
m_timer->setSingleShot(true);
|
||||
connect(m_timer, &QTimer::timeout, this, &HandlerParticipantBoobyTrap::sendFtcCesHitRequestTimeout);
|
||||
} // end of ctor()
|
||||
@@ -36,13 +36,13 @@ HandlerParticipantBoobyTrap::HandlerParticipantBoobyTrap(const std::shared_ptr<C
|
||||
|
||||
HandlerParticipantBoobyTrap::~HandlerParticipantBoobyTrap()
|
||||
{
|
||||
INFO_LOG() << "HandlerParticipantBoobyTrap::~HandlerParticipantBoobyTrap";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::~HandlerParticipantBoobyTrap";
|
||||
} // end of dtor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool HandlerParticipantBoobyTrap::init()
|
||||
{
|
||||
INFO_LOG() << "HandlerParticipantBoobyTrap::init";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::init";
|
||||
auto dtcAes = m_ddsHandler->dtcAes();
|
||||
auto ftcAes = m_ddsHandler->ftcAes();
|
||||
auto dtcCes = m_ddsHandler->dtsCes();
|
||||
@@ -72,7 +72,7 @@ bool HandlerParticipantBoobyTrap::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "HandlerParticipantBoobyTrap::init() finished. ";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::init() finished. ";
|
||||
return true;
|
||||
} // end of init()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -95,13 +95,13 @@ void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation:
|
||||
m_boobyTrapItemsSecondary.remove(data.id());
|
||||
return;
|
||||
}
|
||||
INFO_LOG() << "HandlerParticipantBoobyTrap::onBoobyTrapChanged"
|
||||
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::onBoobyTrapChanged"
|
||||
<< " data.sampleTime=" << data.sampleTime()
|
||||
<< " m_ddsHandler->currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
|
||||
<< " diff=" << m_ddsHandler->currentPartitionTime() - data.sampleTime();
|
||||
if ((m_ddsHandler->currentPartitionTime() - data.sampleTime()) > 2000)
|
||||
{
|
||||
INFO_LOG() << "onBoobyTrap outdated";
|
||||
INFO_LOG(m_logger) << "onBoobyTrap outdated";
|
||||
return;
|
||||
}
|
||||
m_boobyTraps.insert(data.id(), data);
|
||||
@@ -120,7 +120,7 @@ void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation:
|
||||
// m_boobyTrapItems.insert(data.aesItemId(), boobyTrapUtm);
|
||||
// if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
// m_boobyTrapItemsSecondary.insert(data.aesItemId(), boobyTrapUtm);
|
||||
// DEBUG_LOG() << "Check each participant"
|
||||
// DEBUG_LOG(m_logger) << "Check each participant"
|
||||
// << " aesTypeId=" << data.aesTypeId();
|
||||
|
||||
// Check each participant
|
||||
@@ -129,21 +129,21 @@ void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation:
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
{
|
||||
TRACE_LOG() << "isOutdated participantId=" << participantPos.participantId() << " continue";
|
||||
TRACE_LOG(m_logger) << "isOutdated participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
}
|
||||
DEBUG_LOG() << "Check each actuell participant participantId=" << participantPos.participantId();
|
||||
DEBUG_LOG(m_logger) << "Check each actuell participant participantId=" << participantPos.participantId();
|
||||
if (participantPos.insideBuilding())
|
||||
{
|
||||
DEBUG_LOG() << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
}
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG() << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
}
|
||||
DEBUG_LOG() << "pos participantId=" << participantPos.participantId()
|
||||
DEBUG_LOG(m_logger) << "pos participantId=" << participantPos.participantId()
|
||||
<< " buildingId=" << participantPos.buildingId()
|
||||
<< " insideBuilding=" << participantPos.insideBuilding()
|
||||
<< " positionValid=" << participantPos.positionValid;
|
||||
@@ -157,8 +157,8 @@ void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation:
|
||||
|
||||
void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
|
||||
{
|
||||
INFO_LOG() << "---------------------------------------------------------------------------";
|
||||
INFO_LOG() << "HandlerParticipantBoobyTrap::onAesItemViewChanged"
|
||||
INFO_LOG(m_logger) << "---------------------------------------------------------------------------";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::onAesItemViewChanged"
|
||||
<< " aesTypeId=" << data.aesTypeId()
|
||||
<< " data.effectStateId()=" << data.effectStateId();
|
||||
|
||||
@@ -173,7 +173,7 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
m_boobyTrapItemsSecondary.remove(data.id());
|
||||
m_triggeredMineParticipant.remove(data.id());
|
||||
|
||||
DEBUG_LOG() << "onBoobyTrapChanged remove aesId=" << data.id()
|
||||
DEBUG_LOG(m_logger) << "onBoobyTrapChanged remove aesId=" << data.id()
|
||||
<< " m_triggeredMineParticipant.remove(" << data.id() ;
|
||||
}
|
||||
return;
|
||||
@@ -185,7 +185,7 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
return;
|
||||
|
||||
const int aesItemId = data.aesItemId();
|
||||
DEBUG_LOG() << "Got AesItemView id: " << aesItemId
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId()
|
||||
<< ", effectState: " << data.effectStateId()
|
||||
<< ", modType: " << modType;
|
||||
@@ -208,7 +208,7 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
m_boobyTrapItems.insert(data.aesItemId(), boobyTrapUtm);
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
m_boobyTrapItemsSecondary.insert(data.aesItemId(), boobyTrapUtm);
|
||||
DEBUG_LOG() << "Check each participant"
|
||||
DEBUG_LOG(m_logger) << "Check each participant"
|
||||
<< " aesTypeId=" << data.aesTypeId();
|
||||
// Check each participant
|
||||
// const auto partPosMap = m_handlerParticipant->positions();
|
||||
@@ -216,31 +216,31 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
// {
|
||||
// if (m_handlerParticipant->isOutdated(participantPos))
|
||||
// {
|
||||
// TRACE_LOG() << "isOutdated participantId=" << participantPos.participantId() << " continue";
|
||||
// TRACE_LOG(m_logger) << "isOutdated participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// DEBUG_LOG() << "Check each actuell participant participantId=" << participantPos.participantId();
|
||||
// DEBUG_LOG(m_logger) << "Check each actuell participant participantId=" << participantPos.participantId();
|
||||
// if (participantPos.insideBuilding())
|
||||
// {
|
||||
// DEBUG_LOG() << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
// DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
// {
|
||||
// DEBUG_LOG() << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
// DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// // Nur Positionsmeldungen, die neuer sind als die Mine koennen sie ausloesen!
|
||||
// if ((participantPos.sampleTime() < data.sampleTime())
|
||||
// && (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrap))
|
||||
// {
|
||||
// DEBUG_LOG() << " the time of the participant is older than the BoobyTrap participantId=" << participantPos.participantId()
|
||||
// DEBUG_LOG(m_logger) << " the time of the participant is older than the BoobyTrap participantId=" << participantPos.participantId()
|
||||
// << " participantPos.sampleTime()=" << participantPos.sampleTime()
|
||||
// << " data.sampleTime()=" << data.sampleTime()
|
||||
// << " diff =" << participantPos.sampleTime() - data.sampleTime();
|
||||
// continue;
|
||||
// }
|
||||
// DEBUG_LOG() << "pos participantId=" << participantPos.participantId()
|
||||
// DEBUG_LOG(m_logger) << "pos participantId=" << participantPos.participantId()
|
||||
// << " buildingId=" << participantPos.buildingId()
|
||||
// << " insideBuilding=" << participantPos.insideBuilding()
|
||||
// << " positionValid=" << participantPos.positionValid
|
||||
@@ -252,7 +252,7 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
}
|
||||
default:
|
||||
{
|
||||
DEBUG_LOG() << "default";
|
||||
DEBUG_LOG(m_logger) << "default";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,28 +264,28 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
|
||||
void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantsSecondary(int aesItemId, int participantId)
|
||||
{
|
||||
DEBUG_LOG() << "calculateBoobyTrapParticipantsSecondary : aesItemId=" << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "calculateBoobyTrapParticipantsSecondary : aesItemId=" << aesItemId;
|
||||
const auto partPosMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
|
||||
{
|
||||
if (participantPos.participantId() == participantId)
|
||||
{
|
||||
DEBUG_LOG() << "is already handled participantId=" << participantId;
|
||||
DEBUG_LOG(m_logger) << "is already handled participantId=" << participantId;
|
||||
continue;
|
||||
}
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
{
|
||||
// DEBUG_LOG() << "isOutdated participantId=" << participantPos.participantId();
|
||||
// DEBUG_LOG(m_logger) << "isOutdated participantId=" << participantPos.participantId();
|
||||
continue;
|
||||
}
|
||||
if (participantPos.insideBuilding())
|
||||
{
|
||||
DEBUG_LOG() << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
}
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG() << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
}
|
||||
const CentralEffectSimulation::AesItemViewUtm aesItemView = m_boobyTrapItemsSecondary.value(aesItemId);
|
||||
@@ -295,7 +295,7 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantsSecondary(int ae
|
||||
|
||||
bool HandlerParticipantBoobyTrap::insideSecondaryArea(const QPolygonF &polygonf, const QPointF &participantPos) const
|
||||
{
|
||||
DEBUG_LOG() << "pos to check: " << CentralEffectSimulation::debug(participantPos) ;
|
||||
DEBUG_LOG(m_logger) << "pos to check: " << CentralEffectSimulation::debug(participantPos) ;
|
||||
return polygonf.containsPoint(participantPos, Qt::OddEvenFill);
|
||||
}
|
||||
|
||||
@@ -306,19 +306,19 @@ bool HandlerParticipantBoobyTrap::enteredOrCrossedArea(const QPolygonF &polygonf
|
||||
#else
|
||||
bool result = polygonf.intersects(participantStep);
|
||||
#endif
|
||||
DEBUG_LOG() << "enteredOrCrossedArea : " << CentralEffectSimulation::debug(participantStep[0])
|
||||
DEBUG_LOG(m_logger) << "enteredOrCrossedArea : " << CentralEffectSimulation::debug(participantStep[0])
|
||||
<< " to " << CentralEffectSimulation::debug(participantStep[1])
|
||||
<< " result = " << result;
|
||||
for (int i = 0; i < polygonf.size(); i++)
|
||||
{
|
||||
const QPointF point = polygonf[i];
|
||||
DEBUG_LOG() << "polygonf[" << i << "]="
|
||||
DEBUG_LOG(m_logger) << "polygonf[" << i << "]="
|
||||
<< point.x() << "/" << point.y();
|
||||
}
|
||||
for (int i = 0; i < participantStep.size(); i++)
|
||||
{
|
||||
const QPointF point = participantStep[i];
|
||||
DEBUG_LOG() << "participantStep[" << i << "]="
|
||||
DEBUG_LOG(m_logger) << "participantStep[" << i << "]="
|
||||
<< point.x() << "/" << point.y();
|
||||
}
|
||||
//return polygonf.containsPoint(participantStep, Qt::OddEvenFill);
|
||||
@@ -335,10 +335,10 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantSecondary(const C
|
||||
const QPointF impactPosGeo = QPointF(boobyTrap.impactPosition().lon(), boobyTrap.impactPosition().lat());
|
||||
|
||||
|
||||
DEBUG_LOG() << "calculateBoobyTrapParticipantSecondary itemView.id=" << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "calculateBoobyTrapParticipantSecondary itemView.id=" << aesItemView.aesItemId
|
||||
<< " participantId=" << participantPos.participantId();
|
||||
|
||||
DEBUG_LOG() << "BoobyTrap id = " << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "BoobyTrap id = " << aesItemView.aesItemId
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(aesItemView.boundingBoxBottomLeft)
|
||||
<< ", topRight = " << CentralEffectSimulation::debug(aesItemView.boundingBoxTopRight);
|
||||
bool completeEnclosed = false;
|
||||
@@ -352,30 +352,30 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantSecondary(const C
|
||||
//dtcIsm.get()->getBuildingByPolygon(exerciseId, polygonGeo, completeEnclosed, isGroundLevel);
|
||||
if ( buildingIds.size() > 0)
|
||||
{
|
||||
DEBUG_LOG() << "Gebaeude verdeckt den Minentreffer participantId=" << participantPos.participantId();
|
||||
DEBUG_LOG(m_logger) << "Gebaeude verdeckt den Minentreffer participantId=" << participantPos.participantId();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!aesItemView.boundingBox.containsPoint(partPosGeo, Qt::OddEvenFill))
|
||||
DEBUG_LOG() << "not in boundingBox " << participantPos.participantId();
|
||||
DEBUG_LOG(m_logger) << "not in boundingBox " << participantPos.participantId();
|
||||
else
|
||||
DEBUG_LOG() << "in boundingBox" << participantPos.participantId();
|
||||
DEBUG_LOG(m_logger) << "in boundingBox" << participantPos.participantId();
|
||||
// const QPolygonF utmStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId(), aesItemView.zone);
|
||||
|
||||
|
||||
result = insideSecondaryArea(aesItemView.form, partPosGeo);
|
||||
DEBUG_LOG() << "insideSecondaryArea : "
|
||||
DEBUG_LOG(m_logger) << "insideSecondaryArea : "
|
||||
<< " participantId=" << participantPos.participantId()
|
||||
<< " aesItemId=" << aesItemView.aesItemId
|
||||
<< " result=" << result;
|
||||
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
|
||||
DEBUG_LOG() << "result BoobyTrap Explosion = " << result;
|
||||
DEBUG_LOG(m_logger) << "result BoobyTrap Explosion = " << result;
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG() << "sendParticipantEvent";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
DEBUG_LOG() << "sendParticipantHit";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
}
|
||||
} // calculateBoobyTrapParticipantSecondary
|
||||
@@ -385,7 +385,7 @@ bool HandlerParticipantBoobyTrap::intersectsBoundingBoxCheck(const CentralEffect
|
||||
const int participantId)
|
||||
{
|
||||
bool result = false;
|
||||
DEBUG_LOG() << "intersectsBoundingBoxCheck participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "intersectsBoundingBoxCheck participantId=" << participantId
|
||||
<< " itemViewId=" << itemView.aesItemId
|
||||
<< " m_zone=" << itemView.zone;
|
||||
const QPolygonF stepPoly = m_handlerParticipant->getParticipantStep(participantId, itemView.zone);
|
||||
@@ -393,10 +393,10 @@ bool HandlerParticipantBoobyTrap::intersectsBoundingBoxCheck(const CentralEffect
|
||||
return false;
|
||||
|
||||
|
||||
DEBUG_LOG() << "stepPoly von=" << stepPoly.at(0).x() << "/" << stepPoly.at(0).y()
|
||||
DEBUG_LOG(m_logger) << "stepPoly von=" << stepPoly.at(0).x() << "/" << stepPoly.at(0).y()
|
||||
<< " bis=" << stepPoly.at(1).x() << "/" << stepPoly.at(1).y()
|
||||
<< " m_zone=" << itemView.zone;
|
||||
DEBUG_LOG() << "ItemView Bounding Box BottomLeft=" << itemView.boundingBoxBottomLeft.x() << "/" << itemView.boundingBoxBottomLeft.y()
|
||||
DEBUG_LOG(m_logger) << "ItemView Bounding Box BottomLeft=" << itemView.boundingBoxBottomLeft.x() << "/" << itemView.boundingBoxBottomLeft.y()
|
||||
<< " boundingBoxTopRight=" << itemView.boundingBoxTopRight.x() << "/" << itemView.boundingBoxTopRight.y();
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,10,0)
|
||||
@@ -404,7 +404,7 @@ bool HandlerParticipantBoobyTrap::intersectsBoundingBoxCheck(const CentralEffect
|
||||
#else
|
||||
result = itemView.boundingBox.intersects(stepPoly);
|
||||
#endif
|
||||
DEBUG_LOG() << "HandlerMineAreas::intersectsBoundingBoxCheck result =" << result;
|
||||
DEBUG_LOG(m_logger) << "HandlerMineAreas::intersectsBoundingBoxCheck result =" << result;
|
||||
return result;
|
||||
|
||||
}
|
||||
@@ -413,7 +413,7 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "calculateBoobyTrapParticipant itemView.id=" << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "calculateBoobyTrapParticipant itemView.id=" << aesItemView.aesItemId
|
||||
<< " participantId=" << participantPos.participantId();
|
||||
|
||||
// Check coverage by a building
|
||||
@@ -433,28 +433,28 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
|
||||
|
||||
if (buildingIds.size() > 0)
|
||||
{
|
||||
DEBUG_LOG() << "coverage by building id =" << buildingIds[0];
|
||||
DEBUG_LOG(m_logger) << "coverage by building id =" << buildingIds[0];
|
||||
return false;
|
||||
}
|
||||
|
||||
const QPointF partPosUtm = CentralEffectSimulation::geographic2Utm(participantPos.pos(), -1);
|
||||
DEBUG_LOG() << "BoobyTrap id = " << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "BoobyTrap id = " << aesItemView.aesItemId
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(aesItemView.boundingBoxBottomLeft)
|
||||
<< ", topRight = " << CentralEffectSimulation::debug(aesItemView.boundingBoxTopRight)
|
||||
<< " participantPos=" << partPosUtm.x() << "/" << partPosUtm.y();
|
||||
if (!aesItemView.boundingBox.containsPoint(partPosUtm, Qt::OddEvenFill))
|
||||
{
|
||||
DEBUG_LOG() << "not in boundingBox " << participantPos.participantId();
|
||||
DEBUG_LOG(m_logger) << "not in boundingBox " << participantPos.participantId();
|
||||
bool intersectsBoundingBox = intersectsBoundingBoxCheck(aesItemView, participantPos.participantId());
|
||||
if (!intersectsBoundingBox)
|
||||
{
|
||||
DEBUG_LOG() << "Continue nach Bounding BoxCheck itemView: " << aesItemView.aesItemId << ", "
|
||||
DEBUG_LOG(m_logger) << "Continue nach Bounding BoxCheck itemView: " << aesItemView.aesItemId << ", "
|
||||
<< " paricipantId=" << participantPos.participantId();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
DEBUG_LOG() << "in boundingBox participantId=" << participantPos.participantId();
|
||||
DEBUG_LOG(m_logger) << "in boundingBox participantId=" << participantPos.participantId();
|
||||
const QPolygonF posStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId(), aesItemView.zone);
|
||||
|
||||
|
||||
@@ -462,19 +462,19 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
|
||||
return false;
|
||||
|
||||
const bool result = enteredOrCrossedArea(aesItemView.form, posStepPoly);
|
||||
DEBUG_LOG() << "enteredOrCrossedArea : "
|
||||
DEBUG_LOG(m_logger) << "enteredOrCrossedArea : "
|
||||
<< " participantId=" << participantPos.participantId()
|
||||
<< " aesItemId=" << aesItemView.aesItemId
|
||||
<< " result=" << result;
|
||||
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
|
||||
DEBUG_LOG() << "result BoobyTrap Explosion = " << result;
|
||||
DEBUG_LOG(m_logger) << "result BoobyTrap Explosion = " << result;
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG() << "sendFtcBoobyTrapTrigger id=" << aesItemView.aesItemId;
|
||||
DEBUG_LOG(m_logger) << "sendFtcBoobyTrapTrigger id=" << aesItemView.aesItemId;
|
||||
sendFtcBoobyTrapTrigger(aesItemView.aesItemId);
|
||||
DEBUG_LOG() << "sendParticipantEvent";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
DEBUG_LOG() << "sendParticipantHit";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
//calculateBoobyTrapParticipantsSecondary(aesItemView.aesItemId, participantPos.participantId() );
|
||||
}
|
||||
@@ -484,7 +484,7 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
|
||||
void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &partPos)
|
||||
{
|
||||
// Bounding Box von der Linie
|
||||
DEBUG_LOG() << "ParicipantPos "
|
||||
DEBUG_LOG(m_logger) << "ParicipantPos "
|
||||
<< " participantId=" << partPos.participantId()
|
||||
<< " participantTypeId=" << partPos.participantTypeId()
|
||||
<< " participantPos: lat=" << partPos.pos().lat()
|
||||
@@ -493,13 +493,13 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
|
||||
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG() << "Not handle position: participant has vulnerability state CatastrophicKill";
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has vulnerability state CatastrophicKill";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_handlerParticipant->getEquipmentNumber(partPos.participantId()) == 0)
|
||||
{
|
||||
DEBUG_LOG() << "Not handle position: participant has no equipment number";
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has no equipment number";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
|
||||
if (!calculateBoobyTrapParticipant(boobyTrap, partPos))
|
||||
continue;
|
||||
|
||||
DEBUG_LOG() << "boobyTrap id = " << boobyTrap.aesItemId
|
||||
DEBUG_LOG(m_logger) << "boobyTrap id = " << boobyTrap.aesItemId
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(boobyTrap.boundingBoxBottomLeft)
|
||||
<< ", topRight = " << CentralEffectSimulation::debug(boobyTrap.boundingBoxTopRight);
|
||||
|
||||
@@ -518,7 +518,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
|
||||
return;
|
||||
|
||||
const bool result = enteredOrCrossedArea(boobyTrap.form, posStepPoly);
|
||||
DEBUG_LOG() << "result BoobyTrap Explosion = " << result;
|
||||
DEBUG_LOG(m_logger) << "result BoobyTrap Explosion = " << result;
|
||||
if (result)
|
||||
sendParticipantEvent(boobyTrap, partPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
}
|
||||
@@ -536,13 +536,13 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
{
|
||||
DEBUG_LOG() << "sendParticipantEvent aesItemId=" << boobyTrapItem.aesItemId
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent aesItemId=" << boobyTrapItem.aesItemId
|
||||
<< " participantId=" << participantPosition.participantId();
|
||||
|
||||
if ((m_triggeredMineParticipant.contains(boobyTrapItem.aesItemId))
|
||||
&& (m_triggeredMineParticipant.value(boobyTrapItem.aesItemId) == participantPosition.participantId()))
|
||||
{
|
||||
DEBUG_LOG() << "m_triggeredMineParticipant already sent "
|
||||
DEBUG_LOG(m_logger) << "m_triggeredMineParticipant already sent "
|
||||
<< " aesItemId=" << boobyTrapItem.aesItemId
|
||||
<< " participantId=" << participantPosition.participantId();
|
||||
return;
|
||||
@@ -563,7 +563,7 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
|
||||
CentralEffectSimulation::ParticipantEvent pe;
|
||||
if (m_boobyTraps.contains(boobyTrapItem.aesItemId))
|
||||
{
|
||||
INFO_LOG() << "BoobyTrap Position found";
|
||||
INFO_LOG(m_logger) << "BoobyTrap Position found";
|
||||
AreaEffectSimulation::BoobyTrap boobyTrap = m_boobyTraps.value(boobyTrapItem.aesItemId);
|
||||
|
||||
pe.position().lat(boobyTrap.impactPosition().lat());
|
||||
@@ -571,14 +571,14 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG() << "No BoobyTrap Position found";
|
||||
INFO_LOG(m_logger) << "No BoobyTrap Position found";
|
||||
pe.position(participantPosition.pos());
|
||||
}
|
||||
|
||||
const AreaEffectSimulation::BoobyTrap &bt = m_ddsHandler->dtcAes()->boobyTrap(boobyTrapItem.aesItemId);
|
||||
|
||||
|
||||
DEBUG_LOG() << "sendParticipantEvent participantId=" << participantPosition.participantId()
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId()
|
||||
<< " lat= " << participantPosition.pos().lat()
|
||||
<< " lon= " << participantPosition.pos().lon()
|
||||
<< " equipmentNumber=" << equipmentNumber
|
||||
@@ -622,7 +622,7 @@ void HandlerParticipantBoobyTrap::sendParticipantHit(const CentralEffectSimulati
|
||||
//pos.position(position);
|
||||
//pos.reportingSource(participantPosition.reportingSource());
|
||||
|
||||
DEBUG_LOG() << "sendParticipantHit participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit participantId=" << participantId
|
||||
<< " equipmentNumber=" << equipNo
|
||||
<< " chargeTypeId=" << boobyTrap.chargeStruct.chargeTypeId()
|
||||
<< " eventType=" << eventType
|
||||
@@ -649,17 +649,17 @@ void HandlerParticipantBoobyTrap::sendParticipantHit(const CentralEffectSimulati
|
||||
void HandlerParticipantBoobyTrap::onSendCesHitReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
//if (replyObject.error())
|
||||
// WARNING_LOG() << "Can not send hit on participant to training area: " << replyObject();
|
||||
// WARNING_LOG(m_logger) << "Can not send hit on participant to training area: " << replyObject();
|
||||
//else
|
||||
DEBUG_LOG() << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
void HandlerParticipantBoobyTrap::onBoobyTrapTriggerReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
ERROR_LOG() << "Can not send BoobyTrapTriggerReply: " << replyObject();
|
||||
ERROR_LOG(m_logger) << "Can not send BoobyTrapTriggerReply: " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onBoobyTrapTriggerReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onBoobyTrapTriggerReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
|
||||
@@ -669,7 +669,7 @@ void HandlerParticipantBoobyTrap::sendFtcBoobyTrapTrigger(int aesItemId)
|
||||
AreaEffectSimulation::BoobyTrapTriggerRequest hr;
|
||||
hr.id(aesItemId);
|
||||
hr.triggered(true);
|
||||
DEBUG_LOG() << "sendFtcAesRemoveBoobyTrap: id=" << hr;
|
||||
DEBUG_LOG(m_logger) << "sendFtcAesRemoveBoobyTrap: id=" << hr;
|
||||
ftcAes->boobyTrapTriggerRequest(hr, this);
|
||||
}
|
||||
|
||||
@@ -678,7 +678,7 @@ void HandlerParticipantBoobyTrap::sendFtcCesHitRequestTimeout()
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG() << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
}
|
||||
m_requestMap.clear();
|
||||
|
||||
+50
-50
@@ -28,7 +28,7 @@ HandlerParticipantOffRouteMine::HandlerParticipantOffRouteMine(const std::shared
|
||||
, m_timer(new QTimer(this))
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.VirtualMines.HandlerParticipantOffRouteMine"))
|
||||
{
|
||||
INFO_LOG() << "HandlerParticipantOffRouteMine::HandlerParticipantOffRouteMine";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::HandlerParticipantOffRouteMine";
|
||||
m_timer->setSingleShot(true);
|
||||
connect(m_timer, &QTimer::timeout, this, &HandlerParticipantOffRouteMine::sendFtcCesHitRequestTimeout);
|
||||
} // end of ctor()
|
||||
@@ -36,13 +36,13 @@ HandlerParticipantOffRouteMine::HandlerParticipantOffRouteMine(const std::shared
|
||||
|
||||
HandlerParticipantOffRouteMine::~HandlerParticipantOffRouteMine()
|
||||
{
|
||||
INFO_LOG() << "HandlerParticipantOffRouteMine::~HandlerParticipantOffRouteMine";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::~HandlerParticipantOffRouteMine";
|
||||
} // end of dtor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool HandlerParticipantOffRouteMine::init()
|
||||
{
|
||||
INFO_LOG() << "HandlerParticipantOffRouteMine::init";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::init";
|
||||
auto dtcAes = m_ddsHandler->dtcAes();
|
||||
auto ftcAes = m_ddsHandler->ftcAes();
|
||||
auto dtcCes = m_ddsHandler->dtsCes();
|
||||
@@ -72,7 +72,7 @@ bool HandlerParticipantOffRouteMine::init()
|
||||
}
|
||||
|
||||
|
||||
INFO_LOG() << "HandlerParticipantOffRouteMine::init() finished. ";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::init() finished. ";
|
||||
return true;
|
||||
} // end of init()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -94,13 +94,13 @@ void HandlerParticipantOffRouteMine::onOffRouteMineChanged(const AreaEffectSimul
|
||||
m_offRouteMineItemsSecondary.remove(data.id());
|
||||
return;
|
||||
}
|
||||
INFO_LOG() << "HandlerParticipantOffRouteMine::onOffRouteMineChanged";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::onOffRouteMineChanged";
|
||||
m_offRouteMines.insert(data.id(), data);
|
||||
}
|
||||
|
||||
void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
|
||||
{
|
||||
INFO_LOG() << "HandlerParticipantOffRouteMine::onAesItemViewChanged";
|
||||
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::onAesItemViewChanged";
|
||||
if ( data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired
|
||||
|| data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved
|
||||
|| modType == DataModification::eRemoved)
|
||||
@@ -114,7 +114,7 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
|
||||
return;
|
||||
|
||||
const int aesItemId = data.aesItemId();
|
||||
DEBUG_LOG() << "Got AesItemView id: " << aesItemId
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView id: " << aesItemId
|
||||
<< ", type: " << data.aesTypeId()
|
||||
<< ", effectState: " << data.effectStateId()
|
||||
<< ", modType: " << modType;
|
||||
@@ -137,32 +137,32 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
|
||||
m_offRouteMineItems.insert(data.aesItemId(), aesItemViewUtm);
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
m_offRouteMineItemsSecondary.insert(data.aesItemId(), aesItemViewUtm);
|
||||
// DEBUG_LOG() << "Check each participant";
|
||||
// DEBUG_LOG(m_logger) << "Check each participant";
|
||||
// // Check each participant
|
||||
// const auto partPosMap = m_handlerParticipant->positions();
|
||||
// for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
|
||||
// {
|
||||
// if (m_handlerParticipant->isOutdated(participantPos))
|
||||
// {
|
||||
// DEBUG_LOG() << "isOutdated participantId=" << participantPos.participantId() << " continue";
|
||||
// DEBUG_LOG(m_logger) << "isOutdated participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// if (participantPos.insideBuilding())
|
||||
// {
|
||||
// DEBUG_LOG() << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
// DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
// {
|
||||
// DEBUG_LOG() << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
// DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
//// if (participantPos.sampleTime() < data.sampleTime())
|
||||
//// {
|
||||
//// DEBUG_LOG() << " the time of the participant is older than the OffRouteMine participantId=" << participantPos.participantId();
|
||||
//// DEBUG_LOG(m_logger) << " the time of the participant is older than the OffRouteMine participantId=" << participantPos.participantId();
|
||||
//// continue;
|
||||
//// }
|
||||
// DEBUG_LOG() << "pos participantId=" << participantPos.participantId()
|
||||
// DEBUG_LOG(m_logger) << "pos participantId=" << participantPos.participantId()
|
||||
// << " buildingId=" << participantPos.buildingId()
|
||||
// << " insideBuilding=" << participantPos.insideBuilding()
|
||||
// << " positionValid=" << participantPos.positionValid;
|
||||
@@ -173,7 +173,7 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
|
||||
}
|
||||
default:
|
||||
{
|
||||
DEBUG_LOG() << "remove OffRouteMine";
|
||||
DEBUG_LOG(m_logger) << "remove OffRouteMine";
|
||||
m_offRouteMineItems.remove(aesItemId);
|
||||
}
|
||||
}
|
||||
@@ -186,13 +186,13 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
|
||||
|
||||
void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantsSecondary(int aesItemId)
|
||||
{
|
||||
DEBUG_LOG() << "calculateOffRouteMineParticipantsSecondary : aesItemId=" << aesItemId;
|
||||
DEBUG_LOG(m_logger) << "calculateOffRouteMineParticipantsSecondary : aesItemId=" << aesItemId;
|
||||
const auto partPosMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
{
|
||||
// DEBUG_LOG() << "isOutdated participantId=" << participantPos.participantId();
|
||||
// DEBUG_LOG(m_logger) << "isOutdated participantId=" << participantPos.participantId();
|
||||
continue;
|
||||
}
|
||||
const CentralEffectSimulation::AesItemViewUtm aesItemView = m_offRouteMineItemsSecondary.value(aesItemId);
|
||||
@@ -202,7 +202,7 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantsSecondary(
|
||||
|
||||
bool HandlerParticipantOffRouteMine::insideSecondaryArea(const QPolygonF &polygonf, const QPointF &participantPos) const
|
||||
{
|
||||
DEBUG_LOG() << "pos to check: " << CentralEffectSimulation::debug(participantPos) ;
|
||||
DEBUG_LOG(m_logger) << "pos to check: " << CentralEffectSimulation::debug(participantPos) ;
|
||||
return polygonf.containsPoint(participantPos, Qt::OddEvenFill);
|
||||
}
|
||||
|
||||
@@ -213,19 +213,19 @@ bool HandlerParticipantOffRouteMine::enteredOrCrossedArea(const QPolygonF &polyg
|
||||
#else
|
||||
bool result = polygonf.intersects(participantStep);
|
||||
#endif
|
||||
DEBUG_LOG() << "enteredOrCrossedArea : " << CentralEffectSimulation::debug(participantStep[0])
|
||||
DEBUG_LOG(m_logger) << "enteredOrCrossedArea : " << CentralEffectSimulation::debug(participantStep[0])
|
||||
<< " to " << CentralEffectSimulation::debug(participantStep[1])
|
||||
<< " result = " << result;
|
||||
for (int i = 0; i < polygonf.size(); i++)
|
||||
{
|
||||
const QPointF point = polygonf[i];
|
||||
DEBUG_LOG() << "polygonf[" << i << "]="
|
||||
DEBUG_LOG(m_logger) << "polygonf[" << i << "]="
|
||||
<< point.x() << "/" << point.y();
|
||||
}
|
||||
for (int i = 0; i < participantStep.size(); i++)
|
||||
{
|
||||
const QPointF point = participantStep[i];
|
||||
DEBUG_LOG() << "participantStep[" << i << "]="
|
||||
DEBUG_LOG(m_logger) << "participantStep[" << i << "]="
|
||||
<< point.x() << "/" << point.y();
|
||||
}
|
||||
//return polygonf.containsPoint(participantStep, Qt::OddEvenFill);
|
||||
@@ -239,10 +239,10 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantSecondary(c
|
||||
bool result;
|
||||
const QPointF partPosGeo = CentralEffectSimulation::geographic2Utm(participantPos.pos(), aesItemView.zone);
|
||||
|
||||
DEBUG_LOG() << "calculateOffRouteMineParticipantSecondary itemView.id=" << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "calculateOffRouteMineParticipantSecondary itemView.id=" << aesItemView.aesItemId
|
||||
<< " participantId=" << participantPos.participantId();
|
||||
|
||||
DEBUG_LOG() << "OffRouteMine id = " << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "OffRouteMine id = " << aesItemView.aesItemId
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(aesItemView.boundingBoxBottomLeft)
|
||||
<< ", topRight = " << CentralEffectSimulation::debug(aesItemView.boundingBoxTopRight);
|
||||
|
||||
@@ -257,23 +257,23 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantSecondary(c
|
||||
});
|
||||
// if (!boundingBoxAesItemView.containsPoint(partPosGeo, Qt::OddEvenFill))
|
||||
// {
|
||||
// DEBUG_LOG() << "not in boundingBox";
|
||||
// DEBUG_LOG(m_logger) << "not in boundingBox";
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
result = insideSecondaryArea(aesItemView.form, partPosGeo);
|
||||
DEBUG_LOG() << "insideSecondaryArea : "
|
||||
DEBUG_LOG(m_logger) << "insideSecondaryArea : "
|
||||
<< " participantId=" << participantPos.participantId()
|
||||
<< " aesItemId=" << aesItemView.aesItemId
|
||||
<< " result=" << result;
|
||||
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
|
||||
DEBUG_LOG() << "result OffRouteMine Explosion = " << result;
|
||||
DEBUG_LOG(m_logger) << "result OffRouteMine Explosion = " << result;
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG() << "sendParticipantEvent";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine); //69
|
||||
DEBUG_LOG() << "sendParticipantHit";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine); // 49
|
||||
}
|
||||
} // calculateOffRouteMineParticipantSecondary
|
||||
@@ -283,10 +283,10 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipant(const Cent
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "calculateOffRouteMineParticipant itemView.id=" << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "calculateOffRouteMineParticipant itemView.id=" << aesItemView.aesItemId
|
||||
<< " participantId=" << participantPos.participantId();
|
||||
|
||||
DEBUG_LOG() << "OffRouteMine id = " << aesItemView.aesItemId
|
||||
DEBUG_LOG(m_logger) << "OffRouteMine id = " << aesItemView.aesItemId
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(aesItemView.boundingBoxBottomLeft)
|
||||
<< ", topRight = " << CentralEffectSimulation::debug(aesItemView.boundingBoxTopRight);
|
||||
|
||||
@@ -296,19 +296,19 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipant(const Cent
|
||||
return;
|
||||
|
||||
const bool result = enteredOrCrossedArea(aesItemView.form, posStepPoly);
|
||||
DEBUG_LOG() << "enteredOrCrossedArea : "
|
||||
DEBUG_LOG(m_logger) << "enteredOrCrossedArea : "
|
||||
<< " participantId=" << participantPos.participantId()
|
||||
<< " aesItemId=" << aesItemView.aesItemId
|
||||
<< " result=" << result;
|
||||
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
|
||||
DEBUG_LOG() << "result OffRouteMine Explosion = " << result;
|
||||
DEBUG_LOG(m_logger) << "result OffRouteMine Explosion = " << result;
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG() << "sendFtcOffRouteMineTrigger id=" << aesItemView.aesItemId;
|
||||
DEBUG_LOG(m_logger) << "sendFtcOffRouteMineTrigger id=" << aesItemView.aesItemId;
|
||||
sendFtcOffRouteMineTrigger(aesItemView.aesItemId);
|
||||
DEBUG_LOG() << "sendParticipantEvent";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
DEBUG_LOG() << "sendParticipantHit";
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
calculateOffRouteMineParticipantsSecondary(aesItemView.aesItemId);
|
||||
}
|
||||
@@ -319,7 +319,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(partPos.participantTypeId());
|
||||
|
||||
// Bounding Box von der Linie
|
||||
DEBUG_LOG() << "ParicipantPos "
|
||||
DEBUG_LOG(m_logger) << "ParicipantPos "
|
||||
<< " participantId=" << partPos.participantId()
|
||||
<< " participantTypeId=" << partPos.participantTypeId()
|
||||
<< " typeClass=" << typeClass
|
||||
@@ -329,7 +329,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG() << "Not handle position: participant has vulnerability state CatastrophicKill";
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has vulnerability state CatastrophicKill";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -337,13 +337,13 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
&& typeClass != ParticipantManagement::TypeClass_def::WeaponSystem
|
||||
&& typeClass != ParticipantManagement::TypeClass_def::VehicleWithGear)
|
||||
{
|
||||
INFO_LOG() << "Not handle position: No type vehicle ";
|
||||
INFO_LOG(m_logger) << "Not handle position: No type vehicle ";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_handlerParticipant->getEquipmentNumber(partPos.participantId()) == 0)
|
||||
{
|
||||
DEBUG_LOG() << "Not handle position: participant has no equipment number";
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has no equipment number";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
{
|
||||
calculateOffRouteMineParticipant(offRouteMine, partPos);
|
||||
|
||||
DEBUG_LOG() << "offRouteMine id = " << offRouteMine.aesItemId
|
||||
DEBUG_LOG(m_logger) << "offRouteMine id = " << offRouteMine.aesItemId
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(offRouteMine.boundingBoxBottomLeft)
|
||||
<< ", topRight = " << CentralEffectSimulation::debug(offRouteMine.boundingBoxTopRight);
|
||||
|
||||
@@ -376,7 +376,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
posStepPoly.append(utmStepPoly[0]);
|
||||
posStepPoly.append(utmStepPoly[1]);
|
||||
const bool result = enteredOrCrossedArea(offRouteMine.form, posStepPoly);
|
||||
DEBUG_LOG() << "result offRouteMine Explosion = " << result;
|
||||
DEBUG_LOG(m_logger) << "result offRouteMine Explosion = " << result;
|
||||
if (result)
|
||||
sendParticipantEvent(offRouteMine, partPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
}
|
||||
@@ -409,7 +409,7 @@ void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSim
|
||||
CentralEffectSimulation::ParticipantEvent pe;
|
||||
if (m_offRouteMines.contains(offRouteItem.aesItemId))
|
||||
{
|
||||
INFO_LOG() << "OffRouteMine Position found";
|
||||
INFO_LOG(m_logger) << "OffRouteMine Position found";
|
||||
AreaEffectSimulation::OffRouteMine offRouteMine = m_offRouteMines.value(offRouteItem.aesItemId);
|
||||
|
||||
pe.position().lat(offRouteMine.area().cornerBottomLeft().lat());
|
||||
@@ -417,13 +417,13 @@ void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSim
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG() << "No OffRouteMine Position found";
|
||||
INFO_LOG(m_logger) << "No OffRouteMine Position found";
|
||||
pe.position(participantPosition.pos());
|
||||
}
|
||||
|
||||
const AreaEffectSimulation::OffRouteMine &of = m_ddsHandler->dtcAes()->offRouteMine(offRouteItem.aesItemId);
|
||||
|
||||
DEBUG_LOG() << "sendParticipantEvent participantId=" << participantPosition.participantId()
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId()
|
||||
<< " lat= " << participantPosition.pos().lat()
|
||||
<< " lon= " << participantPosition.pos().lon()
|
||||
<< " equipmentNumber=" << equipmentNumber
|
||||
@@ -453,7 +453,7 @@ void HandlerParticipantOffRouteMine::sendParticipantHit(const CentralEffectSimul
|
||||
const int participantId = participantPosition.participantId();
|
||||
const int originatorEquipNo = 0;
|
||||
|
||||
DEBUG_LOG() << "sendParticipantHit participantId=" << participantId
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit participantId=" << participantId
|
||||
<< " equipmentNumber=" << equipNo;
|
||||
|
||||
Core::GeoPosition position;
|
||||
@@ -492,17 +492,17 @@ void HandlerParticipantOffRouteMine::sendParticipantHit(const CentralEffectSimul
|
||||
void HandlerParticipantOffRouteMine::onSendCesHitReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
//if (replyObject.error())
|
||||
// WARNING_LOG() << "Can not send hit on participant to training area: " << replyObject();
|
||||
// WARNING_LOG(m_logger) << "Can not send hit on participant to training area: " << replyObject();
|
||||
//else
|
||||
DEBUG_LOG() << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
void HandlerParticipantOffRouteMine::onOffRouteMineTriggerReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
ERROR_LOG() << "Can not send OffRouteMineTriggerReply: " << replyObject();
|
||||
ERROR_LOG(m_logger) << "Can not send OffRouteMineTriggerReply: " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onOffRouteMineTriggerReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onOffRouteMineTriggerReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
|
||||
@@ -512,7 +512,7 @@ void HandlerParticipantOffRouteMine::sendFtcOffRouteMineTrigger(int aesItemId)
|
||||
AreaEffectSimulation::OffRouteMineTriggerRequest hr;
|
||||
hr.id(aesItemId);
|
||||
hr.triggered(true);
|
||||
DEBUG_LOG() << "send OffRouteMineTriggerRequest: id=" << hr;
|
||||
DEBUG_LOG(m_logger) << "send OffRouteMineTriggerRequest: id=" << hr;
|
||||
ftcAes->offRouteMineTriggerRequest(hr, this);
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ void HandlerParticipantOffRouteMine::sendFtcCesHitRequestTimeout()
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG() << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
}
|
||||
m_requestMap.clear();
|
||||
|
||||
+5
-5
@@ -49,7 +49,7 @@ bool CesVirtualMinesInterfaceImpl::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG() << "CesVirtualMinesInterfaceImpl::init()"
|
||||
INFO_LOG(m_logger) << "CesVirtualMinesInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
@@ -62,7 +62,7 @@ bool CesVirtualMinesInterfaceImpl::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerParticipantBoobyTrap->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerParticipantBoobyTrap failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerParticipantBoobyTrap failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ bool CesVirtualMinesInterfaceImpl::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerParticipantOffRouteMine->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerParticipantOffRouteMine failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerParticipantOffRouteMine failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ QString CesVirtualMinesInterfaceImpl::echo(const QString &message)
|
||||
{
|
||||
|
||||
QString ret(QStringLiteral("<<<< %1 >>>> CesVirtualMinesInterfaceImpl::echo").arg(message));
|
||||
INFO_LOG() << "CesVirtualMinesInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG() << "DEBUG: CesVirtualMinesInterfaceImpl::echo return:" << ret;
|
||||
INFO_LOG(m_logger) << "CesVirtualMinesInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG(m_logger) << "DEBUG: CesVirtualMinesInterfaceImpl::echo return:" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user