Session 026: Lts/Services Qt5:: to Qt6:: migration
- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
c143ff8a4f
commit
d5af8b9764
1244 files changed
+4266
-4633
No files matched your search
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <LtsUtilsSettings/settings.h>
|
||||
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QNetworkReply>
|
||||
#include <qmath.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
+2
-2
@@ -13,13 +13,13 @@
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <TrainingAreaBase/tab_ftc.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
// HTTP Request
|
||||
#include <QtNetwork/QNetworkAccessManager>
|
||||
#include <QNetworkAccessManager>
|
||||
|
||||
namespace CesArtillerySound
|
||||
{
|
||||
|
||||
+5
-2
@@ -18,7 +18,7 @@
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
#include <CentralEffectSimulation/main_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CesArtillerySound
|
||||
@@ -78,7 +78,6 @@ private Q_SLOTS:
|
||||
bool init(int domainId, int exerciseId) override;
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
private:
|
||||
CentralEffectSimulation::Plugin::DataProvider *m_pdp;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
@@ -88,6 +87,10 @@ private:
|
||||
std::shared_ptr<CentralEffectSimulation::HandlerBuildingData> m_handlerBuildingData; ///< Pointer to AES Building handler
|
||||
std::shared_ptr<CentralEffectSimulation::HandlerParticipant> m_handlerParticipant; ///< Pointer to handler for all participants
|
||||
std::shared_ptr<HandlerArtillerieSound> m_handlerArtillerieSound; /// < Pointer to handler for Artillerie Sound
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_domainId = 0;
|
||||
int m_exerciseId = 0;
|
||||
};
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
+3
-4
@@ -7,10 +7,9 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_borderline.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QLineF>
|
||||
#include <QTimer>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -127,7 +126,7 @@ void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEff
|
||||
<< " participantTypeId=" << partPos.participantTypeId()
|
||||
<< " Anzahl Borderlines=" << m_borderlines.size();
|
||||
|
||||
for (const BorderlineUtm &borderline : std::as_const(m_borderlines))
|
||||
for (const BorderlineUtm &borderline : qAsConst(m_borderlines))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "borderline id = " << borderline.id
|
||||
<< ", Box bottomLeft = " << CentralEffectSimulation::debug(borderline.boundingBox.bottomLeft())
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QRectF>
|
||||
#include <QHash>
|
||||
#include <QRectF>
|
||||
#include <QPolygonF>
|
||||
|
||||
|
||||
|
||||
+6
-7
@@ -6,10 +6,9 @@
|
||||
* Created by gr, SLSE, 2017-02-20
|
||||
*/
|
||||
#include "handler_simulated_movement.h"
|
||||
#include <utility>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
@@ -66,7 +65,7 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb()
|
||||
DEBUG_LOG(m_logger) << "loadSimulatedMovementSegmentsFromDb size =" << simMoveSegVec.size();
|
||||
|
||||
// add to internal buffer
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovement &data : std::as_const(simMoveVec))
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovement &data : qAsConst(simMoveVec))
|
||||
{
|
||||
CentralEffectSimulation::SimulatedMovement request;
|
||||
request.id(data.id);
|
||||
@@ -78,14 +77,14 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb()
|
||||
DEBUG_LOG(m_logger) << "Loading SimulatedMovement: " << request;
|
||||
|
||||
QMap <int, CentralEffectSimulation::Database::CesSimulatedMovementSegment> segDbMap; // QMap to get it sorted
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segData : std::as_const(simMoveSegVec))
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segData : qAsConst(simMoveSegVec))
|
||||
{
|
||||
if (segData.simulatedMovementId == data.id)
|
||||
segDbMap.insert(segData.positionIndex, segData);
|
||||
}
|
||||
request.segments().reserve(segDbMap.size());
|
||||
CentralEffectSimulation::SimulatedMovementSegment seg;
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segDb : std::as_const(segDbMap))
|
||||
for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segDb : qAsConst(segDbMap))
|
||||
{
|
||||
seg.delay(segDb.delay);
|
||||
seg.name(segDb.name.toStdString());
|
||||
@@ -281,7 +280,7 @@ void HandlerSimulatedMovement::onSimulatedMovementRemoveByParticipantIdRequest(c
|
||||
DEBUG_LOG(m_logger) << "onSimulatedMovementRemoveByParticipantIdRequest: " << request;
|
||||
|
||||
int id = 0;
|
||||
for (const SimulationMovement *simMovement : std::as_const(m_simulationMovements))
|
||||
for (const SimulationMovement *simMovement : qAsConst(m_simulationMovements))
|
||||
{
|
||||
if (simMovement->participantId() == request.participantId())
|
||||
{
|
||||
@@ -300,7 +299,7 @@ SimulationMovement *HandlerSimulatedMovement::findSimulationMovement(int id, int
|
||||
{
|
||||
if (id)
|
||||
return m_simulationMovements.value(id);
|
||||
for (SimulationMovement *s : std::as_const(m_simulationMovements))
|
||||
for (SimulationMovement *s : qAsConst(m_simulationMovements))
|
||||
{
|
||||
if (s->participantId() == participantId)
|
||||
return s;
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QHash>
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-2
@@ -16,7 +16,7 @@
|
||||
#include <CentralEffectSimulation/main_handler.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
//namespace NGLDB
|
||||
@@ -63,7 +63,6 @@ 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;
|
||||
@@ -74,6 +73,10 @@ private:
|
||||
std::shared_ptr<CentralEffectSimulation::HandlerParticipant> m_handlerParticipant; ///< Pointer to handler for all participants
|
||||
std::shared_ptr<HandlerParticipantBorderline> m_handlerParticipantBorderline; ///< Pointer to handler for check participants cross Borderline
|
||||
std::shared_ptr<HandlerSimulatedMovement> m_handlerSimulatedMovement; ///< Pointer to handler for Simulated Movement
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_domainId = 0;
|
||||
int m_exerciseId = 0;
|
||||
};
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "simulation_movement.h"
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QDateTime>
|
||||
|
||||
namespace CentralEffectSimulationBasic
|
||||
{
|
||||
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/ces_db.h>
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QLineF>
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
namespace CentralEffectSimulationBasic
|
||||
|
||||
+17
-18
@@ -7,16 +7,15 @@
|
||||
*/
|
||||
|
||||
#include "ces_building_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <Buildings/BuildingControlUnit/VWM/vwm_xml_reader.h>
|
||||
#include <Buildings/BuildingControlUnit/VWM/vwm_math.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QLineF>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
@@ -91,20 +90,20 @@ bool BuildingModel::init(
|
||||
)
|
||||
{
|
||||
m_buildingId = buildingId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, m_buildingId=" << m_buildingId;
|
||||
|
||||
m_angle = mse.angle() * M_PI / 180.;
|
||||
m_refPosGeo = mse.geoPosition();
|
||||
m_refPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(mse.geoPosition().lon(), mse.geoPosition().lat());
|
||||
m_refPos = {m_refPosUtm.x, m_refPosUtm.y, m_refPosGeo.z()};
|
||||
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, m_buildingId=" << m_buildingId
|
||||
<< ", m_angle=" << m_angle
|
||||
<< ", m_refPosGeo=" << m_refPosGeo
|
||||
<< ", m_refPos=" << m_refPos;
|
||||
|
||||
|
||||
for (const InfrastructureManagement::FootprintElement &footprintElement : std::as_const(mfp.elements()))
|
||||
for (const InfrastructureManagement::FootprintElement &footprintElement : qAsConst(mfp.elements()))
|
||||
m_footprint << QPointF(footprintElement.relPosition().offsetX(), footprintElement.relPosition().offsetY());
|
||||
if (m_footprint.isEmpty())
|
||||
{
|
||||
@@ -123,14 +122,14 @@ bool BuildingModel::init(
|
||||
|
||||
m_height = DBL_MIN;
|
||||
const QMap<int, BuildingControlUnit::VWM::Room> &roomMap = rooms();
|
||||
for (const BuildingControlUnit::VWM::Room &room : std::as_const(roomMap))
|
||||
for (const BuildingControlUnit::VWM::OuterWall &outerWall : std::as_const(room.outerWalls()))
|
||||
for (const BuildingControlUnit::VWM::WallElement &wallElement : std::as_const(outerWall.elements()))
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(wallElement))
|
||||
for (const BuildingControlUnit::VWM::Room &room : qAsConst(roomMap))
|
||||
for (const BuildingControlUnit::VWM::OuterWall &outerWall : qAsConst(room.outerWalls()))
|
||||
for (const BuildingControlUnit::VWM::WallElement &wallElement : qAsConst(outerWall.elements()))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(wallElement))
|
||||
if (point.z() > m_height)
|
||||
m_height = point.z();
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, m_buildingId=" << m_buildingId;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, m_buildingId=" << m_buildingId;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -141,7 +140,7 @@ bool BuildingModel::init(
|
||||
|
||||
bool BuildingModel::hasIntersectionSimplified(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end) const
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " m_buildingId=" << m_buildingId
|
||||
<< ", start=" << start << ", end=" << end;
|
||||
|
||||
// keep origin of QRect (topLeft) in mind:
|
||||
@@ -230,7 +229,7 @@ bool BuildingModel::hasIntersection(const LtsUtils::QPoint3D &start, const LtsUt
|
||||
|
||||
bool bHasIntersection = BuildingControlUnit::VWM::Math::hasIntersection(start, end, rooms());
|
||||
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " m_buildingId=" << m_buildingId
|
||||
<< ", start=" << start << ", end=" << end
|
||||
<< ", rooms().size()" << rooms().size()
|
||||
<< ", bHasIntersection=" << bHasIntersection;
|
||||
@@ -312,7 +311,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::fromGeographic(const std::vector<Core
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const Core::GeoPosition &point : std::as_const(points))
|
||||
for (const Core::GeoPosition &point : qAsConst(points))
|
||||
ret.append(fromGeographic(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -327,7 +326,7 @@ std::vector<Core::GeoPosition> BuildingModel::toGeographic(const QVector<LtsUtil
|
||||
{
|
||||
std::vector<Core::GeoPosition> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
ret.push_back(toGeographic(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -342,7 +341,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::fromReference(const QVector<LtsUtils:
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
ret.append(fromReference(point));
|
||||
return ret;
|
||||
}
|
||||
@@ -356,7 +355,7 @@ QVector<LtsUtils::QPoint3D> BuildingModel::toReference(const QVector<LtsUtils::Q
|
||||
{
|
||||
QVector<LtsUtils::QPoint3D> ret;
|
||||
ret.reserve(points.size());
|
||||
for (const LtsUtils::QPoint3D &point : std::as_const(points))
|
||||
for (const LtsUtils::QPoint3D &point : qAsConst(points))
|
||||
ret.append(toReference(point));
|
||||
return ret;
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <InfrastructureManagement/ism.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <QPolygonF>
|
||||
|
||||
using namespace CentralEffectSimulation;
|
||||
|
||||
+13
-14
@@ -7,19 +7,18 @@
|
||||
*/
|
||||
|
||||
#include "handler_aes_data.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <QTransform>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#define TIMEDIFFVALID 3000
|
||||
@@ -235,7 +234,7 @@ void HandlerAesData::calculateBuildingExplosion(const AreaEffectSimulation::Char
|
||||
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_handlerBuildingData.getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
{
|
||||
|
||||
const Core::GeoPosition2D impactPosition2D(impactPosition.lon(), impactPosition.lat());
|
||||
@@ -407,7 +406,7 @@ void HandlerAesData::onEffectsChanged(const AreaEffectSimulation::Effects &effec
|
||||
|
||||
// calculate for every building of our exercise:
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &footprints = m_handlerBuildingData->getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
{
|
||||
calculateImpacts(effects, footprint);
|
||||
}
|
||||
@@ -494,7 +493,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
// Vulnerability should be calculated
|
||||
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &footprints = m_handlerBuildingData->getFootprints();
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints))
|
||||
{
|
||||
calculateImpacts(data, aesItemView, footprint);
|
||||
} // for
|
||||
@@ -586,7 +585,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
CentralEffectSimulation::BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId];
|
||||
QSet<int> &bitfieldState = bitfieldStates[aesItemId];
|
||||
for (int i : std::as_const(bitfieldState))
|
||||
for (int i : qAsConst(bitfieldState))
|
||||
DEBUG_LOG(m_logger) << "bitfieldState for " << aesItemId << ": " << i;
|
||||
|
||||
for (int32_t bitFieldIdx = 0; bitFieldIdx < data.impactCount(); ++bitFieldIdx)
|
||||
@@ -600,7 +599,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
continue;
|
||||
|
||||
const Core::GeoPosition &impactPosition = aesItemView.form()[bitFieldIdx];
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION
|
||||
<< " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon() << " z=" << impactPosition.z()
|
||||
<< " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition));
|
||||
|
||||
@@ -711,7 +710,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
|
||||
const std::vector<AreaEffectSimulation::SingleEffect> &singleEffectsRef = effects.singleEffects();
|
||||
int indexBitFieldIdx = -1;
|
||||
for (const AreaEffectSimulation::SingleEffect &singleEffect : std::as_const(singleEffectsRef))
|
||||
for (const AreaEffectSimulation::SingleEffect &singleEffect : qAsConst(singleEffectsRef))
|
||||
{
|
||||
++indexBitFieldIdx;
|
||||
|
||||
@@ -856,7 +855,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary data.form().size()=" << data.form().size();
|
||||
// BoobyTrap
|
||||
polyGeo.reserve(data.form().size());
|
||||
for (const auto &pointGeo : std::as_const(data.form()))
|
||||
for (const auto &pointGeo : qAsConst(data.form()))
|
||||
{
|
||||
QPointF point;
|
||||
point.setX(pointGeo.lon());
|
||||
@@ -873,7 +872,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
<< " exerciseId=" << exerciseId;
|
||||
// only include buildings within the radius
|
||||
|
||||
for (const int buildingId : std::as_const(buildingIdsInside))
|
||||
for (const int buildingId : qAsConst(buildingIdsInside))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " BuildingId=" << buildingId;
|
||||
Buildings::Building tmpBldg;
|
||||
@@ -959,7 +958,7 @@ QVector<int> HandlerAesData::findBuildingsBetween(const LtsCoordTrans::LtsCoordi
|
||||
// check all exercise specific footprints except our:
|
||||
const QHash<int, CentralEffectSimulation::HandlerBuildingData::Footprint> &allFootprintsOfEx = m_handlerBuildingData->getFootprints();
|
||||
buildingIdsInBetween.reserve(allFootprintsOfEx.size());
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : std::as_const(allFootprintsOfEx))
|
||||
for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : qAsConst(allFootprintsOfEx))
|
||||
{
|
||||
// do not check ourself
|
||||
if (footprintToCheck.mseId == targetFootprint.mseId)
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QVector>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
namespace LtsUtils
|
||||
{
|
||||
|
||||
+19
-20
@@ -7,14 +7,13 @@
|
||||
*/
|
||||
|
||||
#include "handler_building_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QVector3D>
|
||||
|
||||
// operator<<
|
||||
@@ -52,19 +51,19 @@ HandlerBuildingModel::HandlerBuildingModel(
|
||||
, m_aesDataHandler(aesDataHandler)
|
||||
, m_logger(CentralEffectSimulation::getLogger("Plugin.Buildings.HandlerBuildingModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
HandlerBuildingModel::~HandlerBuildingModel()
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
bool HandlerBuildingModel::init()
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> dtcIsm = m_ddsHandler->dtcIsm();
|
||||
|
||||
dtcIsm->waitForHistoricalDataMainStructureElement(1000);
|
||||
@@ -79,14 +78,14 @@ bool HandlerBuildingModel::init()
|
||||
|
||||
INFO_LOG(m_logger) << "HandlerBuildingModel is running."
|
||||
<< ", m_buildingModels.size() = " << m_buildingModels.size();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingModel::getLineBuildingIntersection(
|
||||
const std::vector<Core::GeoPosition> &line, const std::string &requestIdOpt)
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest;
|
||||
newRequest.line(line);
|
||||
@@ -105,13 +104,13 @@ HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingMod
|
||||
result.errorParams = reply.errorParams();
|
||||
result.intersection = reply.intersection();
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return result;
|
||||
}
|
||||
|
||||
HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel::getLineBuildingIntersects(const std::vector<Core::GeoPosition> &line, const std::string &requestIdOpt)
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest;
|
||||
newRequest.line(line);
|
||||
@@ -130,7 +129,7 @@ HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel
|
||||
result.errorParams = reply.errorParams();
|
||||
result.intersects = ! std::isnan(reply.intersection().lat()); // ! std::isnan
|
||||
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -322,7 +321,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
QPolygonF polygon2D;
|
||||
polygon2D.reserve(polylineRef.size());
|
||||
for (const Core::GeoPosition &geoPos : std::as_const(polylineRef))
|
||||
for (const Core::GeoPosition &geoPos : qAsConst(polylineRef))
|
||||
polygon2D << QPointF(geoPos.lon(), geoPos.lat());
|
||||
|
||||
// Only the buildings where the line/trajectory flies over the building footprint are taken into account.
|
||||
@@ -333,7 +332,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "relevantBuildings.size=" << relevantBuildings.size();
|
||||
for (const int bldgId : std::as_const(relevantBuildings))
|
||||
for (const int bldgId : qAsConst(relevantBuildings))
|
||||
DEBUG_LOG(m_logger) << "relevantBuilding: bldgId = " << bldgId;
|
||||
}
|
||||
|
||||
@@ -369,8 +368,8 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
<< " , end=" << segEnd;
|
||||
|
||||
int buildingId = -1; // for debugging purposes
|
||||
//for (BuildingModel *buildingModel : std::as_const(m_buildingModels))
|
||||
for (const int bldgId : std::as_const(relevantBuildings))
|
||||
//for (BuildingModel *buildingModel : qAsConst(m_buildingModels))
|
||||
for (const int bldgId : qAsConst(relevantBuildings))
|
||||
{
|
||||
BuildingModel *buildingModel = m_buildingModels.value(bldgId, nullptr);
|
||||
if (!buildingModel)
|
||||
@@ -488,7 +487,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel::
|
||||
|
||||
} // if
|
||||
|
||||
} // for (const int bldgId : std::as_const(relevantBuildings))
|
||||
} // for (const int bldgId : qAsConst(relevantBuildings))
|
||||
} // for(lineIt = polylineRef.begin(); lineIt != polylineRef.end()-1; ++lineIt)
|
||||
|
||||
DEBUG_LOG(m_logger) << "END getLineBuildingIntersectionInternal, request '" << request.requestId() << "'"
|
||||
@@ -661,12 +660,12 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
|
||||
Core::GeoPosition HandlerBuildingModel::calculateDetonationLocation(const std::vector<Core::GeoPosition> &trajectoryGeometry, double detonationDistance) const
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
const int geometrySize = trajectoryGeometry.size();
|
||||
if (geometrySize < 3)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", trajectoryGeometry not sufficiant";
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << ", trajectoryGeometry not sufficiant";
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@
|
||||
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMap>
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
|
||||
|
||||
namespace NGL
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ngldb/dbtransaction.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
namespace CesBuildings
|
||||
|
||||
+4
-5
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "handler_contamination.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
@@ -157,7 +156,7 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
bool isGroundLevel = false;
|
||||
const QVector<int> &buildingIds = dtcIsm.get()->getBuildingByPolygon(exerciseId, polygonGeo, completeEnclosed, isGroundLevel);
|
||||
DEBUG_LOG(m_logger) << "buildingIds.size=" << buildingIds.size();
|
||||
for (int buildingId : std::as_const(buildingIds))
|
||||
for (int buildingId : qAsConst(buildingIds))
|
||||
{
|
||||
calculateBuilding(buildingId, data, chargeHeight, chargeDepression);
|
||||
}
|
||||
@@ -193,7 +192,7 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
DEBUG_LOG(m_logger) << "buildingId=" << buildingId;
|
||||
effectedRooms.clear();
|
||||
effectedFloors = getEffectedFloors(buildingId, chargeHeight, chargeDepression);
|
||||
for (int effectedFloor : std::as_const(effectedFloors))
|
||||
for (int effectedFloor : qAsConst(effectedFloors))
|
||||
effectedRooms += dtcIsm.get()->getRoomIdsFromFloorId(buildingId, effectedFloor);
|
||||
if (!effectedRooms.empty())
|
||||
{
|
||||
@@ -256,7 +255,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
// Buildings that have been reset or decontaminated will be recontaminated as long as the nuclear weapon is still present
|
||||
|
||||
const auto aesItemViews = m_ddsHandler->dtcAes()->aesItemViews();
|
||||
for (const auto &aesItemView : std::as_const(aesItemViews))
|
||||
for (const auto &aesItemView : qAsConst(aesItemViews))
|
||||
{
|
||||
if (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
@@ -371,7 +370,7 @@ QVector<int> HandlerContamination::getEffectedFloors(const int buildingId, const
|
||||
const QVector<int> &floorIds = dtcIsm->getFloorIdsFromBuilding(buildingId);
|
||||
QVector<int> effectedFloorIds;
|
||||
effectedFloorIds.reserve(floorIds.size());
|
||||
for (int floorId : std::as_const(floorIds))
|
||||
for (int floorId : qAsConst(floorIds))
|
||||
{
|
||||
double halfFloorHeight = dtcIsm->getHalfFloorHeight(buildingId, floorId);
|
||||
DEBUG_LOG(m_logger) << " floorId=" << floorId
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <CentralEffectSimulation/proxy_building.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
namespace CesBuildings
|
||||
{
|
||||
|
||||
+2
-3
@@ -22,7 +22,7 @@
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CesBuildings
|
||||
@@ -64,7 +64,6 @@ 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;
|
||||
@@ -80,7 +79,7 @@ private:
|
||||
std::shared_ptr<HandlerBuildingModel> m_handlerBuildingModel;
|
||||
|
||||
|
||||
CentralEffectSimulation::
|
||||
CentralEffectSimulation::LOGGER_T m_logger;
|
||||
int m_domainId{0};
|
||||
int m_exerciseId{0};
|
||||
};
|
||||
|
||||
+10
-10
@@ -7,20 +7,19 @@
|
||||
*/
|
||||
|
||||
#include "handler_aes_data.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <QTransform>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
|
||||
@@ -34,6 +33,7 @@ HandlerAesData::HandlerAesData(const std::shared_ptr<CentralEffectSimulation::Dd
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_handlerBuildingData(buildingDataHandler)
|
||||
, m_logger(getLogger("HandlerAesData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -181,7 +181,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_footprints;
|
||||
for (const Footprint &footprint : std::as_const(m_footprints))
|
||||
for (const Footprint &footprint : qAsConst(m_footprints))
|
||||
{
|
||||
const QPointF impactPos(CentralEffectSimulation::geographic2Utm(data.impactPosition(), footprint.zone));
|
||||
const QPolygonF polyBldgRadius({QPointF(footprint.boundingBoxPolyUtm.bottomLeft().rx() - impactRadius,
|
||||
@@ -304,7 +304,7 @@ void HandlerAesData::calculateFootprint(const InfrastructureManagement::MainFoot
|
||||
footprint.geoPosition = mse.geoPosition();
|
||||
const QPointF utmFpPosition = CentralEffectSimulation::geographic2Utm(footprint.geoPosition, &footprint.zone);
|
||||
footprint.polyUtm.reserve(poly.size());
|
||||
for (const QPointF &point : std::as_const(poly))
|
||||
for (const QPointF &point : qAsConst(poly))
|
||||
footprint.polyUtm.push_back(utmFpPosition + point);
|
||||
footprint.boundingBoxPolyUtm = footprint.polyUtm.boundingRect();
|
||||
|
||||
@@ -351,7 +351,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
}
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_footprints;
|
||||
for (const Footprint &footprint : std::as_const(m_footprints))
|
||||
for (const Footprint &footprint : qAsConst(m_footprints))
|
||||
{
|
||||
//if (boundingBoxImpact.contains(footprint.boundingBoxPolyUtm))
|
||||
calculateImpacts(data, footprint);
|
||||
@@ -407,7 +407,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId];
|
||||
QSet<int> &bitfieldState = bitfieldStates[data.aesItemId()];
|
||||
for (int i : std::as_const(bitfieldState))
|
||||
for (int i : qAsConst(bitfieldState))
|
||||
DEBUG_LOG(m_logger) << "bitfieldState for " << data.aesItemId() << ": " << i;
|
||||
|
||||
const AreaEffectSimulation::AesItemView &aesItemView = *it;
|
||||
@@ -422,7 +422,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
continue;
|
||||
|
||||
const Core::GeoPosition2D &impactPosition = aesItemView.form()[bitFieldIdx];
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION
|
||||
<< " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon()
|
||||
<< " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition));
|
||||
|
||||
|
||||
+1
-2
@@ -55,7 +55,6 @@ public:
|
||||
AreaEffectSimulation::AesItemView itemView(const int &aesId) const { return m_aesItemViews.value(aesId); }
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSendCesHitOnBuildingReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onSendCesHitInformationReply(const Core::FunctionReplyObject &reply) override final;
|
||||
|
||||
@@ -113,7 +112,7 @@ private: // attributes
|
||||
QHash<int, AreaEffectSimulation::AesItemView> m_aesItemViews; // key = aesItemId
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleState; // key = id value = state
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
|
||||
|
||||
+6
-6
@@ -7,18 +7,17 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_area.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "CentralEffectSimulation/handler_participant.h"
|
||||
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
#include <cmath>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
|
||||
namespace dds
|
||||
{
|
||||
@@ -73,6 +72,7 @@ HandlerParticipantArea::HandlerParticipantArea(const std::shared_ptr<CentralEffe
|
||||
, m_handlerParticipant(participantHandler)
|
||||
, m_handlerAesData(aesDataHandler)
|
||||
, m_handlerBuildingModel(buildingModelHandler)
|
||||
, m_logger(getLogger("HandlerParticipantArea"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -498,7 +498,7 @@ void HandlerParticipantArea::calculateAesParticipant(const CentralEffectSimulati
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantPos.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
@@ -837,7 +837,7 @@ void HandlerParticipantArea::onExplosionSingleCentralChanged(const AreaEffectSim
|
||||
const int effectType = static_cast<int>(EffectType::ExplosionSingle) & 0xffff;
|
||||
const QMap<int, BuildingModel *> buildingModels = m_handlerBuildingModel->buildingModels();
|
||||
const QList<CentralEffectSimulation::HandlerParticipant::CesParticipantData> participantPositions = m_handlerParticipant->positions().values();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : std::as_const(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : qAsConst(participantPositions))
|
||||
{
|
||||
if (participantPosition.insideBuilding())
|
||||
continue;
|
||||
|
||||
+1
-2
@@ -70,7 +70,6 @@ public:
|
||||
bool init();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
private Q_SLOTS:
|
||||
@@ -158,7 +157,7 @@ private: // attributes
|
||||
QHash<int, QHash<int, QSet<EffectType>>> m_effectTypeStates; // QHash<aesItemId, QHash<participantId, QSet<effectStates>>>
|
||||
QHash<int, QHash<int, QSet<int>>> m_effectTypeBitFieldIndexes; // QHash<aesItemId, QHash<participantId, QSet<mineFieldBitIdx>>>
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
};
|
||||
} // namespace Ces2D
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "cespluginces2d_export.h"
|
||||
#include "ces_export.h"
|
||||
|
||||
namespace Ces2D
|
||||
{
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ Ces2DInterfaceImpl::Ces2DInterfaceImpl(CentralEffectSimulation::Plugin::DataProv
|
||||
, m_db(db)
|
||||
, m_handlerBuildingData(handlerBuildingData)
|
||||
, m_handlerParticipant(handlerParticipant)
|
||||
.getNGLLogger("CES.Plugin.CentralEffectSimulation2DInterfaceImpl"))
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CES.Plugin.CentralEffectSimulation2DInterfaceImpl"))
|
||||
{
|
||||
Q_UNUSED(settings)
|
||||
}
|
||||
|
||||
+4
-2
@@ -18,7 +18,7 @@
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace Ces2D
|
||||
@@ -65,7 +65,6 @@ private Q_SLOTS:
|
||||
bool init(int domainId, int exerciseId) override;
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
private:
|
||||
CentralEffectSimulation::Plugin::DataProvider *m_pdp;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
@@ -77,6 +76,9 @@ private:
|
||||
std::shared_ptr<HandlerBuildingModel> m_handlerBuildingModel; ///< Pointer to Building Model Handler
|
||||
std::shared_ptr<CentralEffectSimulation::HandlerParticipant> m_handlerParticipant; ///< Pointer to handler for all participants
|
||||
std::shared_ptr<HandlerParticipantArea> m_handlerParticipantArea; ///< Pointer to handler for participant outside from Buildings
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_domainId = 0;
|
||||
int m_exerciseId = 0;
|
||||
};
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "echoplugin.h"
|
||||
#include <QtCore/QDebug>
|
||||
#include <QDebug>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
namespace Echo
|
||||
@@ -27,7 +27,7 @@ EchoInterfaceImpl::EchoInterfaceImpl(CentralEffectSimulation::Plugin::DataProvid
|
||||
|
||||
NGL::Settings *settings)
|
||||
: m_pdp(pdp)
|
||||
.getNGLLogger("CES.Plugin.EchoInterfaceImpl"))
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CES.Plugin.EchoInterfaceImpl"))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <CentralEffectSimulation/ces_plugin_interface.h>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
@@ -45,9 +45,9 @@ public:
|
||||
private Q_SLOTS:
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
private:
|
||||
CentralEffectSimulation::Plugin::DataProvider *m_pdp;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace Echo
|
||||
+1
-2
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "expand_polygon.h"
|
||||
#include <utility>
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
|
||||
@@ -29,7 +28,7 @@ QPolygonF bufferUtmPolygon(const QPolygonF &polygonUtmIn, const int zone, const
|
||||
Esri::ArcGISRuntime::PolygonBuilder polygonBuilder(Esri::ArcGISRuntime::SpatialReference(32600 + zone));
|
||||
DEBUG_LOG(logger) << "ExpandPolygon::bufferUtmPolygon";
|
||||
|
||||
for (const QPointF &pointUtm : std::as_const(polygonUtmIn))
|
||||
for (const QPointF &pointUtm : qAsConst(polygonUtmIn))
|
||||
polygonBuilder.addPoint(Esri::ArcGISRuntime::Point(pointUtm.x(), pointUtm.y(), 0));
|
||||
const Esri::ArcGISRuntime::Geometry &esriGeometry = polygonBuilder.toGeometry();
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace CesExplosions
|
||||
{
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@
|
||||
//#include <CentralEffectSimulation/proxy_building.h>
|
||||
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QVector>
|
||||
#include <QHash>
|
||||
#include <QVector>
|
||||
#include <QPolygonF>
|
||||
|
||||
|
||||
|
||||
+23
-24
@@ -7,11 +7,10 @@
|
||||
*/
|
||||
|
||||
#include "handler_explosions.h"
|
||||
#include <utility>
|
||||
#include "expand_polygon.h"
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <LtsElevation/lts_elevation_manager.h>
|
||||
@@ -19,11 +18,11 @@
|
||||
#include <LtsCoordinate/lts_coordinate.h>
|
||||
|
||||
|
||||
#include <QtCore/QPointF>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QPointF>
|
||||
#include <QVector>
|
||||
#include <QSet>
|
||||
#include <QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
using namespace CentralEffectSimulation;
|
||||
@@ -224,7 +223,7 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
|
||||
const int remaining = 1; // ICD GUEZSB60_ICD-0052_Zentrale_Tne.doc Wirkfeldtyp Gefahrenbereich Steilfeuer
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
{
|
||||
if (!allParticipantIdsInArea.contains(pPos.participantId()))
|
||||
continue;
|
||||
@@ -353,7 +352,7 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
|
||||
AreaEffectSimulation::ChargeStruct chargeStruct(data.chargeTypeId(),data.igniterTypeId(), data.igniterFunctionId());
|
||||
const double impactRadius = m_ddsHandler->chargeTypeRadius(chargeStruct);
|
||||
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -543,7 +542,7 @@ void HandlerExplosions::onExplosionSingleChanged(const AreaEffectSimulation::Exp
|
||||
return;
|
||||
}
|
||||
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -634,7 +633,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef
|
||||
triggeredEffectsLtsCoord.reserve(singleEffectsRef.size());
|
||||
|
||||
int curSeIndex = -1;
|
||||
for (const AreaEffectSimulation::SingleEffect &se : std::as_const(singleEffectsRef))
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffectsRef))
|
||||
{
|
||||
++curSeIndex;
|
||||
if (se.singleEffectState() != AreaEffectSimulation::AesSingleEffectState_def::SesTriggered)
|
||||
@@ -658,7 +657,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef
|
||||
|
||||
// Now call calculateImpacts() (createEvent if in circle...)
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
{
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
continue;
|
||||
@@ -894,9 +893,9 @@ void HandlerExplosions::calculateSmartEffect(const AreaEffectSimulation::Effects
|
||||
bool itemAvailable = m_ddsHandler->dtcAes()->aesItemFromId(effects.aesItemId(), aesItem);
|
||||
if ( itemAvailable)
|
||||
{
|
||||
for (const AreaEffectSimulation::SingleEffect &se : std::as_const(effects.singleEffects()))
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(effects.singleEffects()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ---> singleEffect=" << se
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " ---> singleEffect=" << se
|
||||
<< ", aesItem= " << aesItem;
|
||||
calculateSmartExplosion(effects.aesItemId(),
|
||||
aesItem.chargeStruct(),
|
||||
@@ -935,7 +934,7 @@ void HandlerExplosions::calculateSmartExplosion(const int32_t aesItemId,
|
||||
bool bHumanFound = false;
|
||||
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : std::as_const(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : qAsConst(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(participantPosition)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -1078,7 +1077,7 @@ void HandlerExplosions::calculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
return;
|
||||
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions))
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
{
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -1108,7 +1107,7 @@ void HandlerExplosions::calculateImpacts(const CentralEffectSimulation::AesItemV
|
||||
|
||||
DEBUG_LOG(m_logger) << "XXXXXXXXXXXX calculateImpacts2a impactsToCheck.size " << impactsToCheck.size();
|
||||
|
||||
for (int bitFieldIdx : std::as_const(impactsToCheck))
|
||||
for (int bitFieldIdx : qAsConst(impactsToCheck))
|
||||
{
|
||||
if (itemView.form.size() <= bitFieldIdx)
|
||||
continue;
|
||||
@@ -1166,7 +1165,7 @@ void HandlerExplosions::calculateImpactsEffect(const CentralEffectSimulation::Ae
|
||||
|
||||
DEBUG_LOG(m_logger) << "shiftedParticipantLtsCoord = " << shiftedParticipantLtsCoord.toString(true);
|
||||
|
||||
for (const LtsCoordinate &newTriggeredImpactLtsCoord : std::as_const(triggeredEffectsLtsCoord))
|
||||
for (const LtsCoordinate &newTriggeredImpactLtsCoord : qAsConst(triggeredEffectsLtsCoord))
|
||||
{
|
||||
// const int zoneToUse = itemView.zone;
|
||||
// 2D or 3D??
|
||||
@@ -1293,7 +1292,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul
|
||||
{
|
||||
const LtsCoordTrans::LtsCoordinate &partLtsCoordinate = participantPosition.ltsCoordinate(); // WITH zValue
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START"
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " START"
|
||||
<< " participantId = " << participantPosition.participantId()
|
||||
<< " participantPosition.ltsCoordinate = '" << participantPosition.ltsCoordinate().toString() << "'"
|
||||
<< ", triggeredEffectsGeoPos.size() = " << triggeredEffectsGeoPos.size()
|
||||
@@ -1302,7 +1301,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul
|
||||
<< ", -> partLtsCoordinate " << partLtsCoordinate
|
||||
<< ", lineOfSightOptions " << lineOfSightOptions;
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << participantPosition;
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << participantPosition;
|
||||
|
||||
if (triggeredEffectsGeoPos.empty())
|
||||
return;
|
||||
@@ -1331,7 +1330,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul
|
||||
DEBUG_LOG(m_logger) << "calculateImpactsEffect 1 triggeredEffectsUtmPos.size " << triggeredEffectsUtmPos.size();
|
||||
|
||||
int idx = -1;
|
||||
for (const QPointF &newTriggeredImpactUtm : std::as_const(triggeredEffectsUtmPos))
|
||||
for (const QPointF &newTriggeredImpactUtm : qAsConst(triggeredEffectsUtmPos))
|
||||
{
|
||||
++idx;
|
||||
|
||||
@@ -1353,7 +1352,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul
|
||||
const int exerciseId = m_ddsHandler->getExerciseId();
|
||||
|
||||
QElapsedTimer timer;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " vor lineOfSightOptions start";
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " vor lineOfSightOptions start";
|
||||
if (m_logger.isInfoEnabled())
|
||||
timer.start();
|
||||
|
||||
@@ -1368,7 +1367,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul
|
||||
<< " success=" << success;
|
||||
|
||||
// check LOS / LineOfSight
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " check LOS / LineOfSight bLOS=" << bLOS
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " check LOS / LineOfSight bLOS=" << bLOS
|
||||
<< " participantId=" << participantPosition.participantId();
|
||||
if (bLOS)
|
||||
{
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@
|
||||
#include <QtCore/QVector>
|
||||
#include <QPolygonF>
|
||||
#include <QQueue>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
// AES-Handling for Explosions
|
||||
|
||||
|
||||
+10
-11
@@ -7,24 +7,23 @@
|
||||
*/
|
||||
|
||||
#include "handler_vulcano.h"
|
||||
#include <utility>
|
||||
#include "expand_polygon.h"
|
||||
#include "isInCone.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QVector>
|
||||
#include <QTimer>
|
||||
#include <QTransform>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QDateTime>
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
namespace CesExplosions
|
||||
@@ -245,7 +244,7 @@ void HandlerVulcano::onTrajectoryTimeAwareTimeout()
|
||||
const auto &designationsVec = dpd.designations();
|
||||
DEBUG_LOG(m_logger) << "onTimerTimeout participantId=" << participantId;
|
||||
|
||||
for (const auto &designation : std::as_const(designationsVec))
|
||||
for (const auto &designation : qAsConst(designationsVec))
|
||||
{
|
||||
if (designation.code() == prf && designation.outputPower() > 0)
|
||||
{
|
||||
@@ -369,7 +368,7 @@ Core::GeoPosition HandlerVulcano::getTrajectoryPosFromTime(int aesId, long long
|
||||
|
||||
Core::GeoPosition result;
|
||||
int i = 0;
|
||||
for (const auto &point : std::as_const(trajectoryTimeAwareValue.geometry()))
|
||||
for (const auto &point : qAsConst(trajectoryTimeAwareValue.geometry()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "time=" << point.relativeTime();
|
||||
if ( (point.relativeTime() > relTime) && (i > 0))
|
||||
@@ -405,7 +404,7 @@ void HandlerVulcano::onDynamicParticipantChanged(const ParticipantManagement::Dy
|
||||
<< data.designations().size();
|
||||
if (data.designations().size() > 0)
|
||||
{
|
||||
for (const ParticipantManagement::LaserDesignation &designation : std::as_const(data.designations()))
|
||||
for (const ParticipantManagement::LaserDesignation &designation : qAsConst(data.designations()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "gearId=" << designation.gearId()
|
||||
<< " code=" << designation.code()
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@
|
||||
#include <QtCore/QVector>
|
||||
#include <QPolygonF>
|
||||
#include <QQueue>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QHash>
|
||||
#include <QTimer>
|
||||
|
||||
namespace LtsUtils
|
||||
{
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
#include <LtsCoordinate/lts_coordinate.h>
|
||||
#include <CentralEffectSimulation/proxy_building.h>
|
||||
|
||||
#include <QtCore/QFlags>
|
||||
#include <QFlags>
|
||||
#pragma once
|
||||
|
||||
namespace CesExplosions
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CesExplosions
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
+5
-6
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_functional_area.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
|
||||
@@ -303,7 +302,7 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
@@ -346,7 +345,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
|
||||
+1
-3
@@ -78,8 +78,6 @@ public:
|
||||
bool init();
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onDemandInitReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
@@ -139,7 +137,7 @@ private: // attributes
|
||||
QHash<int, QVector<int>> m_aesPolygonEncloseBuilding; // key = aesItemId value = BuildingIds inside form
|
||||
int m_requestId = 1;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
};
|
||||
} // namespace CES_FUNCTIONAL_AREA
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
#include <CentralEffectSimulation/main_handler.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CES_FUNCTIONAL_AREA
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
namespace CES_FUNCTIONAL_AREA
|
||||
{
|
||||
|
||||
|
||||
+10
-10
@@ -7,19 +7,18 @@
|
||||
*/
|
||||
|
||||
#include "handler_aes_data.h"
|
||||
#include <utility>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
//#include "main_handler.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QPainterPath>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <QTransform>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
|
||||
@@ -32,6 +31,7 @@ HandlerAesData::HandlerAesData(const std::shared_ptr<CentralEffectSimulation::Dd
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_handlerBuildingData(buildingDataHandler)
|
||||
, m_logger(getLogger("HandlerAesData"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -135,7 +135,7 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_footprints;
|
||||
for (const Footprint &footprint : std::as_const(m_footprints))
|
||||
for (const Footprint &footprint : qAsConst(m_footprints))
|
||||
{
|
||||
const QPointF impactPos(CentralEffectSimulation::geographic2Utm(data.impactPosition(), footprint.zone));
|
||||
const QPolygonF polyBldgRadius({QPointF(footprint.boundingBoxPolyUtm.bottomLeft().rx() - impactRadius,
|
||||
@@ -258,7 +258,7 @@ void HandlerAesData::calculateFootprint(const InfrastructureManagement::MainFoot
|
||||
footprint.geoPosition = mse.geoPosition();
|
||||
const QPointF utmFpPosition = CentralEffectSimulation::geographic2Utm(footprint.geoPosition, &footprint.zone);
|
||||
footprint.polyUtm.reserve(poly.size());
|
||||
for (const QPointF &point : std::as_const(poly))
|
||||
for (const QPointF &point : qAsConst(poly))
|
||||
footprint.polyUtm.push_back(utmFpPosition + point);
|
||||
footprint.boundingBoxPolyUtm = footprint.polyUtm.boundingRect();
|
||||
|
||||
@@ -305,7 +305,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
}
|
||||
// Bounding-Box-Check
|
||||
// QMap<int, Footprint> m_footprints;
|
||||
for (const Footprint &footprint : std::as_const(m_footprints))
|
||||
for (const Footprint &footprint : qAsConst(m_footprints))
|
||||
{
|
||||
//if (boundingBoxImpact.contains(footprint.boundingBoxPolyUtm))
|
||||
calculateImpacts(data, footprint);
|
||||
@@ -361,7 +361,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId];
|
||||
QSet<int> &bitfieldState = bitfieldStates[data.aesItemId()];
|
||||
for (int i : std::as_const(bitfieldState))
|
||||
for (int i : qAsConst(bitfieldState))
|
||||
DEBUG_LOG(m_logger) << "bitfieldState for " << data.aesItemId() << ": " << i;
|
||||
|
||||
const AreaEffectSimulation::AesItemView &aesItemView = *it;
|
||||
@@ -376,7 +376,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
continue;
|
||||
|
||||
const Core::GeoPosition2D &impactPosition = aesItemView.form()[bitFieldIdx];
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION
|
||||
<< " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon()
|
||||
<< " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition));
|
||||
|
||||
|
||||
+1
-2
@@ -50,7 +50,6 @@ public:
|
||||
AreaEffectSimulation::AesItemView itemView(const int &aesId) const { return m_aesItemViews.value(aesId); }
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSendCesHitInformationReply(const Core::FunctionReplyObject &reply) override final;
|
||||
|
||||
private slots:
|
||||
@@ -105,7 +104,7 @@ private: // attributes
|
||||
QHash<int, AreaEffectSimulation::AesItemView> m_aesItemViews; // key = aesItemId
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleState; // key = id value = state
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
|
||||
|
||||
+4
-5
@@ -7,10 +7,9 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_gas_pipe.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QLineF>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QLineF>
|
||||
#include <QTimer>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -203,7 +202,7 @@ void HandlerParticipantGasPipe::onParticipantPositionChanged(const CentralEffect
|
||||
<< " Anzahl GasPipes=" << m_gasPipes.size();
|
||||
|
||||
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &gasPipe : std::as_const(m_gasPipes))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &gasPipe : qAsConst(m_gasPipes))
|
||||
{
|
||||
calculateGasPipeParticipant(gasPipe, partPos);
|
||||
|
||||
@@ -318,7 +317,7 @@ void HandlerParticipantGasPipe::onSendCesHitReply(const Core::FunctionReplyObjec
|
||||
void HandlerParticipantGasPipe::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
+4
-4
@@ -8,9 +8,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QRectF>
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
#include <QRectF>
|
||||
#include <QPolygonF>
|
||||
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
// AES-Handling for participants
|
||||
namespace CentralEffectSimulationGasPipes
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CesGasPipes
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ private:
|
||||
QString m_ammunitionFile;
|
||||
N_ConfigSystem::AmmuConfig *m_ammuConfig = nullptr;
|
||||
|
||||
CesGeoPairing::
|
||||
CesGeoPairing::LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+3
@@ -140,6 +140,9 @@ protected:
|
||||
/**
|
||||
* logger object
|
||||
*/
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
|
||||
/**
|
||||
* deinitializes class
|
||||
*/
|
||||
|
||||
+2
@@ -224,6 +224,8 @@ protected:
|
||||
/**
|
||||
* logger object
|
||||
*/
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
/**
|
||||
* deinitializes the class
|
||||
*/
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "ammuconfig.h"
|
||||
#include <QtCore/QStringList>
|
||||
#include <QStringList>
|
||||
|
||||
namespace N_ConfigSystem
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QVector>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include "configsettings.h"
|
||||
#include <FW_Ballistic/Ammunition.hpp>
|
||||
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
#ifndef CONFIGSETTINGS_H
|
||||
#define CONFIGSETTINGS_H
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QSettings>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QString>
|
||||
#include <QSettings>
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
|
||||
class ConfigSettings
|
||||
{
|
||||
|
||||
+4
-4
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "geoconfig.h"
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace N_ConfigSystem
|
||||
{
|
||||
@@ -30,7 +30,7 @@ GeoConfig *GeoConfig::getInstance()
|
||||
bool GeoConfig::initFilename(const QString &fileName)
|
||||
{
|
||||
// const QFileInfo qFileInfo(fileName);
|
||||
// INFO_LOG(m_logger) << Q_FUNC_INFO << " START, GeoConfig::absoluteFilePath ='" << qFileInfo.absoluteFilePath() << "'";
|
||||
// INFO_LOG(m_logger) << LOGFUNCTION << " 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(m_logger) << Q_FUNC_INFO << " use following file(s) for ElevationMap: '" << elevationName << "'";
|
||||
// INFO_LOG(m_logger) << LOGFUNCTION << " 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(m_logger) << Q_FUNC_INFO << " END, filename ='" << fileName << "'";
|
||||
// TRACE_LOG(m_logger) << LOGFUNCTION << " END, filename ='" << fileName << "'";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -13,7 +13,7 @@
|
||||
//#include "../logger.h"
|
||||
|
||||
#include <ElevationMap/elevation_map_manager.h>
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
#include <iostream> // std::cout, std::endl, std::cin
|
||||
#include <stdlib.h> // EXIT_SUCCESS
|
||||
@@ -37,7 +37,6 @@ namespace N_ConfigSystem
|
||||
class GeoConfig: public ConfigSettings
|
||||
{
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
explicit GeoConfig();
|
||||
~GeoConfig();
|
||||
public:
|
||||
@@ -49,7 +48,6 @@ 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);
|
||||
|
||||
@@ -59,6 +57,6 @@ private:
|
||||
|
||||
std::shared_ptr<SituationMap::ElevationMapManager> m_elevationMapManager;
|
||||
|
||||
// CesGeoPairing::
|
||||
// CesGeoPairing::LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
|
||||
#include "GeoCoord.hpp"
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
|
||||
namespace N_Math
|
||||
{
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
#include <GeoPairingImpl/GeoPairingImplBalistic.hpp>
|
||||
#include <GeoPairingImpl/GeoPairingDataFireReport.hpp>
|
||||
#include <Schusstafel.h>
|
||||
#include <QtCore/QScopedPointer>
|
||||
#include <QScopedPointer>
|
||||
#include <FW_Ballistic/AmmunitionTypes.hpp>
|
||||
#include <GBL_ConfigSystem/ammuconfig.h>
|
||||
#include "../settings.h"
|
||||
|
||||
+3
@@ -181,6 +181,9 @@ private:
|
||||
SingleFireToCtas m_singleFireToCtas;
|
||||
AreaFireToCtas m_areaFireToCtas;
|
||||
ReportTarget m_reportTarget;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
void calculateAirFire(const QByteArray &transparentData,
|
||||
const QHash<int, CentralEffectSimulation::HandlerParticipant::CesParticipantData> &aircrafts);
|
||||
void calculateAreaFire(const QByteArray &transparentData,
|
||||
|
||||
-2
@@ -45,7 +45,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcCesGeoPairingImpl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcCesGeoPairingImpl
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -59,4 +58,3 @@ NGL_TARGET_LINK_LIBRARIES(svcCesGeoPairingImpl
|
||||
FW_Ballistic
|
||||
NGLLogger
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
+2
@@ -94,6 +94,8 @@ public:
|
||||
|
||||
protected:
|
||||
int m_Size = 2;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#include "GeoPairingImplAirTargetCacheData.hpp"
|
||||
|
||||
#include "GeoPairingDataFireReport.hpp"
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QDateTime>
|
||||
|
||||
#define PAN_AMMU_TIMEPROG(ammunition) (ammunition & 0x01)
|
||||
#define PAN_AMMU_INDEX(ammunition) ((ammunition >> 1) & 0x03)
|
||||
|
||||
+1
@@ -99,6 +99,7 @@ protected:
|
||||
GeoPairingImplMeteoData m_MeteoData;
|
||||
|
||||
CacheType m_CacheData;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+2
@@ -70,6 +70,8 @@ public:
|
||||
protected:
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+3
@@ -85,6 +85,9 @@ private:
|
||||
CacheType *m_CacheData;
|
||||
SInt32 m_PlayerID;
|
||||
UInt32 m_Timeout;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param a_targetID
|
||||
|
||||
+2
@@ -86,6 +86,8 @@ protected:
|
||||
UInt64 m_Time = 0;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+2
@@ -61,6 +61,8 @@ protected:
|
||||
private:
|
||||
|
||||
SInt32 m_UpdateCount = 0;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#include <GBL_ConfigSystem/geoconfig.h>
|
||||
#include <limits>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
|
||||
#ifdef WIN32
|
||||
#define RAND48_SEED_0 (0x330e)
|
||||
|
||||
+3
@@ -121,6 +121,9 @@ protected:
|
||||
GeoPairingImplMeteoData m_MeteoData;
|
||||
|
||||
GeoPairingImplImpactData m_ImpactData;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
+7
-7
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "handler_geopairing.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "GBL_ConfigSystem/geoconfig.h"
|
||||
#include "GeoPairingImpl/GeoPairingImpl.hpp"
|
||||
@@ -16,12 +15,12 @@
|
||||
#include "GeoPairingImpl/GeoPairingImplBalistic.hpp"
|
||||
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
|
||||
#include <LtsUtilsCore/dds_vector.h>
|
||||
#include <TrainingAreaBase/tab_ftc.h>
|
||||
|
||||
#include <QtCore/QSettings>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QDataStream>
|
||||
#include <QSettings>
|
||||
#include <QFileInfo>
|
||||
#include <QDataStream>
|
||||
|
||||
|
||||
using namespace N_ConfigSystem;
|
||||
@@ -39,6 +38,7 @@ HandlerGeoPairing::HandlerGeoPairing(const std::shared_ptr<CentralEffectSimulati
|
||||
, m_ballisticService(ballisticService)
|
||||
, m_requestMap()
|
||||
, m_timer(new QTimer(this))
|
||||
, m_logger(getLogger("Plugin.GeoPairing.HandlerGeoPairing"))
|
||||
{
|
||||
|
||||
m_timer->setSingleShot(true);
|
||||
@@ -116,7 +116,7 @@ bool HandlerGeoPairing::init()
|
||||
{
|
||||
// Fehlerfall:
|
||||
const QFileInfo qFileInfo(fileName);
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " initFilename failed: '" << qFileInfo.absoluteFilePath() << "'";
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " initFilename failed: '" << qFileInfo.absoluteFilePath() << "'";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -539,7 +539,7 @@ void HandlerGeoPairing::onSendGeopairingDataReply(const Core::FunctionReplyObjec
|
||||
void HandlerGeoPairing::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandlerAes->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequest: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
+2
-3
@@ -16,7 +16,7 @@
|
||||
#include <MeteoDataManagement/mdm_dtc.h>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <FW_Ballistic/BallisticService.hpp>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
@@ -42,7 +42,6 @@ public:
|
||||
eElevationBelowZero = 3
|
||||
};
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
struct GeoPCharge
|
||||
{
|
||||
|
||||
@@ -146,7 +145,7 @@ private: // attributes
|
||||
GeoPMunitonMap m_geoPMunMap;
|
||||
GeoPairing *m_geoPairingPtr;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace CesGeoPairing
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
// #include "cesplugingeopairing_export.h" // export macro not needed since it´s only WITHIN the lib/module
|
||||
// #include "ces_export.h" // export macro not needed since it´s only WITHIN the lib/module
|
||||
|
||||
namespace CesGeoPairing
|
||||
{
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ CesGeoPairingInterfaceImpl::CesGeoPairingInterfaceImpl(CentralEffectSimulation::
|
||||
, m_ddsHandler(m_mainHandler->dds())
|
||||
, m_db(m_mainHandler->db())
|
||||
, m_handlerParticipant(m_mainHandler->handlerParticipant())
|
||||
.getNGLLogger("CES.Plugin.GeoPairingInterfaceImpl"))
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CES.Plugin.GeoPairingInterfaceImpl"))
|
||||
{
|
||||
Q_UNUSED(settings)
|
||||
}
|
||||
|
||||
+4
-2
@@ -17,7 +17,7 @@
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
namespace CesGeoPairing
|
||||
{
|
||||
@@ -63,7 +63,6 @@ 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;
|
||||
@@ -75,6 +74,9 @@ private:
|
||||
|
||||
std::shared_ptr<HandlerGeoPairing> m_handlerGeoPairing; ///< Pointer to handler for GeoPairing
|
||||
std::shared_ptr<N_Ballistic::BallisticService> m_ballisticService; ///< Pointer Ballistic Service
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_domainId = 0;
|
||||
int m_exerciseId = 0;
|
||||
};
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
+3
-3
@@ -8,11 +8,11 @@
|
||||
|
||||
#include "handler_jamming.h"
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
|
||||
|
||||
+1
-2
@@ -57,7 +57,6 @@ public:
|
||||
bool init();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
private Q_SLOTS:
|
||||
@@ -94,7 +93,7 @@ private: // attributes
|
||||
QHash<int, QVector<int>> m_aesPolygonEncloseBuilding; // key = aesItemId value = BuildingIds inside form
|
||||
int m_requestId = 1;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
};
|
||||
} // namespace CES_JAMMING
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
#include <CentralEffectSimulation/main_handler.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CES_JAMMING
|
||||
|
||||
+5
-6
@@ -7,17 +7,16 @@
|
||||
*/
|
||||
|
||||
#include "handler_mine_areas.h"
|
||||
#include <utility>
|
||||
#include "CentralEffectSimulation/handler_participant.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
|
||||
namespace dds
|
||||
{
|
||||
@@ -374,7 +373,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
|
||||
// const QVector<QPointF> utmStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId(), m_zone);
|
||||
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
{
|
||||
int remaining = m_ddsHandler->remainingTasCode(itemView.chargeStruct);
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <CentralEffectSimulation/main_handler.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CesMineAreas
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
+4
-4
@@ -8,10 +8,10 @@
|
||||
|
||||
#include "handler_mine_laying_artillery.h"
|
||||
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QTimer>
|
||||
#include <QTransform>
|
||||
#include <qrandom.h>
|
||||
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QObject>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QPolygonF>
|
||||
#include <QQueue>
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <handler_mine_laying_artillery.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
namespace MineLayingArtillery
|
||||
{
|
||||
|
||||
+4
-4
@@ -8,11 +8,11 @@
|
||||
|
||||
#include "ces_mission_plan_handler.h"
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
|
||||
@@ -168,7 +168,7 @@ bool CesMissionPlanHandler::isUasInAutoMode(int participantId)
|
||||
return (uas.uasState() == ProjectDataManagement::UasState::Auto);
|
||||
}
|
||||
|
||||
// stolen from Lts/ParticipantManagement/Gui/ParticipantInfo/participant_info_dialog.cpp
|
||||
// stolen from Lts/Plugins/ParticipantManagement/Gui/ParticipantInfo/participant_info_dialog.cpp
|
||||
bool CesMissionPlanHandler::isUasCombatReady(int participantId)
|
||||
{
|
||||
|
||||
|
||||
+1
-2
@@ -43,7 +43,6 @@ public:
|
||||
bool init();
|
||||
void updateMissionPlanList(const ParticipantManagement::MissionPlan &data);
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void sendNextMissionAction();
|
||||
private Q_SLOTS:
|
||||
|
||||
@@ -65,7 +64,7 @@ private: // attributes
|
||||
|
||||
QHash<int/*PlanId*/, CesMissionPlanObject *> m_missionPlanObjects; // Only: MissionBegin is reached and fulfilled = 0;
|
||||
int m_requestId = 1;
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
};
|
||||
} // namespace CES_MISSIONPLAN
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
|
||||
#include "ces_mission_plan_object.h"
|
||||
#include "qobject.h"
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <ngltools/ngltools_dtg.h>
|
||||
namespace CES_MISSIONPLAN
|
||||
{
|
||||
|
||||
+4
-5
@@ -9,14 +9,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <ParticipantManagement/ppm_db.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/logger.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
namespace CES_MISSIONPLAN
|
||||
{
|
||||
|
||||
@@ -36,7 +36,6 @@ public:
|
||||
int participantId() const; /// uas participantId
|
||||
bool isMissionFulfilled(const ParticipantManagement::MissionPlan &mission);
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void sendActionAttact();
|
||||
AreaEffectSimulation::ExplosionClusterSingleEffectOnlyRequest getExplosionCluster();
|
||||
ParticipantManagement::MissionPlan &missionPlan();
|
||||
@@ -63,7 +62,7 @@ private:
|
||||
QTimer *m_loiterTimer{nullptr};
|
||||
std::shared_ptr<CentralEffectSimulation::DdsHandler> m_ddsHandler;
|
||||
ParticipantManagement::MissionPlan m_missionPlan;
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
#include <CentralEffectSimulation/main_handler.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CES_MISSIONPLAN
|
||||
|
||||
+6
-7
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_nbc.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
#include <cmath>
|
||||
@@ -498,7 +497,7 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
|
||||
DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId()
|
||||
<< " m_aesItemViews.size()=" << m_aesItemViews.size();
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews))
|
||||
for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
@@ -709,7 +708,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
InfrastructureManagement::StructureElement structureElement;
|
||||
bool roomFound = m_ddsHandler->dtcIsm()->getStructureElementById(participantData.roomId(), structureElement);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId()
|
||||
DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId()
|
||||
<< " pos.z=" << participantData.pos().z()
|
||||
<< " upperOffset =" << itemView.upperOffset
|
||||
<< " lowerOffset=" << itemView.lowerOffset
|
||||
@@ -721,7 +720,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
&& ( ( structureElement.relPosition().offsetZ() + 1.5 > itemView.upperOffset )
|
||||
|| ( structureElement.relPosition().offsetZ() + 1.5 < itemView.lowerOffset)))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId()
|
||||
DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId()
|
||||
<< " pos.z=" << participantData.pos().z()
|
||||
<< " not between upperOffset =" << itemView.upperOffset
|
||||
<< " and lowerOffset=" << itemView.lowerOffset
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <CentralEffectSimulation/main_handler.h>
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CES_NBC
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
#include <CentralEffectSimulation/ces_db.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <TrainingAreaBase/tab_ftc.h>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <handler_participant_building.h>
|
||||
|
||||
+1
-2
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "handler_participant_building.h"
|
||||
#include <utility>
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
|
||||
@@ -303,7 +302,7 @@ void HandlerParticipantBuilding::sendCesHitToParticipant(const Buildings::Buildi
|
||||
void HandlerParticipantBuilding::sendFtcCesHitRequestTimeout()
|
||||
{
|
||||
auto ftcTab = m_ddsHandler->ftcTab();
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap))
|
||||
for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendFtcCesHitRequest: " << hr;
|
||||
ftcTab->sendCesHitRequest(hr, this);
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
#include <CentralEffectSimulation/handler_participant.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
// Handling for participants within buildings
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
#include <CentralEffectSimulation/dds_handler.h>
|
||||
#include <CentralEffectSimulation/handler_building_data.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
namespace CesParticipantBuildings
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
-2
@@ -20,7 +20,6 @@ SET(SRCS
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV cesPluginTargetAreas MODULE ${SRCS})
|
||||
NGL_INSTALL_TARGET(cesPluginTargetAreas)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(cesPluginTargetAreas
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
@@ -33,5 +32,4 @@ NGL_TARGET_LINK_LIBRARIES(cesPluginTargetAreas
|
||||
LtsCoordTrans
|
||||
svcCoreClient
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
|
||||
Loaded 100 of 1244 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user