Continues migration with DDS, Common

This commit is contained in:
torsten committed 2026-07-17 12:41:42 +02:00
1 parent 9b15cee841
commit fa48db111e
668 files changed
+111841 -2

No files matched your search

+129
View File
@@ -0,0 +1,129 @@
#pragma once
#include "logger.h"
#include <LtsElevation/ltselevation_export.h>
#include <LtsUtilsCore/qpoint3d.h>
#include <QObject>
#include <QPointer>
#include <QStringList>
#include <QCoreApplication>
#include <memory>
#include <iosfwd>
namespace LtsSession
{
class LtsSessionDataDds;
}
namespace ExerciseManagement
{
namespace Interface
{
class Dtc;
}
}
namespace AssetManagement
{
namespace Interface
{
class Dtc;
}
}
namespace LtsElevation
{
enum class LineOfSight { LOS_UNDEFINED,
LOS_ERROR,
LOS_VISIBLE,
LOS_INVISIBLE };
class LtsElevationManager;
using LTS_ELEVATION_MANAGER_TYPE = QPointer<LtsElevationManager>;
class LTSELEVATION_EXPORT LtsElevationManager : public QObject
{
public:
static LTS_ELEVATION_MANAGER_TYPE createInstance(int exerciseId,
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &exmDtc = {},
const std::shared_ptr<AssetManagement::Interface::Dtc> &asmDtc = {});
static LTS_ELEVATION_MANAGER_TYPE getInstance(int exerciseId);
static LTS_ELEVATION_MANAGER_TYPE createInstanceForTrainingAreaId(int trainingAreaId,
const std::shared_ptr<AssetManagement::Interface::Dtc> &asmDtc = nullptr);
static void cleanupAll();
virtual ~LtsElevationManager();
bool waitForInitialization();
bool isValid() const;
double elevation(double lon_rad, double lat_rad, double defaultValue = std::numeric_limits<double>::min(), bool *bIsCovered = nullptr) const;
LineOfSight lineOfSightCalculation(const LtsUtils::QPoint3D &startPointGeo_absZ,
const LtsUtils::QPoint3D &endPointGeo_absZ);
LineOfSight lineOfSightCalculation(const QPointF &startPointGeo, double startHat,
const QPointF &endPointGeo, double endHat);
protected:
explicit LtsElevationManager();
void initDDS(const std::shared_ptr<ExerciseManagement::Interface::Dtc> &exmDtc,
const std::shared_ptr<AssetManagement::Interface::Dtc> &asmDtc);
bool init(const QStringList &filePaths_rough_to_fine);
static int exerciseIdToTrainingAreaId(int exerciseId, const std::shared_ptr<ExerciseManagement::Interface::Dtc> &exmDtc);
QStringList getFilenamesForExercise(int exerciseId);
QStringList getFilenamesForTrainingArea(int trainingAreaId);
static LTS_ELEVATION_MANAGER_TYPE createInstanceUnitTest(int id, const QStringList &filePaths_rough_to_fine);
private:
class Private;
Private *d;
LOGGER_T m_logger;
};
LTSELEVATION_EXPORT const QString toString(const LtsElevation::LineOfSight &value);
LTSELEVATION_EXPORT std::ostream &operator<< (std::ostream &stream,
const LtsElevation::LineOfSight value);
}