Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -3,7 +3,7 @@
#include "aes_handler.h"
#include <utility>
#include "DDS/Core/function_reply_object.h"
#include "DDS/Core/core_types.h"
#include "aes.hpp"
#include "json_dispatcher.h"
#include <QJsonArray>
@@ -31,7 +31,6 @@ namespace AdlerJson
AesHandler::AesHandler(std::shared_ptr<TrainingAreaBase::Interface::Fts> ftsTab, QObject *parent)
: QObject(parent)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("AesHandler"))
{
Q_UNUSED(ftsTab)
}
@@ -48,24 +47,24 @@ bool AesHandler::init(MainDispatcher *mainDispatcher)
if (!m_ftcAes->enableAirSupportImpactModify() || !m_dtcAes->enableExplosionSingle())
{
ERROR_LOG(m_logger) << "Can not enableAirSupportImpactModify or enableExplosionSingle";
ERROR_LOG() << "Can not enableAirSupportImpactModify or enableExplosionSingle";
}
if (!m_dtcAes->enableExplosionCluster() || !m_ftcAes->enableExplosionClusterModify() || !m_ftcAes->enableExplosionClusterReleaseReceived()
|| !m_ftcAes->enableExplosionClusterPauseResume() || !m_ftcAes->enableTrajectoryAdlerModify() || !m_ftcAes->enableEffectClusterFireHalt())
{
ERROR_LOG(m_logger) << "Can not enableExplosionCluster or enableExplosionClusterModify";
ERROR_LOG() << "Can not enableExplosionCluster or enableExplosionClusterModify";
}
if (!m_dtcAes->enableEffectCluster() || !m_ftcAes->enableEffectClusterModify() || !m_ftcAes->enableEffectClusterReleaseReceived()
|| !m_ftcAes->enableEffectClusterPauseResume() || !m_ftcAes->enableEffectClusterRemove())
{
ERROR_LOG(m_logger) << "Can not enableEffectnCluster or enableEffectClusterModify";
ERROR_LOG() << "Can not enableEffectnCluster or enableEffectClusterModify";
}
DEBUG_LOG(m_logger) << "------ Connect Explosion Single Changed ------- ";
DEBUG_LOG() << "------ Connect Explosion Single Changed ------- ";
connect(m_dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::explosionSingleChanged, this, &AesHandler::onExplosionSingleChanged);
connect(m_dtcAes.get(), &AreaEffectSimulation::Interface::Dtc::effectClusterChanged, this, &AesHandler::onEffectClusterChanged);
@@ -74,24 +73,24 @@ bool AesHandler::init(MainDispatcher *mainDispatcher)
void AesHandler::onOffRouteMineModifyReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG(m_logger) << "onOffRouteMineModifyReply"
DEBUG_LOG() << "onOffRouteMineModifyReply"
<< ", replyObject.id :" << replyObject.id() << ", str :" << replyObject.str() << ", tanslated :" << replyObject.translated();
};
void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG(m_logger) << "onEffectClusterModifyReply"
DEBUG_LOG() << "onEffectClusterModifyReply"
<< ", replyObject.id :" << replyObject.id() << ", str :" << replyObject.str() << ", tanslated :" << replyObject.translated()
<< ", additinal Info :" << replyObject.additionalInfo();
m_requestHelper->requestReply(replyObject);
DEBUG_LOG(m_logger) << "Got Reply";
DEBUG_LOG() << "Got Reply";
if (replyObject.error())
{
DEBUG_LOG(m_logger) << "Got onEffectClusterModifyReply ERROR: " << replyObject.translated();
DEBUG_LOG() << "Got onEffectClusterModifyReply ERROR: " << replyObject.translated();
ExTqTechnischeQuittung extq;
extq.technischeDaten.beschreibung = replyObject.translated();
extq.technischeDaten.status = Status_L32::DAT;
@@ -101,11 +100,11 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
}
QJsonObject propertiesObject = QJsonDocument::fromJson(QByteArray::fromStdString(replyObject.additionalInfo())).object();
ERROR_LOG(m_logger) << "Try send notification0";
ERROR_LOG() << "Try send notification0";
m_aesId = replyObject.id();
ProjectDataManagement::EffectSource effectSource
= static_cast<ProjectDataManagement::EffectSource::type>(propertiesObject.value(QStringLiteral("effectSource")).toInt());
ERROR_LOG(m_logger) << "Try send notification1 " << effectSource;
ERROR_LOG() << "Try send notification1 " << effectSource;
if (effectSource != ProjectDataManagement::EffectSource::ES_ADLER)
return;
@@ -182,14 +181,14 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
m_mainDispatcher->ddsHandler()->ftcNom()->createNotificationRequest(req, this);
}
else
WARNING_LOG(m_logger) << "No recipent found for exercise";
WARNING_LOG() << "No recipent found for exercise";
}
void AesHandler::onCreateNotificationReply(const Core::FunctionReplyObject &replyObject)
{
if (replyObject.error())
ERROR_LOG(m_logger) << "Got onCreateNotificationReply ERROR: " << replyObject.translated();
ERROR_LOG() << "Got onCreateNotificationReply ERROR: " << replyObject.translated();
}
bool AesHandler::sendAesModifyRequest(const QJsonObject &data)
@@ -248,7 +247,7 @@ void AesHandler::handleCreateSingleExplosion(const TrainingAreaBase::TetraIcd::C
{
auto strFromObj = QJsonDocument(data.toJson()).toJson(QJsonDocument::Compact);
m_singleExplosions.insert(data.aesDdsId, AreaEffectSimulation::AesEffectState_def::EsCreated);
DEBUG_LOG(m_logger) << "TEST SINGLE EXPLOSION CREATED " << strFromObj;
DEBUG_LOG() << "TEST SINGLE EXPLOSION CREATED " << strFromObj;
}
void AesHandler::handleEXFire(const Feuerkampfdaten &data, int wsId)
@@ -281,7 +280,7 @@ void AesHandler::handleEXDontFire(const Feuerkampfdaten &data, int wsId)
const auto saa = m_mainDispatcher->jsonDispatcher()->getSAAByWs(wsId);
DEBUG_LOG(m_logger) << "[EX-FQ(nFN)] data from SSA " << wsId << " : "
DEBUG_LOG() << "[EX-FQ(nFN)] data from SSA " << wsId << " : "
<< "verein: " << data.verein << " "
<< "kenner: " << data.kenner.underlying() << " "
<< "feuerkampfReferenz: " << data.feuerkampfReferenz;
@@ -296,18 +295,18 @@ void AesHandler::handleEXDontFire(const Feuerkampfdaten &data, int wsId)
void AesHandler::onTrajectoryAdlerModifyReply(const Core::FunctionReplyObject &reply)
{
DEBUG_LOG(m_logger) << "onTrajectoryAdlerModifyReply"
DEBUG_LOG() << "onTrajectoryAdlerModifyReply"
<< ", aesId :" << reply.id() << ", str :" << reply.str() << ", m_wirkmittelIndex :" << m_wirkmittelIndex
<< ", m_data.feuerkommando.wirkmittel.size() :" << m_wirkfeldPlanungsData.feuerkommando.wirkmittel.size();
if (reply.error())
ERROR_LOG(m_logger) << reply.translated();
ERROR_LOG() << reply.translated();
if (m_wirkmittelIndex == m_wirkfeldPlanungsData.feuerkommando.wirkmittel.size() - 1)
{
DEBUG_LOG(m_logger) << "TAB->SAA EX-MQ"
DEBUG_LOG() << "TAB->SAA EX-MQ"
<< ", feuerkampfReferenz :" << m_wirkfeldPlanungsData.feuerkampfReferenz;
DEBUG_LOG(m_logger) << "onTrajectoryAdlerModifyReply " << reply.id();
DEBUG_LOG() << "onTrajectoryAdlerModifyReply " << reply.id();
ExFeuerbereit exFB;
exFB.feuerkampfdaten.feuerkampfReferenz = m_wirkfeldPlanungsData.feuerkampfReferenz;
@@ -319,7 +318,7 @@ void AesHandler::onTrajectoryAdlerModifyReply(const Core::FunctionReplyObject &r
if (m_wirkmittelIndex < m_wirkfeldPlanungsData.feuerkommando.wirkmittel.size() - 1)
{
m_wirkmittelIndex++;
DEBUG_LOG(m_logger) << "sendTrajectoryAdlerModifyRequest"
DEBUG_LOG() << "sendTrajectoryAdlerModifyRequest"
<< ", m_participantId :" << m_participantId << ", m_wirkmittelIndex :" << m_wirkmittelIndex << ", m_aesId :" << m_aesId;
sendTrajectoryAdlerModifyRequest(m_wirkfeldPlanungsData, m_participantId, m_wirkmittelIndex, m_aesId);
}
@@ -328,7 +327,7 @@ void AesHandler::onTrajectoryAdlerModifyReply(const Core::FunctionReplyObject &r
void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &data, int participantId, int wirkmittelIndex, int aesId)
{
DEBUG_LOG(m_logger) << "sendTrajectoryAdlerModifyRequest"
DEBUG_LOG() << "sendTrajectoryAdlerModifyRequest"
<< ", participantId :" << participantId << ", wirkmittelIndex :" << wirkmittelIndex << ", aesId:" << aesId;
std::vector<Core::RelativePositionRelativeTime> geometryRef;
geometryRef.clear();
@@ -339,7 +338,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
for (int subordinate : std::as_const(subordinates))
{
DEBUG_LOG(m_logger) << "subordinates(" << participantId << ") :" << subordinate;
DEBUG_LOG() << "subordinates(" << participantId << ") :" << subordinate;
subordinatePositions.append(m_dtcPpm->participantPosition(subordinate));
}
@@ -386,10 +385,10 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
matrix.rotate(-grad);
QPointF point(pntGeo.x(), pntGeo.y());
DEBUG_LOG(m_logger) << " POS bevore rot: " << point;
DEBUG_LOG() << " POS bevore rot: " << point;
auto rotatePoint = matrix.map(point);
DEBUG_LOG(m_logger) << " POS after rot: " << rotatePoint;
DEBUG_LOG() << " POS after rot: " << rotatePoint;
pntGeo.setX(rotatePoint.x());
pntGeo.setY(rotatePoint.y());
@@ -411,11 +410,11 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
impactPosition.z(data.zieldaten.koordinate.hoehe);
newRequest->impactPosition(impactPosition);
newRequest->geometry(geometryRef);
DEBUG_LOG(m_logger) << "geometryRef.size=" << geometryRef.size() << ", newRequest->geometry().size() :" << newRequest->geometry().size();
DEBUG_LOG() << "geometryRef.size=" << geometryRef.size() << ", newRequest->geometry().size() :" << newRequest->geometry().size();
if (newRequest->aesItemId() <= 0)
{
ERROR_LOG(m_logger) << "newRequest->aesItemId() <=0"
ERROR_LOG() << "newRequest->aesItemId() <=0"
<< ", aesItemId :" << newRequest->aesItemId();
return;
}
@@ -429,12 +428,12 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
{
DEBUG_LOG(m_logger) << "AesHandler::handleEffectCluster (Empfang WirkfeldplanungData)"
DEBUG_LOG() << "AesHandler::handleEffectCluster (Empfang WirkfeldplanungData)"
<< ", feuerkampfReferenz :" << data.feuerkampfReferenz << ", wirkmittel.size() :" << data.feuerkommando.wirkmittel.size();
if (!m_mainDispatcher->jsonDispatcher()->getSAAByWs(wsId))
{
ERROR_LOG(m_logger) << "!m_mainDispatcher->jsonDispatcher()->getSAAByWs(" << wsId << ") return";
ERROR_LOG() << "!m_mainDispatcher->jsonDispatcher()->getSAAByWs(" << wsId << ") return";
return;
}
const QString &verein = data.feuerkommando.verein;
@@ -449,7 +448,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
if (part.id() <= 0)
{
ERROR_LOG(m_logger) << "Got EffectClusterData for " << verein << " but unit not found";
ERROR_LOG() << "Got EffectClusterData for " << verein << " but unit not found";
return;
}
@@ -473,7 +472,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
AreaEffectSimulation::AesExplosionGeometry geometry = AreaEffectSimulation::AesExplosionGeometry::EgArea;
AreaEffectSimulation::Area area;
const bool createArea = data.zieldaten.breiteRadius == 0 && data.zieldaten.tiefe == 0;
ERROR_LOG(m_logger) << "create AREA??? " << createArea << " breite " << data.zieldaten.breiteRadius << " tiefe " << data.zieldaten.tiefe;
ERROR_LOG() << "create AREA??? " << createArea << " breite " << data.zieldaten.breiteRadius << " tiefe " << data.zieldaten.tiefe;
if (!createArea && data.zieldaten.geometrie == ProjectDataManagement::L4_TargetGeometry::Point)
{
@@ -486,7 +485,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
const int igniterFunctionId = m_mainDispatcher->pdmHandler()->getDtc()->getIgniterFunctionIdFromAdlerIgniterFunction(chargeData.zuenderFunktion);
const int impactRadius = m_mainDispatcher->pdmHandler()->getDtc()->impactRadius(chargeTypeId, igniterTypeId, igniterFunctionId);
DEBUG_LOG(m_logger) << "Impact Radius for " << chargeTypeId << " " << igniterTypeId << " " << igniterTypeId << " is " << impactRadius;
DEBUG_LOG() << "Impact Radius for " << chargeTypeId << " " << igniterTypeId << " " << igniterTypeId << " is " << impactRadius;
area.height(impactRadius * 2);
area.width(impactRadius * 2);
}
@@ -516,28 +515,28 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
const QPointF bl = QTransform().rotate(-area.rotation()).map(rect.topLeft());
const LtsCoordTrans::UtmCoordinate centerUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(centerPoint);
DEBUG_LOG(m_logger) << "centerUtm="
DEBUG_LOG() << "centerUtm="
<< ", x :" << centerUtm.x << ", y :" << centerUtm.y << ", zone :" << centerUtm.zone;
const QPointF &bottomLeft = centerUtm.geographic(bl);
DEBUG_LOG(m_logger) << "bl="
DEBUG_LOG() << "bl="
<< ", x :" << bl.x() << ", y :" << bl.y();
DEBUG_LOG(m_logger) << "bottomLeft="
DEBUG_LOG() << "bottomLeft="
<< ", x :" << bottomLeft.x() << ", y :" << bottomLeft.y();
area.cornerBottomLeft(Core::GeoPosition2D(bottomLeft.x(), bottomLeft.y()));
DEBUG_LOG(m_logger) << "area.cornerBottomLeft="
DEBUG_LOG() << "area.cornerBottomLeft="
<< ", lon :" << area.cornerBottomLeft().lon() << ", lat :" << area.cornerBottomLeft().lat();
const LtsCoordTrans::UtmCoordinate cornerBottomLeftUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(area.cornerBottomLeft().lon(), area.cornerBottomLeft().lat());
DEBUG_LOG(m_logger) << "cornerBottomLeftUtm="
DEBUG_LOG() << "cornerBottomLeftUtm="
<< ", x :" << cornerBottomLeftUtm.x << ", y :" << cornerBottomLeftUtm.y << ", zone :" << cornerBottomLeftUtm.zone;
}
else
{
DEBUG_LOG(m_logger) << " Need to generate area";
DEBUG_LOG() << " Need to generate area";
if (data.feuerkommando.wirkmittel.size() == 1)
{
DEBUG_LOG(m_logger) << " Need to generate area SINGLE";
DEBUG_LOG() << " Need to generate area SINGLE";
geometry = AreaEffectSimulation::AesExplosionGeometry::EgPoint;
@@ -550,7 +549,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
const int igniterFunctionId = m_mainDispatcher->pdmHandler()->getDtc()->getIgniterFunctionIdFromAdlerIgniterFunction(chargeData.zuenderFunktion);
const int impactRadius = m_mainDispatcher->pdmHandler()->getDtc()->impactRadius(chargeTypeId, igniterTypeId, igniterFunctionId);
DEBUG_LOG(m_logger) << "Impact Radius for " << chargeTypeId << " " << igniterTypeId << " " << igniterTypeId << " is " << impactRadius;
DEBUG_LOG() << "Impact Radius for " << chargeTypeId << " " << igniterTypeId << " " << igniterTypeId << " is " << impactRadius;
area.height(impactRadius * 2);
area.width(impactRadius * 2);
@@ -562,25 +561,25 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
const QPointF bl = QTransform().rotate(-area.rotation()).map(rect.topLeft());
const LtsCoordTrans::UtmCoordinate centerUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(centerPoint);
DEBUG_LOG(m_logger) << "centerUtm="
DEBUG_LOG() << "centerUtm="
<< ", x :" << centerUtm.x << ", y :" << centerUtm.y << ", zone :" << centerUtm.zone;
const QPointF bottomLeft = centerUtm.geographic(bl);
DEBUG_LOG(m_logger) << "bl="
DEBUG_LOG() << "bl="
<< ", x :" << bl.x() << ", y :" << bl.y();
DEBUG_LOG(m_logger) << "bottomLeft="
DEBUG_LOG() << "bottomLeft="
<< ", x :" << bottomLeft.x() << ", y :" << bottomLeft.y();
area.cornerBottomLeft(Core::GeoPosition2D(bottomLeft.x(), bottomLeft.y()));
DEBUG_LOG(m_logger) << "area.cornerBottomLeft="
DEBUG_LOG() << "area.cornerBottomLeft="
<< ", lon :" << area.cornerBottomLeft().lon() << ", lat :" << area.cornerBottomLeft().lat();
const LtsCoordTrans::UtmCoordinate cornerBottomLeftUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(area.cornerBottomLeft().lon(), area.cornerBottomLeft().lat());
ERROR_LOG(m_logger) << "cornerBottomLeftUtm="
ERROR_LOG() << "cornerBottomLeftUtm="
<< ", x :" << cornerBottomLeftUtm.x << ", y :" << cornerBottomLeftUtm.y << ", zone :" << cornerBottomLeftUtm.zone;
}
else if (data.feuerkommando.wirkmittel.size() > 1)
{
DEBUG_LOG(m_logger) << " Need to generate area AREA";
DEBUG_LOG() << " Need to generate area AREA";
geometry = AreaEffectSimulation::AesExplosionGeometry::EgArea;
@@ -591,7 +590,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
const int igniterFunctionId = m_mainDispatcher->pdmHandler()->getDtc()->getIgniterFunctionIdFromAdlerIgniterFunction(chargeData.zuenderFunktion);
const int impactRadius = m_mainDispatcher->pdmHandler()->getDtc()->impactRadius(chargeTypeId, igniterTypeId, igniterFunctionId);
DEBUG_LOG(m_logger) << "Impact Radius for " << chargeTypeId << " " << igniterTypeId << " " << igniterTypeId << " is " << impactRadius;
DEBUG_LOG() << "Impact Radius for " << chargeTypeId << " " << igniterTypeId << " " << igniterTypeId << " is " << impactRadius;
QList<AreaEffectSimulation::Area> areas;
@@ -629,11 +628,11 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
area = createMinimumRect(zone, vecPoints);
DEBUG_LOG(m_logger) << "FINAL AREA " << area.cornerBottomLeft() << " " << area.height() << " " << area.width();
DEBUG_LOG() << "FINAL AREA " << area.cornerBottomLeft() << " " << area.height() << " " << area.width();
}
else if (data.feuerkommando.wirkmittelRakete.size() > 0)
{
DEBUG_LOG(m_logger) << " Need to generate area AREA";
DEBUG_LOG() << " Need to generate area AREA";
geometry = AreaEffectSimulation::AesExplosionGeometry::EgArea;
@@ -678,7 +677,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
area = createMinimumRect(zone, vecPoints);
DEBUG_LOG(m_logger) << "FINAL AREA " << area.cornerBottomLeft() << " " << area.height() << " " << area.width();
DEBUG_LOG() << "FINAL AREA " << area.cornerBottomLeft() << " " << area.height() << " " << area.width();
}
}
@@ -726,9 +725,9 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
effectorData.chargeStruct().igniterTypeId() = m_mainDispatcher->pdmHandler()->getDtc()->getIgniterTypeIdFromAdlerIgniter(effectorAdler.geschoss.zuender);
effectorData.chargeStruct().igniterFunctionId()
= m_mainDispatcher->pdmHandler()->getDtc()->getIgniterFunctionIdFromAdlerIgniterFunction(effectorAdler.geschoss.zuenderFunktion);
DEBUG_LOG(m_logger) << "FOUND chargeTypeId " << effectorData.chargeStruct().chargeTypeId() << " for " << effectorAdler.geschoss.geschosssorte;
DEBUG_LOG(m_logger) << "igniterTypeId: " << effectorData.chargeStruct().igniterTypeId();
DEBUG_LOG(m_logger) << "igniterFunctionId: " << effectorData.chargeStruct().igniterFunctionId();
DEBUG_LOG() << "FOUND chargeTypeId " << effectorData.chargeStruct().chargeTypeId() << " for " << effectorAdler.geschoss.geschosssorte;
DEBUG_LOG() << "igniterTypeId: " << effectorData.chargeStruct().igniterTypeId();
DEBUG_LOG() << "igniterFunctionId: " << effectorData.chargeStruct().igniterFunctionId();
effectorData.participantId()
= m_dtcPpm->getParticipantByInternalName(part.partyId(), QString::fromStdString(part.name()), waffensystemkennerMap.key(effectorAdler.kenner)).id();
std::vector<Core::RelativePositionRelativeTime> flightCurve;
@@ -736,20 +735,20 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
const auto &startPos = m_dtcPpm->participantPosition(effectorData.participantId());
const auto coordStart = LtsCoordTrans::UtmCoordinate::fromGeographic(startPos.pos().lon(), startPos.pos().lat());
DEBUG_LOG(m_logger) << "Start point: " << coordStart;
DEBUG_LOG() << "Start point: " << coordStart;
const auto coordEnd = LtsCoordTrans::UtmCoordinate::fromGeographic(effectorAdler.auftreffpunkt.koordinate.longitude * (M_PI / 180.0),
effectorAdler.auftreffpunkt.koordinate.latitude * (M_PI / 180.0));
DEBUG_LOG(m_logger) << "End point: " << coordEnd;
DEBUG_LOG() << "End point: " << coordEnd;
LtsCoordTrans::UtmCoordinate coordDiff = coordEnd;
coordDiff.x = coordDiff.x - coordStart.x;
coordDiff.y = coordDiff.y - coordStart.y;
DEBUG_LOG(m_logger) << "Last point: " << coordDiff.x << " " << coordDiff.y;
DEBUG_LOG(m_logger) << "Last point ATAN: " << std::atan2(coordDiff.y, coordDiff.x);
DEBUG_LOG() << "Last point: " << coordDiff.x << " " << coordDiff.y;
DEBUG_LOG() << "Last point ATAN: " << std::atan2(coordDiff.y, coordDiff.x);
const double useNewGrad = -90 + std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
DEBUG_LOG(m_logger) << "Atan2 Deg to: last point " << std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
DEBUG_LOG() << "Atan2 Deg to: last point " << std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
for (const auto &flightPointAdler : std::as_const(effectorAdler.flugbahnpunkt))
{
@@ -762,10 +761,10 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
QTransform matrix;
matrix.rotate(useNewGrad);
const QPointF point(flightPoint.offsetX(), flightPoint.offsetY());
TRACE_LOG(m_logger) << " POS bevore rot: " << point;
TRACE_LOG() << " POS bevore rot: " << point;
const auto rotatePoint = matrix.map(point);
TRACE_LOG(m_logger) << " POS after rot: " << rotatePoint;
TRACE_LOG() << " POS after rot: " << rotatePoint;
flightPoint.offsetX() = rotatePoint.x();
flightPoint.offsetY() = rotatePoint.y();
@@ -786,8 +785,8 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
effectorData.mhpScatterLengthDetonationHeight() = effectorAdler.streuung.laengsstreuungH;
effectorData.mhpScatterWidth() = effectorAdler.streuung.seitenstreuung;
effectorData.mhpScatterWidthDetonationHeight() = effectorAdler.streuung.seitenstreuungH;
DEBUG_LOG(m_logger) << effectorAdler.kenner;
DEBUG_LOG(m_logger) << "Looking for participantID with stats = party: " << part.partyId() << " unitname: " << part.name()
DEBUG_LOG() << effectorAdler.kenner;
DEBUG_LOG() << "Looking for participantID with stats = party: " << part.partyId() << " unitname: " << part.name()
<< " effectorname: " << waffensystemkennerMap.key(effectorAdler.kenner);
effectorData.peakHeight() = effectorAdler.gipfelhoehe;
effectorVec.push_back(effectorData);
@@ -810,14 +809,14 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
effectorData.chargeStruct().igniterFunctionId()
= m_mainDispatcher->pdmHandler()->getDtc()->getIgniterFunctionIdFromAdlerIgniterFunction(effectorAdler.geschoss.zuenderFunktion);
DEBUG_LOG(m_logger) << "FOUND chargeTypeId " << effectorData.chargeStruct().chargeTypeId() << " for " << effectorAdler.geschoss.geschosssorte;
DEBUG_LOG(m_logger) << "igniterTypeId: " << effectorData.chargeStruct().igniterTypeId();
DEBUG_LOG(m_logger) << "igniterFunctionId: " << effectorData.chargeStruct().igniterFunctionId();
DEBUG_LOG() << "FOUND chargeTypeId " << effectorData.chargeStruct().chargeTypeId() << " for " << effectorAdler.geschoss.geschosssorte;
DEBUG_LOG() << "igniterTypeId: " << effectorData.chargeStruct().igniterTypeId();
DEBUG_LOG() << "igniterFunctionId: " << effectorData.chargeStruct().igniterFunctionId();
effectorData.participantId()
= m_dtcPpm->getParticipantByInternalName(part.partyId(), QString::fromStdString(part.name()), waffensystemkennerMap.key(effectorAdler.kenner)).id();
if (effectorData.participantId() == 0)
WARNING_LOG(m_logger) << "Could not find participant for partiyId " << part.partyId() << ", name " << part.name() << ", kenner " << effectorAdler.kenner;
WARNING_LOG() << "Could not find participant for partiyId " << part.partyId() << ", name " << part.name() << ", kenner " << effectorAdler.kenner;
effectorData.chargeStruct().igniterTypeId() = m_mainDispatcher->pdmHandler()->getDtc()->getIgniterTypeIdFromAdlerIgniter(effectorAdler.geschoss.zuender);
effectorData.interval() = effectorAdler.geschoss.intervall;
@@ -853,7 +852,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
AreaEffectSimulation::TrajectoryGeoPosition trajectoryWithoutTime;
if (!AreaEffectSimulation::TrajectoryGenerator::getInstance()->generateTrajectoryBiedziak(trajectoryStart, trajectoryEnd, 45.0, trajectoryWithoutTime))
ERROR_LOG(m_logger) << "Could not create trajectory for Feuerkommando " << data.feuerkommando.verein;
ERROR_LOG() << "Could not create trajectory for Feuerkommando " << data.feuerkommando.verein;
@@ -898,12 +897,12 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
req.tla(data.zieldaten.zog);
if (data.feuerkommando.wirkmittel.empty())
DEBUG_LOG(m_logger) << "flugzeit :"
DEBUG_LOG() << "flugzeit :"
<< " -";
else
DEBUG_LOG(m_logger) << "flugzeit :" << data.feuerkommando.wirkmittel.at(0).flugzeit;
DEBUG_LOG() << "flugzeit :" << data.feuerkommando.wirkmittel.at(0).flugzeit;
DEBUG_LOG(m_logger) << "SEND " << data.feuerkampfReferenz << " ";
DEBUG_LOG() << "SEND " << data.feuerkampfReferenz << " ";
int ammoCounter = 0;
std::vector<ProjectDataManagement::L27_EffectorId> refWirkmittel;
refWirkmittel.reserve(data.feuerkommando.wirkmittel.size());
@@ -911,7 +910,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
for (const auto &wm : std::as_const(data.feuerkommando.wirkmittel))
{
ammoCounter += wm.geschoss.anzahl;
DEBUG_LOG(m_logger) << "INSERT KENNER INTO MAP: " << data.feuerkampfReferenz << "---------" << wm.kenner;
DEBUG_LOG() << "INSERT KENNER INTO MAP: " << data.feuerkampfReferenz << "---------" << wm.kenner;
refWirkmittel.push_back(wm.kenner);
}
@@ -967,7 +966,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
bool outOfAmmo = false;
const int newAmmoAmount = std::max(0, refAmmoCounter - 1);
DEBUG_LOG(m_logger) << "Handle ammo count - ID: " << aes.id() << " | Ref: " << refTrimmed << " | PartyID: " << saaPartyId << " | oldAmmoCount: " << refAmmoCounter
DEBUG_LOG() << "Handle ammo count - ID: " << aes.id() << " | Ref: " << refTrimmed << " | PartyID: " << saaPartyId << " | oldAmmoCount: " << refAmmoCounter
<< " | newAmmoCount: " << newAmmoAmount;
if (newAmmoAmount <= 0)
@@ -992,7 +991,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
exvm.feuerkampfdaten.kenner = kenner;
exvm.feuerkampfdaten.verein = data.verein;
DEBUG_LOG(m_logger) << "------------ SENDE ExVollzugsmeldung für ------------ " << kenner;
DEBUG_LOG() << "------------ SENDE ExVollzugsmeldung für ------------ " << kenner;
m_mainDispatcher->jsonDispatcher()->sendExVollzugsmeldung(exvm, saaPartyId);
}
@@ -1015,15 +1014,15 @@ void AesHandler::removeAllPendingEffectCluster(int partyId)
if (effectClusterIds.isEmpty())
return;
INFO_LOG(m_logger) << "Pending effect cluster size: " << effectClusterIds.size();
INFO_LOG() << "Pending effect cluster size: " << effectClusterIds.size();
Core::RemoveElementRequest req;
for (const qint32 id : std::as_const(effectClusterIds))
{
req.id(id);
INFO_LOG(m_logger) << "Remove effect cluster id: " << id;
INFO_LOG() << "Remove effect cluster id: " << id;
qint32 ret = m_ftcAes->effectClusterRemoveRequest(req);
INFO_LOG(m_logger) << "m_ftsAes->effectClusterRemoveRequest(req) --> " << ret;
INFO_LOG() << "m_ftsAes->effectClusterRemoveRequest(req) --> " << ret;
}
}
@@ -1047,13 +1046,13 @@ void AesHandler::onExplosionSingleChanged(const AreaEffectSimulation::ExplosionS
if (modType == DataModification::eRemoved)
{
DEBUG_LOG(m_logger) << "----------------- remove area ------------- ";
DEBUG_LOG() << "----------------- remove area ------------- ";
m_singleExplosions.remove(data.id());
return;
}
if (modType == DataModification::eAdded)
{
DEBUG_LOG(m_logger) << "----------------- add area ------------- " << data.effectStateId();
DEBUG_LOG() << "----------------- add area ------------- " << data.effectStateId();
m_singleExplosions.insert(data.id(), data.effectStateId());
return;
}
@@ -1061,7 +1060,7 @@ void AesHandler::onExplosionSingleChanged(const AreaEffectSimulation::ExplosionS
&& m_singleExplosions.value(data.id(), AreaEffectSimulation::AesEffectState::EsActivated) != AreaEffectSimulation::AesEffectState_def::EsActivated)
{
const auto state = data.effectStateId();
DEBUG_LOG(m_logger) << "----------------- switch state ------------- " << state;
DEBUG_LOG() << "----------------- switch state ------------- " << state;
m_singleExplosions.insert(data.id(), state);
QJsonObject telegram;
telegram[QStringLiteral("typeId")] = 80082;
@@ -1090,12 +1089,12 @@ void AesHandler::onExplosionSingleChanged(const AreaEffectSimulation::ExplosionS
void AesHandler::onEffectClusterChanged(const AreaEffectSimulation::EffectCluster &data, DataModification modType)
{
DEBUG_LOG(m_logger) << "Try auto handle effectCluster: " << data.name();
DEBUG_LOG() << "Try auto handle effectCluster: " << data.name();
if (modType == DataModification::eRemoved)
return;
DEBUG_LOG(m_logger) << "Try auto handle effectCluster: probs: " << data.properties();
DEBUG_LOG() << "Try auto handle effectCluster: probs: " << data.properties();
if (data.properties().empty())
return;
@@ -1103,20 +1102,20 @@ void AesHandler::onEffectClusterChanged(const AreaEffectSimulation::EffectCluste
if (!data.partyId().is_set())
return;
DEBUG_LOG(m_logger) << "has PARTY " << data.properties();
DEBUG_LOG() << "has PARTY " << data.properties();
if (!data.participantId().is_set())
return;
if (data.effectSourceId() != ProjectDataManagement::EffectSource::ES_ADLER)
return;
DEBUG_LOG(m_logger) << "has PARTICIPANTID " << data.properties();
DEBUG_LOG() << "has PARTICIPANTID " << data.properties();
QJsonObject propertiesObject = QJsonDocument::fromJson(QByteArray::fromStdString(data.properties())).object();
if (!propertiesObject.value(QStringLiteral("useReceived")).toBool())
return;
DEBUG_LOG(m_logger) << "has USE RECEIVED " << data.effectStateId().underlying();
DEBUG_LOG() << "has USE RECEIVED " << data.effectStateId().underlying();
switch (data.effectStateId().underlying())
{
@@ -1137,7 +1136,7 @@ void AesHandler::onEffectClusterChanged(const AreaEffectSimulation::EffectCluste
m_aesIdToFeuerkampfReferenz.remove(data.id());
DEBUG_LOG(m_logger) << "SEND MQ for " << data.name() << " " << reference;
DEBUG_LOG() << "SEND MQ for " << data.name() << " " << reference;
break;
}
}