Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set

new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
berrux-dev committed 2026-10-20 09:36:57 +02:00
1 parent 2b957d1edb
commit 598fc2560e
1718 files changed
+126739 -18495

No files matched your search

@@ -84,30 +84,30 @@ bool HandlerParticipantBoobyTrap::init()
void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &data, DataModification modType)
{
if (data.isDeleted()
|| data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved
|| (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired && !data.triggered())
|| !data.isCentral()
if (data.isDeleted
|| data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved
|| (data.effectStateId == AreaEffectSimulation::AesEffectState::EsExpired && !data.triggered)
|| !data.isCentral
|| modType == DataModification::eRemoved)
{
m_boobyTraps.remove(data.id());
m_boobyTrapItems.remove(data.id());
m_boobyTrapItemsSecondary.remove(data.id());
m_boobyTraps.remove(data.id);
m_boobyTrapItems.remove(data.id);
m_boobyTrapItemsSecondary.remove(data.id);
return;
}
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::onBoobyTrapChanged"
<< " data.sampleTime=" << data.sampleTime()
<< " data.sampleTime=" << data.sampleTime
<< " m_ddsHandler->currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
<< " diff=" << m_ddsHandler->currentPartitionTime() - data.sampleTime();
if ((m_ddsHandler->currentPartitionTime() - data.sampleTime()) > 2000)
<< " diff=" << m_ddsHandler->currentPartitionTime() - data.sampleTime;
if ((m_ddsHandler->currentPartitionTime() - data.sampleTime) > 2000)
{
INFO_LOG(m_logger) << "onBoobyTrap outdated";
return;
}
m_boobyTraps.insert(data.id(), data);
m_boobyTraps.insert(data.id, data);
if (!data.triggered())
if (!data.triggered)
return;
@@ -129,73 +129,73 @@ void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation:
{
if (m_handlerParticipant->isOutdated(participantPos))
{
TRACE_LOG(m_logger) << "isOutdated participantId=" << participantPos.participantId() << " continue";
TRACE_LOG(m_logger) << "isOutdated participantId=" << participantPos.participantId << " continue";
continue;
}
DEBUG_LOG(m_logger) << "Check each actuell participant participantId=" << participantPos.participantId();
DEBUG_LOG(m_logger) << "Check each actuell participant participantId=" << participantPos.participantId;
if (participantPos.insideBuilding())
{
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId << " continue";
continue;
}
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
{
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId << " continue";
continue;
}
DEBUG_LOG(m_logger) << "pos participantId=" << participantPos.participantId()
<< " buildingId=" << participantPos.buildingId()
DEBUG_LOG(m_logger) << "pos participantId=" << participantPos.participantId
<< " buildingId=" << participantPos.buildingId
<< " insideBuilding=" << participantPos.insideBuilding()
<< " positionValid=" << participantPos.positionValid;
const CentralEffectSimulation::AesItemViewUtm aesItemView = m_boobyTrapItemsSecondary.value(data.id());
const CentralEffectSimulation::AesItemViewUtm aesItemView = m_boobyTrapItemsSecondary.value(data.id);
calculateBoobyTrapParticipant(aesItemView, participantPos);
}
m_boobyTraps.remove(data.id());
m_boobyTrapItems.remove(data.id());
m_boobyTrapItemsSecondary.remove(data.id());
m_boobyTraps.remove(data.id);
m_boobyTrapItems.remove(data.id);
m_boobyTrapItemsSecondary.remove(data.id);
}
void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
{
INFO_LOG(m_logger) << "---------------------------------------------------------------------------";
INFO_LOG(m_logger) << "HandlerParticipantBoobyTrap::onAesItemViewChanged"
<< " aesTypeId=" << data.aesTypeId()
<< " data.effectStateId()=" << data.effectStateId();
<< " aesTypeId=" << data.aesTypeId
<< " data.effectStateId()=" << data.effectStateId;
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired
|| data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved
if (data.effectStateId == AreaEffectSimulation::AesEffectState::EsExpired
|| data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved
|| modType == DataModification::eRemoved)
{
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
if (data.aesTypeId == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
{
m_boobyTraps.remove(data.id());
m_boobyTrapItems.remove(data.id());
m_boobyTrapItemsSecondary.remove(data.id());
m_triggeredMineParticipant.remove(data.id());
m_boobyTraps.remove(data.id);
m_boobyTrapItems.remove(data.id);
m_boobyTrapItemsSecondary.remove(data.id);
m_triggeredMineParticipant.remove(data.id);
DEBUG_LOG(m_logger) << "onBoobyTrapChanged remove aesId=" << data.id()
<< " m_triggeredMineParticipant.remove(" << data.id() ;
DEBUG_LOG(m_logger) << "onBoobyTrapChanged remove aesId=" << data.id
<< " m_triggeredMineParticipant.remove(" << data.id ;
}
return;
}
//
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtBoobyTrap
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
if (data.aesTypeId != AreaEffectSimulation::AesType::AtBoobyTrap
&& data.aesTypeId != AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
return;
const int aesItemId = data.aesItemId();
const int aesItemId = data.aesItemId;
DEBUG_LOG(m_logger) << "Got AesItemView id: " << aesItemId
<< ", type: " << data.aesTypeId()
<< ", effectState: " << data.effectStateId()
<< ", type: " << data.aesTypeId
<< ", effectState: " << data.effectStateId
<< ", modType: " << modType;
if (modType == DataModification::eAdded
|| modType == DataModification::eModified)
{
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
switch (effectState.underlying())
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId;
switch (effectState)
{
case AreaEffectSimulation::AesEffectState::EsActivated:
{
@@ -204,12 +204,12 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
prevData.aesItemId = 0;
const CentralEffectSimulation::AesItemViewUtm boobyTrapUtm = CentralEffectSimulation::AesItemViewUtm::create(data, prevData, impactRadius);
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrap)
m_boobyTrapItems.insert(data.aesItemId(), boobyTrapUtm);
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
m_boobyTrapItemsSecondary.insert(data.aesItemId(), boobyTrapUtm);
if (data.aesTypeId == AreaEffectSimulation::AesType::AtBoobyTrap)
m_boobyTrapItems.insert(data.aesItemId, boobyTrapUtm);
if (data.aesTypeId == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
m_boobyTrapItemsSecondary.insert(data.aesItemId, boobyTrapUtm);
DEBUG_LOG(m_logger) << "Check each participant"
<< " aesTypeId=" << data.aesTypeId();
<< " aesTypeId=" << data.aesTypeId;
// Check each participant
// const auto partPosMap = m_handlerParticipant->positions();
// for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
@@ -268,7 +268,7 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantsSecondary(int ae
const auto partPosMap = m_handlerParticipant->positions();
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
{
if (participantPos.participantId() == participantId)
if (participantPos.participantId == participantId)
{
DEBUG_LOG(m_logger) << "is already handled participantId=" << participantId;
continue;
@@ -280,12 +280,12 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantsSecondary(int ae
}
if (participantPos.insideBuilding())
{
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId << " continue";
continue;
}
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
{
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId << " continue";
continue;
}
const CentralEffectSimulation::AesItemViewUtm aesItemView = m_boobyTrapItemsSecondary.value(aesItemId);
@@ -331,12 +331,12 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantSecondary(const C
{
bool result;
const AreaEffectSimulation::BoobyTrap boobyTrap = m_ddsHandler->dtcAes()->boobyTrap(aesItemView.aesItemId);
const QPointF partPosGeo = QPointF(participantPos.pos().lon(), participantPos.pos().lat());
const QPointF impactPosGeo = QPointF(boobyTrap.impactPosition().lon(), boobyTrap.impactPosition().lat());
const QPointF partPosGeo = QPointF(participantPos.pos.lon, participantPos.pos.lat);
const QPointF impactPosGeo = QPointF(boobyTrap.impactPosition.lon, boobyTrap.impactPosition.lat);
DEBUG_LOG(m_logger) << "calculateBoobyTrapParticipantSecondary itemView.id=" << aesItemView.aesItemId
<< " participantId=" << participantPos.participantId();
<< " participantId=" << participantPos.participantId;
DEBUG_LOG(m_logger) << "BoobyTrap id = " << aesItemView.aesItemId
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(aesItemView.boundingBoxBottomLeft)
@@ -352,21 +352,21 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantSecondary(const C
//dtcIsm.get()->getBuildingByPolygon(exerciseId, polygonGeo, completeEnclosed, isGroundLevel);
if ( buildingIds.size() > 0)
{
DEBUG_LOG(m_logger) << "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(m_logger) << "not in boundingBox " << participantPos.participantId();
DEBUG_LOG(m_logger) << "not in boundingBox " << participantPos.participantId;
else
DEBUG_LOG(m_logger) << "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(m_logger) << "insideSecondaryArea : "
<< " participantId=" << participantPos.participantId()
<< " participantId=" << participantPos.participantId
<< " aesItemId=" << aesItemView.aesItemId
<< " result=" << result;
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
@@ -414,14 +414,14 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
{
DEBUG_LOG(m_logger) << "calculateBoobyTrapParticipant itemView.id=" << aesItemView.aesItemId
<< " participantId=" << participantPos.participantId();
<< " participantId=" << participantPos.participantId;
// Check coverage by a building
const AreaEffectSimulation::BoobyTrap boobyTrap = m_ddsHandler->dtcAes()->boobyTrap(aesItemView.aesItemId);
//const QPointF partPosGeo = CentralEffectSimulation::geographic2Utm(participantPos.pos(), aesItemView.zone);
//const QPointF impactPosGeo = CentralEffectSimulation::geographic2Utm(boobyTrap.impactPosition(), aesItemView.zone);
const QPointF partPosGeo = QPointF(participantPos.pos().lon(), participantPos.pos().lat());
const QPointF impactPosGeo = QPointF(boobyTrap.impactPosition().lon(), boobyTrap.impactPosition().lat());
const QPointF partPosGeo = QPointF(participantPos.pos.lon, participantPos.pos.lat);
const QPointF impactPosGeo = QPointF(boobyTrap.impactPosition.lon, boobyTrap.impactPosition.lat);
bool completeEnclosed = false;
bool isGroundLevel = true;
int exerciseId = m_ddsHandler->getExerciseId();
@@ -437,25 +437,25 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
return false;
}
const QPointF partPosUtm = CentralEffectSimulation::geographic2Utm(participantPos.pos(), -1);
const QPointF partPosUtm = CentralEffectSimulation::geographic2Utm(participantPos.pos, -1);
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(m_logger) << "not in boundingBox " << participantPos.participantId();
bool intersectsBoundingBox = intersectsBoundingBoxCheck(aesItemView, participantPos.participantId());
DEBUG_LOG(m_logger) << "not in boundingBox " << participantPos.participantId;
bool intersectsBoundingBox = intersectsBoundingBoxCheck(aesItemView, participantPos.participantId);
if (!intersectsBoundingBox)
{
DEBUG_LOG(m_logger) << "Continue nach Bounding BoxCheck itemView: " << aesItemView.aesItemId << ", "
<< " paricipantId=" << participantPos.participantId();
<< " paricipantId=" << participantPos.participantId;
return false;
}
}
else
DEBUG_LOG(m_logger) << "in boundingBox participantId=" << participantPos.participantId();
const QPolygonF posStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId(), aesItemView.zone);
DEBUG_LOG(m_logger) << "in boundingBox participantId=" << participantPos.participantId;
const QPolygonF posStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId, aesItemView.zone);
if (posStepPoly.size() < 2)
@@ -463,7 +463,7 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
const bool result = enteredOrCrossedArea(aesItemView.form, posStepPoly);
DEBUG_LOG(m_logger) << "enteredOrCrossedArea : "
<< " participantId=" << participantPos.participantId()
<< " participantId=" << participantPos.participantId
<< " aesItemId=" << aesItemView.aesItemId
<< " result=" << result;
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
@@ -485,10 +485,10 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
{
// Bounding Box von der Linie
DEBUG_LOG(m_logger) << "ParicipantPos "
<< " participantId=" << partPos.participantId()
<< " participantTypeId=" << partPos.participantTypeId()
<< " participantPos: lat=" << partPos.pos().lat()
<< " lon=" << partPos.pos().lon()
<< " participantId=" << partPos.participantId
<< " participantTypeId=" << partPos.participantTypeId
<< " participantPos: lat=" << partPos.pos.lat
<< " lon=" << partPos.pos.lon
<< " Anzahl BoobyTraps=" << m_boobyTrapItems.size();
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
@@ -497,7 +497,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
return;
}
if (m_handlerParticipant->getEquipmentNumber(partPos.participantId()) == 0)
if (m_handlerParticipant->getEquipmentNumber(partPos.participantId) == 0)
{
DEBUG_LOG(m_logger) << "Not handle position: participant has no equipment number";
return;
@@ -512,7 +512,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(boobyTrap.boundingBoxBottomLeft)
<< ", topRight = " << CentralEffectSimulation::debug(boobyTrap.boundingBoxTopRight);
const QPolygonF posStepPoly = m_handlerParticipant->getParticipantStep(partPos.participantId(), boobyTrap.zone);
const QPolygonF posStepPoly = m_handlerParticipant->getParticipantStep(partPos.participantId, boobyTrap.zone);
if (posStepPoly.size() < 2)
return;
@@ -537,18 +537,18 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
const ProjectDataManagement::PdmEventType eventType)
{
DEBUG_LOG(m_logger) << "sendParticipantEvent aesItemId=" << boobyTrapItem.aesItemId
<< " participantId=" << participantPosition.participantId();
<< " participantId=" << participantPosition.participantId;
if ((m_triggeredMineParticipant.contains(boobyTrapItem.aesItemId))
&& (m_triggeredMineParticipant.value(boobyTrapItem.aesItemId) == participantPosition.participantId()))
&& (m_triggeredMineParticipant.value(boobyTrapItem.aesItemId) == participantPosition.participantId))
{
DEBUG_LOG(m_logger) << "m_triggeredMineParticipant already sent "
<< " aesItemId=" << boobyTrapItem.aesItemId
<< " participantId=" << participantPosition.participantId();
<< " participantId=" << participantPosition.participantId;
return;
}
m_triggeredMineParticipant.insert(boobyTrapItem.aesItemId, participantPosition.participantId());
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
m_triggeredMineParticipant.insert(boobyTrapItem.aesItemId, participantPosition.participantId);
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId);
if (typeClass == ParticipantManagement::TypeClass::Unit ||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
@@ -556,7 +556,7 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
typeClass == ParticipantManagement::TypeClass::Unknown)
return;
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId);
if (equipmentNumber <= 0)
return;
@@ -566,35 +566,35 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
INFO_LOG(m_logger) << "BoobyTrap Position found";
AreaEffectSimulation::BoobyTrap boobyTrap = m_boobyTraps.value(boobyTrapItem.aesItemId);
pe.position().lat(boobyTrap.impactPosition().lat());
pe.position().lon(boobyTrap.impactPosition().lon());
pe.position.lat = boobyTrap.impactPosition.lat;
pe.position.lon = boobyTrap.impactPosition.lon;
}
else
{
INFO_LOG(m_logger) << "No BoobyTrap Position found";
pe.position(participantPosition.pos());
pe.position = participantPosition.pos;
}
const AreaEffectSimulation::BoobyTrap &bt = m_ddsHandler->dtcAes()->boobyTrap(boobyTrapItem.aesItemId);
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId()
<< " lat= " << participantPosition.pos().lat()
<< " lon= " << participantPosition.pos().lon()
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId
<< " lat= " << participantPosition.pos.lat
<< " lon= " << participantPosition.pos.lon
<< " equipmentNumber=" << equipmentNumber
<< " eventType=" << eventType;
pe.id(m_ddsHandler->getParticipantEventId());
pe.eventTypeId(eventType);
pe.participantId(participantPosition.participantId());
pe.eventTime(participantPosition.sampleTime());
pe.aesItemId(boobyTrapItem.aesItemId);
pe.partyId(participantPosition.partyId());
pe.aesName(bt.name());
pe.equipmentNumber(equipmentNumber);
pe.friendlyFire(boobyTrapItem.partyId == participantPosition.partyId());
pe.id = m_ddsHandler->getParticipantEventId();
pe.eventTypeId = eventType;
pe.participantId = participantPosition.participantId;
pe.eventTime = participantPosition.sampleTime;
pe.aesItemId = boobyTrapItem.aesItemId;
pe.partyId = participantPosition.partyId;
pe.aesName = bt.name;
pe.equipmentNumber = equipmentNumber;
pe.friendlyFire = boobyTrapItem.partyId == participantPosition.partyId;
m_ddsHandler->dtsCes()->publish(pe);
qint64 id = pe.id();
qint64 id = pe.id;
QTimer::singleShot(1 * 60 * 1000, this, [id, this]() { m_ddsHandler->dtsCes()->removeParticipantEventByKey(id); });
}
@@ -604,8 +604,8 @@ void HandlerParticipantBoobyTrap::sendParticipantHit(const CentralEffectSimulati
{
// Q_UNUSED(eventType); // not used - no alarm for this
const int equipNo = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
const int participantId = participantPosition.participantId();
const int equipNo = m_ddsHandler->participantId2EquipNo(participantPosition.participantId);
const int participantId = participantPosition.participantId;
const int originatorEquipNo = 0;
if ( equipNo == 0)
@@ -614,24 +614,24 @@ void HandlerParticipantBoobyTrap::sendParticipantHit(const CentralEffectSimulati
Core::GeoPosition position;
// TODO: Hier wird die Mitte der Bounding-Box genommen und nicht die Position vom Participant
position.lat(participantPosition.pos().lat());
position.lon(participantPosition.pos().lon());
position.lat = participantPosition.pos.lat;
position.lon = participantPosition.pos.lon;
const TrainingAreaBase::TabPosition pos(position, participantPosition.reportingSource(), 0, 0);
const TrainingAreaBase::TabPosition pos(position, participantPosition.reportingSource, 0, 0);
int remainTasCodeIndirect = m_ddsHandler->remainingTasCode(boobyTrap.chargeStruct);
//pos.position(position);
//pos.reportingSource(participantPosition.reportingSource());
DEBUG_LOG(m_logger) << "sendParticipantHit participantId=" << participantId
<< " equipmentNumber=" << equipNo
<< " chargeTypeId=" << boobyTrap.chargeStruct.chargeTypeId()
<< " chargeTypeId=" << boobyTrap.chargeStruct.chargeTypeId
<< " eventType=" << eventType
<< " remainTasCodeIndirect=" << remainTasCodeIndirect;
TrainingAreaBase::SendCesHitRequest requestTab(
equipNo, // equipmentNumber
participantId, // participantId
boobyTrap.chargeStruct.chargeTypeId(), // chargeTypeId
boobyTrap.chargeStruct.chargeTypeId, // chargeTypeId
boobyTrap.aesItemId, // aesId
originatorEquipNo, // originatorEquipmentNumber
remainTasCodeIndirect, // IED heavy
@@ -667,8 +667,8 @@ void HandlerParticipantBoobyTrap::sendFtcBoobyTrapTrigger(int aesItemId)
{
auto ftcAes = m_ddsHandler->ftcAes();
AreaEffectSimulation::BoobyTrapTriggerRequest hr;
hr.id(aesItemId);
hr.triggered(true);
hr.id = aesItemId;
hr.triggered = true;
DEBUG_LOG(m_logger) << "sendFtcAesRemoveBoobyTrap: id=" << hr;
ftcAes->boobyTrapTriggerRequest(hr, this);
}
@@ -84,47 +84,47 @@ bool HandlerParticipantOffRouteMine::init()
void HandlerParticipantOffRouteMine::onOffRouteMineChanged(const AreaEffectSimulation::OffRouteMine &data, DataModification modType)
{
if (data.isDeleted()
|| data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired
|| data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved
if (data.isDeleted
|| data.effectStateId == AreaEffectSimulation::AesEffectState::EsExpired
|| data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved
|| modType == DataModification::eRemoved)
{
m_offRouteMines.remove(data.id());
m_offRouteMineItems.remove(data.id());
m_offRouteMineItemsSecondary.remove(data.id());
m_offRouteMines.remove(data.id);
m_offRouteMineItems.remove(data.id);
m_offRouteMineItemsSecondary.remove(data.id);
return;
}
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::onOffRouteMineChanged";
m_offRouteMines.insert(data.id(), data);
m_offRouteMines.insert(data.id, data);
}
void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
{
INFO_LOG(m_logger) << "HandlerParticipantOffRouteMine::onAesItemViewChanged";
if ( data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired
|| data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved
if ( data.effectStateId == AreaEffectSimulation::AesEffectState::EsExpired
|| data.effectStateId == AreaEffectSimulation::AesEffectState::EsRemoved
|| modType == DataModification::eRemoved)
{
return;
}
//
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtOffRouteMine
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
if (data.aesTypeId != AreaEffectSimulation::AesType::AtOffRouteMine
&& data.aesTypeId != AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
return;
const int aesItemId = data.aesItemId();
const int aesItemId = data.aesItemId;
DEBUG_LOG(m_logger) << "Got AesItemView id: " << aesItemId
<< ", type: " << data.aesTypeId()
<< ", effectState: " << data.effectStateId()
<< ", type: " << data.aesTypeId
<< ", effectState: " << data.effectStateId
<< ", modType: " << modType;
if (modType == DataModification::eAdded
|| modType == DataModification::eModified)
{
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
switch (effectState.underlying())
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId;
switch (effectState)
{
case AreaEffectSimulation::AesEffectState::EsActivated:
{
@@ -133,10 +133,10 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
prevData.aesItemId = 0;
const CentralEffectSimulation::AesItemViewUtm aesItemViewUtm = CentralEffectSimulation::AesItemViewUtm::create(data, prevData, impactRadius);
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMine)
m_offRouteMineItems.insert(data.aesItemId(), aesItemViewUtm);
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
m_offRouteMineItemsSecondary.insert(data.aesItemId(), aesItemViewUtm);
if (data.aesTypeId == AreaEffectSimulation::AesType::AtOffRouteMine)
m_offRouteMineItems.insert(data.aesItemId, aesItemViewUtm);
if (data.aesTypeId == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
m_offRouteMineItemsSecondary.insert(data.aesItemId, aesItemViewUtm);
// DEBUG_LOG(m_logger) << "Check each participant";
// // Check each participant
// const auto partPosMap = m_handlerParticipant->positions();
@@ -237,10 +237,10 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantSecondary(c
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos)
{
bool result;
const QPointF partPosGeo = CentralEffectSimulation::geographic2Utm(participantPos.pos(), aesItemView.zone);
const QPointF partPosGeo = CentralEffectSimulation::geographic2Utm(participantPos.pos, aesItemView.zone);
DEBUG_LOG(m_logger) << "calculateOffRouteMineParticipantSecondary itemView.id=" << aesItemView.aesItemId
<< " participantId=" << participantPos.participantId();
<< " participantId=" << participantPos.participantId;
DEBUG_LOG(m_logger) << "OffRouteMine id = " << aesItemView.aesItemId
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(aesItemView.boundingBoxBottomLeft)
@@ -264,7 +264,7 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantSecondary(c
result = insideSecondaryArea(aesItemView.form, partPosGeo);
DEBUG_LOG(m_logger) << "insideSecondaryArea : "
<< " participantId=" << participantPos.participantId()
<< " participantId=" << participantPos.participantId
<< " aesItemId=" << aesItemView.aesItemId
<< " result=" << result;
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
@@ -284,20 +284,20 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipant(const Cent
{
DEBUG_LOG(m_logger) << "calculateOffRouteMineParticipant itemView.id=" << aesItemView.aesItemId
<< " participantId=" << participantPos.participantId();
<< " participantId=" << participantPos.participantId;
DEBUG_LOG(m_logger) << "OffRouteMine id = " << aesItemView.aesItemId
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(aesItemView.boundingBoxBottomLeft)
<< ", topRight = " << CentralEffectSimulation::debug(aesItemView.boundingBoxTopRight);
const QPolygonF posStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId(), m_zone);
const QPolygonF posStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId, m_zone);
if (posStepPoly.size() < 2)
return;
const bool result = enteredOrCrossedArea(aesItemView.form, posStepPoly);
DEBUG_LOG(m_logger) << "enteredOrCrossedArea : "
<< " participantId=" << participantPos.participantId()
<< " participantId=" << participantPos.participantId
<< " aesItemId=" << aesItemView.aesItemId
<< " result=" << result;
// const bool result = enteredOrCrossedArea(aesItemView.form, partPosGeo);
@@ -316,15 +316,15 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipant(const Cent
void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &partPos)
{
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(partPos.participantTypeId());
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(partPos.participantTypeId);
// Bounding Box von der Linie
DEBUG_LOG(m_logger) << "ParicipantPos "
<< " participantId=" << partPos.participantId()
<< " participantTypeId=" << partPos.participantTypeId()
<< " participantId=" << partPos.participantId
<< " participantTypeId=" << partPos.participantTypeId
<< " typeClass=" << typeClass
<< " participantPos: lat=" << partPos.pos().lat()
<< " lon=" << partPos.pos().lon()
<< " participantPos: lat=" << partPos.pos.lat
<< " lon=" << partPos.pos.lon
<< " Anzahl OffRouteMines=" << m_offRouteMineItems.size();
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
@@ -341,7 +341,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
return;
}
if (m_handlerParticipant->getEquipmentNumber(partPos.participantId()) == 0)
if (m_handlerParticipant->getEquipmentNumber(partPos.participantId) == 0)
{
DEBUG_LOG(m_logger) << "Not handle position: participant has no equipment number";
return;
@@ -366,7 +366,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
});
// if (!boundingBoxOffRouteMine.containsPoint(partPosGeo, Qt::OddEvenFill))
// continue;
const QVector<QPointF> utmStepPoly = m_handlerParticipant->getParticipantStep(partPos.participantId(), m_zone);
const QVector<QPointF> utmStepPoly = m_handlerParticipant->getParticipantStep(partPos.participantId, m_zone);
QPolygonF posStepPoly;
@@ -394,7 +394,7 @@ void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSim
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
const ProjectDataManagement::PdmEventType eventType)
{
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId);
if (typeClass == ParticipantManagement::TypeClass::Unit ||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
@@ -402,7 +402,7 @@ void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSim
typeClass == ParticipantManagement::TypeClass::Unknown)
return;
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId);
if (equipmentNumber <= 0)
return;
@@ -412,35 +412,35 @@ void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSim
INFO_LOG(m_logger) << "OffRouteMine Position found";
AreaEffectSimulation::OffRouteMine offRouteMine = m_offRouteMines.value(offRouteItem.aesItemId);
pe.position().lat(offRouteMine.area().cornerBottomLeft().lat());
pe.position().lon(offRouteMine.area().cornerBottomLeft().lon());
pe.position.lat = offRouteMine.area.cornerBottomLeft.lat;
pe.position.lon = offRouteMine.area.cornerBottomLeft.lon;
}
else
{
INFO_LOG(m_logger) << "No OffRouteMine Position found";
pe.position(participantPosition.pos());
pe.position = participantPosition.pos;
}
const AreaEffectSimulation::OffRouteMine &of = m_ddsHandler->dtcAes()->offRouteMine(offRouteItem.aesItemId);
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId()
<< " lat= " << participantPosition.pos().lat()
<< " lon= " << participantPosition.pos().lon()
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId
<< " lat= " << participantPosition.pos.lat
<< " lon= " << participantPosition.pos.lon
<< " equipmentNumber=" << equipmentNumber
<< " eventType=" << eventType
<< " Name=" << of.name();
pe.id(m_ddsHandler->getParticipantEventId());
pe.eventTypeId(eventType);
pe.participantId(participantPosition.participantId());
pe.eventTime(participantPosition.sampleTime());
pe.aesItemId(offRouteItem.aesItemId);
pe.partyId(participantPosition.partyId());
pe.aesName(of.name());
pe.equipmentNumber(equipmentNumber);
pe.friendlyFire(offRouteItem.partyId == participantPosition.partyId());
<< " Name=" << of.name;
pe.id = m_ddsHandler->getParticipantEventId();
pe.eventTypeId = eventType;
pe.participantId = participantPosition.participantId;
pe.eventTime = participantPosition.sampleTime;
pe.aesItemId = offRouteItem.aesItemId;
pe.partyId = participantPosition.partyId;
pe.aesName = of.name;
pe.equipmentNumber = equipmentNumber;
pe.friendlyFire = offRouteItem.partyId == participantPosition.partyId;
m_ddsHandler->dtsCes()->publish(pe);
qint64 id = pe.id();
qint64 id = pe.id;
QTimer::singleShot(1 * 60 * 1000, this, [id, this]() { m_ddsHandler->dtsCes()->removeParticipantEventByKey(id); });
}
@@ -449,8 +449,8 @@ void HandlerParticipantOffRouteMine::sendParticipantHit(const CentralEffectSimul
const ProjectDataManagement::PdmEventType eventType)
{
const int equipNo = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
const int participantId = participantPosition.participantId();
const int equipNo = m_ddsHandler->participantId2EquipNo(participantPosition.participantId);
const int participantId = participantPosition.participantId;
const int originatorEquipNo = 0;
DEBUG_LOG(m_logger) << "sendParticipantHit participantId=" << participantId
@@ -459,10 +459,10 @@ void HandlerParticipantOffRouteMine::sendParticipantHit(const CentralEffectSimul
Core::GeoPosition position;
// TODO: Hier wird die Mitte der Bounding-Box genommen und nicht die Position vom Participant
position.lat(participantPosition.pos().lat());
position.lon(participantPosition.pos().lon());
position.lat = participantPosition.pos.lat;
position.lon = participantPosition.pos.lon;
const TrainingAreaBase::TabPosition pos(position, participantPosition.reportingSource(), 0, 0);
const TrainingAreaBase::TabPosition pos(position, participantPosition.reportingSource, 0, 0);
//pos.position(position);
//pos.reportingSource(participantPosition.reportingSource());
@@ -474,7 +474,7 @@ void HandlerParticipantOffRouteMine::sendParticipantHit(const CentralEffectSimul
TrainingAreaBase::SendCesHitRequest requestTab(
equipNo, // equipmentNumber
participantId, // participantId
offRouteMine.chargeStruct.chargeTypeId(), // chargeTypeId
offRouteMine.chargeStruct.chargeTypeId, // chargeTypeId
offRouteMine.aesItemId, // aesId
originatorEquipNo, // originatorEquipmentNumber
remainTasCodeIndirect, // IED heavy
@@ -510,8 +510,8 @@ void HandlerParticipantOffRouteMine::sendFtcOffRouteMineTrigger(int aesItemId)
{
auto ftcAes = m_ddsHandler->ftcAes();
AreaEffectSimulation::OffRouteMineTriggerRequest hr;
hr.id(aesItemId);
hr.triggered(true);
hr.id = aesItemId;
hr.triggered = true;
DEBUG_LOG(m_logger) << "send OffRouteMineTriggerRequest: id=" << hr;
ftcAes->offRouteMineTriggerRequest(hr, this);
}