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:
2785 files changed
+18754
-18316
No files matched your search
+91
-91
@@ -33,34 +33,34 @@ GeoPairing::GeoPairing(const std::shared_ptr<N_Ballistic::BallisticService> &bal
|
||||
m_ballisticService(ballisticService)
|
||||
, m_logger(CesGeoPairing::getLogger("Plugin.GeoPairing.GeoPairing"))
|
||||
{
|
||||
INFO_LOG(m_logger) << "konfigPath = " << ballisticService->getConfigPath() ;
|
||||
INFO_LOG() << "konfigPath = " << ballisticService->getConfigPath() ;
|
||||
|
||||
const QString s_configPath = ballisticService->getConfigPath();
|
||||
INFO_LOG(m_logger) << "GeoPairing Config location : " << s_configPath ;
|
||||
INFO_LOG() << "GeoPairing Config location : " << s_configPath ;
|
||||
|
||||
GeoPairingImpl *l_impl = new GeoPairingImplDted;
|
||||
INFO_LOG(m_logger) << "--> Installing GeoPairingImplDted..." ;
|
||||
INFO_LOG() << "--> Installing GeoPairingImplDted..." ;
|
||||
GeoPairingImplFactory::setImpl(l_impl);
|
||||
readAmmunitionIni();
|
||||
|
||||
// initialize the GeoPairing implementation
|
||||
if (!GeoPairingImplFactory::initialize(s_configPath))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplDted!" ;
|
||||
ERROR_LOG() << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplDted!" ;
|
||||
|
||||
l_impl = new GeoPairingImplBalistic();
|
||||
INFO_LOG(m_logger) << "--> Installing GeoPairingImplBalistic...";
|
||||
INFO_LOG() << "--> Installing GeoPairingImplBalistic...";
|
||||
GeoPairingImplFactory::setImpl(l_impl);
|
||||
if (!GeoPairingImplFactory::initialize(s_configPath))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplBalistic!" ;
|
||||
ERROR_LOG() << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplBalistic!" ;
|
||||
abort();
|
||||
}
|
||||
else
|
||||
INFO_LOG(m_logger) << "GeoPairingImplBalistic correctly initialized" ;
|
||||
INFO_LOG() << "GeoPairingImplBalistic correctly initialized" ;
|
||||
}
|
||||
else
|
||||
INFO_LOG(m_logger) << "GeoPairingImplDted correctly initialized" ;
|
||||
INFO_LOG() << "GeoPairingImplDted correctly initialized" ;
|
||||
|
||||
#ifdef _PSEUDO_TARGETS_
|
||||
// initial lat long position
|
||||
@@ -110,24 +110,24 @@ GeoPairing::GeoPairing(const std::shared_ptr<N_Ballistic::BallisticService> &bal
|
||||
|
||||
#endif
|
||||
|
||||
INFO_LOG(m_logger) << "Initialization finished";
|
||||
INFO_LOG() << "Initialization finished";
|
||||
}
|
||||
|
||||
void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
const QHash<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> &aircrafts)
|
||||
{
|
||||
INFO_LOG(m_logger) << "calculateAirFire (IGLA)..." ;
|
||||
INFO_LOG() << "calculateAirFire (IGLA)..." ;
|
||||
|
||||
GeoPairingDataFireReport l_Report;
|
||||
if (!l_Report.parse(transparentData))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Error: Couldn't parse Fire Report" ;
|
||||
WARNING_LOG() << "Error: Couldn't parse Fire Report" ;
|
||||
return;
|
||||
}
|
||||
|
||||
if (aircrafts.size() == 0)
|
||||
{
|
||||
INFO_LOG(m_logger) << "No Aircraft available";
|
||||
INFO_LOG() << "No Aircraft available";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
SInt32 vulnerabilityState = i.value().vulnerabilityState.underlying();
|
||||
Float64 lat = i.value().pos().lat() * 180 / M_PI;
|
||||
Float64 lon = i.value().pos().lon() * 180 / M_PI;
|
||||
DEBUG_LOG(m_logger) << "GeoPairing::calculateAirFire"
|
||||
DEBUG_LOG() << "GeoPairing::calculateAirFire"
|
||||
<< "\nl_Updater->update : " << i.key()
|
||||
<< "\n: participantId=" << i.value().participantId()
|
||||
<< "\n participantTypeId= " << i.value().participantTypeId()
|
||||
@@ -164,7 +164,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
l_SensorData.FireTime = m_Time;
|
||||
l_SensorData.WeaponElevation = 0;
|
||||
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire (createSensorData)"
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire (createSensorData)"
|
||||
<< "\nl_SensorData.WeaponPositionLat = " << l_SensorData.WeaponPositionLat
|
||||
<< "\nl_SensorData.WeaponPositionLong = " << l_SensorData.WeaponPositionLong
|
||||
<< "\nl_SensorData.WeaponAzimuth=" << l_SensorData.WeaponAzimuth
|
||||
@@ -173,11 +173,11 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
;
|
||||
SInt32 l_DeviceID = GeoPairingImplFactory::createSensorData(&l_SensorData, transparentData);
|
||||
|
||||
INFO_LOG(m_logger) << "createSensorData -> SensorData.WeaponAzimuth=" << l_SensorData.WeaponAzimuth
|
||||
INFO_LOG() << "createSensorData -> SensorData.WeaponAzimuth=" << l_SensorData.WeaponAzimuth
|
||||
<< "\nl_SensorData.WeaponElevation=" << l_SensorData.WeaponElevation;
|
||||
if (l_DeviceID == -1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Couldn't create SensorData" ;
|
||||
ERROR_LOG() << "Couldn't create SensorData" ;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -189,14 +189,14 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
|
||||
if (l_Report.m_DeviceID == PAN_GP_REQUEST_IGLA)
|
||||
{
|
||||
INFO_LOG(m_logger) << " -> IGLA : Request Target Detection " ;
|
||||
INFO_LOG() << " -> IGLA : Request Target Detection " ;
|
||||
|
||||
QScopedPointer<GeoPairingImplAirTargetCache> l_Cache(GeoPairingImplFactory::createAirTargetCache(m_equipmentNumber));
|
||||
|
||||
int l_TargetPlayerId = 0;
|
||||
uint64_t l_ImpactTime = 0;
|
||||
|
||||
INFO_LOG(m_logger) << "-> IGLA : Request Target Detection -> searchAirTarget (vor dem aufruf)"
|
||||
INFO_LOG() << "-> IGLA : Request Target Detection -> searchAirTarget (vor dem aufruf)"
|
||||
<< "\nl_Elevation = " << l_Elevation
|
||||
<< "\nl_Azimuth = " << l_Azimuth
|
||||
;
|
||||
@@ -204,7 +204,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
|
||||
bool l_TargetFound = searchAirTarget(l_Elevation, l_Azimuth, l_TargetPlayerId, l_ImpactTime);
|
||||
|
||||
INFO_LOG(m_logger) << "-> IGLA : Request Target Detection -> searchAirTarget (nach dem aufruf)"
|
||||
INFO_LOG() << "-> IGLA : Request Target Detection -> searchAirTarget (nach dem aufruf)"
|
||||
<< "\nl_TargetFound = " << l_TargetFound
|
||||
<< "\nl_TargetPlayerId = " << l_TargetPlayerId
|
||||
<< "\nl_ImpactTime = " << l_ImpactTime
|
||||
@@ -213,7 +213,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
bool l_CachedTrackingState = l_Cache->getLatestTrackState(l_TargetPlayerId);
|
||||
UInt32 l_CachedTrackingTime = l_Cache->getLatestTrackTime(l_TargetPlayerId);
|
||||
|
||||
INFO_LOG(m_logger) << "-> IGLA : Retrieved Target Detection Results from Cache"
|
||||
INFO_LOG() << "-> IGLA : Retrieved Target Detection Results from Cache"
|
||||
<< "\nl_CachedTrackingState = " << l_CachedTrackingState
|
||||
<< "\nl_CachedTrackingTime = " << l_CachedTrackingTime
|
||||
;
|
||||
@@ -239,26 +239,26 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
m_reportTarget.send = true;
|
||||
|
||||
// Richtung Gefechtsfeld
|
||||
INFO_LOG(m_logger) << "<-- EC : Report Target Detection " ;
|
||||
INFO_LOG(m_logger) << "Target Found : " << l_TargetFound ;
|
||||
INFO_LOG() << "<-- EC : Report Target Detection " ;
|
||||
INFO_LOG() << "Target Found : " << l_TargetFound ;
|
||||
|
||||
//m_geoPairingData->sendData(m_PlayerId, l_SendData.data(), l_SendData.size() );
|
||||
|
||||
l_Cache->storeLatestTrackState(l_TargetPlayerId, m_Time, l_TargetFound);
|
||||
}
|
||||
}
|
||||
INFO_LOG(m_logger) << "\n\nPAN_GP_REPORT_IGLA m_DeviceID=" << l_Report.m_DeviceID
|
||||
INFO_LOG() << "\n\nPAN_GP_REPORT_IGLA m_DeviceID=" << l_Report.m_DeviceID
|
||||
<< " PAN_GP_REPORT_IGLA=" << PAN_GP_REPORT_IGLA;
|
||||
if (l_Report.m_DeviceID == PAN_GP_REPORT_IGLA)
|
||||
{
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire " ;
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire " ;
|
||||
|
||||
int l_TargetPlayerId = 0;
|
||||
UInt64 l_ImpactTime = 0;
|
||||
|
||||
QScopedPointer<GeoPairingImplAirTargetTracker> l_Tracker(GeoPairingImplFactory::createAirTargetTracker());
|
||||
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire (l_Tracker->setPosition)"
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire (l_Tracker->setPosition)"
|
||||
<< "\nm_PositionLat = " << m_PositionLat
|
||||
<< "\nm_PositionLon = " << m_PositionLon
|
||||
<< "\nm_PositionHeight = " << m_PositionHeight
|
||||
@@ -266,12 +266,12 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
|
||||
l_Tracker->setPosition(m_PositionLat, m_PositionLon, m_PositionHeight);
|
||||
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire (setTime)"
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire (setTime)"
|
||||
<< "\nm_Time = " << m_Time ;
|
||||
|
||||
l_Tracker->setTime(m_Time);
|
||||
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire (vor l_Tracker->track)"
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire (vor l_Tracker->track)"
|
||||
<< "\nl_Azimuth = " << l_Azimuth
|
||||
<< "\nl_Elevation = " << l_Elevation
|
||||
<< "\nl_TargetPlayerId = " << l_TargetPlayerId
|
||||
@@ -280,7 +280,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
|
||||
bool l_TargetFound = l_Tracker->track(l_Azimuth, l_Elevation, l_TargetPlayerId, l_ImpactTime);
|
||||
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire (nach l_Tracker->track)"
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire (nach l_Tracker->track)"
|
||||
<< "\nl_TargetFound = " << l_TargetFound ;
|
||||
|
||||
if (l_TargetFound)
|
||||
@@ -295,17 +295,17 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
{
|
||||
//m_surfaceToAir->fire(l_TargetPlayerId, l_ImpactTime, l_AmmunitionType, m_PlayerId, true);
|
||||
m_fireToAircraft.hit = true;
|
||||
INFO_LOG(m_logger) << "Air Target " << l_TargetPlayerId << " in reach and hit" ;
|
||||
INFO_LOG() << "Air Target " << l_TargetPlayerId << " in reach and hit" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
//m_surfaceToAir->fire(l_TargetPlayerId, l_ImpactTime, l_AmmunitionType, m_PlayerId, false);
|
||||
m_fireToAircraft.hit = false;
|
||||
INFO_LOG(m_logger) << "Air Target " << l_TargetPlayerId << " in reach, but not hit" ;
|
||||
INFO_LOG() << "Air Target " << l_TargetPlayerId << " in reach, but not hit" ;
|
||||
}
|
||||
}
|
||||
else
|
||||
INFO_LOG(m_logger) << "No Air Target withing reach..." ;
|
||||
INFO_LOG() << "No Air Target withing reach..." ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
void GeoPairing::calculateAreaFire(const QByteArray &transparentData,
|
||||
const std::shared_ptr<N_Ballistic::BallisticService> &ballisticService)
|
||||
{
|
||||
INFO_LOG(m_logger) << "calculateAreaFire (MK19)..." ;
|
||||
INFO_LOG() << "calculateAreaFire (MK19)..." ;
|
||||
|
||||
// Prepare SensorData for Implementation
|
||||
GeoPairingImplSensorData l_SensorData;
|
||||
@@ -325,20 +325,20 @@ void GeoPairing::calculateAreaFire(const QByteArray &transparentData,
|
||||
GeoPairingDataFireReport l_Report;
|
||||
if (!l_Report.parse(transparentData))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error: Couldn't parse Fire Report" ;
|
||||
ERROR_LOG() << "Error: Couldn't parse Fire Report" ;
|
||||
return;
|
||||
}
|
||||
SInt32 l_DeviceID = GeoPairingImplFactory::createSensorData(&l_SensorData, transparentData);
|
||||
if (l_DeviceID == -1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Couldn't create SensorData" ;
|
||||
ERROR_LOG() << "Couldn't create SensorData" ;
|
||||
return;
|
||||
}
|
||||
|
||||
QScopedPointer<GeoPairingImplFiredBullet> l_FiredBullet(GeoPairingImplFactory::createFiredBullet(l_SensorData));
|
||||
if (l_FiredBullet == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error: Couldn't create FiredBullet object" ;
|
||||
ERROR_LOG() << "Error: Couldn't create FiredBullet object" ;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ void GeoPairing::calculateAreaFire(const QByteArray &transparentData,
|
||||
GeoPairingImplImpactData *l_ImpactData = l_FiredBullet->getImpactData();
|
||||
if (l_ImpactData == nullptr)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error: Couldn't create ImpactData object" ;
|
||||
ERROR_LOG() << "Error: Couldn't create ImpactData object" ;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -364,15 +364,15 @@ void GeoPairing::calculateAreaFire(const QByteArray &transparentData,
|
||||
case MK19Type_m385:
|
||||
l_AmmunitionType = N_Ballistic::MK19_M385;
|
||||
l_AmmunitionTypeOSAG = N_Ballistic::MK19_M385_OSAG;
|
||||
INFO_LOG(m_logger) << "Wirkfeld Ammunition MK19_M385" ;
|
||||
INFO_LOG() << "Wirkfeld Ammunition MK19_M385" ;
|
||||
break;
|
||||
case MK19Type_m430:
|
||||
l_AmmunitionType = N_Ballistic::MK19_M430;
|
||||
l_AmmunitionTypeOSAG = N_Ballistic::MK19_M430_OSAG;
|
||||
INFO_LOG(m_logger) << "Wirkfeld Ammunition MK19_M430" ;
|
||||
INFO_LOG() << "Wirkfeld Ammunition MK19_M430" ;
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(m_logger) << "Default Ammunition. Must not be called : " << l_SensorData.AmmunitionType ;
|
||||
ERROR_LOG() << "Default Ammunition. Must not be called : " << l_SensorData.AmmunitionType ;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ void GeoPairing::calculateAreaFire(const QByteArray &transparentData,
|
||||
m_areaFireToCtas.ammunitionTypeOSAG = l_AmmunitionTypeOSAG;
|
||||
m_areaFireToCtas.hit = true;
|
||||
|
||||
INFO_LOG(m_logger) << "calculateAreaFire m_equipmentNumber=" << m_equipmentNumber
|
||||
INFO_LOG() << "calculateAreaFire m_equipmentNumber=" << m_equipmentNumber
|
||||
<< " ImpactTime=" << l_ImpactData->ImpactTime
|
||||
<< " ImpactPositionLat=" << l_ImpactData->ImpactPositionLat
|
||||
<< " ImpactPositionLong=" << l_ImpactData->ImpactPositionLong
|
||||
@@ -431,7 +431,7 @@ void GeoPairing::calculateAreaFire(const QByteArray &transparentData,
|
||||
|
||||
void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const std::shared_ptr<N_Ballistic::BallisticService> &ballisticService)
|
||||
{
|
||||
INFO_LOG(m_logger) << "calculateSingleFire ..." ;
|
||||
INFO_LOG() << "calculateSingleFire ..." ;
|
||||
|
||||
ElevationError error_elevation = ElevationError::NoError;
|
||||
int error_charge = 0;
|
||||
@@ -446,10 +446,10 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
l_SensorData.IgnitionType = -1; // Unknown
|
||||
|
||||
SInt32 l_DeviceID = GeoPairingImplFactory::createSensorData(&l_SensorData, transparentData, error_mun);
|
||||
INFO_LOG(m_logger) << "l_DeviceID=" << l_DeviceID;
|
||||
INFO_LOG() << "l_DeviceID=" << l_DeviceID;
|
||||
if (l_DeviceID == -1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Couldn't create SensorData" ;
|
||||
ERROR_LOG() << "Couldn't create SensorData" ;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
QString pfadQstr = CesGeoPairing::Settings::cesGeopairingIniPath() + QStringLiteral("/");
|
||||
std::string pfad = pfadQstr.toStdString();
|
||||
std::string munart;
|
||||
INFO_LOG(m_logger) << "Vor switch AmmunitionType=" << l_SensorData.AmmunitionType
|
||||
INFO_LOG() << "Vor switch AmmunitionType=" << l_SensorData.AmmunitionType
|
||||
<< " ChargeType=" << l_SensorData.ChargeType;
|
||||
|
||||
// Ammunition HE-M1
|
||||
@@ -471,7 +471,7 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
{
|
||||
case HE_M1A2:
|
||||
{
|
||||
INFO_LOG(m_logger) << "HE_M1A2";
|
||||
INFO_LOG() << "HE_M1A2";
|
||||
switch (l_SensorData.ChargeType)
|
||||
{
|
||||
case 0:
|
||||
@@ -497,32 +497,32 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
case M60mm_m385:
|
||||
case M60mm_m430:
|
||||
{
|
||||
INFO_LOG(m_logger) << "M60mm_m385 M60mm_m430";
|
||||
INFO_LOG() << "M60mm_m385 M60mm_m430";
|
||||
switch (l_SensorData.IgnitionType) // ChargeType = Ladung...
|
||||
{
|
||||
// Todo: Umbenennen und ggf. Zuordnung korrigieren
|
||||
case 0:
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad1";
|
||||
INFO_LOG() << "Moerser-60mm-Lad1";
|
||||
munart = "Moerser-60mm-Lad1";
|
||||
break;
|
||||
case 1:
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad2";
|
||||
INFO_LOG() << "Moerser-60mm-Lad2";
|
||||
munart = "Moerser-60mm-Lad2";
|
||||
break;
|
||||
case 2:
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad3";
|
||||
INFO_LOG() << "Moerser-60mm-Lad3";
|
||||
munart = "Moerser-60mm-Lad3";
|
||||
break;
|
||||
case 3:
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad4";
|
||||
INFO_LOG() << "Moerser-60mm-Lad4";
|
||||
munart = "Moerser-60mm-Lad4";
|
||||
break;
|
||||
case 4:
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad5";
|
||||
INFO_LOG() << "Moerser-60mm-Lad5";
|
||||
munart = "Moerser-60mm-Lad5";
|
||||
break;
|
||||
case 5:
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-La6";
|
||||
INFO_LOG() << "Moerser-60mm-La6";
|
||||
munart = "Moerser-60mm-Lad6";
|
||||
break;
|
||||
default:
|
||||
@@ -532,7 +532,7 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
}
|
||||
case VLAP_M9703:
|
||||
{
|
||||
INFO_LOG(m_logger) << "VLAP_M9703";
|
||||
INFO_LOG() << "VLAP_M9703";
|
||||
// Sonderfall Ammunition VLAP-M64. Da hier nur 5 x M64 Incr als Ladung vorhanden ist.
|
||||
// Sollten wir eine andere Ladung aus dem Gefechtsfeld bekommen, dann Munition HE M1A2 benutzen
|
||||
switch (l_SensorData.ChargeType)
|
||||
@@ -610,7 +610,7 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
}
|
||||
if (munart.empty())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No valid charge type " << l_SensorData.ChargeType <<
|
||||
WARNING_LOG() << "No valid charge type " << l_SensorData.ChargeType <<
|
||||
" for ammunition " << l_SensorData.AmmunitionType <<
|
||||
" (internal ids!)" ;
|
||||
munart = "HE-M1-M64Base-TableE";
|
||||
@@ -618,7 +618,7 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
}
|
||||
|
||||
std::string suffix = ".sus";
|
||||
DEBUG_LOG(m_logger) << "schusstafel pfad=" << pfad
|
||||
DEBUG_LOG() << "schusstafel pfad=" << pfad
|
||||
<< " munart=" << munart
|
||||
<< " suffix=" << suffix;
|
||||
Schusstafel schusstafel(pfad, munart, suffix);
|
||||
@@ -647,10 +647,10 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
double elevationGrad = l_SensorData.WeaponElevation.getDegree();
|
||||
if (elevationGrad <= 0.0)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Elevation ist <= 0 Grad. Entfernung wird auf 50% des ersten Wertes aus der Schusstafel festgesetzt" ;
|
||||
INFO_LOG() << "Elevation ist <= 0 Grad. Entfernung wird auf 50% des ersten Wertes aus der Schusstafel festgesetzt" ;
|
||||
// Dazu aus der minimal moeglichen Elevation die Entfernung bestimmen und halbieren
|
||||
float minEval = mun.minEleval * MILRAD;
|
||||
DEBUG_LOG(m_logger) << "schusstafel tafelName=" << tafelName
|
||||
DEBUG_LOG() << "schusstafel tafelName=" << tafelName
|
||||
<< " minEval=" << minEval
|
||||
<< "zielhoehenwinkel=" << zielhoehenwinkel;
|
||||
|
||||
@@ -661,10 +661,10 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
}
|
||||
else if (elevationGrad >= 90.0)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Elevation ist >= 90 Grad. Entfernung wird auf den letzten Wert aus der Schusstafel festgesetzt" ;
|
||||
INFO_LOG() << "Elevation ist >= 90 Grad. Entfernung wird auf den letzten Wert aus der Schusstafel festgesetzt" ;
|
||||
// Dazu aus der maximal moeglichen Elevation die Entfernung bestimmen
|
||||
double maxEval = mun.maxEleval * MILRAD;
|
||||
DEBUG_LOG(m_logger) << "schusstafel tafelName=" << tafelName
|
||||
DEBUG_LOG() << "schusstafel tafelName=" << tafelName
|
||||
<< " maxEval=" << maxEval
|
||||
<< "zielhoehenwinkel=" << zielhoehenwinkel;
|
||||
schusstafel.ST_artillerie(tafelName, maxEval, zielhoehenwinkel, &entfernung1, &aufsatz1, &flugzeit1, &drift1,
|
||||
@@ -672,14 +672,14 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "schusstafel tafelName=" << tafelName
|
||||
DEBUG_LOG() << "schusstafel tafelName=" << tafelName
|
||||
<< " arg_wert=" << arg_wert
|
||||
<< "zielhoehenwinkel=" << zielhoehenwinkel;
|
||||
schusstafel.ST_artillerie(tafelName, arg_wert, zielhoehenwinkel, &entfernung1, &aufsatz1, &flugzeit1, &drift1,
|
||||
&entfernung2, &aufsatz2, &flugzeit2, &drift2);
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "Schusstafel " << munart << ".sus: "
|
||||
INFO_LOG() << "Schusstafel " << munart << ".sus: "
|
||||
<< "Entfernung [m]: " << entfernung1
|
||||
<< " Elevation [mil]: " << evalMil
|
||||
<< " Drift [grad]: " << drift1 * 180 / M_PI
|
||||
@@ -691,14 +691,14 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
else
|
||||
{
|
||||
// != G5G6 && != M109
|
||||
INFO_LOG(m_logger) << "calculate(ballisticService)";
|
||||
INFO_LOG() << "calculate(ballisticService)";
|
||||
l_FiredBullet->calculate(ballisticService);
|
||||
}
|
||||
|
||||
GeoPairingImplImpactData *l_ImpactData = l_FiredBullet->getImpactData();
|
||||
if (!l_ImpactData)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "No impact Data available";
|
||||
ERROR_LOG() << "No impact Data available";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -794,7 +794,7 @@ void GeoPairing::calculateSingleFire(const QByteArray &transparentData, const st
|
||||
// l_DeviceID);
|
||||
QString latStr = QString::number(l_ImpactData->ImpactPositionLat, 'f', 8);
|
||||
QString lonStr = QString::number(l_ImpactData->ImpactPositionLong, 'f', 8);
|
||||
INFO_LOG(m_logger) << "calculateSingleFire m_equipmentNumber=" << m_equipmentNumber
|
||||
INFO_LOG() << "calculateSingleFire m_equipmentNumber=" << m_equipmentNumber
|
||||
<< " ImpactTime=" << l_ImpactData->ImpactTime
|
||||
<< " ImpactPositionLat=" << latStr
|
||||
<< " ImpactPositionLong=" << lonStr
|
||||
@@ -830,20 +830,20 @@ bool GeoPairing::geoPairingData(const std::shared_ptr<N_Ballistic::BallisticServ
|
||||
m_areaFireToCtas.hit = false;
|
||||
m_reportTarget.send = false;
|
||||
|
||||
INFO_LOG(m_logger) << "--------------- geoPairingData empfangen! -----------------" ;
|
||||
INFO_LOG(m_logger) << "playerId = " << m_equipmentNumber ;
|
||||
INFO_LOG(m_logger) << "time = " << (SInt64) m_Time ;
|
||||
INFO_LOG(m_logger) << "positionLat = " << m_PositionLat ;
|
||||
INFO_LOG(m_logger) << "positonLon = " << m_PositionLon ;
|
||||
INFO_LOG(m_logger) << "tr.Data-Size = " << transparentDataAr.size() ;
|
||||
INFO_LOG() << "--------------- geoPairingData empfangen! -----------------" ;
|
||||
INFO_LOG() << "playerId = " << m_equipmentNumber ;
|
||||
INFO_LOG() << "time = " << (SInt64) m_Time ;
|
||||
INFO_LOG() << "positionLat = " << m_PositionLat ;
|
||||
INFO_LOG() << "positonLon = " << m_PositionLon ;
|
||||
INFO_LOG() << "tr.Data-Size = " << transparentDataAr.size() ;
|
||||
|
||||
INFO_LOG(m_logger) << "transparentData = " << transparentDataAr.toHex() ;
|
||||
INFO_LOG() << "transparentData = " << transparentDataAr.toHex() ;
|
||||
|
||||
QHashIterator<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> i(aircrafts);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
DEBUG_LOG(m_logger) << i.key() << ": participantId=" << i.value().participantId()
|
||||
DEBUG_LOG() << i.key() << ": participantId=" << i.value().participantId()
|
||||
<< " participantTypeId= " << i.value().participantTypeId()
|
||||
<< " pos lat=" << i.value().pos().lat()
|
||||
<< " pos lon=" << i.value().pos().lon()
|
||||
@@ -855,18 +855,18 @@ bool GeoPairing::geoPairingData(const std::shared_ptr<N_Ballistic::BallisticServ
|
||||
|
||||
if (!l_Header.parse(transparentDataAr))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error: Couldn't parse header of transparent Data!" ;
|
||||
ERROR_LOG() << "Error: Couldn't parse header of transparent Data!" ;
|
||||
return false;
|
||||
}
|
||||
|
||||
UInt8 l_MessageID = l_Header.m_MessageID;
|
||||
PanGeoPairingDeviceId l_DeviceID = l_Header.m_DeviceID;
|
||||
INFO_LOG(m_logger) << "l_MessageID = " << std::hex << (int)l_MessageID ;
|
||||
INFO_LOG(m_logger) << "l_DeviceID = " << l_DeviceID ;
|
||||
INFO_LOG() << "l_MessageID = " << std::hex << (int)l_MessageID ;
|
||||
INFO_LOG() << "l_DeviceID = " << l_DeviceID ;
|
||||
|
||||
if (l_MessageID == 0xE3) // Firing_Report
|
||||
{
|
||||
INFO_LOG(m_logger) << "--> E3 : Firing Report " ;
|
||||
INFO_LOG() << "--> E3 : Firing Report " ;
|
||||
|
||||
switch (l_DeviceID)
|
||||
{
|
||||
@@ -874,7 +874,7 @@ bool GeoPairing::geoPairingData(const std::shared_ptr<N_Ballistic::BallisticServ
|
||||
case PAN_GP_REPORT_G5_G6:
|
||||
case PAN_GP_REPORT_M109:
|
||||
calculateSingleFire(transparentDataAr, ballisticService);
|
||||
INFO_LOG(m_logger) << "PAN_GP_REPORT_MORTAR PAN_GP_REPORT_G5_G6 PAN_GP_REPORT_M109 calculateSingleFire";
|
||||
INFO_LOG() << "PAN_GP_REPORT_MORTAR PAN_GP_REPORT_G5_G6 PAN_GP_REPORT_M109 calculateSingleFire";
|
||||
break;
|
||||
case PAN_GP_REPORT_MK19:
|
||||
calculateAreaFire(transparentDataAr, ballisticService);
|
||||
@@ -882,16 +882,16 @@ bool GeoPairing::geoPairingData(const std::shared_ptr<N_Ballistic::BallisticServ
|
||||
case PAN_GP_REPORT_IGLA:
|
||||
case PAN_GP_REQUEST_IGLA:
|
||||
calculateAirFire(transparentDataAr, aircrafts);
|
||||
INFO_LOG(m_logger) << "PAN_GP_REPORT_IGLA PAN_GP_REQUEST_IGLA ";
|
||||
INFO_LOG() << "PAN_GP_REPORT_IGLA PAN_GP_REQUEST_IGLA ";
|
||||
break;
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "--> Unknown DeviceID " << l_DeviceID << " used !" ;
|
||||
WARNING_LOG() << "--> Unknown DeviceID " << l_DeviceID << " used !" ;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "--> Unknown MessageID used ! " ;
|
||||
WARNING_LOG() << "--> Unknown MessageID used ! " ;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -913,7 +913,7 @@ void GeoPairing::setMeteo(double winddirection, double windspeed, double tempera
|
||||
|
||||
bool GeoPairing::searchAirTarget(double a_elevation, double azimuth, int &playerId, uint64_t &impactTime)
|
||||
{
|
||||
INFO_LOG(m_logger) << "searchAirTarget (IGLA)..." ;
|
||||
INFO_LOG() << "searchAirTarget (IGLA)..." ;
|
||||
|
||||
QScopedPointer<GeoPairingImplAirTargetTracker> l_Tracker(GeoPairingImplFactory::createAirTargetTracker());
|
||||
|
||||
@@ -936,25 +936,25 @@ void GeoPairing::readAmmunitionIni()
|
||||
//Zu erst holen wir uns alle WaffenTypen
|
||||
const QVector<int> typesList = ammuConfig->getIntegerVector(QStringLiteral("WeaponRestriction"), QStringLiteral("Types"));
|
||||
|
||||
DEBUG_LOG(m_logger) << "typesList.size=" << typesList.size();
|
||||
DEBUG_LOG() << "typesList.size=" << typesList.size();
|
||||
//Wir holen uns alle Munitionen die in Frage kommen heraus // evtl mit Liste?
|
||||
const QVector<int> ammoList = ammuConfig->getIntegerVector(QStringLiteral("WeaponRestriction"), QStringLiteral("AmmoList"));
|
||||
DEBUG_LOG(m_logger) << "ammoList=" << ammoList.size();
|
||||
DEBUG_LOG() << "ammoList=" << ammoList.size();
|
||||
for (int ammo : ammoList)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ammoListValue=" << ammo;
|
||||
DEBUG_LOG() << "ammoListValue=" << ammo;
|
||||
|
||||
QString eleGroup = QStringLiteral("Ammunition") + QStringLiteral("P") + QString::number(ammo) + QStringLiteral("/CWParams");
|
||||
const QVector<double> minElevataion = ammuConfig->getFloatVector(eleGroup, QStringLiteral("ElevMin"));
|
||||
DEBUG_LOG(m_logger) << "ammo = " << ammo << " minElevataion.size() =" << minElevataion.size()
|
||||
DEBUG_LOG() << "ammo = " << ammo << " minElevataion.size() =" << minElevataion.size()
|
||||
<< " " << eleGroup << "/" << QStringLiteral("ElevMin");
|
||||
|
||||
const QVector<double> maxElevataion = ammuConfig->getFloatVector(eleGroup, QStringLiteral("ElevMax"));
|
||||
DEBUG_LOG(m_logger) << "ammo = " << ammo << " maxElevataion.size() =" << maxElevataion.size() << eleGroup << "/" << QStringLiteral("ElevMax");
|
||||
DEBUG_LOG() << "ammo = " << ammo << " maxElevataion.size() =" << maxElevataion.size() << eleGroup << "/" << QStringLiteral("ElevMax");
|
||||
|
||||
if (minElevataion.size() != maxElevataion.size())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Invalid Ammunition Config for : Ammunition" << ammo ;
|
||||
DEBUG_LOG() << "Invalid Ammunition Config for : Ammunition" << ammo ;
|
||||
continue;
|
||||
}
|
||||
// Get Allowd fpr all Types
|
||||
@@ -966,9 +966,9 @@ void GeoPairing::readAmmunitionIni()
|
||||
{
|
||||
QString alloweKey = QStringLiteral("Allowed") + QString::number(weaponTypeId);
|
||||
const QMap<int, bool> allowed = ammuConfig->getBoolMap(eleGroup, alloweKey);
|
||||
DEBUG_LOG(m_logger) << "alloweKey allowed.size() =" << allowed.size() << " " << eleGroup << "/" << alloweKey;
|
||||
DEBUG_LOG() << "alloweKey allowed.size() =" << allowed.size() << " " << eleGroup << "/" << alloweKey;
|
||||
allowedCombi.insert(weaponTypeId, allowed);
|
||||
//DEBUG_LOG(m_logger) << "allowedCombi.insert(" << weaponTypeId <<", " << allowed << ")";
|
||||
//DEBUG_LOG() << "allowedCombi.insert(" << weaponTypeId <<", " << allowed << ")";
|
||||
}
|
||||
|
||||
for (int j = 0; j < minElevataion.size(); j++)
|
||||
@@ -983,13 +983,13 @@ void GeoPairing::readAmmunitionIni()
|
||||
//hier holen wir nur den erlaubtstatus für die jeweilige ChargeElevation und packen sie in die
|
||||
//Map des ChargeType
|
||||
allowedCombiForCharge.insert(weaponTypeId, allowedCombi.value(weaponTypeId).value(j));
|
||||
DEBUG_LOG(m_logger) << "allowedCombiForCharge.insert(" << weaponTypeId << ", " << allowedCombi.value(weaponTypeId).value(j) << ")";
|
||||
DEBUG_LOG() << "allowedCombiForCharge.insert(" << weaponTypeId << ", " << allowedCombi.value(weaponTypeId).value(j) << ")";
|
||||
}
|
||||
GeoPCharge geoPCharge = GeoPCharge(_chargeId, _minEleval, _maxEleval, allowedCombiForCharge);
|
||||
mun.insert(j, geoPCharge);
|
||||
}
|
||||
m_geoPMunMap.insert(ammo, mun);
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "m_geoPMunMap.size=" << m_geoPMunMap.size();
|
||||
DEBUG_LOG() << "m_geoPMunMap.size=" << m_geoPMunMap.size();
|
||||
|
||||
}
|
||||
-3
@@ -181,9 +181,6 @@ private:
|
||||
SingleFireToCtas m_singleFireToCtas;
|
||||
AreaFireToCtas m_areaFireToCtas;
|
||||
ReportTarget m_reportTarget;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
void calculateAirFire(const QByteArray &transparentData,
|
||||
const QHash<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> &aircrafts);
|
||||
void calculateAreaFire(const QByteArray &transparentData,
|
||||
|
||||
Reference in new issue
Block a user