Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/tne_algorithmen.h
T
torstenandCopilot d5af8b9764 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>
2026-08-25 19:23:30 +02:00

84 lines
2.7 KiB
C++
Executable File

/**
* @RDE_HEADER@
* TNE_Algorithemn zur Nachbildung von TNE-Funktionalität, hier Berechnung der Einschlagkoordinaten eines Flächenfeuers
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <AreaEffectSimulation/aes_export.h>
#include <QVector>
#include <QPointF>
namespace AreaEffectSimulation
{
/**
* @brief This namespace contains some algorithms, which must behave identical on both sides!!!
* Therefore the is an UnitTest with values taken from the TNE: ../UnitTests/UnitTests_TneAlgo
* That was created while Michael Moetje was implementing that code at the TNE (PlayerUnit)
*/
namespace TNE_ALGORITHMEN
{
//
// Hinweise für die Übernahme/Updates des wesentlichen Codes (AWES_FF_IteriereEinschlagkoordinaten2)
//
/* moetje:
"long" -> 32Bit
MTP -> MittlerTrefferPunkt
*/
// some using/typedef to ease updates
using SHORT = qint16;
using USHORT = quint16;
using ULONG = quint32; // TNE ist auf 32Bit Plattform
using LONG = qint32; // TNE ist auf 32Bit Plattform
using INT_AS_CHAR = int;
//
// basic TNE wrapper:
//
/**
* @brief areaExlosionsGAUSS berechnet die Einschläge eines Flächenfeuers entsprechend der Normal-Verteilung, siehe auch TNGUEZSB60__TN-0006_Wirksimulationsmodelle.docx
* @param wirkfeldKennung dient als Startwert für den Zufallzahlen-Generator.
* @param breite in Meter, sollte aber ein Vielfaches von 5m sein, vergleiche ICD.
* @param tiefe in Meter, sollte aber ein Vielfaches von 5m sein, vergleiche ICD.
* @param anzahl_einschlaege Die Anzahl der gewuenschten Einschläge
* @return Einschläge entsprechend der Normal-Verteilung
*/
AES_COMMON_EXPORT QVector<QPointF> areaExlosionsGAUSS(int wirkfeldKennung, int breite_m, int tiefe_m, short anzahl_einschlaege);
/**
* @brief areaExlosionsGAUSS berechnet die Einschläge eines Flächenfeuers entsprechend der Normal-Verteilung, siehe auch TNGUEZSB60__TN-0006_Wirksimulationsmodelle.docx
* @param wirkfeldKennung dient als Startwert für den Zufallzahlen-Generator.
* @param breite in Meter, sollte aber ein Vielfaches von 5m sein, vergleiche ICD.
* @param tiefe in Meter, sollte aber ein Vielfaches von 5m sein, vergleiche ICD.
* @param anzahl_einschlaege Die Anzahl der gewuenschten Einschläge
* @return Einschläge entsprechend der Normal-Verteilung
*/
AES_COMMON_EXPORT QVector<QPointF> areaExlosionsGAUSS_aroundCenter(int wirkfeldKennung, int breite_m, int tiefe_m, short anzahl_einschlaege);
AES_COMMON_EXPORT USHORT xorshift32(ULONG *_px);
AES_COMMON_EXPORT SHORT xorshift32_nv(ULONG *_generator, SHORT _bereich, INT_AS_CHAR _sigmaGrenze);
AES_COMMON_EXPORT SHORT xorshift32_nv_limited(ULONG *_generator, SHORT _bereich, INT_AS_CHAR _sigmaGrenze);
} // namespace TNE_ALGORITHMEN
} // namespace AreaEffectSimulation