Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -67,19 +67,18 @@ QString toString(const std::vector<int> &cont)
//
// class ShootbackController
//
ShootbackController::ShootbackController(MainHandler *mainHandler)
: BaseClass(mainHandler)
ShootbackController::ShootbackController(MainHandler *mainHandler) : BaseClass(mainHandler)
, m_mainHandler(mainHandler)
, m_elevationMap(nullptr)
, m_losCalculation(nullptr)
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG() << Q_FUNC_INFO << " END";
, m_losCalculation(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
ShootbackController::~ShootbackController()
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
// disconnect external "signals"..
disconnect(m_mainHandler->dds()->dtcPpm().get());
@@ -91,27 +90,27 @@ ShootbackController::~ShootbackController()
delete m_losCalculation;
m_losCalculation = nullptr;
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
bool ShootbackController::initLOS(SituationMap::ElevationMap *elevationMap)
{
TRACE_LOG() << Q_FUNC_INFO << " START, elevationMap = " << elevationMap
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, elevationMap = " << elevationMap
<< " isValid = " << elevationMap->isValid();
if (!elevationMap->isValid())
{
ERROR_LOG() << Q_FUNC_INFO << " elevationMap not valid -> return";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " elevationMap not valid -> return";
return false;
}
delete m_losCalculation;
m_elevationMap = elevationMap;
INFO_LOG() << Q_FUNC_INFO << " m_elevationMap.isValid() =" << m_elevationMap->isValid();
INFO_LOG(m_logger) << Q_FUNC_INFO << " m_elevationMap.isValid() =" << m_elevationMap->isValid();
m_losCalculation = new SituationMap::LineOfSightCalculation(m_elevationMap);
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
return true;
}
@@ -151,7 +150,7 @@ bool ShootbackController::initDds(std::shared_ptr<HandlerShootbackArea> handlerA
void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed)
{
TRACE_LOG() << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId << " removed=" << removed;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId << " removed=" << removed;
if (removed)
{
@@ -168,7 +167,7 @@ void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed)
auto it = areaMap.find(areaId);
if (it == areaMap.end())
{
ERROR_LOG() << Q_FUNC_INFO << " obj changes, but connot be found" << " shootbackAreaId=" << areaId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << " obj changes, but connot be found" << " shootbackAreaId=" << areaId;
return;
}
onShootbackAreaChanged2(*(it.value()));
@@ -176,13 +175,13 @@ void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed)
}
syncExternal();
TRACE_LOG() << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId << " removed=" << removed;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId << " removed=" << removed;
}
void ShootbackController::onShootbackAreaChanged2(const TargetManagement::ObjectShootbackArea &area)
{
const int areaId = area.getId();
TRACE_LOG() << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId;
// handle new/modified area and check all participants:
const QMap<qint32, ParticipantManagement::ParticipantPosition> &participantPositions =
@@ -193,12 +192,12 @@ void ShootbackController::onShootbackAreaChanged2(const TargetManagement::Object
updateInternal_participantPerArea(area, posData);
} // for
TRACE_LOG() << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId;
}
void ShootbackController::onShootbackTargetChanged(qint32 targetId, bool removed)
{
TRACE_LOG() << Q_FUNC_INFO << " START" << ", targetId=" << targetId << ", removed=" << removed;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << ", targetId=" << targetId << ", removed=" << removed;
// Note:
// updateInternalLos is not required if (removed == true)
@@ -214,12 +213,12 @@ void ShootbackController::onShootbackTargetChanged(qint32 targetId, bool removed
updateInternalLos({}, {}, {targetId});
syncExternal();
TRACE_LOG() << Q_FUNC_INFO << " END" << " targetId=" << targetId << " removed=" << removed;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " targetId=" << targetId << " removed=" << removed;
}
void ShootbackController::onTargetAreaAssignmentChanged(qint32 assignmentId, bool removed)
{
TRACE_LOG() << Q_FUNC_INFO << " START" << " assignmentId=" << assignmentId << " removed=" << removed;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " assignmentId=" << assignmentId << " removed=" << removed;
// Note:
// updateInternalLos is not required on removed == true
@@ -231,16 +230,16 @@ void ShootbackController::onTargetAreaAssignmentChanged(qint32 assignmentId, boo
updateInternalLos({assignmentId}, {}, {});
syncExternal();
TRACE_LOG() << Q_FUNC_INFO << " END" << " assignmentId=" << assignmentId << " removed=" << removed;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " assignmentId=" << assignmentId << " removed=" << removed;
}
void ShootbackController::onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &posData, DataModification modType)
{
TRACE_LOG() << Q_FUNC_INFO << " participantId changed, participantId=" << posData << " mod=" << modType;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " participantId changed, participantId=" << posData << " mod=" << modType;
if (!participantPositionTopicIsValid(posData))
{
// DEBUG_LOG() << Q_FUNC_INFO << " NOT VALID, participantId=" << posData.participantId();
// DEBUG_LOG(m_logger) << Q_FUNC_INFO << " NOT VALID, participantId=" << posData.participantId();
return;
}
@@ -249,30 +248,30 @@ void ShootbackController::onParticipantPositionChanged(const ParticipantManageme
bool bIsTarget = false;
if (isTarget(participantId, bIsTarget) && bIsTarget)
{
INFO_LOG() << Q_FUNC_INFO << " TARGET, participantId=" << participantId;
INFO_LOG(m_logger) << Q_FUNC_INFO << " TARGET, participantId=" << participantId;
ObjectShootbackTarget *osbTarget = m_handlerShootbackTarget->dataForTargetParticipantId(participantId);
if (!osbTarget)
{
ERROR_LOG() << Q_FUNC_INFO << " ObjectShootbackTarget not found for participantId=" << participantId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << " ObjectShootbackTarget not found for participantId=" << participantId;
return;
}
osbTarget->updateVolatileData(posData.pos());
}
INFO_LOG() << Q_FUNC_INFO << " participantId=" << participantId << ", isTarget=" << bIsTarget;
INFO_LOG(m_logger) << Q_FUNC_INFO << " participantId=" << participantId << ", isTarget=" << bIsTarget;
if ((modType == DataModification::eAdded) || (modType == DataModification::eModified))
{
// update
const QHash<int, ObjectShootbackArea *> &objMap = m_handlerShootbackArea->getObjectMap();
DEBUG_LOG() << Q_FUNC_INFO << " objMap.size" << objMap.size();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " objMap.size" << objMap.size();
QMapIterator< int, QSet<int>> it(m_participantsPerArea);
while (it.hasNext())
{
it.next();
DEBUG_LOG() << " areaId = " << it.key() << "-> partIdRef VORHERXX" << toString(it.value());
DEBUG_LOG(m_logger) << " areaId = " << it.key() << "-> partIdRef VORHERXX" << toString(it.value());
}
for (const auto &area : std::as_const(objMap))
@@ -286,7 +285,7 @@ void ShootbackController::onParticipantPositionChanged(const ParticipantManageme
while (it_inner.hasNext())
{
it_inner.next();
DEBUG_LOG() << " areaId = " << it_inner.key() << "-> partIdRef NACHHERXX" << toString(it_inner.value());
DEBUG_LOG(m_logger) << " areaId = " << it_inner.key() << "-> partIdRef NACHHERXX" << toString(it_inner.value());
}
}
@@ -322,7 +321,7 @@ bool ShootbackController::isTarget(qint32 participantId, bool &bIsTarget) const
std::shared_ptr<ParticipantManagement::Interface::Dtc> dtcPpm = m_mainHandler->dds()->dtcPpm();
if (!dtcPpm)
{
ERROR_LOG() << Q_FUNC_INFO << " no dtcPpm, return";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no dtcPpm, return";
return false;
}
@@ -372,9 +371,9 @@ void ShootbackController::updateInternal_participantPerArea(const ObjectShootbac
QSet<int> &partIdRef = m_participantsPerArea[areaId];
bool alreadyInCont = partIdRef.contains(participantId);
DEBUG_LOG() << " areaId = " << area.getId() << " ---> partIdRef VORHER" << toString(partIdRef);
DEBUG_LOG(m_logger) << " areaId = " << area.getId() << " ---> partIdRef VORHER" << toString(partIdRef);
DEBUG_LOG() << Q_FUNC_INFO << " "
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " "
<< " shootbackAreaId=" << areaId
<< " shootbackAreaName=" << area.getName()
<< " area.position=" << area.getData().position()
@@ -387,17 +386,17 @@ void ShootbackController::updateInternal_participantPerArea(const ObjectShootbac
{
// ENTER
partIdRef.insert(participantId);
DEBUG_LOG() << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId;
}
else if (!contains && alreadyInCont)
{
// LEAVE
DEBUG_LOG() << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId;
partIdRef.remove(participantId);
}
DEBUG_LOG() << " areaId = " << area.getId() << " ---> partIdRef NACHER" << toString(partIdRef);
DEBUG_LOG(m_logger) << " areaId = " << area.getId() << " ---> partIdRef NACHER" << toString(partIdRef);
}
bool ShootbackController::areaContainsPosition(const TargetManagement::ObjectShootbackArea &area,
@@ -453,7 +452,7 @@ QSet<int> ShootbackController::areasWithParticipant(qint32 participantId) const
QSet<int> ShootbackController::assignmentsWithTargetParticipantId(qint32 targetParticipantId) const
{
TRACE_LOG() << Q_FUNC_INFO << " START" << " targetParticipantId=" << targetParticipantId;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " targetParticipantId=" << targetParticipantId;
QSet<int> ret;
// all assignments
@@ -467,7 +466,7 @@ QSet<int> ShootbackController::assignmentsWithTargetParticipantId(qint32 targetP
ret += targetAreaAssignment->getId();
} // for
TRACE_LOG() << Q_FUNC_INFO << " END" << " areaId=" << targetParticipantId;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " areaId=" << targetParticipantId;
return ret;
}
@@ -483,7 +482,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
const QSet<int> &changingTartgetIds, // ~dynamic
int changedParticipantId) // ~dynamic
{
DEBUG_LOG() << Q_FUNC_INFO << " START"
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START"
<< ", changingAssigmentIds=" << toString(changingAssignmentIds)
<< ", changingAreaIds=" << toString(changingAreaIds)
<< ", changingTartgetIds=" << toString(changingTartgetIds)
@@ -491,13 +490,13 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
// loop over every assignment
const QHash<int, ObjectTargetAreaAssignment *> &allAssignments = m_handlerTargetAreaAssignment->getObjectMap();
DEBUG_LOG() << Q_FUNC_INFO << " allAssignments.size() " << allAssignments.size();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " allAssignments.size() " << allAssignments.size();
for (ObjectTargetAreaAssignment *assignment : allAssignments)
{
if (!assignment)
{
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
continue;
}
@@ -505,7 +504,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
const int assignmentId = assignment->getId();
if (!idIsRelevantHelper(changingAssignmentIds, assignmentId))
{
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
continue;
}
@@ -515,7 +514,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
const int areaId = assignmentData.areaId();
if (!idIsRelevantHelper(changingAreaIds, areaId))
{
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
continue;
}
@@ -524,7 +523,7 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
const int targetDataId = m_handlerShootbackTarget->targetDataIdForTargetParticipantId(targetParticpantId);
if (!idIsRelevantHelper(changingTartgetIds, targetDataId))
{
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId()
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId()
<< ", changingTartgetIds=" << toString(changingTartgetIds)
<< ", targetParticpantId=" << targetParticpantId
<< ", targetDataId=" << targetDataId;
@@ -536,13 +535,13 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
{
// Note: m_participantsPerArea is up-to-date
QSet<int> areasWithPart = areasWithParticipant(changedParticipantId);
DEBUG_LOG() << Q_FUNC_INFO << " areasWithPart=" << areasWithPart.size();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " areasWithPart=" << areasWithPart.size();
for (auto curAreaId : std::as_const(areasWithPart))
DEBUG_LOG() << Q_FUNC_INFO << " -> curAreaId=" << curAreaId;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " -> curAreaId=" << curAreaId;
if (!idIsRelevantHelper(areasWithPart, areaId))
{
DEBUG_LOG() << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId();
continue;
}
}
@@ -551,11 +550,11 @@ void ShootbackController::updateInternalLos(const QSet<int> &changingAssignmentI
// one assignment -> single target, single area, some participants (which are in that single area):
if (!updateInternalLosSingleAssignment(assignment))
ERROR_LOG() << Q_FUNC_INFO << " updateInternalLosSingleAssignment failed, assignmentId=" << assignment->getId();
ERROR_LOG(m_logger) << Q_FUNC_INFO << " updateInternalLosSingleAssignment failed, assignmentId=" << assignment->getId();
} // for
TRACE_LOG() << Q_FUNC_INFO << " END"
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"
<< ", changingAssigmentIds=" << changingAssignmentIds.size()
<< ", changingAreaIds=" << changingAreaIds.size()
<< ", changingTartgetIds=" << changingTartgetIds.size()
@@ -567,14 +566,14 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
if (!assignment)
return false;
const int assignmentId = assignment->getId();
TRACE_LOG() << Q_FUNC_INFO << " START, assignmentId=" << assignmentId;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, assignmentId=" << assignmentId;
const TargetAreaAssignment &assignmentData = assignment->getData();
const int areaId = assignmentData.areaId();
const int targetParticipantId = assignmentData.targetParticipantId();
DEBUG_LOG() << Q_FUNC_INFO << " START, assignmentId=" << assignmentId
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, assignmentId=" << assignmentId
<< ", areaId = " << areaId
<< ", targetParticipantId = " << targetParticipantId;
@@ -585,14 +584,14 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
// Neverless, for this assignment -> area there are no participants visible:
// clear container:
m_visibleParticipantsPerAssignment[assignmentId] = {};
ERROR_LOG() << Q_FUNC_INFO << " no area for areaId=" << areaId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no area for areaId=" << areaId;
return false;
}
ObjectShootbackTarget *target = m_handlerShootbackTarget->dataForTargetParticipantId(targetParticipantId);
if (!target)
{
ERROR_LOG() << Q_FUNC_INFO << " no target for targetParticipantId=" << targetParticipantId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no target for targetParticipantId=" << targetParticipantId;
return false;
}
@@ -604,7 +603,7 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
for (auto participantId : std::as_const(partIdRef))
{
// check lineOfSight:
DEBUG_LOG() << Q_FUNC_INFO << " check lineOfSight for: assignmentId=" << assignmentId
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " check lineOfSight for: assignmentId=" << assignmentId
<< ", areaId = " << areaId
<< ", targetParticipantId = " << targetParticipantId
<< ", participantId=" << participantId;
@@ -619,13 +618,13 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
if (participantPos.participantId() != participantId)
{
ERROR_LOG() << Q_FUNC_INFO << " no position for participantId=" << participantId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << " no position for participantId=" << participantId;
return false;
}
const Core::GeoPosition &participantGeoPos = participantPos.pos();
bool visi = lineOfSight(sbTargetGeoPos, participantGeoPos);
DEBUG_LOG() << Q_FUNC_INFO << " current targetId = " << target->getId() << " visi = " << visi;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " current targetId = " << target->getId() << " visi = " << visi;
if (visi)
visiPartCont.insert(participantId);
@@ -635,19 +634,19 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi
} // if (m_participantsPerArea.contains(areaId))
DEBUG_LOG() << Q_FUNC_INFO << " assignmentId = " << assignmentId
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " assignmentId = " << assignmentId
<< " visiPartCont.size() " << visiPartCont.size();
// store at member
m_visibleParticipantsPerAssignment[assignmentId] = visiPartCont;
TRACE_LOG() << Q_FUNC_INFO << " END, assignmentId=" << assignmentId;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, assignmentId=" << assignmentId;
return true;
}
QSet<int> ShootbackController::visibleParticipantsPerTargetParticipantId(int targetParticipantId)
{
TRACE_LOG() << Q_FUNC_INFO << " START, targetParticipantId = " << targetParticipantId;
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, targetParticipantId = " << targetParticipantId;
QSet<int> visiPartPerTarget;
@@ -658,19 +657,19 @@ QSet<int> ShootbackController::visibleParticipantsPerTargetParticipantId(int tar
visiPartPerTarget += m_visibleParticipantsPerAssignment[assignmentId];
}
TRACE_LOG() << Q_FUNC_INFO << " END, targetParticipantId = " << targetParticipantId
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, targetParticipantId = " << targetParticipantId
<< ", visiPartPerTarget = " << toString(visiPartPerTarget);
return visiPartPerTarget;
}
void ShootbackController::syncExternal()
{
TRACE_LOG() << Q_FUNC_INFO << " START";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
// loop over all targets
const QHash<int, ObjectShootbackTarget *> &allTargets = m_handlerShootbackTarget->getObjectMap();
INFO_LOG() << Q_FUNC_INFO << " allTargets.size() " << allTargets.size();
INFO_LOG(m_logger) << Q_FUNC_INFO << " allTargets.size() " << allTargets.size();
for (ObjectShootbackTarget *target : allTargets)
{
@@ -680,7 +679,7 @@ void ShootbackController::syncExternal()
const QSet<int> &visiPartPerTarget = visibleParticipantsPerTargetParticipantId(target->getTargetParticipantId()); // QSet -> unique and sorted
std::vector<int32_t> visiPartPerTargetStd;
visiPartPerTargetStd.reserve(visiPartPerTarget.size());
INFO_LOG() << Q_FUNC_INFO << " targetId " << target->getId() << ", visiPartPerTarget = " << toString(visiPartPerTarget);
INFO_LOG(m_logger) << Q_FUNC_INFO << " targetId " << target->getId() << ", visiPartPerTarget = " << toString(visiPartPerTarget);
for (auto id : std::as_const(visiPartPerTarget))
visiPartPerTargetStd.push_back(id);
@@ -689,26 +688,26 @@ void ShootbackController::syncExternal()
if (visiPartPerTargetStd != sbTarget.visibleParticipants())
{
// data has changed
INFO_LOG() << Q_FUNC_INFO << " targetId differ -> updateObject..";
INFO_LOG() << Q_FUNC_INFO << " visiOld =" << toString(sbTarget.visibleParticipants());
INFO_LOG() << Q_FUNC_INFO << " visiNew =" << toString(visiPartPerTargetStd);
INFO_LOG(m_logger) << Q_FUNC_INFO << " targetId differ -> updateObject..";
INFO_LOG(m_logger) << Q_FUNC_INFO << " visiOld =" << toString(sbTarget.visibleParticipants());
INFO_LOG(m_logger) << Q_FUNC_INFO << " visiNew =" << toString(visiPartPerTargetStd);
target->updateVolatileData(visiPartPerTargetStd); // update and publish
}
} // for
TRACE_LOG() << Q_FUNC_INFO << " END";
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
}
bool ShootbackController::lineOfSight(const Core::GeoPosition &observerPos, const Core::GeoPosition &targetPos) const
{
DEBUG_LOG() << Q_FUNC_INFO << " calculate m_losCalculation = " << m_losCalculation
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " calculate m_losCalculation = " << m_losCalculation
<< ", observerPos=" << observerPos
<< ", targetPos=" << targetPos;
if (!m_losCalculation)
{
ERROR_LOG() << Q_FUNC_INFO << " Error: no m_losCalculation";
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error: no m_losCalculation";
return false;
}
@@ -720,7 +719,7 @@ bool ShootbackController::lineOfSight(const Core::GeoPosition &observerPos, cons
if (!success)
{
ERROR_LOG() << Q_FUNC_INFO << " calculate failed:"
ERROR_LOG(m_logger) << Q_FUNC_INFO << " calculate failed:"
<< " observerPos=" << observerPos
<< " targetPos=" << targetPos;
return false;