Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+11
-11
@@ -54,11 +54,11 @@ bool BallisticService::init(const QString &a_configPath,
|
||||
m_configFile = a_configFile;
|
||||
m_ammunitionFile = a_ammunitionFile;
|
||||
|
||||
INFO_LOG() << "init";
|
||||
INFO_LOG(m_logger) << "init";
|
||||
|
||||
m_ammuConfig = N_ConfigSystem::AmmuConfig::getInstance();
|
||||
QString FileName = a_configPath + QLatin1Char('/') + a_ammunitionFile;
|
||||
INFO_LOG() << "FileName=" << FileName;
|
||||
INFO_LOG(m_logger) << "FileName=" << FileName;
|
||||
|
||||
m_ammuConfig->initFilename(FileName);
|
||||
|
||||
@@ -74,15 +74,15 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
{
|
||||
if (!m_Initialized)
|
||||
{
|
||||
ERROR_LOG() << "Class is not initialized" ;
|
||||
ERROR_LOG(m_logger) << "Class is not initialized" ;
|
||||
return false;
|
||||
}
|
||||
|
||||
Ammunition *configuredAmmunition;
|
||||
E_TypeOfImpl e_impl = e_ImplBase;
|
||||
|
||||
DEBUG_LOG() << "Target Interface Pointer : " << app_interface ;
|
||||
DEBUG_LOG() << "Searching in available ammunitions for " << a_ammuName ;
|
||||
DEBUG_LOG(m_logger) << "Target Interface Pointer : " << app_interface ;
|
||||
DEBUG_LOG(m_logger) << "Searching in available ammunitions for " << a_ammuName ;
|
||||
|
||||
//iterate over all Ammunition nodes and find the corresponding Ammunition name
|
||||
bool bAmmunitionFound = false;
|
||||
@@ -95,7 +95,7 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
//find ammunition
|
||||
configuredAmmunition = &ammunition;
|
||||
|
||||
DEBUG_LOG() << "Ammunition found: " << configuredAmmunition->m_AmmunInfo.m_Name ;
|
||||
DEBUG_LOG(m_logger) << "Ammunition found: " << configuredAmmunition->m_AmmunInfo.m_Name ;
|
||||
|
||||
if (configuredAmmunition->m_AmmunInfo.m_Name == a_ammuName)
|
||||
{
|
||||
@@ -118,7 +118,7 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
e_impl = e_ImplBase;
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Configured Algorithm not known :"
|
||||
ERROR_LOG(m_logger) << "Configured Algorithm not known :"
|
||||
<< configuredAmmunition->m_AmmunInfo.m_Algorithm;
|
||||
return false;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
|
||||
if (!bAmmunitionFound)
|
||||
{
|
||||
ERROR_LOG() << "Desired ammunition was not found :" << a_ammuName ;
|
||||
ERROR_LOG(m_logger) << "Desired ammunition was not found :" << a_ammuName ;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
p_firecontrol = new FireControlRungeKuttaSimple;
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG() << "Implementation does not exist: " << e_impl ;
|
||||
ERROR_LOG(m_logger) << "Implementation does not exist: " << e_impl ;
|
||||
*app_interface = nullptr;
|
||||
return false;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
p_trajectorybase = new TrajectoryRungeKuttaSimple;
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG() << "Implementation does not exist: " << e_impl ;
|
||||
ERROR_LOG(m_logger) << "Implementation does not exist: " << e_impl ;
|
||||
*app_interface = nullptr;
|
||||
return false;
|
||||
}
|
||||
@@ -208,7 +208,7 @@ bool BallisticService::createInterfaceOf(IUnknown **app_interface, E_TypeOfInter
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ERROR_LOG() << "Interface does not exist: " << a_typeInterface ;
|
||||
ERROR_LOG(m_logger) << "Interface does not exist: " << a_typeInterface ;
|
||||
*app_interface = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
+15
-15
@@ -63,7 +63,7 @@ bool FireControlBase::init(const Ammunition &a_ammunition)
|
||||
|
||||
if (a_ammunition.m_StandardParams.m_Valid)
|
||||
{
|
||||
TRACE_LOG() << "FireControlBase::init : initialising StandardParams..." ;
|
||||
TRACE_LOG(m_logger) << "FireControlBase::init : initialising StandardParams..." ;
|
||||
|
||||
m_InitialAmmuVelocityV0constX1 = a_ammunition.m_StandardParams.m_Speed.m_V0ConstX1;
|
||||
m_InitialAmmuVelocityV0constX0 = a_ammunition.m_StandardParams.m_Speed.m_V0ConstX0;
|
||||
@@ -76,14 +76,14 @@ bool FireControlBase::init(const Ammunition &a_ammunition)
|
||||
|
||||
m_Initialized = true;
|
||||
|
||||
TRACE_LOG() << "m_InitialAmmuVelocityV0constX1 : " << m_InitialAmmuVelocityV0constX1 ;
|
||||
TRACE_LOG() << "m_InitialAmmuVelocityV0constX0 : " << m_InitialAmmuVelocityV0constX0 ;
|
||||
TRACE_LOG() << "m_CrossWindConstX3 : " << m_CrossWindConstX3 ;
|
||||
TRACE_LOG() << "m_CrossWindConstX2 : " << m_CrossWindConstX2 ;
|
||||
TRACE_LOG() << "m_CrossWindConstX1 : " << m_CrossWindConstX1 ;
|
||||
TRACE_LOG() << "m_CrossWindConstX0 : " << m_CrossWindConstX0 ;
|
||||
TRACE_LOG(m_logger) << "m_InitialAmmuVelocityV0constX1 : " << m_InitialAmmuVelocityV0constX1 ;
|
||||
TRACE_LOG(m_logger) << "m_InitialAmmuVelocityV0constX0 : " << m_InitialAmmuVelocityV0constX0 ;
|
||||
TRACE_LOG(m_logger) << "m_CrossWindConstX3 : " << m_CrossWindConstX3 ;
|
||||
TRACE_LOG(m_logger) << "m_CrossWindConstX2 : " << m_CrossWindConstX2 ;
|
||||
TRACE_LOG(m_logger) << "m_CrossWindConstX1 : " << m_CrossWindConstX1 ;
|
||||
TRACE_LOG(m_logger) << "m_CrossWindConstX0 : " << m_CrossWindConstX0 ;
|
||||
|
||||
TRACE_LOG() << "FireControlBase::init : initialized successfully!" ;
|
||||
TRACE_LOG(m_logger) << "FireControlBase::init : initialized successfully!" ;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -101,13 +101,13 @@ Float64 FireControlBase::getFlightTime(const Float64 a_distance,
|
||||
|
||||
if (!m_Initialized)
|
||||
{
|
||||
WARNING_LOG() << "The class is not initialized" ;
|
||||
WARNING_LOG(m_logger) << "The class is not initialized" ;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
if (a_distance < 1.0 || a_initialAmmuVelocity < 1.0)
|
||||
{
|
||||
ERROR_LOG() << "The parameters are not correct" ;
|
||||
ERROR_LOG(m_logger) << "The parameters are not correct" ;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ Float64 FireControlBase::getFireAngle(const Float64 a_distance, const Float64 a_
|
||||
|
||||
if (!m_Initialized)
|
||||
{
|
||||
WARNING_LOG() << "The class is not initialized" ;
|
||||
WARNING_LOG(m_logger) << "The class is not initialized" ;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ Float64 FireControlBase::getFireAngle(const Float64 a_distance, const Float64 a_
|
||||
(a_terrainAngle > M_PI_2) ||
|
||||
(a_terrainAngle < -M_PI_2))
|
||||
{
|
||||
ERROR_LOG() << "The parameters are not correct" ;
|
||||
ERROR_LOG(m_logger) << "The parameters are not correct" ;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ N_Types::Radian64 FireControlBase::getCrossWindCorrection(const Float64 a_crossW
|
||||
|
||||
if (!m_Initialized)
|
||||
{
|
||||
ERROR_LOG() << "The class is not initialized" ;
|
||||
ERROR_LOG(m_logger) << "The class is not initialized" ;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ N_Types::Radian64 FireControlBase::getCrossWindCorrection(const Float64 a_crossW
|
||||
m_CrossWindConstX1 == 0 &&
|
||||
m_CrossWindConstX0 == 0)
|
||||
{
|
||||
WARNING_LOG() << "The class uses probably not initialized parameters" ;
|
||||
WARNING_LOG(m_logger) << "The class uses probably not initialized parameters" ;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ Float64 FireControlBase::getAirDensity(const Float64 a_atmosphericPressure, cons
|
||||
if ((a_atmosphericPressure <= 1.0) ||
|
||||
(a_airTemperature <= -N_SST::ZERO_CELSIUS_IN_KELVIN))
|
||||
{
|
||||
ERROR_LOG() << "The parameters are not correct, Pressure=" << a_atmosphericPressure << ", Temp=" << a_airTemperature ;
|
||||
ERROR_LOG(m_logger) << "The parameters are not correct, Pressure=" << a_atmosphericPressure << ", Temp=" << a_airTemperature ;
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -70,16 +70,16 @@ bool TrajectoryBase::init(const N_Types::Coord3 &a_gunPos, const N_Types::Angle3
|
||||
|
||||
if (m_Deviation != 0)
|
||||
{
|
||||
INFO_LOG() << "Deviation taken into account: " << m_Deviation ;
|
||||
INFO_LOG(m_logger) << "Deviation taken into account: " << m_Deviation ;
|
||||
|
||||
Float64 l_deviationRandomized = m_Deviation * (Float64)(rand() % 100) / 100.0;
|
||||
INFO_LOG() << "l_deviationRandomized = " << l_deviationRandomized ;
|
||||
INFO_LOG(m_logger) << "l_deviationRandomized = " << l_deviationRandomized ;
|
||||
|
||||
N_Types::Coord3 o_dev(l_deviationRandomized, 1000.0, 0.0);
|
||||
//INFO_LOG() << "o_dev = " << o_dev ;
|
||||
//INFO_LOG(m_logger) << "o_dev = " << o_dev ;
|
||||
|
||||
Float64 l_angleRandomized = rand() % 360;
|
||||
INFO_LOG() << "l_angleRandomized = " << l_angleRandomized ;
|
||||
INFO_LOG(m_logger) << "l_angleRandomized = " << l_angleRandomized ;
|
||||
|
||||
N_Types::Radian64 l_angleRad;
|
||||
l_angleRad.setDegree(l_angleRandomized);
|
||||
@@ -90,7 +90,7 @@ bool TrajectoryBase::init(const N_Types::Coord3 &a_gunPos, const N_Types::Angle3
|
||||
o_angle.m_H = o_dev.getPolar3().getAzimuth();
|
||||
o_angle.m_P = o_dev.getPolar3().getElevation();
|
||||
|
||||
//INFO_LOG() << "o_angle = " << o_angle << END_LOG
|
||||
//INFO_LOG(m_logger) << "o_angle = " << o_angle << END_LOG
|
||||
m_GunAngle = m_GunAngle + o_angle;
|
||||
}
|
||||
|
||||
@@ -115,13 +115,13 @@ bool TrajectoryBase::move(const Float64 a_deltaTime)
|
||||
{
|
||||
if (!m_Initialized)
|
||||
{
|
||||
WARNING_LOG() << "The class is not initialized" ;
|
||||
WARNING_LOG(m_logger) << "The class is not initialized" ;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_Active)
|
||||
{
|
||||
ERROR_LOG() << "Call init(gunPos, gunAngle, ...) first" ;
|
||||
ERROR_LOG(m_logger) << "Call init(gunPos, gunAngle, ...) first" ;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ bool TrajectoryBase::init(const Ammunition &a_ammunition)
|
||||
{
|
||||
m_Initialized = false;
|
||||
|
||||
TRACE_LOG() << "TrajectoryBase::init : initialising..." ;
|
||||
TRACE_LOG(m_logger) << "TrajectoryBase::init : initialising..." ;
|
||||
|
||||
m_TimeOutCycles = a_ammunition.m_AmmunInfo.m_TimeOut / 1000.0;
|
||||
m_TimeOut = m_TimeOutCycles;
|
||||
@@ -178,9 +178,9 @@ bool TrajectoryBase::init(const Ammunition &a_ammunition)
|
||||
m_IsDetonateOnImpact = true;
|
||||
}
|
||||
|
||||
TRACE_LOG() << "TrajectoryBase::init : initialized successfully!" ;
|
||||
TRACE_LOG(m_logger) << "TrajectoryBase::init : initialized successfully!" ;
|
||||
|
||||
TRACE_LOG() << "m_TimeOutCycles : " << m_TimeOutCycles ;
|
||||
TRACE_LOG(m_logger) << "m_TimeOutCycles : " << m_TimeOutCycles ;
|
||||
|
||||
m_Initialized = true;
|
||||
return true;
|
||||
@@ -246,7 +246,7 @@ void TrajectoryBase::setVelAccelOrientTimeOut()
|
||||
|
||||
if (m_TimeOut < 0)
|
||||
{
|
||||
INFO_LOG() << "Bullet timed out : " << m_TimeOutCycles ;
|
||||
INFO_LOG(m_logger) << "Bullet timed out : " << m_TimeOutCycles ;
|
||||
m_Active = false;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -30,7 +30,7 @@ GeoConfig *GeoConfig::getInstance()
|
||||
bool GeoConfig::initFilename(const QString &fileName)
|
||||
{
|
||||
// const QFileInfo qFileInfo(fileName);
|
||||
// INFO_LOG() << Q_FUNC_INFO << " START, GeoConfig::absoluteFilePath ='" << qFileInfo.absoluteFilePath() << "'";
|
||||
// INFO_LOG(m_logger) << Q_FUNC_INFO << " START, GeoConfig::absoluteFilePath ='" << qFileInfo.absoluteFilePath() << "'";
|
||||
|
||||
// AmmunitionMap
|
||||
ConfigSettings::initFilename(fileName);
|
||||
@@ -41,7 +41,7 @@ bool GeoConfig::initFilename(const QString &fileName)
|
||||
|
||||
const QStringList &filePaths_rough_to_fine = elevationName.split(QStringLiteral(";"));
|
||||
|
||||
// INFO_LOG() << Q_FUNC_INFO << " use following file(s) for ElevationMap: '" << elevationName << "'";
|
||||
// INFO_LOG(m_logger) << Q_FUNC_INFO << " use following file(s) for ElevationMap: '" << elevationName << "'";
|
||||
|
||||
if (!m_elevationMapManager)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ bool GeoConfig::initFilename(const QString &fileName)
|
||||
m_elevationMapManager->init(filePaths_rough_to_fine);
|
||||
}
|
||||
|
||||
// TRACE_LOG() << Q_FUNC_INFO << " END, filename ='" << fileName << "'";
|
||||
// TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, filename ='" << fileName << "'";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -78,9 +78,9 @@ void GeoConfig::initializeAmmu()
|
||||
|
||||
QVector<double> l_charges = getFloatVector(QStringLiteral("ChargeMap"), s_ammu_group);
|
||||
m_ChargeMap[i] = l_charges;
|
||||
// INFO_LOG() << "Store ChargeMap Entry: " << " i=" << i << " s_ammu_group = '" << s_ammu_group << "'";
|
||||
// INFO_LOG(m_logger) << "Store ChargeMap Entry: " << " i=" << i << " s_ammu_group = '" << s_ammu_group << "'";
|
||||
// for (int j = 0; j < l_charges.size(); j++)
|
||||
// INFO_LOG() << j << " = " << l_charges[j];
|
||||
// INFO_LOG(m_logger) << j << " = " << l_charges[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -37,6 +37,7 @@ namespace N_ConfigSystem
|
||||
class GeoConfig: public ConfigSettings
|
||||
{
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
explicit GeoConfig();
|
||||
~GeoConfig();
|
||||
public:
|
||||
@@ -48,6 +49,7 @@ public:
|
||||
double getElevation(const double lon, const double lat) const;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
friend class CesGeoPairing::HandlerGeoPairing; // for initFilename
|
||||
bool initFilename(const QString &fileName);
|
||||
|
||||
|
||||
+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() << "konfigPath = " << ballisticService->getConfigPath() ;
|
||||
INFO_LOG(m_logger) << "konfigPath = " << ballisticService->getConfigPath() ;
|
||||
|
||||
const QString s_configPath = ballisticService->getConfigPath();
|
||||
INFO_LOG() << "GeoPairing Config location : " << s_configPath ;
|
||||
INFO_LOG(m_logger) << "GeoPairing Config location : " << s_configPath ;
|
||||
|
||||
GeoPairingImpl *l_impl = new GeoPairingImplDted;
|
||||
INFO_LOG() << "--> Installing GeoPairingImplDted..." ;
|
||||
INFO_LOG(m_logger) << "--> Installing GeoPairingImplDted..." ;
|
||||
GeoPairingImplFactory::setImpl(l_impl);
|
||||
readAmmunitionIni();
|
||||
|
||||
// initialize the GeoPairing implementation
|
||||
if (!GeoPairingImplFactory::initialize(s_configPath))
|
||||
{
|
||||
ERROR_LOG() << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplDted!" ;
|
||||
ERROR_LOG(m_logger) << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplDted!" ;
|
||||
|
||||
l_impl = new GeoPairingImplBalistic();
|
||||
INFO_LOG() << "--> Installing GeoPairingImplBalistic...";
|
||||
INFO_LOG(m_logger) << "--> Installing GeoPairingImplBalistic...";
|
||||
GeoPairingImplFactory::setImpl(l_impl);
|
||||
if (!GeoPairingImplFactory::initialize(s_configPath))
|
||||
{
|
||||
ERROR_LOG() << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplBalistic!" ;
|
||||
ERROR_LOG(m_logger) << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplBalistic!" ;
|
||||
abort();
|
||||
}
|
||||
else
|
||||
INFO_LOG() << "GeoPairingImplBalistic correctly initialized" ;
|
||||
INFO_LOG(m_logger) << "GeoPairingImplBalistic correctly initialized" ;
|
||||
}
|
||||
else
|
||||
INFO_LOG() << "GeoPairingImplDted correctly initialized" ;
|
||||
INFO_LOG(m_logger) << "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() << "Initialization finished";
|
||||
INFO_LOG(m_logger) << "Initialization finished";
|
||||
}
|
||||
|
||||
void GeoPairing::calculateAirFire(const QByteArray &transparentData,
|
||||
const QHash<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> &aircrafts)
|
||||
{
|
||||
INFO_LOG() << "calculateAirFire (IGLA)..." ;
|
||||
INFO_LOG(m_logger) << "calculateAirFire (IGLA)..." ;
|
||||
|
||||
GeoPairingDataFireReport l_Report;
|
||||
if (!l_Report.parse(transparentData))
|
||||
{
|
||||
WARNING_LOG() << "Error: Couldn't parse Fire Report" ;
|
||||
WARNING_LOG(m_logger) << "Error: Couldn't parse Fire Report" ;
|
||||
return;
|
||||
}
|
||||
|
||||
if (aircrafts.size() == 0)
|
||||
{
|
||||
INFO_LOG() << "No Aircraft available";
|
||||
INFO_LOG(m_logger) << "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() << "GeoPairing::calculateAirFire"
|
||||
DEBUG_LOG(m_logger) << "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() << "--> IGLA : Report Target Fire (createSensorData)"
|
||||
INFO_LOG(m_logger) << "--> 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() << "createSensorData -> SensorData.WeaponAzimuth=" << l_SensorData.WeaponAzimuth
|
||||
INFO_LOG(m_logger) << "createSensorData -> SensorData.WeaponAzimuth=" << l_SensorData.WeaponAzimuth
|
||||
<< "\nl_SensorData.WeaponElevation=" << l_SensorData.WeaponElevation;
|
||||
if (l_DeviceID == -1)
|
||||
{
|
||||
ERROR_LOG() << "Couldn't create SensorData" ;
|
||||
ERROR_LOG(m_logger) << "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() << " -> IGLA : Request Target Detection " ;
|
||||
INFO_LOG(m_logger) << " -> IGLA : Request Target Detection " ;
|
||||
|
||||
QScopedPointer<GeoPairingImplAirTargetCache> l_Cache(GeoPairingImplFactory::createAirTargetCache(m_equipmentNumber));
|
||||
|
||||
int l_TargetPlayerId = 0;
|
||||
uint64_t l_ImpactTime = 0;
|
||||
|
||||
INFO_LOG() << "-> IGLA : Request Target Detection -> searchAirTarget (vor dem aufruf)"
|
||||
INFO_LOG(m_logger) << "-> 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() << "-> IGLA : Request Target Detection -> searchAirTarget (nach dem aufruf)"
|
||||
INFO_LOG(m_logger) << "-> 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() << "-> IGLA : Retrieved Target Detection Results from Cache"
|
||||
INFO_LOG(m_logger) << "-> 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() << "<-- EC : Report Target Detection " ;
|
||||
INFO_LOG() << "Target Found : " << l_TargetFound ;
|
||||
INFO_LOG(m_logger) << "<-- EC : Report Target Detection " ;
|
||||
INFO_LOG(m_logger) << "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() << "\n\nPAN_GP_REPORT_IGLA m_DeviceID=" << l_Report.m_DeviceID
|
||||
INFO_LOG(m_logger) << "\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() << "--> IGLA : Report Target Fire " ;
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire " ;
|
||||
|
||||
int l_TargetPlayerId = 0;
|
||||
UInt64 l_ImpactTime = 0;
|
||||
|
||||
QScopedPointer<GeoPairingImplAirTargetTracker> l_Tracker(GeoPairingImplFactory::createAirTargetTracker());
|
||||
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire (l_Tracker->setPosition)"
|
||||
INFO_LOG(m_logger) << "--> 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() << "--> IGLA : Report Target Fire (setTime)"
|
||||
INFO_LOG(m_logger) << "--> IGLA : Report Target Fire (setTime)"
|
||||
<< "\nm_Time = " << m_Time ;
|
||||
|
||||
l_Tracker->setTime(m_Time);
|
||||
|
||||
INFO_LOG() << "--> IGLA : Report Target Fire (vor l_Tracker->track)"
|
||||
INFO_LOG(m_logger) << "--> 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() << "--> IGLA : Report Target Fire (nach l_Tracker->track)"
|
||||
INFO_LOG(m_logger) << "--> 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() << "Air Target " << l_TargetPlayerId << " in reach and hit" ;
|
||||
INFO_LOG(m_logger) << "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() << "Air Target " << l_TargetPlayerId << " in reach, but not hit" ;
|
||||
INFO_LOG(m_logger) << "Air Target " << l_TargetPlayerId << " in reach, but not hit" ;
|
||||
}
|
||||
}
|
||||
else
|
||||
INFO_LOG() << "No Air Target withing reach..." ;
|
||||
INFO_LOG(m_logger) << "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() << "calculateAreaFire (MK19)..." ;
|
||||
INFO_LOG(m_logger) << "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() << "Error: Couldn't parse Fire Report" ;
|
||||
ERROR_LOG(m_logger) << "Error: Couldn't parse Fire Report" ;
|
||||
return;
|
||||
}
|
||||
SInt32 l_DeviceID = GeoPairingImplFactory::createSensorData(&l_SensorData, transparentData);
|
||||
if (l_DeviceID == -1)
|
||||
{
|
||||
ERROR_LOG() << "Couldn't create SensorData" ;
|
||||
ERROR_LOG(m_logger) << "Couldn't create SensorData" ;
|
||||
return;
|
||||
}
|
||||
|
||||
QScopedPointer<GeoPairingImplFiredBullet> l_FiredBullet(GeoPairingImplFactory::createFiredBullet(l_SensorData));
|
||||
if (l_FiredBullet == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "Error: Couldn't create FiredBullet object" ;
|
||||
ERROR_LOG(m_logger) << "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() << "Error: Couldn't create ImpactData object" ;
|
||||
ERROR_LOG(m_logger) << "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() << "Wirkfeld Ammunition MK19_M385" ;
|
||||
INFO_LOG(m_logger) << "Wirkfeld Ammunition MK19_M385" ;
|
||||
break;
|
||||
case MK19Type_m430:
|
||||
l_AmmunitionType = N_Ballistic::MK19_M430;
|
||||
l_AmmunitionTypeOSAG = N_Ballistic::MK19_M430_OSAG;
|
||||
INFO_LOG() << "Wirkfeld Ammunition MK19_M430" ;
|
||||
INFO_LOG(m_logger) << "Wirkfeld Ammunition MK19_M430" ;
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG() << "Default Ammunition. Must not be called : " << l_SensorData.AmmunitionType ;
|
||||
ERROR_LOG(m_logger) << "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() << "calculateAreaFire m_equipmentNumber=" << m_equipmentNumber
|
||||
INFO_LOG(m_logger) << "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() << "calculateSingleFire ..." ;
|
||||
INFO_LOG(m_logger) << "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() << "l_DeviceID=" << l_DeviceID;
|
||||
INFO_LOG(m_logger) << "l_DeviceID=" << l_DeviceID;
|
||||
if (l_DeviceID == -1)
|
||||
{
|
||||
ERROR_LOG() << "Couldn't create SensorData" ;
|
||||
ERROR_LOG(m_logger) << "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() << "Vor switch AmmunitionType=" << l_SensorData.AmmunitionType
|
||||
INFO_LOG(m_logger) << "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() << "HE_M1A2";
|
||||
INFO_LOG(m_logger) << "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() << "M60mm_m385 M60mm_m430";
|
||||
INFO_LOG(m_logger) << "M60mm_m385 M60mm_m430";
|
||||
switch (l_SensorData.IgnitionType) // ChargeType = Ladung...
|
||||
{
|
||||
// Todo: Umbenennen und ggf. Zuordnung korrigieren
|
||||
case 0:
|
||||
INFO_LOG() << "Moerser-60mm-Lad1";
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad1";
|
||||
munart = "Moerser-60mm-Lad1";
|
||||
break;
|
||||
case 1:
|
||||
INFO_LOG() << "Moerser-60mm-Lad2";
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad2";
|
||||
munart = "Moerser-60mm-Lad2";
|
||||
break;
|
||||
case 2:
|
||||
INFO_LOG() << "Moerser-60mm-Lad3";
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad3";
|
||||
munart = "Moerser-60mm-Lad3";
|
||||
break;
|
||||
case 3:
|
||||
INFO_LOG() << "Moerser-60mm-Lad4";
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad4";
|
||||
munart = "Moerser-60mm-Lad4";
|
||||
break;
|
||||
case 4:
|
||||
INFO_LOG() << "Moerser-60mm-Lad5";
|
||||
INFO_LOG(m_logger) << "Moerser-60mm-Lad5";
|
||||
munart = "Moerser-60mm-Lad5";
|
||||
break;
|
||||
case 5:
|
||||
INFO_LOG() << "Moerser-60mm-La6";
|
||||
INFO_LOG(m_logger) << "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() << "VLAP_M9703";
|
||||
INFO_LOG(m_logger) << "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() << "No valid charge type " << l_SensorData.ChargeType <<
|
||||
WARNING_LOG(m_logger) << "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() << "schusstafel pfad=" << pfad
|
||||
DEBUG_LOG(m_logger) << "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() << "Elevation ist <= 0 Grad. Entfernung wird auf 50% des ersten Wertes aus der Schusstafel festgesetzt" ;
|
||||
INFO_LOG(m_logger) << "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() << "schusstafel tafelName=" << tafelName
|
||||
DEBUG_LOG(m_logger) << "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() << "Elevation ist >= 90 Grad. Entfernung wird auf den letzten Wert aus der Schusstafel festgesetzt" ;
|
||||
INFO_LOG(m_logger) << "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() << "schusstafel tafelName=" << tafelName
|
||||
DEBUG_LOG(m_logger) << "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() << "schusstafel tafelName=" << tafelName
|
||||
DEBUG_LOG(m_logger) << "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() << "Schusstafel " << munart << ".sus: "
|
||||
INFO_LOG(m_logger) << "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() << "calculate(ballisticService)";
|
||||
INFO_LOG(m_logger) << "calculate(ballisticService)";
|
||||
l_FiredBullet->calculate(ballisticService);
|
||||
}
|
||||
|
||||
GeoPairingImplImpactData *l_ImpactData = l_FiredBullet->getImpactData();
|
||||
if (!l_ImpactData)
|
||||
{
|
||||
ERROR_LOG() << "No impact Data available";
|
||||
ERROR_LOG(m_logger) << "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() << "calculateSingleFire m_equipmentNumber=" << m_equipmentNumber
|
||||
INFO_LOG(m_logger) << "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() << "--------------- 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) << "--------------- 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() << "transparentData = " << transparentDataAr.toHex() ;
|
||||
INFO_LOG(m_logger) << "transparentData = " << transparentDataAr.toHex() ;
|
||||
|
||||
QHashIterator<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> i(aircrafts);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
DEBUG_LOG() << i.key() << ": participantId=" << i.value().participantId()
|
||||
DEBUG_LOG(m_logger) << 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() << "Error: Couldn't parse header of transparent Data!" ;
|
||||
ERROR_LOG(m_logger) << "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() << "l_MessageID = " << std::hex << (int)l_MessageID ;
|
||||
INFO_LOG() << "l_DeviceID = " << l_DeviceID ;
|
||||
INFO_LOG(m_logger) << "l_MessageID = " << std::hex << (int)l_MessageID ;
|
||||
INFO_LOG(m_logger) << "l_DeviceID = " << l_DeviceID ;
|
||||
|
||||
if (l_MessageID == 0xE3) // Firing_Report
|
||||
{
|
||||
INFO_LOG() << "--> E3 : Firing Report " ;
|
||||
INFO_LOG(m_logger) << "--> 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() << "PAN_GP_REPORT_MORTAR PAN_GP_REPORT_G5_G6 PAN_GP_REPORT_M109 calculateSingleFire";
|
||||
INFO_LOG(m_logger) << "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() << "PAN_GP_REPORT_IGLA PAN_GP_REQUEST_IGLA ";
|
||||
INFO_LOG(m_logger) << "PAN_GP_REPORT_IGLA PAN_GP_REQUEST_IGLA ";
|
||||
break;
|
||||
default:
|
||||
WARNING_LOG() << "--> Unknown DeviceID " << l_DeviceID << " used !" ;
|
||||
WARNING_LOG(m_logger) << "--> Unknown DeviceID " << l_DeviceID << " used !" ;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG() << "--> Unknown MessageID used ! " ;
|
||||
WARNING_LOG(m_logger) << "--> 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() << "searchAirTarget (IGLA)..." ;
|
||||
INFO_LOG(m_logger) << "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() << "typesList.size=" << typesList.size();
|
||||
DEBUG_LOG(m_logger) << "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() << "ammoList=" << ammoList.size();
|
||||
DEBUG_LOG(m_logger) << "ammoList=" << ammoList.size();
|
||||
for (int ammo : ammoList)
|
||||
{
|
||||
DEBUG_LOG() << "ammoListValue=" << ammo;
|
||||
DEBUG_LOG(m_logger) << "ammoListValue=" << ammo;
|
||||
|
||||
QString eleGroup = QStringLiteral("Ammunition") + QStringLiteral("P") + QString::number(ammo) + QStringLiteral("/CWParams");
|
||||
const QVector<double> minElevataion = ammuConfig->getFloatVector(eleGroup, QStringLiteral("ElevMin"));
|
||||
DEBUG_LOG() << "ammo = " << ammo << " minElevataion.size() =" << minElevataion.size()
|
||||
DEBUG_LOG(m_logger) << "ammo = " << ammo << " minElevataion.size() =" << minElevataion.size()
|
||||
<< " " << eleGroup << "/" << QStringLiteral("ElevMin");
|
||||
|
||||
const QVector<double> maxElevataion = ammuConfig->getFloatVector(eleGroup, QStringLiteral("ElevMax"));
|
||||
DEBUG_LOG() << "ammo = " << ammo << " maxElevataion.size() =" << maxElevataion.size() << eleGroup << "/" << QStringLiteral("ElevMax");
|
||||
DEBUG_LOG(m_logger) << "ammo = " << ammo << " maxElevataion.size() =" << maxElevataion.size() << eleGroup << "/" << QStringLiteral("ElevMax");
|
||||
|
||||
if (minElevataion.size() != maxElevataion.size())
|
||||
{
|
||||
DEBUG_LOG() << "Invalid Ammunition Config for : Ammunition" << ammo ;
|
||||
DEBUG_LOG(m_logger) << "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() << "alloweKey allowed.size() =" << allowed.size() << " " << eleGroup << "/" << alloweKey;
|
||||
DEBUG_LOG(m_logger) << "alloweKey allowed.size() =" << allowed.size() << " " << eleGroup << "/" << alloweKey;
|
||||
allowedCombi.insert(weaponTypeId, allowed);
|
||||
//DEBUG_LOG() << "allowedCombi.insert(" << weaponTypeId <<", " << allowed << ")";
|
||||
//DEBUG_LOG(m_logger) << "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() << "allowedCombiForCharge.insert(" << weaponTypeId << ", " << allowedCombi.value(weaponTypeId).value(j) << ")";
|
||||
DEBUG_LOG(m_logger) << "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_geoPMunMap.size=" << m_geoPMunMap.size();
|
||||
DEBUG_LOG(m_logger) << "m_geoPMunMap.size=" << m_geoPMunMap.size();
|
||||
|
||||
}
|
||||
+3
-3
@@ -35,20 +35,20 @@ bool GeoPairingDataBase::parse(const QByteArray& a_transparentData)
|
||||
|
||||
if (a_transparentData.size() < m_Size)
|
||||
{
|
||||
ERROR_LOG() << "Size of transparent Data not valid :" << a_transparentData.size()
|
||||
ERROR_LOG(m_logger) << "Size of transparent Data not valid :" << a_transparentData.size()
|
||||
<< " instead of " << m_Size;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_MessageID = a_transparentData[startMessageId];
|
||||
int messageId = m_MessageID;
|
||||
INFO_LOG() << "Header -> MessageID : " << messageId;
|
||||
INFO_LOG(m_logger) << "Header -> MessageID : " << messageId;
|
||||
|
||||
UInt8 deviceId;
|
||||
deviceId = a_transparentData[startDevice];
|
||||
|
||||
m_DeviceID = static_cast<PanGeoPairingDeviceId>(deviceId);
|
||||
INFO_LOG() << "Header -> DeviceID : " << m_DeviceID;
|
||||
INFO_LOG(m_logger) << "Header -> DeviceID : " << m_DeviceID;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+44
-44
@@ -84,23 +84,23 @@ GeoPairingImplAirTargetCache *GeoPairingImpl::createAirTargetCache(UInt32 a_play
|
||||
// ---------------------------------------------------------------
|
||||
SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData, const QByteArray& a_transparendData, int &isDefault)
|
||||
{
|
||||
INFO_LOG() << "createSensorData";
|
||||
INFO_LOG(m_logger) << "createSensorData";
|
||||
if (!m_Initialized)
|
||||
{
|
||||
ERROR_LOG() << "Implementation not initialized";
|
||||
ERROR_LOG(m_logger) << "Implementation not initialized";
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!a_sensorData)
|
||||
{
|
||||
ERROR_LOG() << "SensorData Object argument not valid";
|
||||
ERROR_LOG(m_logger) << "SensorData Object argument not valid";
|
||||
return -1;
|
||||
}
|
||||
|
||||
GeoPairingDataFireReport l_Report;
|
||||
if (!l_Report.parse(a_transparendData))
|
||||
{
|
||||
ERROR_LOG() << "Couldn't parse FireReport";
|
||||
ERROR_LOG(m_logger) << "Couldn't parse FireReport";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -141,9 +141,9 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
|
||||
if (date.isValid())
|
||||
{
|
||||
INFO_LOG() << "GeoMagneticField DateRecord = " << l_DateRecord;
|
||||
INFO_LOG() << "GeoMagneticField Declination = " << l_Declination;
|
||||
INFO_LOG() << "GeoMagneticField ChangePerYear = " << l_ChangePerYear;
|
||||
INFO_LOG(m_logger) << "GeoMagneticField DateRecord = " << l_DateRecord;
|
||||
INFO_LOG(m_logger) << "GeoMagneticField Declination = " << l_Declination;
|
||||
INFO_LOG(m_logger) << "GeoMagneticField ChangePerYear = " << l_ChangePerYear;
|
||||
|
||||
time_t l_TimeNow = time(nullptr);
|
||||
struct tm l_TimeInfo;
|
||||
@@ -157,42 +157,42 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
|
||||
int l_SecondsPerYear = 365 * 24 * 3600;
|
||||
int l_Years = l_TimeDiff / l_SecondsPerYear; // number of years since DateRecords
|
||||
DEBUG_LOG() << "GeoMagneticField Years since DateRecord : " << l_Years;
|
||||
DEBUG_LOG(m_logger) << "GeoMagneticField Years since DateRecord : " << l_Years;
|
||||
|
||||
l_GeoMagneticCorrection = l_Declination + (l_Years * l_ChangePerYear);
|
||||
INFO_LOG() << "GeoMagneticField Azimuth correction [degrees]: " << l_GeoMagneticCorrection;
|
||||
INFO_LOG(m_logger) << "GeoMagneticField Azimuth correction [degrees]: " << l_GeoMagneticCorrection;
|
||||
l_GeoMagneticCorrection *= N_SST::PI_OVER_180;
|
||||
l_Azimuth += l_GeoMagneticCorrection;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
INFO_LOG() << "createSensorData";
|
||||
INFO_LOG(m_logger) << "createSensorData";
|
||||
|
||||
if (l_Report.m_DeviceID == PAN_GP_REPORT_MORTAR)
|
||||
{
|
||||
int l_AmmunitionField = PAN_AMMU_INDEX(l_Report.m_Ammunition);
|
||||
INFO_LOG() << "createSensorData PAN_GP_REPORT_MORTAR l_AmmunitionField=" << +l_AmmunitionField
|
||||
INFO_LOG(m_logger) << "createSensorData PAN_GP_REPORT_MORTAR l_AmmunitionField=" << +l_AmmunitionField
|
||||
<< " l_Report.m_Ammunition=" << +l_Report.m_Ammunition
|
||||
<< " l_Report.m_Ammunition & 0x03=" << +(l_Report.m_Ammunition & 0x03);
|
||||
switch (l_Report.m_Ammunition & 0x03)
|
||||
{
|
||||
case 1:
|
||||
a_sensorData->AmmunitionType = MortarType1;
|
||||
INFO_LOG() << "Using Mortar Ammunition 1";
|
||||
INFO_LOG(m_logger) << "Using Mortar Ammunition 1";
|
||||
break;
|
||||
case 2:
|
||||
a_sensorData->AmmunitionType = MortarType2;
|
||||
INFO_LOG() << "Using Mortar Ammunition 2";
|
||||
INFO_LOG(m_logger) << "Using Mortar Ammunition 2";
|
||||
break;
|
||||
default:
|
||||
a_sensorData->AmmunitionType = MortarType1;
|
||||
ERROR_LOG() << "Ammunition value means 'reserved' : "
|
||||
ERROR_LOG(m_logger) << "Ammunition value means 'reserved' : "
|
||||
<< l_AmmunitionField;
|
||||
return -1;
|
||||
}
|
||||
a_sensorData->IgnitionType = (l_Report.m_Ammunition >> 3) & 0x07;
|
||||
INFO_LOG() << "a_sensorData->IgnitionType= " << a_sensorData->IgnitionType;
|
||||
INFO_LOG(m_logger) << "a_sensorData->IgnitionType= " << a_sensorData->IgnitionType;
|
||||
}
|
||||
else if ((l_Report.m_DeviceID == PAN_GP_REPORT_G5_G6) || (l_Report.m_DeviceID == PAN_GP_REPORT_M109))
|
||||
{
|
||||
@@ -202,38 +202,38 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
case 1:
|
||||
a_sensorData->AmmunitionType = HE_M1A2;
|
||||
a_sensorData->IgnitionTypeG5G6 = IgnitionTypePercussion;
|
||||
INFO_LOG() << "Using HE_M1A2 Percussion";
|
||||
INFO_LOG(m_logger) << "Using HE_M1A2 Percussion";
|
||||
break;
|
||||
case 2:
|
||||
a_sensorData->AmmunitionType = HE_M1A2;
|
||||
a_sensorData->IgnitionTypeG5G6 = IgnitionTypeProximity;
|
||||
INFO_LOG() << "Using HE_M1A2 Proximity";
|
||||
INFO_LOG(m_logger) << "Using HE_M1A2 Proximity";
|
||||
break;
|
||||
case 3:
|
||||
a_sensorData->AmmunitionType = VLAP_M9703;
|
||||
a_sensorData->IgnitionTypeG5G6 = IgnitionTypePercussion;
|
||||
INFO_LOG() << "Using VLAP_M9703 Percussion";
|
||||
INFO_LOG(m_logger) << "Using VLAP_M9703 Percussion";
|
||||
break;
|
||||
case 4:
|
||||
a_sensorData->AmmunitionType = VLAP_M9703;
|
||||
a_sensorData->IgnitionTypeG5G6 = IgnitionTypeProximity;
|
||||
INFO_LOG() << "Using VLAP_M9703 Proximity";
|
||||
INFO_LOG(m_logger) << "Using VLAP_M9703 Proximity";
|
||||
break;
|
||||
case 5:
|
||||
a_sensorData->AmmunitionType = SMK_BE_M2;
|
||||
a_sensorData->IgnitionTypeG5G6 = IgnitionTypeTime;
|
||||
INFO_LOG() << "Using SMK_BE_M2 Time";
|
||||
INFO_LOG(m_logger) << "Using SMK_BE_M2 Time";
|
||||
break;
|
||||
case 6:
|
||||
a_sensorData->AmmunitionType = CLUSTER_HEHC_M9609;
|
||||
a_sensorData->IgnitionTypeG5G6 = IgnitionTypeTime;
|
||||
INFO_LOG() << "Using CLUSTER_HEHC_M9609 Time";
|
||||
INFO_LOG(m_logger) << "Using CLUSTER_HEHC_M9609 Time";
|
||||
break;
|
||||
default:
|
||||
a_sensorData->AmmunitionType = HE_M1A2;
|
||||
a_sensorData->IgnitionTypeG5G6 = IgnitionTypePercussion;
|
||||
isDefault = 1;
|
||||
ERROR_LOG() << "Ammunition value means 'reserved' : " << l_AmmunitionField;
|
||||
ERROR_LOG(m_logger) << "Ammunition value means 'reserved' : " << l_AmmunitionField;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -277,15 +277,15 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
{
|
||||
case 1:
|
||||
a_sensorData->AmmunitionType = MK19Type_m385;
|
||||
INFO_LOG() << "Using MK19 Ammunition 1 (m385)";
|
||||
INFO_LOG(m_logger) << "Using MK19 Ammunition 1 (m385)";
|
||||
break;
|
||||
case 2:
|
||||
a_sensorData->AmmunitionType = MK19Type_m430;
|
||||
INFO_LOG() << "Using MK19 Ammunition 2 (m430)";
|
||||
INFO_LOG(m_logger) << "Using MK19 Ammunition 2 (m430)";
|
||||
break;
|
||||
default:
|
||||
a_sensorData->AmmunitionType = MK19Type_m385;
|
||||
ERROR_LOG() << "Ammunition value means 'reserved' : " << l_AmmunitionField;
|
||||
ERROR_LOG(m_logger) << "Ammunition value means 'reserved' : " << l_AmmunitionField;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -293,11 +293,11 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
l_Report.m_DeviceID == PAN_GP_REQUEST_IGLA)
|
||||
{
|
||||
a_sensorData->AmmunitionType = AmmunitionTypeUnknown; // irrelevant
|
||||
INFO_LOG() << "Using IGLA Ammunition 1";
|
||||
INFO_LOG(m_logger) << "Using IGLA Ammunition 1";
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Couldn't create sensorData for DeviceID : " << l_Report.m_DeviceID;
|
||||
ERROR_LOG(m_logger) << "Couldn't create sensorData for DeviceID : " << l_Report.m_DeviceID;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
a_sensorData->WeaponElevation = l_Elevation;
|
||||
a_sensorData->WeaponTemperature = l_Report.m_Temperature;
|
||||
|
||||
INFO_LOG() << "a_sensorData->ChargeType=" << a_sensorData->ChargeType
|
||||
INFO_LOG(m_logger) << "a_sensorData->ChargeType=" << a_sensorData->ChargeType
|
||||
<< " l_Report.m_Ammunition=" << l_Report.m_Ammunition
|
||||
<< " l_Report.m_DeviceID=" << l_Report.m_DeviceID;
|
||||
|
||||
@@ -329,7 +329,7 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
// a_sensorData->ChargeType = 382;
|
||||
// else
|
||||
// a_sensorData->ChargeType = 385;
|
||||
INFO_LOG() << "PAN_GP_REPORT_MORTAR: l_Report.m_Ammunition" << l_Report.m_Ammunition
|
||||
INFO_LOG(m_logger) << "PAN_GP_REPORT_MORTAR: l_Report.m_Ammunition" << l_Report.m_Ammunition
|
||||
<< " a_sensorData->ChargeType=" << a_sensorData->ChargeType;
|
||||
}
|
||||
else if ((l_Report.m_DeviceID != PAN_GP_REPORT_G5_G6) && (l_Report.m_DeviceID != PAN_GP_REPORT_M109))
|
||||
@@ -339,47 +339,47 @@ SInt32 GeoPairingImpl::createSensorData(GeoPairingImplSensorData *a_sensorData,
|
||||
a_sensorData->IgnitionType = l_Report.m_TimeToDetonate;
|
||||
else
|
||||
a_sensorData->IgnitionType = 0;
|
||||
INFO_LOG() << "if a_sensorData->ChargeType=" << a_sensorData->ChargeType;
|
||||
INFO_LOG(m_logger) << "if a_sensorData->ChargeType=" << a_sensorData->ChargeType;
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG() << "else a_sensorData->ChargeType=" << a_sensorData->ChargeType;
|
||||
INFO_LOG(m_logger) << "else a_sensorData->ChargeType=" << a_sensorData->ChargeType;
|
||||
|
||||
SInt32 ch = PAN_AMMU_CHARGE_G5_G6(l_Report.m_Ammunition);
|
||||
|
||||
if (ch == 1) // M64 Base
|
||||
{
|
||||
a_sensorData->ChargeType = 0;
|
||||
INFO_LOG() << "Using Charge M64 Base";
|
||||
INFO_LOG(m_logger) << "Using Charge M64 Base";
|
||||
}
|
||||
else if (ch == 3) // 3 x M64 Incr
|
||||
{
|
||||
a_sensorData->ChargeType = 1;
|
||||
INFO_LOG() << "Using Charge M64 INCR x 3";
|
||||
INFO_LOG(m_logger) << "Using Charge M64 INCR x 3";
|
||||
}
|
||||
else if (ch == 4) // 4 x M64 Incr
|
||||
{
|
||||
a_sensorData->ChargeType = 2;
|
||||
INFO_LOG() << "Using Charge M64 INCR x 4";
|
||||
INFO_LOG(m_logger) << "Using Charge M64 INCR x 4";
|
||||
}
|
||||
else if (ch == 5) // 5 x M64 Incr
|
||||
{
|
||||
a_sensorData->ChargeType = 3;
|
||||
INFO_LOG() << "Using Charge M64 INCR x 5";
|
||||
INFO_LOG(m_logger) << "Using Charge M64 INCR x 5";
|
||||
}
|
||||
else if (ch == 6) // 5 x M64 Incr + Base Bleed
|
||||
{
|
||||
a_sensorData->ChargeType = 4;
|
||||
INFO_LOG() << "Using Charge M64 INCR x 5 + Base Bleed";
|
||||
INFO_LOG(m_logger) << "Using Charge M64 INCR x 5 + Base Bleed";
|
||||
}
|
||||
else
|
||||
{
|
||||
a_sensorData->ChargeType = 0;
|
||||
isDefault = 1;
|
||||
WARNING_LOG() << "Unknown Charge Type. Using Charge M64 Base";
|
||||
WARNING_LOG(m_logger) << "Unknown Charge Type. Using Charge M64 Base";
|
||||
}
|
||||
}
|
||||
INFO_LOG() << "a_sensorData->ChargeType=" << a_sensorData->ChargeType;
|
||||
INFO_LOG(m_logger) << "a_sensorData->ChargeType=" << a_sensorData->ChargeType;
|
||||
return l_Report.m_DeviceID;
|
||||
}
|
||||
|
||||
@@ -391,16 +391,16 @@ void GeoPairingImpl::setMeteoData(const GeoPairingImplMeteoData &a_meteoData)
|
||||
{
|
||||
if (!m_Initialized)
|
||||
{
|
||||
ERROR_LOG() << "Implementation not initialized";
|
||||
ERROR_LOG(m_logger) << "Implementation not initialized";
|
||||
return;
|
||||
}
|
||||
m_MeteoData = a_meteoData;
|
||||
|
||||
INFO_LOG() << "---------- Setting Meteo Data ------------";
|
||||
INFO_LOG() << "AirPressure : " << m_MeteoData.AirPressure;
|
||||
INFO_LOG() << "Temperature : " << m_MeteoData.Temperature;
|
||||
INFO_LOG() << "WindDirection : " << m_MeteoData.WindDirection;
|
||||
INFO_LOG() << "WindSpeed : " << m_MeteoData.WindSpeed;
|
||||
INFO_LOG(m_logger) << "---------- Setting Meteo Data ------------";
|
||||
INFO_LOG(m_logger) << "AirPressure : " << m_MeteoData.AirPressure;
|
||||
INFO_LOG(m_logger) << "Temperature : " << m_MeteoData.Temperature;
|
||||
INFO_LOG(m_logger) << "WindDirection : " << m_MeteoData.WindDirection;
|
||||
INFO_LOG(m_logger) << "WindSpeed : " << m_MeteoData.WindSpeed;
|
||||
}
|
||||
|
||||
} // namespace N_GeoPairingImpl
|
||||
+10
-10
@@ -29,7 +29,7 @@ GeoPairingImplAirTarget::GeoPairingImplAirTarget(SInt32 a_playerID)
|
||||
: m_PlayerID(a_playerID),
|
||||
m_logger(CesGeoPairing::getLogger("Plugin.GeoPairing.GeoPairingImplAirTarget"))
|
||||
{
|
||||
INFO_LOG() << "Constructor : PlayerID " << m_PlayerID;
|
||||
INFO_LOG(m_logger) << "Constructor : PlayerID " << m_PlayerID;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ bool GeoPairingImplAirTarget::updatePosition(Float64 a_positionLat, Float64 a_po
|
||||
{
|
||||
if (a_positionTime <= m_PositionTime)
|
||||
{
|
||||
INFO_LOG() << "No new position info for Player " << m_PlayerID
|
||||
INFO_LOG(m_logger) << "No new position info for Player " << m_PlayerID
|
||||
<< ", abandon update. PositionTime = "
|
||||
<< a_positionTime;
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "Set new Position for Player " << m_PlayerID;
|
||||
INFO_LOG(m_logger) << "Set new Position for Player " << m_PlayerID;
|
||||
|
||||
N_Math::GeoCoord l_NewPositionUtm;
|
||||
l_NewPositionUtm.setLlPositionDegree(a_positionLat, a_positionLon, a_positionAlt);
|
||||
@@ -56,28 +56,28 @@ bool GeoPairingImplAirTarget::updatePosition(Float64 a_positionLat, Float64 a_po
|
||||
if (m_PositionTime > 0)
|
||||
{
|
||||
UInt32 l_TimeDiff = a_positionTime - m_PositionTime;
|
||||
INFO_LOG() << "l_TimeDiff [s]: " << l_TimeDiff;
|
||||
INFO_LOG(m_logger) << "l_TimeDiff [s]: " << l_TimeDiff;
|
||||
|
||||
// when new position time is more current than existing one
|
||||
if (l_TimeDiff > 0)
|
||||
{
|
||||
N_Types::Vec3 l_NewDirection = l_NewPosition - m_Position;
|
||||
Float64 l_Distance = l_NewDirection.magnitude();
|
||||
INFO_LOG() << "l_Distance [m]: " << l_Distance;
|
||||
INFO_LOG(m_logger) << "l_Distance [m]: " << l_Distance;
|
||||
l_NewDirection /= l_Distance;
|
||||
m_Direction = l_NewDirection;
|
||||
INFO_LOG() << "m_Direction : " << m_Direction;
|
||||
INFO_LOG(m_logger) << "m_Direction : " << m_Direction;
|
||||
|
||||
m_Speed = l_Distance / l_TimeDiff;
|
||||
INFO_LOG() << "m_Speed [m/s]: " << m_Speed;
|
||||
INFO_LOG(m_logger) << "m_Speed [m/s]: " << m_Speed;
|
||||
}
|
||||
}
|
||||
|
||||
m_Position = l_NewPosition;
|
||||
INFO_LOG() << "m_Position : " << m_Position;
|
||||
INFO_LOG(m_logger) << "m_Position : " << m_Position;
|
||||
|
||||
m_PositionTime = a_positionTime;
|
||||
INFO_LOG() << "m_PositionTime : " << m_PositionTime;
|
||||
INFO_LOG(m_logger) << "m_PositionTime : " << m_PositionTime;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ bool GeoPairingImplAirTarget::updatePosition(Float64 a_positionLat, Float64 a_po
|
||||
// ---------------------------------------------------------------
|
||||
void GeoPairingImplAirTarget::updateState(SInt32 a_state)
|
||||
{
|
||||
INFO_LOG() << "Set new State for Player "
|
||||
INFO_LOG(m_logger) << "Set new State for Player "
|
||||
<< m_PlayerID << " : " << a_state;
|
||||
m_State = a_state;
|
||||
}
|
||||
|
||||
+10
-10
@@ -66,20 +66,20 @@ GeoPairingImplAirTargetCacheData *GeoPairingImplAirTargetCache::getLatestCacheDa
|
||||
{
|
||||
if (m_CacheData == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "No global Cache pointer present!";
|
||||
ERROR_LOG(m_logger) << "No global Cache pointer present!";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (m_CacheData->empty())
|
||||
{
|
||||
INFO_LOG() << "Global Cache empty";
|
||||
INFO_LOG(m_logger) << "Global Cache empty";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CacheType::iterator it = m_CacheData->find(m_PlayerID);
|
||||
if (it == m_CacheData->end())
|
||||
{
|
||||
INFO_LOG() << "No Cache present for Player " << m_PlayerID
|
||||
INFO_LOG(m_logger) << "No Cache present for Player " << m_PlayerID
|
||||
<< " tracking Target " << a_targetID;
|
||||
return nullptr;
|
||||
}
|
||||
@@ -88,14 +88,14 @@ GeoPairingImplAirTargetCacheData *GeoPairingImplAirTargetCache::getLatestCacheDa
|
||||
|
||||
if (l_Cache->empty())
|
||||
{
|
||||
INFO_LOG() << "Cache for Player " << m_PlayerID << " is empty";
|
||||
INFO_LOG(m_logger) << "Cache for Player " << m_PlayerID << " is empty";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CacheDataType::iterator itC = l_Cache->find(a_targetID);
|
||||
if (itC == l_Cache->end())
|
||||
{
|
||||
INFO_LOG() << "Target " << a_targetID
|
||||
INFO_LOG(m_logger) << "Target " << a_targetID
|
||||
<< " not found in Cache of Player "
|
||||
<< m_PlayerID;
|
||||
return nullptr;
|
||||
@@ -112,7 +112,7 @@ bool GeoPairingImplAirTargetCache::storeLatestTrackState(SInt32 a_targetID, UInt
|
||||
{
|
||||
if (m_CacheData == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "No global Cache pointer present!";
|
||||
ERROR_LOG(m_logger) << "No global Cache pointer present!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ bool GeoPairingImplAirTargetCache::storeLatestTrackState(SInt32 a_targetID, UInt
|
||||
if (it == m_CacheData->end())
|
||||
{
|
||||
(*m_CacheData)[m_PlayerID] = new CacheDataType();
|
||||
INFO_LOG() << "Create new Cache for Player " << m_PlayerID;
|
||||
INFO_LOG(m_logger) << "Create new Cache for Player " << m_PlayerID;
|
||||
}
|
||||
|
||||
CacheDataType *l_Cache = (*m_CacheData)[m_PlayerID];
|
||||
@@ -131,7 +131,7 @@ bool GeoPairingImplAirTargetCache::storeLatestTrackState(SInt32 a_targetID, UInt
|
||||
{
|
||||
l_CacheData = new GeoPairingImplAirTargetCacheData();
|
||||
(*l_Cache)[a_targetID] = l_CacheData;
|
||||
INFO_LOG() << "Create new CacheObject for Target "
|
||||
INFO_LOG(m_logger) << "Create new CacheObject for Target "
|
||||
<< a_targetID << " in Cache of Player "
|
||||
<< m_PlayerID;
|
||||
}
|
||||
@@ -141,10 +141,10 @@ bool GeoPairingImplAirTargetCache::storeLatestTrackState(SInt32 a_targetID, UInt
|
||||
l_CacheData->m_TrackTime = a_trackingTime;
|
||||
l_CacheData->m_TrackState = a_trackingState;
|
||||
|
||||
INFO_LOG() << "Stored Tracking Time and State for Target "
|
||||
INFO_LOG(m_logger) << "Stored Tracking Time and State for Target "
|
||||
<< a_targetID << " in Cache of Player "
|
||||
<< m_PlayerID;
|
||||
INFO_LOG() << "-> Cached Time : " << a_trackingTime
|
||||
INFO_LOG(m_logger) << "-> Cached Time : " << a_trackingTime
|
||||
<< " State : " << a_trackingState;
|
||||
return true;
|
||||
}
|
||||
|
||||
+40
-40
@@ -30,7 +30,7 @@ GeoPairingImplAirTargetTracker::GeoPairingImplAirTargetTracker(std::vector<GeoPa
|
||||
: m_List(a_listTargets)
|
||||
, m_logger(CesGeoPairing::getLogger("Plugin.GeoPairing.GeoPairingImplAirTargetTracker"))
|
||||
{
|
||||
INFO_LOG() << "Construct Tracker for " << a_listTargets->size()
|
||||
INFO_LOG(m_logger) << "Construct Tracker for " << a_listTargets->size()
|
||||
<< " air targets";
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void GeoPairingImplAirTargetTracker::setPosition(Float64 a_positionLat,
|
||||
|
||||
N_Types::Coord3 l_Position(l_PositionUtm.utmEasting(), l_PositionUtm.utmNorthing(),
|
||||
l_PositionUtm.height());
|
||||
INFO_LOG() << "Tracker position : " << l_Position;
|
||||
INFO_LOG(m_logger) << "Tracker position : " << l_Position;
|
||||
m_Position = l_Position;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
{
|
||||
if (m_List->size() == 0)
|
||||
{
|
||||
INFO_LOG() << "No air targets to track";
|
||||
INFO_LOG(m_logger) << "No air targets to track";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
l_sensorAngle.m_H.setDegree(-a_azimuth);
|
||||
l_sensorAngle.m_P.setDegree(a_elevation);
|
||||
|
||||
INFO_LOG() << "Tracking angle : " << l_sensorAngle;
|
||||
INFO_LOG(m_logger) << "Tracking angle : " << l_sensorAngle;
|
||||
|
||||
N_Types::Radian64 l_ClosestAzimuth;
|
||||
N_Types::Radian64 l_ClosestElevation;
|
||||
@@ -85,7 +85,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
UInt64 l_ClosestPlayerImpactTime = 0;
|
||||
Float64 l_ClosestPlayerDistance = 0;
|
||||
|
||||
INFO_LOG() << "Iterating through air targets, Count : "
|
||||
INFO_LOG(m_logger) << "Iterating through air targets, Count : "
|
||||
<< m_List->size();
|
||||
for (const auto l_Target : *m_List)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
// Float64 l_TargetSpeed = l_Target->m_Speed;
|
||||
UInt64 l_TargetPosTime = l_Target->m_PositionTime;
|
||||
|
||||
INFO_LOG() << "Position of air target "
|
||||
INFO_LOG(m_logger) << "Position of air target "
|
||||
<< l_Target->m_PlayerID << " @ "
|
||||
<< l_TargetPosTime << " s : "
|
||||
<< l_targetPos;
|
||||
@@ -104,7 +104,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
/* if (l_TimeDiff != 0)
|
||||
{
|
||||
N_Types::Vec3 l_PosDiff = l_TargetDir * (l_TargetSpeed * l_TimeDiff);
|
||||
INFO_LOG() << "l_PosDiff = " << l_PosDiff;
|
||||
INFO_LOG(m_logger) << "l_PosDiff = " << l_PosDiff;
|
||||
|
||||
l_targetPos.m_X += l_PosDiff.m_X;
|
||||
l_targetPos.m_Y += l_PosDiff.m_Y;
|
||||
@@ -114,7 +114,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
// instead of position interpolation we checkout the time difference
|
||||
if (abs(l_TimeDiff) > 2)
|
||||
{
|
||||
WARNING_LOG() << "l_TimeDiff differs by more that 2 s ! m_Time = "
|
||||
WARNING_LOG(m_logger) << "l_TimeDiff differs by more that 2 s ! m_Time = "
|
||||
<< m_Time << " l_TargetPosTime = " << l_TargetPosTime
|
||||
;
|
||||
}
|
||||
@@ -123,30 +123,30 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
N_Types::Polar3 l_LinePolar = l_LineVector.getPolar3();
|
||||
N_Types::Angle3 l_LineAngle(l_LinePolar.m_Azimuth, l_LinePolar.m_Elevation, 0);
|
||||
|
||||
INFO_LOG() << "Line of sight angle to air target : " << l_LineAngle;
|
||||
INFO_LOG(m_logger) << "Line of sight angle to air target : " << l_LineAngle;
|
||||
|
||||
N_Types::Radian64 l_AzimuthDiff = fabs(l_sensorAngle.m_H - l_LineAngle.m_H);
|
||||
DEBUG_LOG() << "l_AzimuthDiff=" << l_AzimuthDiff
|
||||
DEBUG_LOG(m_logger) << "l_AzimuthDiff=" << l_AzimuthDiff
|
||||
<< " l_sensorAngle.m_H=" << l_sensorAngle.m_H
|
||||
<< " l_LineAngle.m_H=" << l_LineAngle.m_H;
|
||||
N_Types::Radian64 l_ElevationDiff = fabs(l_sensorAngle.m_P - l_LineAngle.m_P);
|
||||
|
||||
INFO_LOG() << "l_AzimuthDiff : "
|
||||
INFO_LOG(m_logger) << "l_AzimuthDiff : "
|
||||
<< l_AzimuthDiff.getDegree() << " [Grad] "
|
||||
<< l_AzimuthDiff << " [rad] ";
|
||||
INFO_LOG() << "l_AzimuthWindow : "
|
||||
INFO_LOG(m_logger) << "l_AzimuthWindow : "
|
||||
<< l_AzimuthWindow.getDegree() << " [Grad] "
|
||||
<< l_AzimuthWindow << " [rad] ";
|
||||
INFO_LOG() << "l_ElevationDiff : "
|
||||
INFO_LOG(m_logger) << "l_ElevationDiff : "
|
||||
<< l_ElevationDiff.getDegree() << " [Grad] "
|
||||
<< l_ElevationDiff << " [rad] ";
|
||||
INFO_LOG() << "l_ElevationWindow : "
|
||||
INFO_LOG(m_logger) << "l_ElevationWindow : "
|
||||
<< l_ElevationWindow.getDegree() << " [Grad] "
|
||||
<< l_ElevationWindow << " [rad] ";
|
||||
|
||||
if (fabs(l_AzimuthDiff) > l_AzimuthWindow || fabs(l_ElevationDiff) > l_ElevationWindow)
|
||||
{
|
||||
INFO_LOG() << "-> air target " << l_Target->m_PlayerID
|
||||
INFO_LOG(m_logger) << "-> air target " << l_Target->m_PlayerID
|
||||
<< " is NOT in window"
|
||||
<< " fabs(l_AzimuthDiff)=" << fabs(l_AzimuthDiff)
|
||||
<< " l_AzimuthWindow=" << l_AzimuthWindow
|
||||
@@ -160,7 +160,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
|
||||
if (l_TimeOfFlight > l_TimeRange)
|
||||
{
|
||||
INFO_LOG() << "-> Target flight time " << l_TimeOfFlight
|
||||
INFO_LOG(m_logger) << "-> Target flight time " << l_TimeOfFlight
|
||||
<< " exceeding max time of " << l_TimeRange
|
||||
;
|
||||
continue;
|
||||
@@ -168,7 +168,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
|
||||
if (l_ClosestPlayerId == 0) // as long as no reference
|
||||
{
|
||||
INFO_LOG() << "=> air target " << l_Target->m_PlayerID
|
||||
INFO_LOG(m_logger) << "=> air target " << l_Target->m_PlayerID
|
||||
<< " is in window";
|
||||
l_ClosestAzimuth = l_AzimuthDiff;
|
||||
l_ClosestElevation = l_ElevationDiff;
|
||||
@@ -182,7 +182,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
{
|
||||
if (l_TargetDistance < l_ClosestPlayerDistance)
|
||||
{
|
||||
INFO_LOG() << "=> air target " << l_Target->m_PlayerID
|
||||
INFO_LOG(m_logger) << "=> air target " << l_Target->m_PlayerID
|
||||
<< " is in window";
|
||||
l_ClosestAzimuth = l_AzimuthDiff;
|
||||
l_ClosestElevation = l_ElevationDiff;
|
||||
@@ -192,7 +192,7 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG() << "=> air target " << l_Target->m_PlayerID
|
||||
INFO_LOG(m_logger) << "=> air target " << l_Target->m_PlayerID
|
||||
<< " is in window, but ID " << l_ClosestPlayerId
|
||||
<< " is closer";
|
||||
}
|
||||
@@ -202,16 +202,16 @@ bool GeoPairingImplAirTargetTracker::track(Float64 a_azimuth,
|
||||
|
||||
if (l_ClosestPlayerId == 0)
|
||||
{
|
||||
INFO_LOG() << "No air target was within window...";
|
||||
INFO_LOG(m_logger) << "No air target was within window...";
|
||||
return false;
|
||||
}
|
||||
|
||||
a_playerId = l_ClosestPlayerId;
|
||||
a_impactTime = l_ClosestPlayerImpactTime;
|
||||
|
||||
INFO_LOG() << "a_impactTime = " << a_impactTime;
|
||||
INFO_LOG() << "l_TimeOfFlight = " << a_impactTime - m_Time;
|
||||
INFO_LOG() << "Closest air target in window: " << a_playerId;
|
||||
INFO_LOG(m_logger) << "a_impactTime = " << a_impactTime;
|
||||
INFO_LOG(m_logger) << "l_TimeOfFlight = " << a_impactTime - m_Time;
|
||||
INFO_LOG(m_logger) << "Closest air target in window: " << a_playerId;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -225,11 +225,11 @@ bool GeoPairingImplAirTargetTracker::hitCheck(SInt32 a_targetId,
|
||||
{
|
||||
if (m_List->size() == 0)
|
||||
{
|
||||
ERROR_LOG() << "No air targets to track, strange at this point!";
|
||||
ERROR_LOG(m_logger) << "No air targets to track, strange at this point!";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "Searching for air target, Count : " << m_List->size();
|
||||
INFO_LOG(m_logger) << "Searching for air target, Count : " << m_List->size();
|
||||
GeoPairingImplAirTarget *l_HitTarget = nullptr;
|
||||
|
||||
for (const auto l_Target : *m_List)
|
||||
@@ -243,7 +243,7 @@ bool GeoPairingImplAirTargetTracker::hitCheck(SInt32 a_targetId,
|
||||
|
||||
if (l_HitTarget == nullptr)
|
||||
{
|
||||
ERROR_LOG() << "No air targets found with ID " << a_targetId;
|
||||
ERROR_LOG(m_logger) << "No air targets found with ID " << a_targetId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -252,11 +252,11 @@ bool GeoPairingImplAirTargetTracker::hitCheck(SInt32 a_targetId,
|
||||
N_Types::Vec3 l_Line = l_targetPos - m_Position;
|
||||
|
||||
Float64 l_OriginalDistance = l_Line.magnitude();
|
||||
INFO_LOG() << "l_OriginalDistance = " << l_OriginalDistance;
|
||||
INFO_LOG(m_logger) << "l_OriginalDistance = " << l_OriginalDistance;
|
||||
|
||||
l_Line = (l_TargetDir + l_targetPos) - m_Position;
|
||||
Float64 l_DirectionDistance = l_Line.magnitude();
|
||||
INFO_LOG() << "l_DirectionDistance = " << l_DirectionDistance;
|
||||
INFO_LOG(m_logger) << "l_DirectionDistance = " << l_DirectionDistance;
|
||||
|
||||
|
||||
const bool l_FliesTowardsMe = l_DirectionDistance < l_OriginalDistance;
|
||||
@@ -273,14 +273,14 @@ bool GeoPairingImplAirTargetTracker::hitCheck(SInt32 a_targetId,
|
||||
|
||||
if (l_OriginalDistance > l_DistanceRange)
|
||||
{
|
||||
INFO_LOG() << "--> Target " << a_targetId << " distance "
|
||||
INFO_LOG(m_logger) << "--> Target " << a_targetId << " distance "
|
||||
<< l_OriginalDistance << " beyond max distance of "
|
||||
<< l_DistanceRange;
|
||||
return false;
|
||||
}
|
||||
if (l_targetPos.m_Z > l_FlightHeightMax)
|
||||
{
|
||||
INFO_LOG() << "--> Target " << a_targetId << " flying on height = "
|
||||
INFO_LOG(m_logger) << "--> Target " << a_targetId << " flying on height = "
|
||||
<< l_targetPos.m_Z << ", max Height for IGLA is "
|
||||
<< l_FlightHeightMax;
|
||||
return false;
|
||||
@@ -289,44 +289,44 @@ bool GeoPairingImplAirTargetTracker::hitCheck(SInt32 a_targetId,
|
||||
Float64 l_Probability = l_ModeAutoProbability;
|
||||
if (!a_modeAuto)
|
||||
l_Probability = l_ModeManuProbability;
|
||||
INFO_LOG() << "Basic Probability = " << l_Probability
|
||||
INFO_LOG(m_logger) << "Basic Probability = " << l_Probability
|
||||
<< (a_modeAuto ? " (auto)" : " (manual)");
|
||||
|
||||
/* if (l_FliesTowardsMe == a_changeOverPoint)
|
||||
{
|
||||
INFO_LOG() << "Wrong COP Factor applied";
|
||||
INFO_LOG(m_logger) << "Wrong COP Factor applied";
|
||||
l_Probability *= l_WrongCOPFactor;
|
||||
}
|
||||
*/
|
||||
|
||||
if (a_changeOverPoint)
|
||||
INFO_LOG() << "Depart Button pressed";
|
||||
INFO_LOG(m_logger) << "Depart Button pressed";
|
||||
else
|
||||
INFO_LOG() << "Depart Button released";
|
||||
INFO_LOG(m_logger) << "Depart Button released";
|
||||
|
||||
INFO_LOG() << "l_FliesTowardsMe = " << l_FliesTowardsMe;
|
||||
INFO_LOG(m_logger) << "l_FliesTowardsMe = " << l_FliesTowardsMe;
|
||||
// Wenn der Depart Button nicht gedrueckt ist, und das Ziel vom Schuetzen wegfliegt.
|
||||
if (!l_FliesTowardsMe && !a_changeOverPoint)
|
||||
{
|
||||
INFO_LOG() << "Wrong COP Factor applied";
|
||||
INFO_LOG(m_logger) << "Wrong COP Factor applied";
|
||||
l_Probability *= l_WrongCOPFactor;
|
||||
}
|
||||
|
||||
if (l_HitTarget->m_IRJammer)
|
||||
{
|
||||
INFO_LOG() << "IR Jammer Factor applied";
|
||||
INFO_LOG(m_logger) << "IR Jammer Factor applied";
|
||||
l_Probability *= l_IRJammerFactor;
|
||||
}
|
||||
|
||||
Float64 l_Random = (rand() % 100) / 100.0;
|
||||
if (l_Random > l_Probability)
|
||||
{
|
||||
INFO_LOG() << "--> Target " << a_targetId << " not hit, Probability = "
|
||||
INFO_LOG(m_logger) << "--> Target " << a_targetId << " not hit, Probability = "
|
||||
<< l_Probability << ", Randomizer = " << l_Random;
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "==> Target " << a_targetId << " hit, Probability = "
|
||||
INFO_LOG(m_logger) << "==> Target " << a_targetId << " hit, Probability = "
|
||||
<< l_Probability << ", Randomizer = " << l_Random;
|
||||
return true;
|
||||
}
|
||||
@@ -337,7 +337,7 @@ bool GeoPairingImplAirTargetTracker::hitCheck(SInt32 a_targetId,
|
||||
void GeoPairingImplAirTargetTracker::setTime(UInt64 a_time)
|
||||
{
|
||||
m_Time = a_time;
|
||||
INFO_LOG() << "Set new tracker reference time : " << m_Time;
|
||||
INFO_LOG(m_logger) << "Set new tracker reference time : " << m_Time;
|
||||
}
|
||||
|
||||
} // namespace N_GeoPairingImpl
|
||||
+3
-3
@@ -21,7 +21,7 @@ namespace N_GeoPairingImpl
|
||||
|
||||
GeoPairingImplAirTargetUpdater::~GeoPairingImplAirTargetUpdater()
|
||||
{
|
||||
INFO_LOG() << "Number of updated air targets : " << m_UpdateCount;
|
||||
INFO_LOG(m_logger) << "Number of updated air targets : " << m_UpdateCount;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ GeoPairingImplAirTargetUpdater::GeoPairingImplAirTargetUpdater(std::vector<GeoPa
|
||||
: m_List(a_listTargets)
|
||||
, m_logger(CesGeoPairing::getLogger("Plugin.GeoPairing.GeoPairingImplAirTargetUpdater"))
|
||||
{
|
||||
INFO_LOG() << "Construct Updater for " << a_listTargets->size()
|
||||
INFO_LOG(m_logger) << "Construct Updater for " << a_listTargets->size()
|
||||
<< " air targets";
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ void GeoPairingImplAirTargetUpdater::update(SInt32 a_playerID, Float64 a_positio
|
||||
// create new air target
|
||||
if (l_PlayerAirTarget == nullptr)
|
||||
{
|
||||
INFO_LOG() << "Creating a new air target object for Player "
|
||||
INFO_LOG(m_logger) << "Creating a new air target object for Player "
|
||||
<< a_playerID;
|
||||
l_PlayerAirTarget = new GeoPairingImplAirTarget(a_playerID);
|
||||
m_List->push_back(l_PlayerAirTarget);
|
||||
|
||||
+60
-60
@@ -90,21 +90,21 @@ GeoPairingImplFiredBullet::GeoPairingImplFiredBullet(const GeoPairingImplSensorD
|
||||
: m_SensorData(a_sensorData)
|
||||
, m_logger(CesGeoPairing::getLogger(loggerName ? loggerName : "Plugin.GeoPairing.GeoPairingImplFiredBullet"))
|
||||
{
|
||||
INFO_LOG() << "---------- Setting Sensor Data ------------";
|
||||
INFO_LOG() << "WeaponPositionLat : " << m_SensorData.WeaponPositionLat;
|
||||
INFO_LOG() << "WeaponPositionLong : " << m_SensorData.WeaponPositionLong;
|
||||
INFO_LOG() << "WeaponPositionHeight : " << m_SensorData.WeaponPositionHeight;
|
||||
INFO_LOG() << "WeaponAzimuth : " << m_SensorData.WeaponAzimuth << " (" << m_SensorData.WeaponAzimuth.getDegree() << ")" ;
|
||||
INFO_LOG() << "WeaponAzimuthMin : " << m_SensorData.WeaponAzimuthMin << " (" << m_SensorData.WeaponAzimuthMin.getDegree() << ")" ;
|
||||
INFO_LOG() << "WeaponAzimuthMax : " << m_SensorData.WeaponAzimuthMax << " (" << m_SensorData.WeaponAzimuthMax.getDegree() << ")" ;
|
||||
INFO_LOG() << "WeaponElevation : " << m_SensorData.WeaponElevation << " (" << m_SensorData.WeaponElevation.getDegree() << ")" ;
|
||||
INFO_LOG() << "WeaponElevationMin : " << m_SensorData.WeaponElevationMin << " (" << m_SensorData.WeaponElevationMin.getDegree() << ")" ;
|
||||
INFO_LOG() << "WeaponElevationMax : " << m_SensorData.WeaponElevationMax << " (" << m_SensorData.WeaponElevationMax.getDegree() << ")" ;
|
||||
INFO_LOG() << "WeaponTemperature : " << m_SensorData.WeaponTemperature;
|
||||
INFO_LOG() << "AmmunitionType : " << m_SensorData.AmmunitionType;
|
||||
INFO_LOG() << "ChargeType : " << m_SensorData.ChargeType;
|
||||
INFO_LOG() << "IgnitionType : " << m_SensorData.IgnitionType;
|
||||
INFO_LOG() << "FireTime : " << m_SensorData.FireTime;
|
||||
INFO_LOG(m_logger) << "---------- Setting Sensor Data ------------";
|
||||
INFO_LOG(m_logger) << "WeaponPositionLat : " << m_SensorData.WeaponPositionLat;
|
||||
INFO_LOG(m_logger) << "WeaponPositionLong : " << m_SensorData.WeaponPositionLong;
|
||||
INFO_LOG(m_logger) << "WeaponPositionHeight : " << m_SensorData.WeaponPositionHeight;
|
||||
INFO_LOG(m_logger) << "WeaponAzimuth : " << m_SensorData.WeaponAzimuth << " (" << m_SensorData.WeaponAzimuth.getDegree() << ")" ;
|
||||
INFO_LOG(m_logger) << "WeaponAzimuthMin : " << m_SensorData.WeaponAzimuthMin << " (" << m_SensorData.WeaponAzimuthMin.getDegree() << ")" ;
|
||||
INFO_LOG(m_logger) << "WeaponAzimuthMax : " << m_SensorData.WeaponAzimuthMax << " (" << m_SensorData.WeaponAzimuthMax.getDegree() << ")" ;
|
||||
INFO_LOG(m_logger) << "WeaponElevation : " << m_SensorData.WeaponElevation << " (" << m_SensorData.WeaponElevation.getDegree() << ")" ;
|
||||
INFO_LOG(m_logger) << "WeaponElevationMin : " << m_SensorData.WeaponElevationMin << " (" << m_SensorData.WeaponElevationMin.getDegree() << ")" ;
|
||||
INFO_LOG(m_logger) << "WeaponElevationMax : " << m_SensorData.WeaponElevationMax << " (" << m_SensorData.WeaponElevationMax.getDegree() << ")" ;
|
||||
INFO_LOG(m_logger) << "WeaponTemperature : " << m_SensorData.WeaponTemperature;
|
||||
INFO_LOG(m_logger) << "AmmunitionType : " << m_SensorData.AmmunitionType;
|
||||
INFO_LOG(m_logger) << "ChargeType : " << m_SensorData.ChargeType;
|
||||
INFO_LOG(m_logger) << "IgnitionType : " << m_SensorData.IgnitionType;
|
||||
INFO_LOG(m_logger) << "FireTime : " << m_SensorData.FireTime;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
@@ -115,7 +115,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculate(con
|
||||
{
|
||||
Q_UNUSED(ballisticService) // why?
|
||||
|
||||
INFO_LOG() << "----------- Calculating Impact -----------";
|
||||
INFO_LOG(m_logger) << "----------- Calculating Impact -----------";
|
||||
|
||||
N_Math::GeoCoord o_sensorUtm;
|
||||
|
||||
@@ -126,7 +126,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculate(con
|
||||
N_Types::Coord3 o_sensorPos(o_sensorUtm.utmEasting(),
|
||||
o_sensorUtm.utmNorthing(),
|
||||
o_sensorUtm.height());
|
||||
INFO_LOG() << "o_sensorPos : " << o_sensorPos;
|
||||
INFO_LOG(m_logger) << "o_sensorPos : " << o_sensorPos;
|
||||
|
||||
GeoPairingImplTrajectoryData::TrajectoryPoint tpSensor;
|
||||
tpSensor.m_X = o_sensorPos.m_X;
|
||||
@@ -138,18 +138,18 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculate(con
|
||||
N_Types::Angle3 o_sensorAngle(m_SensorData.WeaponAzimuth,
|
||||
m_SensorData.WeaponElevation,
|
||||
0);
|
||||
INFO_LOG() << "o_sensorAngle : " << o_sensorAngle;
|
||||
INFO_LOG(m_logger) << "o_sensorAngle : " << o_sensorAngle;
|
||||
|
||||
// calculate a faked shot
|
||||
Float64 d_shootingDistance = 500.0 + (m_SensorData.AmmunitionType * 200) ;
|
||||
INFO_LOG() << "d_shootingDistance : " << d_shootingDistance;
|
||||
INFO_LOG(m_logger) << "d_shootingDistance : " << d_shootingDistance;
|
||||
|
||||
N_Types::Coord3 o_shot(0, d_shootingDistance, 0);
|
||||
INFO_LOG() << "o_shot : " << o_shot;
|
||||
INFO_LOG(m_logger) << "o_shot : " << o_shot;
|
||||
o_shot = o_shot.rotate(o_sensorAngle);
|
||||
o_sensorPos += o_shot;
|
||||
INFO_LOG() << "o_shot : " << o_shot;
|
||||
INFO_LOG() << "impact : " << o_sensorPos;
|
||||
INFO_LOG(m_logger) << "o_shot : " << o_shot;
|
||||
INFO_LOG(m_logger) << "impact : " << o_sensorPos;
|
||||
|
||||
N_Math::GeoCoord o_impactUtm;
|
||||
o_impactUtm.setTotalUtmPosition(o_sensorPos.m_X, o_sensorPos.m_Y, o_sensorPos.m_Z,
|
||||
@@ -165,7 +165,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculate(con
|
||||
if (m_logger.isInfoEnabled())
|
||||
{
|
||||
for (const auto &tp : m_TrajectoryData.m_Points)
|
||||
INFO_LOG() << tp.m_X << " " << tp.m_Y << " " << tp.m_Z << " " << tp.m_H;
|
||||
INFO_LOG(m_logger) << tp.m_X << " " << tp.m_Y << " " << tp.m_Z << " " << tp.m_H;
|
||||
}
|
||||
|
||||
m_ImpactData.AmmunitionType = m_SensorData.AmmunitionType;
|
||||
@@ -181,7 +181,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateG5G6
|
||||
double drift,
|
||||
double flugzeit)
|
||||
{
|
||||
INFO_LOG() << "----------- Calculating Impact -----------";
|
||||
INFO_LOG(m_logger) << "----------- Calculating Impact -----------";
|
||||
|
||||
|
||||
Float64 xOutMgrs = 0.0;
|
||||
@@ -207,7 +207,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateG5G6
|
||||
xOutMgrs += xOut;
|
||||
yOutMgrs += yOut;
|
||||
LtsCoordTrans::UtmCoordinate tm2(utm.zone, xOutMgrs, yOutMgrs );
|
||||
INFO_LOG() << "NEW POS " << tm2.geographic().x() << " " << tm2.geographic().y() ;
|
||||
INFO_LOG(m_logger) << "NEW POS " << tm2.geographic().x() << " " << tm2.geographic().y() ;
|
||||
|
||||
//LtsCoordTrans::MGRS2LonLat(xOutMgrs, yOutMgrs, xOutLon, yOutLat);
|
||||
LtsCoordTrans::geocentric2LonLatAlt(xOutMgrs, yOutMgrs, 0.0, xOutLon, yOutLat, zOutAlt);
|
||||
@@ -218,7 +218,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateG5G6
|
||||
m_ImpactData.ImpactPositionLong = tm2.geographic().x() * (180 / M_PI);
|
||||
m_ImpactData.ImpactPositionHeight = 0;
|
||||
|
||||
INFO_LOG() << "m_SensorData.WeaponPositionLong=" << m_SensorData.WeaponPositionLong
|
||||
INFO_LOG(m_logger) << "m_SensorData.WeaponPositionLong=" << m_SensorData.WeaponPositionLong
|
||||
<< " m_SensorData.WeaponPositionLat=" << m_SensorData.WeaponPositionLat
|
||||
<< "\n entfernung=" << entfernung
|
||||
<< "\n utm.x=" << utm.x
|
||||
@@ -245,7 +245,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateSalv
|
||||
double &a_lengthField, double &a_duration,
|
||||
double &a_heading)
|
||||
{
|
||||
INFO_LOG() << "----------- Calculating Salve -----------";
|
||||
INFO_LOG(m_logger) << "----------- Calculating Salve -----------";
|
||||
|
||||
if (a_nbrRounds < 1)
|
||||
return GeoPairingImplFiredBullet::e_OUTOFRANGE;
|
||||
@@ -259,7 +259,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateSalv
|
||||
N_Types::Coord3 l_sensorPos(l_sensorUtm.utmEasting(),
|
||||
l_sensorUtm.utmNorthing(),
|
||||
l_sensorUtm.height());
|
||||
INFO_LOG() << "l_sensorPos : " << l_sensorPos;
|
||||
INFO_LOG(m_logger) << "l_sensorPos : " << l_sensorPos;
|
||||
|
||||
Float64 l_TopPos = 0, l_BottomPos = 0, l_LeftPos = 0, l_RightPos = 0, l_BelowPos = 0, l_AbovePos = 0;
|
||||
|
||||
@@ -272,7 +272,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateSalv
|
||||
|
||||
for (int i = 0; i < a_nbrRounds; i++)
|
||||
{
|
||||
INFO_LOG() << "========== Calculating Round " << i + 1 << " of " << a_nbrRounds << " =============";
|
||||
INFO_LOG(m_logger) << "========== Calculating Round " << i + 1 << " of " << a_nbrRounds << " =============";
|
||||
prepareSensorData();
|
||||
|
||||
if (calculate( ballisticService) != e_OK)
|
||||
@@ -287,7 +287,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateSalv
|
||||
l_impactUtm.utmNorthing(),
|
||||
l_impactUtm.height());
|
||||
|
||||
INFO_LOG() << "l_impactPos : " << l_impactPos;
|
||||
INFO_LOG(m_logger) << "l_impactPos : " << l_impactPos;
|
||||
|
||||
l_avgImpactPos += l_impactPos;
|
||||
l_avgImpactCount++;
|
||||
@@ -314,18 +314,18 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateSalv
|
||||
}
|
||||
}
|
||||
|
||||
INFO_LOG() << "========== Summarize Impact Data ==========";
|
||||
INFO_LOG(m_logger) << "========== Summarize Impact Data ==========";
|
||||
|
||||
a_widthField = l_RightPos - l_LeftPos;
|
||||
a_lengthField = l_TopPos - l_BottomPos;
|
||||
|
||||
INFO_LOG() << "a_widthField = " << a_widthField;
|
||||
INFO_LOG() << "a_lengthField = " << a_lengthField;
|
||||
INFO_LOG(m_logger) << "a_widthField = " << a_widthField;
|
||||
INFO_LOG(m_logger) << "a_lengthField = " << a_lengthField;
|
||||
|
||||
// calculate average impact pos for this salve
|
||||
N_Types::Coord3 l_ImpactPos = l_avgImpactPos / std::max(1, l_avgImpactCount);
|
||||
|
||||
INFO_LOG() << "l_ImpactPos (Avg) : " << l_ImpactPos;
|
||||
INFO_LOG(m_logger) << "l_ImpactPos (Avg) : " << l_ImpactPos;
|
||||
|
||||
N_Math::GeoCoord l_impactUtm;
|
||||
l_impactUtm.setTotalUtmPosition(l_ImpactPos.m_X, l_ImpactPos.m_Y, l_ImpactPos.m_Z,
|
||||
@@ -344,10 +344,10 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateSalv
|
||||
Float64 l_RoundsPerMinute = l_config->getFloat(s_MK19, s_RoundsPerMinute, 350);
|
||||
|
||||
a_duration = 60 * a_nbrRounds / l_RoundsPerMinute;
|
||||
INFO_LOG() << "a_duration = " << a_duration;
|
||||
INFO_LOG(m_logger) << "a_duration = " << a_duration;
|
||||
|
||||
Float64 l_Distance = l_ImpactPos.length(l_sensorPos);
|
||||
INFO_LOG() << "l_Distance = " << l_Distance;
|
||||
INFO_LOG(m_logger) << "l_Distance = " << l_Distance;
|
||||
|
||||
N_Types::Radian64 l_AvgHeading = m_SensorData.WeaponAzimuthMax - m_SensorData.WeaponAzimuthMin;
|
||||
l_AvgHeading /= 2.0;
|
||||
@@ -355,7 +355,7 @@ GeoPairingImplFiredBullet::E_CalcResult GeoPairingImplFiredBullet::calculateSalv
|
||||
l_AvgHeading += M_PI_2; // rotate 90deg from east
|
||||
|
||||
a_heading = l_AvgHeading.getZeroTo360();
|
||||
INFO_LOG() << "a_heading [deg ] = " << a_heading;
|
||||
INFO_LOG(m_logger) << "a_heading [deg ] = " << a_heading;
|
||||
|
||||
|
||||
return e_OK;
|
||||
@@ -369,16 +369,16 @@ GeoPairingImplImpactData *GeoPairingImplFiredBullet::getImpactData()
|
||||
{
|
||||
if (m_ImpactData.ImpactTime == 0)
|
||||
{
|
||||
ERROR_LOG() << "Impact Data not yet calculated";
|
||||
ERROR_LOG(m_logger) << "Impact Data not yet calculated";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
INFO_LOG() << "---------- Getting Impact Data ------------";
|
||||
INFO_LOG() << "ImpactPositionLat : " << m_ImpactData.ImpactPositionLat;
|
||||
INFO_LOG() << "ImpactPositionLong : " << m_ImpactData.ImpactPositionLong;
|
||||
INFO_LOG() << "ImpactPositionHeight : " << m_ImpactData.ImpactPositionHeight;
|
||||
INFO_LOG() << "ImpactTime : " << m_ImpactData.ImpactTime;
|
||||
INFO_LOG() << "AmmunitionType : " << m_ImpactData.AmmunitionType;
|
||||
INFO_LOG(m_logger) << "---------- Getting Impact Data ------------";
|
||||
INFO_LOG(m_logger) << "ImpactPositionLat : " << m_ImpactData.ImpactPositionLat;
|
||||
INFO_LOG(m_logger) << "ImpactPositionLong : " << m_ImpactData.ImpactPositionLong;
|
||||
INFO_LOG(m_logger) << "ImpactPositionHeight : " << m_ImpactData.ImpactPositionHeight;
|
||||
INFO_LOG(m_logger) << "ImpactTime : " << m_ImpactData.ImpactTime;
|
||||
INFO_LOG(m_logger) << "AmmunitionType : " << m_ImpactData.AmmunitionType;
|
||||
|
||||
return &m_ImpactData;
|
||||
}
|
||||
@@ -391,7 +391,7 @@ GeoPairingImplTrajectoryData *GeoPairingImplFiredBullet::getTrajectoryData()
|
||||
{
|
||||
if (m_ImpactData.ImpactTime == 0)
|
||||
{
|
||||
ERROR_LOG() << "Impact Data not yet calculated";
|
||||
ERROR_LOG(m_logger) << "Impact Data not yet calculated";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -406,11 +406,11 @@ void GeoPairingImplFiredBullet::setMeteoData(const GeoPairingImplMeteoData &a_me
|
||||
{
|
||||
m_MeteoData = a_meteoData;
|
||||
|
||||
INFO_LOG() << "---------- Setting Meteo Data ------------";
|
||||
INFO_LOG() << "AirPressure : " << m_MeteoData.AirPressure;
|
||||
INFO_LOG() << "Temperature : " << m_MeteoData.Temperature;
|
||||
INFO_LOG() << "WindDirection : " << m_MeteoData.WindDirection;
|
||||
INFO_LOG() << "WindSpeed : " << m_MeteoData.WindSpeed;
|
||||
INFO_LOG(m_logger) << "---------- Setting Meteo Data ------------";
|
||||
INFO_LOG(m_logger) << "AirPressure : " << m_MeteoData.AirPressure;
|
||||
INFO_LOG(m_logger) << "Temperature : " << m_MeteoData.Temperature;
|
||||
INFO_LOG(m_logger) << "WindDirection : " << m_MeteoData.WindDirection;
|
||||
INFO_LOG(m_logger) << "WindSpeed : " << m_MeteoData.WindSpeed;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
@@ -422,22 +422,22 @@ void GeoPairingImplFiredBullet::prepareSensorData()
|
||||
if (!m_SensorData.UseMinMax)
|
||||
return;
|
||||
|
||||
INFO_LOG() << "----------- Prepare Sensor Angles -----------";
|
||||
INFO_LOG(m_logger) << "----------- Prepare Sensor Angles -----------";
|
||||
|
||||
N_Types::Radian64 l_AzimuthMin = m_SensorData.WeaponAzimuthMin;
|
||||
N_Types::Radian64 l_AzimuthMax = m_SensorData.WeaponAzimuthMax;
|
||||
|
||||
INFO_LOG() << "WeaponAzimuthMin [deg] = " << m_SensorData.WeaponAzimuthMin.getDegree();
|
||||
INFO_LOG() << "WeaponAzimuthMax [deg] = " << m_SensorData.WeaponAzimuthMax.getDegree();
|
||||
INFO_LOG() << "WeaponElevationMin [deg] = " << m_SensorData.WeaponElevationMin.getDegree();
|
||||
INFO_LOG() << "WeaponElevationMax [deg] = " << m_SensorData.WeaponElevationMax.getDegree();
|
||||
INFO_LOG(m_logger) << "WeaponAzimuthMin [deg] = " << m_SensorData.WeaponAzimuthMin.getDegree();
|
||||
INFO_LOG(m_logger) << "WeaponAzimuthMax [deg] = " << m_SensorData.WeaponAzimuthMax.getDegree();
|
||||
INFO_LOG(m_logger) << "WeaponElevationMin [deg] = " << m_SensorData.WeaponElevationMin.getDegree();
|
||||
INFO_LOG(m_logger) << "WeaponElevationMax [deg] = " << m_SensorData.WeaponElevationMax.getDegree();
|
||||
|
||||
N_Types::Radian64 l_AzimuthDelta = fabs(l_AzimuthMax - l_AzimuthMin);
|
||||
|
||||
// test the +/- 180 deg limit case
|
||||
if (l_AzimuthDelta > M_PI)
|
||||
{
|
||||
INFO_LOG() << "Take short circle path";
|
||||
INFO_LOG(m_logger) << "Take short circle path";
|
||||
l_AzimuthDelta -= M_PI;
|
||||
}
|
||||
|
||||
@@ -447,10 +447,10 @@ void GeoPairingImplFiredBullet::prepareSensorData()
|
||||
m_SensorData.WeaponElevation = m_SensorData.WeaponElevationMin + (drand48() * l_DeltaElevation);
|
||||
m_SensorData.WeaponAzimuth = m_SensorData.WeaponAzimuthMin + (drand48() * l_DeltaAzimuth);
|
||||
|
||||
INFO_LOG() << "l_DeltaElevation : " << l_DeltaElevation << " (" << l_DeltaElevation.getDegree() << ")";
|
||||
INFO_LOG() << "l_DeltaAzimuth : " << l_DeltaAzimuth << " (" << l_DeltaAzimuth.getDegree() << ")";
|
||||
INFO_LOG() << "WeaponElevation : " << m_SensorData.WeaponElevation << " (" << m_SensorData.WeaponElevation.getDegree() << ")" ;
|
||||
INFO_LOG() << "WeaponAzimuth : " << m_SensorData.WeaponAzimuth << " (" << m_SensorData.WeaponAzimuth.getDegree() << ")";
|
||||
INFO_LOG(m_logger) << "l_DeltaElevation : " << l_DeltaElevation << " (" << l_DeltaElevation.getDegree() << ")";
|
||||
INFO_LOG(m_logger) << "l_DeltaAzimuth : " << l_DeltaAzimuth << " (" << l_DeltaAzimuth.getDegree() << ")";
|
||||
INFO_LOG(m_logger) << "WeaponElevation : " << m_SensorData.WeaponElevation << " (" << m_SensorData.WeaponElevation.getDegree() << ")" ;
|
||||
INFO_LOG(m_logger) << "WeaponAzimuth : " << m_SensorData.WeaponAzimuth << " (" << m_SensorData.WeaponAzimuth.getDegree() << ")";
|
||||
|
||||
}
|
||||
|
||||
|
||||
+43
-43
@@ -53,38 +53,38 @@ HandlerGeoPairing::HandlerGeoPairing(const std::shared_ptr<CentralEffectSimulati
|
||||
ftcTab->enableSendCesHit();
|
||||
|
||||
connect(m_timer, &QTimer::timeout, this, &HandlerGeoPairing::sendFtcCesHitRequestTimeout);
|
||||
INFO_LOG() << "configPath = " << m_ballisticService->getConfigPath();
|
||||
INFO_LOG() << "configFile = " << m_ballisticService->getConfigFile();
|
||||
INFO_LOG() << "ammunitionFile = " << m_ballisticService->getAmmunitionFile();
|
||||
INFO_LOG(m_logger) << "configPath = " << m_ballisticService->getConfigPath();
|
||||
INFO_LOG(m_logger) << "configFile = " << m_ballisticService->getConfigFile();
|
||||
INFO_LOG(m_logger) << "ammunitionFile = " << m_ballisticService->getAmmunitionFile();
|
||||
|
||||
const QString s_configFile = Settings::cesGeopairingIniPath() + QStringLiteral("/") + Settings::cesGeopairingIniFile();
|
||||
INFO_LOG() << "GeoPairing Config location : " << s_configFile;
|
||||
INFO_LOG(m_logger) << "GeoPairing Config location : " << s_configFile;
|
||||
|
||||
N_GeoPairingImpl::GeoPairingImpl *l_impl = new N_GeoPairingImpl::GeoPairingImplDted;
|
||||
INFO_LOG() << "--> Installing GeoPairingImplDted...";
|
||||
INFO_LOG(m_logger) << "--> Installing GeoPairingImplDted...";
|
||||
N_GeoPairingImpl::GeoPairingImplFactory::setImpl(l_impl);
|
||||
|
||||
// initialize the GeoPairing implementation
|
||||
if (!N_GeoPairingImpl::GeoPairingImplFactory::initialize(Settings::cesGeopairingIniPath()))
|
||||
{
|
||||
ERROR_LOG() << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplDted!";
|
||||
ERROR_LOG(m_logger) << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplDted!";
|
||||
|
||||
l_impl = new N_GeoPairingImpl::GeoPairingImplBalistic();
|
||||
INFO_LOG() << "--> Installing GeoPairingImplBalistic...";
|
||||
INFO_LOG(m_logger) << "--> Installing GeoPairingImplBalistic...";
|
||||
N_GeoPairingImpl::GeoPairingImplFactory::setImpl(l_impl);
|
||||
if (!N_GeoPairingImpl::GeoPairingImplFactory::initialize(s_configFile))
|
||||
{
|
||||
ERROR_LOG() << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplBalistic!";
|
||||
ERROR_LOG(m_logger) << "Couldn't initialize GeoPairingImplFactory with GeoPairingImplBalistic!";
|
||||
abort();
|
||||
}
|
||||
else
|
||||
INFO_LOG() << "GeoPairingImplBalistic correctly initialized";
|
||||
INFO_LOG(m_logger) << "GeoPairingImplBalistic correctly initialized";
|
||||
}
|
||||
else
|
||||
INFO_LOG() << "GeoPairingImplDted correctly initialized";
|
||||
INFO_LOG(m_logger) << "GeoPairingImplDted correctly initialized";
|
||||
|
||||
|
||||
INFO_LOG() << "Initialization finished";
|
||||
INFO_LOG(m_logger) << "Initialization finished";
|
||||
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -96,7 +96,7 @@ HandlerGeoPairing::~HandlerGeoPairing()
|
||||
|
||||
bool HandlerGeoPairing::init()
|
||||
{
|
||||
DEBUG_LOG() << "init";
|
||||
DEBUG_LOG(m_logger) << "init";
|
||||
auto dtcTab = m_ddsHandlerAes->dtcTab();
|
||||
auto dtcMdm = m_ddsHandlerAes->dtcMdm();
|
||||
|
||||
@@ -111,12 +111,12 @@ bool HandlerGeoPairing::init()
|
||||
// create GeoConfig for this process && initFilename, just one time, just here
|
||||
GeoConfig *o_config = GeoConfig::getInstance();
|
||||
const QString &fileName = Settings::cesGeopairingIniPath() + QStringLiteral("/") + Settings::cesGeopairingIniFile();
|
||||
DEBUG_LOG() << "fileName= " << fileName;
|
||||
DEBUG_LOG(m_logger) << "fileName= " << fileName;
|
||||
if (!o_config || !o_config->initFilename(fileName))
|
||||
{
|
||||
// Fehlerfall:
|
||||
const QFileInfo qFileInfo(fileName);
|
||||
ERROR_LOG() << Q_FUNC_INFO << " initFilename failed: '" << qFileInfo.absoluteFilePath() << "'";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " initFilename failed: '" << qFileInfo.absoluteFilePath() << "'";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ bool HandlerGeoPairing::init()
|
||||
|
||||
QString s_filter = o_config->getString(s_group, s_keyOfEntries, s_ammunition);
|
||||
|
||||
DEBUG_LOG() << "s_group=" << s_group
|
||||
DEBUG_LOG(m_logger) << "s_group=" << s_group
|
||||
<< " n_numberOfAmmunitions=" << n_numberOfAmmunitions
|
||||
<< " s_keyOfEntries=" << s_keyOfEntries
|
||||
<< " s_ammunition=" << s_ammunition
|
||||
@@ -139,7 +139,7 @@ bool HandlerGeoPairing::init()
|
||||
QString s_ammu_group = s_filter + QString::number(i + 1);
|
||||
QString s_unknown = QStringLiteral("<unknown>");
|
||||
QString s_ammu_value = o_config->getString(s_group, s_ammu_group, s_unknown);
|
||||
DEBUG_LOG() << "s_ammu_value=" << s_ammu_value
|
||||
DEBUG_LOG(m_logger) << "s_ammu_value=" << s_ammu_value
|
||||
<< " s_group=" << s_group
|
||||
<< " s_ammu_group=" << s_ammu_group;
|
||||
}
|
||||
@@ -151,33 +151,33 @@ bool HandlerGeoPairing::init()
|
||||
void HandlerGeoPairing::onSendCesHitReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send hit on participant to training area: " << replyObject();
|
||||
WARNING_LOG(m_logger) << "Can not send hit on participant to training area: " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
void HandlerGeoPairing::onSendCesHitInformationReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send hit information on participant to training area: " << replyObject();
|
||||
WARNING_LOG(m_logger) << "Can not send hit information on participant to training area: " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onSendCesHitInformationReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendCesHitInformationReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
void HandlerGeoPairing::onExplosionSingleModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send ExplosionSingleModify: " << replyObject();
|
||||
WARNING_LOG(m_logger) << "Can not send ExplosionSingleModify: " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onExplosionSingleModifyReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onExplosionSingleModifyReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
void HandlerGeoPairing::onExplosionAreaModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send ExplosionAreaModify: " << replyObject();
|
||||
WARNING_LOG(m_logger) << "Can not send ExplosionAreaModify: " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onExplosionAreaModifyReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onExplosionAreaModifyReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
// ///////////////////////////////////
|
||||
@@ -187,13 +187,13 @@ void HandlerGeoPairing::onMeteoDataChanged(const MeteoDataManagement::MeteoData
|
||||
{
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "onMeteoDataChanged eRemoved";
|
||||
DEBUG_LOG(m_logger) << "onMeteoDataChanged eRemoved";
|
||||
return;
|
||||
}
|
||||
|
||||
m_meteoData = data;
|
||||
|
||||
DEBUG_LOG() << "Got onMeteoDataChanged "
|
||||
DEBUG_LOG(m_logger) << "Got onMeteoDataChanged "
|
||||
<< " id=" << m_meteoData.id()
|
||||
<< " windSpeed=" << m_meteoData.windSpeed()
|
||||
<< " windDirection=" << m_meteoData.windDirection()
|
||||
@@ -208,11 +208,11 @@ void HandlerGeoPairing::onMeteoDataChanged(const MeteoDataManagement::MeteoData
|
||||
//{
|
||||
// if (modType == DataModification::eRemoved)
|
||||
// {
|
||||
// DEBUG_LOG() << "onGeoPairingDataChanged eRemoved";
|
||||
// DEBUG_LOG(m_logger) << "onGeoPairingDataChanged eRemoved";
|
||||
// return;
|
||||
// }
|
||||
// m_geoPairingPtr = new GeoPairing(m_ballisticService);
|
||||
// DEBUG_LOG() << "Got onGeoPairingDataChanged "
|
||||
// DEBUG_LOG(m_logger) << "Got onGeoPairingDataChanged "
|
||||
// << " equipmentNumber=" << data.equipmentNumber()
|
||||
// << " position lat=" << data.position().lat()
|
||||
// << " lon=" << data.position().lon()
|
||||
@@ -236,7 +236,7 @@ void HandlerGeoPairing::onMeteoDataChanged(const MeteoDataManagement::MeteoData
|
||||
// while (i.hasNext())
|
||||
// {
|
||||
// i.next();
|
||||
// DEBUG_LOG() << i.key() << ": participantId=" << i.value().participantId()
|
||||
// DEBUG_LOG(m_logger) << i.key() << ": participantId=" << i.value().participantId()
|
||||
// << " participantTypeId= " << i.value().participantTypeId();
|
||||
// }
|
||||
|
||||
@@ -276,7 +276,7 @@ void HandlerGeoPairing::onMeteoDataChanged(const MeteoDataManagement::MeteoData
|
||||
|
||||
// if (areaFireToCtas.hit)
|
||||
// {
|
||||
// INFO_LOG() << "AreaFireToCtas"
|
||||
// INFO_LOG(m_logger) << "AreaFireToCtas"
|
||||
// << " playerId=" << areaFireToCtas.playerId
|
||||
// << " impactTime=" << areaFireToCtas.impactTime
|
||||
// << " duration=" << areaFireToCtas.duration
|
||||
@@ -319,7 +319,7 @@ void HandlerGeoPairing::onMeteoDataChanged(const MeteoDataManagement::MeteoData
|
||||
// if (fireToAircaft.hit)
|
||||
// {
|
||||
// TrainingAreaBase::SendCesHitInformation chi;
|
||||
// INFO_LOG() << "send CesHitInformation to Ctas "
|
||||
// INFO_LOG(m_logger) << "send CesHitInformation to Ctas "
|
||||
// << " equipmentNumberGunner: " << fireToAircaft.equipmentNumberGunner
|
||||
// << " participantIdTarget: " << fireToAircaft.participantIdTarget
|
||||
// << " impactTime: " << fireToAircaft.impactTime
|
||||
@@ -348,7 +348,7 @@ void HandlerGeoPairing::onMeteoDataChanged(const MeteoDataManagement::MeteoData
|
||||
// gpd.equipmentNumber(data.equipmentNumber());
|
||||
// gpd.participantId(participantId);
|
||||
// gpd.payload(LtsUtils::convert<std::vector<uint8_t>>(reportTarget.sendData));
|
||||
// INFO_LOG() << " send Geopairing-Data to Ctas"
|
||||
// INFO_LOG(m_logger) << " send Geopairing-Data to Ctas"
|
||||
// << " equipmentNumber: " << data.equipmentNumber()
|
||||
// << " playerId: " << reportTarget.playerId
|
||||
// << " participantId: " << participantId
|
||||
@@ -361,17 +361,17 @@ void HandlerGeoPairing::onMeteoDataChanged(const MeteoDataManagement::MeteoData
|
||||
|
||||
void HandlerGeoPairing::onGeoPairingDataChanged(const TrainingAreaBase::GeopairingData &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "Got onGeoPairingDataChanged ";
|
||||
DEBUG_LOG(m_logger) << "Got onGeoPairingDataChanged ";
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
DEBUG_LOG() << "onGeoPairingDataChanged eRemoved";
|
||||
DEBUG_LOG(m_logger) << "onGeoPairingDataChanged eRemoved";
|
||||
return;
|
||||
}
|
||||
unsigned char msgType = 0xE3;
|
||||
|
||||
if (static_cast<unsigned char>(data.payload().at(0)) != msgType)
|
||||
{
|
||||
DEBUG_LOG() << "data.payload().at(0) != msgType";
|
||||
DEBUG_LOG(m_logger) << "data.payload().at(0) != msgType";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ void HandlerGeoPairing::onGeoPairingDataChanged(const TrainingAreaBase::Geopairi
|
||||
v0 = Settings::moerserLoad_6();
|
||||
|
||||
|
||||
DEBUG_LOG() << "Got onGeoPairingDataChanged "
|
||||
DEBUG_LOG(m_logger) << "Got onGeoPairingDataChanged "
|
||||
<< "\nequipmentNumber=" << data.equipmentNumber()
|
||||
<< "\nposition lat=" << data.position().lat()
|
||||
<< "/" << data.position().lon()
|
||||
@@ -487,7 +487,7 @@ void HandlerGeoPairing::onGeoPairingDataChanged(const TrainingAreaBase::Geopairi
|
||||
//QPointF distVector = calculateDistVector ( rw, azimut/10.0);
|
||||
QPointF explosionPosUtm = calculateExplosionPosUtm(rw, azimut / 10.0, posUtm);
|
||||
|
||||
DEBUG_LOG() << "Result: rw=" << rw
|
||||
DEBUG_LOG(m_logger) << "Result: rw=" << rw
|
||||
<< " v0=" << v0
|
||||
<< "\n t1=" << t1
|
||||
<< "\n explosionPosUtm=" << explosionPosUtm.x() << "/" << explosionPosUtm.y();
|
||||
@@ -511,7 +511,7 @@ void HandlerGeoPairing::onGeoPairingDataChanged(const TrainingAreaBase::Geopairi
|
||||
explosionSingleModifyRequest.partyId(partyId);
|
||||
|
||||
|
||||
DEBUG_LOG() << "impactTime=" << data.sampleTime()
|
||||
DEBUG_LOG(m_logger) << "impactTime=" << data.sampleTime()
|
||||
<< " name=" << name
|
||||
<< " m_ddsHandler->currentPartitionTime=" << m_ddsHandlerAes->currentPartitionTime()
|
||||
<< " participantId=" << participantId << " " << participantId
|
||||
@@ -519,21 +519,21 @@ void HandlerGeoPairing::onGeoPairingDataChanged(const TrainingAreaBase::Geopairi
|
||||
|
||||
if (impactTime > m_ddsHandlerAes->currentPartitionTime())
|
||||
{
|
||||
DEBUG_LOG() << "Send explosionSingleModifyRequest";
|
||||
DEBUG_LOG(m_logger) << "Send explosionSingleModifyRequest";
|
||||
auto ftcAes = m_ddsHandlerAes->ftcAes();
|
||||
ftcAes->explosionSingleModifyRequest(explosionSingleModifyRequest, this);
|
||||
}
|
||||
else
|
||||
DEBUG_LOG() << "NOT Send explosionSingleModifyRequest impactTime is in the past";
|
||||
DEBUG_LOG(m_logger) << "NOT Send explosionSingleModifyRequest impactTime is in the past";
|
||||
}
|
||||
|
||||
|
||||
void HandlerGeoPairing::onSendGeopairingDataReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
WARNING_LOG() << "Can not send GeopPairing Data participant : " << replyObject();
|
||||
WARNING_LOG(m_logger) << "Can not send GeopPairing Data participant : " << replyObject();
|
||||
else
|
||||
DEBUG_LOG() << "onSendGeopairingDataReply for id " << replyObject.id() << " success";
|
||||
DEBUG_LOG(m_logger) << "onSendGeopairingDataReply for id " << replyObject.id() << " success";
|
||||
}
|
||||
|
||||
void HandlerGeoPairing::sendFtcCesHitRequestTimeout()
|
||||
@@ -541,7 +541,7 @@ void HandlerGeoPairing::sendFtcCesHitRequestTimeout()
|
||||
auto ftcTab = m_ddsHandlerAes->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG() << "sendFtcCesHitRequest: " << hr;
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequest: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
}
|
||||
m_requestMap.clear();
|
||||
|
||||
+1
@@ -42,6 +42,7 @@ public:
|
||||
eElevationBelowZero = 3
|
||||
};
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
struct GeoPCharge
|
||||
{
|
||||
|
||||
|
||||
+5
-5
@@ -47,7 +47,7 @@ bool CesGeoPairingInterfaceImpl::init(int domainId, int exerciseId)
|
||||
{
|
||||
m_domainId = domainId;
|
||||
m_exerciseId = exerciseId;
|
||||
INFO_LOG() << "CesGeoPairingInterfaceImpl::init()"
|
||||
INFO_LOG(m_logger) << "CesGeoPairingInterfaceImpl::init()"
|
||||
<< " m_domainId=" << m_domainId
|
||||
<< " m_exerciseId=" << m_exerciseId;
|
||||
|
||||
@@ -66,11 +66,11 @@ bool CesGeoPairingInterfaceImpl::init(int domainId, int exerciseId)
|
||||
|
||||
if (!m_handlerGeoPairing->init())
|
||||
{
|
||||
ERROR_LOG() << "Initialisation m_handlerGeoPairing failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation m_handlerGeoPairing failed.";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "CesGeoPairingInterfaceImpl::init() return true";
|
||||
INFO_LOG(m_logger) << "CesGeoPairingInterfaceImpl::init() return true";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -78,8 +78,8 @@ QString CesGeoPairingInterfaceImpl::echo(const QString &message)
|
||||
{
|
||||
|
||||
QString ret(QStringLiteral("<<<< %1 >>>> CesGeoPairingInterfaceImpl::echo").arg(message));
|
||||
INFO_LOG() << "CesGeoPairingInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG() << "DEBUG: CesGeoPairingInterfaceImpl::echo return:" << ret;
|
||||
INFO_LOG(m_logger) << "CesGeoPairingInterfaceImpl::echo return:" << ret;
|
||||
DEBUG_LOG(m_logger) << "DEBUG: CesGeoPairingInterfaceImpl::echo return:" << ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user