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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 06:06:24 +02:00

128 lines
4.5 KiB
C++
Executable File

/**
* Exercise object
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include "logger.h"
#include "handler_pdm_data.h"
#include <AreaEffectSimulation/aes_dtc.h>
#include <EffectShowManagement/esm_db.h>
#include <LtsCoordTrans/lts_coord_trans.h>
namespace EffectShowManagement
{
/**
* @brief Creates the Effect Show data from the Area Effect Simulation data for Explosion Clusters.
*
* For the Effect Show data to be created see ICD GUEZSB60_ICD-0046C.
* For calculations the mathematical x-axis is mapped to east; the y-axis is mapped to north.\n
*
* List of features:\n
* (1)The area effect is limited to one effect show located at the center of the cluster.\n
* (2) Only specific charge types create more than one effect show as configured in the charge type
* (3)The number of volleys depends on the number of shots by the explosion cluster as follows:\n
* Number of shot <= 25 : 3 volleys\n
* Number of shot <= 50 : 6 volleys\n
* Number of shot <= 100 : 9 volleys\n
* Number of shot <= 150 : 12 volleys\n
* Number of shot <= 200 : 15 volleys\n
* else : 18 volleys\n
* (4)The start time for the effect show is overtaken from the start time of the explosion cluster.\n
* (5)The duration for the effect show is overtaken from the duration of the explosion cluster.\n
* (6)The type of ammunition is determined by the chargeType of the explosion cluster and the
* "tas code indirect" of the Project Data Management.\n
*
*/
class EffectShowEffectCluster
{
public:
explicit EffectShowEffectCluster(const AreaEffectSimulation::EffectCluster &explosionCluster,
const std::shared_ptr<HandlerPdmData> &handlerPdmData);
/**
* @brief Returns the number of Effect Shows resulting from Area Effect Simulation.
* @return The number of effect shows
*/
int getNumOfEffectShows();
/**
* @brief Returns the Effect Show with the provided index.
* @param[in] idx The index of the Effect Show [0..@see geNumOfEffectShows()-1]
* @return The Effect Show with the provided index
*/
Database::EsmEffectShow getEffectShow(int idx);
/**
* @brief Updates the following data: startTime, duration, volley, typeOfAmmunition.
* @param[in] data The Effect Show to be updated
* @param[out] data The updated Effect Show
*/
void updateEffectShow(Database::EsmEffectShow &data);
int getShotsPerArea(int areas) const;
static int getNumberOfVolley(int v);
/**
* @brief Returns the number of volley.
* @return The number of volley.
*/
int getNumberOfVolley() const;
int getShotsPerArea() const;
private:
/**
* @brief Calculates the square of the each effect area.
*/
void calculateSquare();
/**
* @brief Turns position p arround position c.
* @param[in] p Point to be rotated
* @param[in] c Center point of rotation
* @param[in] angle Angle of rotation
* @return Depth of the effect area. The resolution of the value is 50m. (Max: 300m)
*/
static LtsCoordTrans::UtmCoordinate rotate(const LtsCoordTrans::UtmCoordinate &p, const LtsCoordTrans::UtmCoordinate &c, double angle);
struct areas_t
{
int side(int i) const
{
return (i < numSideLength1) ? sideLength1 : sideLength2;
}
int numSideLength1 = 0; // number of areas with the side length "sideLength1"
int sideLength1 = 0; // side length of the areas 1
int numSideLength2 = 0; // number of areas with the side length "sideLength2"
int sideLength2 = 0; // side length of the areas 2
int numOfAreas = 0; // number of areas along the side at all
};
/** @brief Calculates the side length of effect shows.
* The side length shall be rounded to a resolution of 50m.
* The maximum side length shall be 300m. If the side length is > 300m, a split into
* more side length shall be made. In this case uniform side length of <= 300m shall be
* calculated. For the rest, a last side length shall be provided.
* @param[in] sideLength Side length of Area Effect Simuilation
* @return Side length of the effect shows
*/
static areas_t getAreasSideLength(double sideLength);
double rotationRad() const;
private:
AreaEffectSimulation::EffectCluster const m_effectCluster;
std::shared_ptr<HandlerPdmData> m_handlerPdmData;
int m_numOfEffectShows;
areas_t m_areasWidth; // squares in x-direction
areas_t m_areasDepth; // squares in y-direction
LtsCoordTrans::UtmCoordinate m_lowerLeftPos;
};
}