/** * @RDE_HEADER@ * Trajectory Helper * $Id$ * $HeadURL$ * $Author$ * Created by Norbert Thoden, SLTE, 2023-11-08 */ #pragma once #include #include // Forward namespace LtsUtils { class QPoint3D; } namespace AreaEffectSimulation { class TRAJECTORY_EXPORT TrajectoryHelper { public: /** * @brief TrajectoryHelper::flightDurationSec * @param posStart start of the curve * @param posEnd end of the curve * @param peakHeightAbs absolute peak of the curve value * @param betaRadiantOut start angle * @param vOut firing speed * @param reasonOut error information * @return Flugzeit in Sekunden (Rueckgabewert -1 bei Eingabe zu kleiner Hoehe / -2 bei Hoehenunterschieden) */ static double flightDurationSec(const LtsUtils::QPoint3D &posStart, const LtsUtils::QPoint3D &posEnd, double peakHeightAbs, double *betaRadiantOut = nullptr, double *vOut = nullptr, QString *reasonOut = nullptr); enum class TrajectoryMode { TrajectoryModeLow = 0, // flat TrajectoryModeHigh }; /** * @brief TrajectoryHelper::peakHeightAbs * @param posStart start of the curve * @param posEnd end of the curve * @param timeSec flightDuration in seconds * @param trajMode LOW (0) or HIGH (1) curve * @param betaRadiantOut start angle * @param vOut firing speed * @param reasonOut error information * @return absolute peak */ static double peakHeightAbs(const LtsUtils::QPoint3D &posStart, const LtsUtils::QPoint3D &posEnd, double timeSec, double *betaRadiantOut = nullptr, double *vOut = nullptr, QString *reasonOut = nullptr); /** * @brief calculate realStartPoint based on apogaeum and endpos (more of less mirroring) * @param apogaeum of ideal parabel * @param posEnd impact position * @return mirrored point (z values of posEnd is taken) */ static LtsUtils::QPoint3D realStartPoint(const LtsUtils::QPoint3D &apogaeum, const LtsUtils::QPoint3D &endPos); }; } // namespace AreaEffectSimulation