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

@@ -25,7 +25,7 @@ HandlerParticipantBorderline::HandlerParticipantBorderline(const std::shared_ptr
, m_handlerParticipant(participantHandler)
, m_logger(CentralEffectSimulation::getLogger("Plugin.Basic.HandlerParticipantBorderline"))
{
INFO_LOG() << "HandlerParticipantBorderline::HandlerParticipantBorderline";
INFO_LOG(m_logger) << "HandlerParticipantBorderline::HandlerParticipantBorderline";
} // end of ctor()
//-----------------------------------------------------------------------------
@@ -37,7 +37,7 @@ HandlerParticipantBorderline::~HandlerParticipantBorderline()
bool HandlerParticipantBorderline::init()
{
INFO_LOG() << "HandlerParticipantBorderline::init";
INFO_LOG(m_logger) << "HandlerParticipantBorderline::init";
auto dtcAes = m_ddsHandler->dtcAes();
dtcAes->waitForHistoricalDataBorderline(1000);
@@ -59,7 +59,7 @@ bool HandlerParticipantBorderline::init()
return false;
}
INFO_LOG() << "HandlerParticipantBorderline::init() finished. ";
INFO_LOG(m_logger) << "HandlerParticipantBorderline::init() finished. ";
return true;
} // end of init()
//-----------------------------------------------------------------------------
@@ -69,7 +69,7 @@ void HandlerParticipantBorderline::onBorderlineChanged(const AreaEffectSimulatio
switch (modType)
{
case DataModification::eRemoved:
DEBUG_LOG() << " remove Borderline- data.id()=" << data.id();
DEBUG_LOG(m_logger) << " remove Borderline- data.id()=" << data.id();
m_borderlines.remove(data.id());
break;
case DataModification::eAdded:
@@ -85,7 +85,7 @@ void HandlerParticipantBorderline::onBorderlineChanged(const AreaEffectSimulatio
case AreaEffectSimulation::AesEffectState_def::EsActivated:
{
BorderlineUtm borderline(data);
DEBUG_LOG() << "m_borderlines.insert id=" << data.id();
DEBUG_LOG(m_logger) << "m_borderlines.insert id=" << data.id();
m_borderlines.insert(data.id(), borderline);
break;
}
@@ -105,12 +105,12 @@ void HandlerParticipantBorderline::onBorderlineChanged(const AreaEffectSimulatio
bool HandlerParticipantBorderline::intersect(const QPolygonF &polygonf, const QLineF &linef) const
{
DEBUG_LOG() << "line to check: " << CentralEffectSimulation::debug(linef.p1()) << " - " << CentralEffectSimulation::debug(linef.p2());
DEBUG_LOG(m_logger) << "line to check: " << CentralEffectSimulation::debug(linef.p1()) << " - " << CentralEffectSimulation::debug(linef.p2());
QPointF a = polygonf.first();
for (const QPointF &b : polygonf)
{
const QLineF segment(a, b);
DEBUG_LOG() << "segment:" << CentralEffectSimulation::debug(a) << " - " << CentralEffectSimulation::debug(b);
DEBUG_LOG(m_logger) << "segment:" << CentralEffectSimulation::debug(a) << " - " << CentralEffectSimulation::debug(b);
if (QLineF::BoundedIntersection == linef.intersect(segment, nullptr))
return true;
a = b;
@@ -122,14 +122,14 @@ bool HandlerParticipantBorderline::intersect(const QPolygonF &polygonf, const QL
void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &partPos)
{
// Bounding Box von der Linie
DEBUG_LOG() << "ParicipantStep "
DEBUG_LOG(m_logger) << "ParicipantStep "
<< " participantId=" << partPos.participantId()
<< " participantTypeId=" << partPos.participantTypeId()
<< " Anzahl Borderlines=" << m_borderlines.size();
for (const BorderlineUtm &borderline : std::as_const(m_borderlines))
{
DEBUG_LOG() << "borderline id = " << borderline.id
DEBUG_LOG(m_logger) << "borderline id = " << borderline.id
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(borderline.boundingBox.bottomLeft())
<< ", topRight = " << CentralEffectSimulation::debug(borderline.boundingBox.topRight());
const QPolygonF utmStepPoly = m_handlerParticipant->getParticipantStep(partPos.participantId(), borderline.zone);
@@ -139,7 +139,7 @@ void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEff
// Intersection von Polygon und Line: Polygon = Borderline, Line from last Participant pos to actual participant pos
const QLineF utmStep(utmStepPoly[0], utmStepPoly[1]);
const bool result = intersect(borderline.points, utmStep);
DEBUG_LOG() << "result intersection = " << result;
DEBUG_LOG(m_logger) << "result intersection = " << result;
if (result)
{
if (borderline.operatorId <= 0)
@@ -175,7 +175,7 @@ void HandlerParticipantBorderline::sendParticipantEvent(const BorderlineUtm &bor
return;
CentralEffectSimulation::ParticipantEvent pe;
DEBUG_LOG() << "sendParticipantEvent participantId=" << participantPosition.participantId()
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId()
<< " lat= " << participantPosition.pos().lat()
<< " lon= " << participantPosition.pos().lon()
<< " equipmentNumber=" << equipmentNumber
@@ -52,18 +52,18 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb()
QVector<CentralEffectSimulation::Database::CesSimulatedMovement> simMoveVec;
if (!m_db->select(simMoveVec))
{
ERROR_LOG() << "Error reading data from database 'CesSimulatedMovement'";
ERROR_LOG(m_logger) << "Error reading data from database 'CesSimulatedMovement'";
return false;
}
DEBUG_LOG() << "loadSimulatedMovementFromDb size =" << simMoveVec.size();
DEBUG_LOG(m_logger) << "loadSimulatedMovementFromDb size =" << simMoveVec.size();
QVector<CentralEffectSimulation::Database::CesSimulatedMovementSegment> simMoveSegVec;
if (!m_db->select(simMoveSegVec))
{
ERROR_LOG() << "Error reading data from database 'CesSimulatedMovementSegment'";
ERROR_LOG(m_logger) << "Error reading data from database 'CesSimulatedMovementSegment'";
return false;
}
DEBUG_LOG() << "loadSimulatedMovementSegmentsFromDb size =" << simMoveSegVec.size();
DEBUG_LOG(m_logger) << "loadSimulatedMovementSegmentsFromDb size =" << simMoveSegVec.size();
// add to internal buffer
for (const CentralEffectSimulation::Database::CesSimulatedMovement &data : std::as_const(simMoveVec))
@@ -75,7 +75,7 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb()
request.participantId(data.participantId);
request.repeat(data.repeat);
request.nextPoint(data.nextpoint);
DEBUG_LOG() << "Loading SimulatedMovement: " << request;
DEBUG_LOG(m_logger) << "Loading SimulatedMovement: " << request;
QMap <int, CentralEffectSimulation::Database::CesSimulatedMovementSegment> segDbMap; // QMap to get it sorted
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segData : std::as_const(simMoveSegVec))
@@ -115,7 +115,7 @@ Core::FunctionReplyObject HandlerSimulatedMovement::insertInDb(const CentralEffe
if (!m_db->insert(newSimulatedMovement))
return Core::FunctionReplyObject(0, tr_lts("dds", "Error adding 'CesSimulatedMovement' to database"));
DEBUG_LOG() << "newSimulatedMovement.id = " << newSimulatedMovement.id;
DEBUG_LOG(m_logger) << "newSimulatedMovement.id = " << newSimulatedMovement.id;
CentralEffectSimulation::Database::CesSimulatedMovementSegment newSegment;
newSegment.simulatedMovementId = newSimulatedMovement.id;
@@ -134,7 +134,7 @@ Core::FunctionReplyObject HandlerSimulatedMovement::insertInDb(const CentralEffe
trans.commit();
DEBUG_LOG() << "newSimulatedMovement.id=" << newSimulatedMovement.id << " request.id=" << request.id();
DEBUG_LOG(m_logger) << "newSimulatedMovement.id=" << newSimulatedMovement.id << " request.id=" << request.id();
return Core::FunctionReplyObject(newSimulatedMovement.id);
} // end of insertInDb
@@ -143,7 +143,7 @@ Core::FunctionReplyObject HandlerSimulatedMovement::updateDb(const CentralEffect
CentralEffectSimulation::Database::CesSimulatedMovement newSimulatedMovement(SimulationMovement::toDb(request));
if (!m_db->update(newSimulatedMovement))
return Core::FunctionReplyObject(0, tr_lts("dds", "Error update 'CesSimulatedMovement' to database"));
DEBUG_LOG() << "newSimulatedMovement.id = " << newSimulatedMovement.id;
DEBUG_LOG(m_logger) << "newSimulatedMovement.id = " << newSimulatedMovement.id;
// First remove all participant-segments
@@ -164,14 +164,14 @@ Core::FunctionReplyObject HandlerSimulatedMovement::updateDb(const CentralEffect
++newSegment.positionIndex;
}
DEBUG_LOG() << "newSimulatedMovement.id=" << newSimulatedMovement.id << " request.id=" << request.id();
DEBUG_LOG(m_logger) << "newSimulatedMovement.id=" << newSimulatedMovement.id << " request.id=" << request.id();
return Core::FunctionReplyObject(newSimulatedMovement.id);
} // end of updateDb
Core::FunctionReplyObject HandlerSimulatedMovement::removeFromDb(const int32_t id)
{
DEBUG_LOG() << "removeFromDb: id=" << id;
DEBUG_LOG(m_logger) << "removeFromDb: id=" << id;
if (!m_db->removeCesSimulatedMovement(id))
return Core::FunctionReplyObject(0, tr_lts("dds", "Error remove 'CesSimulatedMovement' from database"));
return Core::FunctionReplyObject(id);
@@ -179,7 +179,7 @@ Core::FunctionReplyObject HandlerSimulatedMovement::removeFromDb(const int32_t i
void HandlerSimulatedMovement::publishSimulatedMovement(const CentralEffectSimulation::SimulatedMovement &request)
{
INFO_LOG() << "publishSimulatedMovement: " << request;
INFO_LOG(m_logger) << "publishSimulatedMovement: " << request;
m_ddsHandler->dtsCes()->publish(request);
}
@@ -189,25 +189,25 @@ void HandlerSimulatedMovement::setParticipantAsSimulated(const int &participantI
return;
ParticipantManagement::SetAsSimulated req(participantId,isSimulated);
if (!m_ddsHandler->ftcPpm()->setAsSimulatedRequest(req, this))
ERROR_LOG() << "Error modify participant data participantId=" << participantId;
ERROR_LOG(m_logger) << "Error modify participant data participantId=" << participantId;
}
void HandlerSimulatedMovement::onModifyParticipantDataReply(const Core::FunctionReplyObject &replyObject)
{
if (replyObject.error())
WARNING_LOG() << "onModifyParticipantDataReply: " << replyObject();
WARNING_LOG(m_logger) << "onModifyParticipantDataReply: " << replyObject();
}
void HandlerSimulatedMovement::onSetAsSimulatedReply(const Core::FunctionReplyObject &replyObject)
{
if (replyObject.error())
WARNING_LOG() << "onSetAsSimulatedReply: " << replyObject();
WARNING_LOG(m_logger) << "onSetAsSimulatedReply: " << replyObject();
}
void HandlerSimulatedMovement::onSimulatedMovementModifyRequest(const rti::core::SampleIdentity &cookie,
const CentralEffectSimulation::SimulatedMovement &request)
{
DEBUG_LOG() << "onSimulatedMovementModifyRequest: " << request;
DEBUG_LOG(m_logger) << "onSimulatedMovementModifyRequest: " << request;
m_jumpToStart = request.jumpToStart();
// we allow a modify with requestId = 0 and participantId != 0
@@ -220,7 +220,7 @@ void HandlerSimulatedMovement::onSimulatedMovementModifyRequest(const rti::core:
// New Route
if (request.jumpToStart())
{
DEBUG_LOG() << "sm->setJump(true)";
DEBUG_LOG(m_logger) << "sm->setJump(true)";
sm->setJump(true);
}
@@ -234,14 +234,14 @@ void HandlerSimulatedMovement::onSimulatedMovementModifyRequest(const rti::core:
setParticipantAsSimulated(request.participantId(), true);
DEBUG_LOG() << "simulatedMovementModifyReply id=" << reply.id();
DEBUG_LOG(m_logger) << "simulatedMovementModifyReply id=" << reply.id();
m_ddsHandler->ftsCes()->simulatedMovementModifyReply(cookie, reply);
} // end onSimulatedMovementModifyRequest
Core::FunctionReplyObject HandlerSimulatedMovement::removeSimulatedMovement(int32_t ddsId)
{
DEBUG_LOG() << "removeSimulatedMovement with id " << ddsId << ", " << m_simulationMovements.size();
DEBUG_LOG(m_logger) << "removeSimulatedMovement with id " << ddsId << ", " << m_simulationMovements.size();
if (ddsId <= 0)
return Core::FunctionReplyObject(0, tr_lts("dds", "remove participant simulation "));
@@ -259,7 +259,7 @@ Core::FunctionReplyObject HandlerSimulatedMovement::removeSimulatedMovement(int3
m_simulationMovements.erase(it);
}
if (participantId == -1)
WARNING_LOG() << "Could not find movement simulation with id " << ddsId << ", " << m_simulationMovements.size();
WARNING_LOG(m_logger) << "Could not find movement simulation with id " << ddsId << ", " << m_simulationMovements.size();
setParticipantAsSimulated(participantId, false);
return reply;
@@ -270,7 +270,7 @@ void HandlerSimulatedMovement::onSimulatedMovementRemoveRequest(const rti::core:
{
Core::FunctionReplyObject reply = removeSimulatedMovement(request.id());
if (reply.error())
WARNING_LOG() << reply();
WARNING_LOG(m_logger) << reply();
m_ddsHandler->ftsCes()->simulatedMovementRemoveReply(cookie, reply);
} // end onSimulatedMovementRemoveRequest
@@ -278,7 +278,7 @@ void HandlerSimulatedMovement::onSimulatedMovementRemoveRequest(const rti::core:
void HandlerSimulatedMovement::onSimulatedMovementRemoveByParticipantIdRequest(const rti::core::SampleIdentity &cookie,
const CentralEffectSimulation::SimulatedMovementRemoveByParticipantId &request)
{
DEBUG_LOG() << "onSimulatedMovementRemoveByParticipantIdRequest: " << request;
DEBUG_LOG(m_logger) << "onSimulatedMovementRemoveByParticipantIdRequest: " << request;
int id = 0;
for (const SimulationMovement *simMovement : std::as_const(m_simulationMovements))
@@ -291,7 +291,7 @@ void HandlerSimulatedMovement::onSimulatedMovementRemoveByParticipantIdRequest(c
}
Core::FunctionReplyObject reply = removeSimulatedMovement(id);
if (reply.error())
WARNING_LOG() << reply();
WARNING_LOG(m_logger) << reply();
m_ddsHandler->ftsCes()->simulatedMovementRemoveByParticipantIdReply(cookie, reply);
}
@@ -49,7 +49,7 @@ bool CesBasicInterfaceImpl::init(int domainId, int exerciseId)
m_domainId = domainId;
m_exerciseId = exerciseId;
INFO_LOG() << "CesBasicInterfaceImpl::init()"
INFO_LOG(m_logger) << "CesBasicInterfaceImpl::init()"
<< " m_domainId=" << m_domainId
<< " m_exerciseId=" << m_exerciseId;
@@ -63,7 +63,7 @@ bool CesBasicInterfaceImpl::init(int domainId, int exerciseId)
if (!m_handlerParticipantBorderline->init())
{
ERROR_LOG() << "Initialisation HandlerParticipantBorderline failed.";
ERROR_LOG(m_logger) << "Initialisation HandlerParticipantBorderline failed.";
return false;
}
@@ -75,11 +75,11 @@ bool CesBasicInterfaceImpl::init(int domainId, int exerciseId)
if (!m_handlerSimulatedMovement->init())
{
ERROR_LOG() << "Initialisation m_handlerSimulatedMovement failed.";
ERROR_LOG(m_logger) << "Initialisation m_handlerSimulatedMovement failed.";
return false;
}
INFO_LOG() << "CentralEffectSimulationBasicInterfaceImpl::init() return true";
INFO_LOG(m_logger) << "CentralEffectSimulationBasicInterfaceImpl::init() return true";
return true;
}
@@ -87,8 +87,8 @@ QString CesBasicInterfaceImpl::echo(const QString &message)
{
QString ret(QStringLiteral("<<<< %1 >>>> CesBasicInterfaceImpl::echo").arg(message));
INFO_LOG() << "CesBasicInterfaceImpl::echo return:" << ret;
DEBUG_LOG() << "DEBUG: CesBasicInterfaceImpl::echo return:" << ret;
INFO_LOG(m_logger) << "CesBasicInterfaceImpl::echo return:" << ret;
DEBUG_LOG(m_logger) << "DEBUG: CesBasicInterfaceImpl::echo return:" << ret;
return ret;
}
@@ -63,6 +63,7 @@ private Q_SLOTS:
bool init(int domainId, int exerciseId) override;
private:
NGL::INGLLogger &m_logger;
private:
CentralEffectSimulation::Plugin::DataProvider *m_pdp{nullptr};
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
@@ -43,7 +43,7 @@ SimulationMovement::SimulationMovement(const std::shared_ptr<CentralEffectSimula
SimulationMovement::~SimulationMovement()
{
DEBUG_LOG() << "Delete SimulatedMovement "
DEBUG_LOG(m_logger) << "Delete SimulatedMovement "
<< " id=" << m_simMovement.id()
<< " participantId= " << m_simMovement.participantId();
m_ddsHandler->dtsCes()->removeSimulatedMovementByKey(m_simMovement.id());
@@ -72,7 +72,7 @@ void SimulationMovement::setSimulatedMovementRequest(const CentralEffectSimulati
{
const Core::GeoPosition2D &pointGeo = point.position();
m_points.push_back(m_zone == -1 ? CentralEffectSimulation::geographic2Utm(pointGeo, &m_zone) : CentralEffectSimulation::geographic2Utm(pointGeo, m_zone));
DEBUG_LOG() << "pointGeo lat=" << pointGeo.lat() << " lon=" << pointGeo.lon()
DEBUG_LOG(m_logger) << "pointGeo lat=" << pointGeo.lat() << " lon=" << pointGeo.lon()
<< " point lat=" << point.position().lat() << " lon=" << point.position().lon()
<< " utmPoint=" << CentralEffectSimulation::debug(m_points.last());
m_segSpeed.append(point.speed());
@@ -80,7 +80,7 @@ void SimulationMovement::setSimulatedMovementRequest(const CentralEffectSimulati
}
// Only start simulation in future
DEBUG_LOG() << "m_startTime - QDateTime::currentMSecsSinceEpoch()=" << m_simMovement.startTime() - QDateTime::currentMSecsSinceEpoch()
DEBUG_LOG(m_logger) << "m_startTime - QDateTime::currentMSecsSinceEpoch()=" << m_simMovement.startTime() - QDateTime::currentMSecsSinceEpoch()
<< " m_startTime=" << m_simMovement.startTime()
<< " currentTime=" << QDateTime::currentMSecsSinceEpoch()
<< " m_nextPoint=" << m_simMovement.nextPoint();
@@ -92,7 +92,7 @@ void SimulationMovement::setSimulatedMovementRequest(const CentralEffectSimulati
m_moveTimer->start(m_simMovement.startTime() - QDateTime::currentMSecsSinceEpoch());
else
{
DEBUG_LOG() << "Service-Start";
DEBUG_LOG(m_logger) << "Service-Start";
m_moveTimer->start(10); // Service-Start
}
}
@@ -101,7 +101,7 @@ void SimulationMovement::updateNextPointInDb()
{
if (m_simMovement.id() <= 0)
{
WARNING_LOG() << "Internal error - id not set!";
WARNING_LOG(m_logger) << "Internal error - id not set!";
return;
}
CentralEffectSimulation::Database::CesSimulatedMovement dbSim = toDb(m_simMovement);
@@ -111,7 +111,7 @@ void SimulationMovement::updateNextPointInDb()
void SimulationMovement::startNewSegment()
{
DEBUG_LOG() << "simulate participantId = " << m_simMovement.participantId()
DEBUG_LOG(m_logger) << "simulate participantId = " << m_simMovement.participantId()
<< " m_nextPoint = " << m_simMovement.nextPoint();
m_moveTime = 1;
@@ -123,31 +123,31 @@ void SimulationMovement::startNewSegment()
if (pos.participantId() == m_simMovement.participantId())
{
p1 = CentralEffectSimulation::geographic2Utm(pos.pos(), m_zone);
DEBUG_LOG() << "Next segment ParticipantPosition =" << CentralEffectSimulation::debug(p1);
DEBUG_LOG(m_logger) << "Next segment ParticipantPosition =" << CentralEffectSimulation::debug(p1);
}
else
{
if (m_simStart) // Wait for participantPosition
{
INFO_LOG() << "Wait for participant position participantId =" << m_simMovement.participantId();
INFO_LOG(m_logger) << "Wait for participant position participantId =" << m_simMovement.participantId();
m_segTimer->start(1000);
return;
}
if (m_simMovement.nextPoint() > 0)
{
p1 = m_points.at(m_simMovement.participantId() - 1);
DEBUG_LOG() << "nextPoint>0 (" << m_simMovement.nextPoint() << ") ParticipantPosition =" << CentralEffectSimulation::debug(p1);
DEBUG_LOG(m_logger) << "nextPoint>0 (" << m_simMovement.nextPoint() << ") ParticipantPosition =" << CentralEffectSimulation::debug(p1);
}
else
{
p1 = m_points.at(m_points.size() - 1);
DEBUG_LOG() << "nextPoint=" << m_simMovement.nextPoint() << " ParticipantPosition =" << CentralEffectSimulation::debug(p1);
DEBUG_LOG(m_logger) << "nextPoint=" << m_simMovement.nextPoint() << " ParticipantPosition =" << CentralEffectSimulation::debug(p1);
}
}
const QPointF &p2 = m_points.at(m_simMovement.nextPoint());
m_actSegment.setPoints(p1, p2);
int curDelay = m_segDelay.at(m_simMovement.nextPoint());
DEBUG_LOG() << "New Segment: p1 = " << CentralEffectSimulation::debug(p1) << " p2=" << CentralEffectSimulation::debug(p2)
DEBUG_LOG(m_logger) << "New Segment: p1 = " << CentralEffectSimulation::debug(p1) << " p2=" << CentralEffectSimulation::debug(p2)
<< " delay =" << curDelay;
m_moveTimer->start(curDelay);
}
@@ -165,7 +165,7 @@ void SimulationMovement::startNewSegment()
void SimulationMovement::setJump(bool jump)
{
DEBUG_LOG() << "Jump";
DEBUG_LOG(m_logger) << "Jump";
if (jump)
{
m_simMovement.nextPoint(1);
@@ -175,13 +175,13 @@ void SimulationMovement::setJump(bool jump)
m_moveTime = 1;
m_simStart = false;
publishNewPos();
DEBUG_LOG() << "Jump done";
DEBUG_LOG(m_logger) << "Jump done";
}
}
void SimulationMovement::publishSimulatedMovement()
{
DEBUG_LOG() << " m_nextPoint= " << m_simMovement.nextPoint();
DEBUG_LOG(m_logger) << " m_nextPoint= " << m_simMovement.nextPoint();
m_ddsHandler->dtsCes()->publish(m_simMovement);
}
@@ -195,7 +195,7 @@ void SimulationMovement::publishNewPos()
utmPos.x = m_newPos.x();
utmPos.y = m_newPos.y();
const QPointF posGeo = utmPos.geographic();
DEBUG_LOG() << "participantPos zone=" << utmPos.zone
DEBUG_LOG(m_logger) << "participantPos zone=" << utmPos.zone
<< " northp=" << utmPos.northp
<< " x=" << utmPos.x
<< " y=" << utmPos.y;
@@ -213,10 +213,10 @@ void SimulationMovement::publishNewPos()
void SimulationMovement::move()
{
DEBUG_LOG() << "move";
DEBUG_LOG(m_logger) << "move";
if (m_simMovement.nextPoint() < 0)
{
DEBUG_LOG() << "move next point < 0";
DEBUG_LOG(m_logger) << "move next point < 0";
return;
}
@@ -224,17 +224,17 @@ void SimulationMovement::move()
const QPointF participantPosUtm = CentralEffectSimulation::geographic2Utm(partPos.pos(), m_zone);
if (partPos.participantId() != m_simMovement.participantId())
{
DEBUG_LOG() << "move no ParticipantId=" << m_simMovement.participantId();
DEBUG_LOG(m_logger) << "move no ParticipantId=" << m_simMovement.participantId();
m_moveTimer->start(1000);
return;
}
if (!partPos.positionValid)
{
DEBUG_LOG() << "move no ParticipantId=" << m_simMovement.participantId();
DEBUG_LOG(m_logger) << "move no ParticipantId=" << m_simMovement.participantId();
m_moveTimer->start(1000);
return;
}
DEBUG_LOG() << " pos=" << CentralEffectSimulation::debug(participantPosUtm);
DEBUG_LOG(m_logger) << " pos=" << CentralEffectSimulation::debug(participantPosUtm);
QLineF step = m_actSegment;
if (m_simStart)
@@ -242,7 +242,7 @@ void SimulationMovement::move()
m_actSegment.setPoints(participantPosUtm,
m_points.at(m_simMovement.nextPoint()));
step = m_actSegment;
DEBUG_LOG() << "m_simStart set m_actSegment"
DEBUG_LOG(m_logger) << "m_simStart set m_actSegment"
<< " p1: " << CentralEffectSimulation::debug(m_actSegment.p1())
<< " p2: " << CentralEffectSimulation::debug(m_actSegment.p2());
m_simStart = false;
@@ -250,7 +250,7 @@ void SimulationMovement::move()
if (m_segSpeed[m_simMovement.nextPoint()] <= 0.0)
{
DEBUG_LOG() << "move next point < 0";
DEBUG_LOG(m_logger) << "move next point < 0";
return;
}
@@ -261,7 +261,7 @@ void SimulationMovement::move()
if (step.length() >= m_actSegment.length() + 0.1 ||
step.length() < 0.1) // 0.1 Magic Number but 10 cm distance to Point is arrived
{
DEBUG_LOG() << "move ready step.length()=" << step.length()
DEBUG_LOG(m_logger) << "move ready step.length()=" << step.length()
<< " m_actSegment.length()=" << m_actSegment.length();
m_simMovement.nextPoint(m_simMovement.nextPoint() + 1);
if (m_simMovement.nextPoint() >= m_points.size())
@@ -275,7 +275,7 @@ void SimulationMovement::move()
}
}
updateNextPointInDb();
DEBUG_LOG() << "ready move participantId = " << m_simMovement.participantId()
DEBUG_LOG(m_logger) << "ready move participantId = " << m_simMovement.participantId()
<< " m_nextPoint =" << m_simMovement.nextPoint()
<< " newPos =" << m_newPos.x() << "/" << m_newPos.y()
<< " m_moveTime=" << m_moveTime
@@ -291,7 +291,7 @@ void SimulationMovement::move()
return;
}
m_newPos = step.p2();
DEBUG_LOG() << "move participantId = " << m_simMovement.participantId()
DEBUG_LOG(m_logger) << "move participantId = " << m_simMovement.participantId()
<< " m_nextPoint =" << m_simMovement.nextPoint()
<< " newPos =" << m_newPos.x() << "/" << m_newPos.y()
<< " m_moveTime=" << m_moveTime