Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+41
@@ -0,0 +1,41 @@
|
||||
#* **************************************************************************
|
||||
#*
|
||||
#* (C) Copyright 2009 Swiss SIMTEC AG
|
||||
#*
|
||||
#* **************************************************************************
|
||||
#*
|
||||
#* $HeadURL$
|
||||
#* $LastChangedBy$
|
||||
#* $LastChangedDate$
|
||||
#* $LastChangedRevision$
|
||||
#*
|
||||
#* **************************************************************************
|
||||
|
||||
SET(my_SRCS
|
||||
configsettings.cpp
|
||||
ammuconfig.cpp
|
||||
geoconfig.cpp
|
||||
# ../logger.cpp # wird nicht genutzt, warum nochmals übersetzen?
|
||||
)
|
||||
|
||||
SET(my_HDRS
|
||||
configsettings.h
|
||||
ammuconfig.h
|
||||
geoconfig.h
|
||||
# ../logger.h # wird nicht genutzt, warum nochmals übersetzen?
|
||||
)
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(GBL_ConfigSystem
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
|
||||
NGL_ADD_LIBRARY(AAR SV GBL_ConfigSystem STATIC ${my_SRCS} ${my_HDRS})
|
||||
NGL_TARGET_LINK_LIBRARIES(GBL_ConfigSystem
|
||||
Qt5::Core
|
||||
nglsettings
|
||||
FW_Ballistic
|
||||
situationMapElevationMap
|
||||
)
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
/**
|
||||
* Geopairing Ammu Config
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, ESZS, 2016-04-14
|
||||
*/
|
||||
|
||||
#include "ammuconfig.h"
|
||||
#include <QStringList>
|
||||
|
||||
namespace N_ConfigSystem
|
||||
{
|
||||
|
||||
AmmuConfig *AmmuConfig::getInstance()
|
||||
{
|
||||
static AmmuConfig ammuConfig;
|
||||
return &ammuConfig;
|
||||
}
|
||||
|
||||
void AmmuConfig::initFilename(const QString &fileName)
|
||||
{
|
||||
ConfigSettings::initFilename(fileName);
|
||||
loadAmmunitions();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
N_Ballistic::Ammunition AmmuConfig::loadAmmunition(QString a_group)
|
||||
{
|
||||
N_Ballistic::Ammunition p_ammu;
|
||||
|
||||
p_ammu.m_AmmunInfo.m_Name = getString(a_group, QStringLiteral("Name"), QStringLiteral("<unknown>"));
|
||||
p_ammu.m_AmmunInfo.m_Range = getFloat(a_group, QStringLiteral("Range"), 0);
|
||||
p_ammu.m_AmmunInfo.m_Caliber = getFloat(a_group, QStringLiteral("Caliber"), 0);
|
||||
p_ammu.m_AmmunInfo.m_Speed = getFloat(a_group, QStringLiteral("Speed"), 0);
|
||||
p_ammu.m_AmmunInfo.m_TimeOut = getFloat(a_group, QStringLiteral("TimeOut"), 0);
|
||||
p_ammu.m_AmmunInfo.m_ReasonToDetonate = getString(a_group, QStringLiteral("ReasonToDetonate"), QStringLiteral("OnImpact"));
|
||||
p_ammu.m_AmmunInfo.m_Algorithm = getString(a_group, QStringLiteral("Algorithm"), QStringLiteral("DAntonio"));
|
||||
p_ammu.m_AmmunInfo.m_Deviation = getFloat(a_group, QStringLiteral("Deviation"), 0.0);
|
||||
//INFO_LOG(m_logger) << a_group << " m_Deviation : " << p_ammu.m_AmmunInfo.m_Deviation ;
|
||||
p_ammu.m_AmmunInfo.m_Derivation = getFloat(a_group, QStringLiteral("Derivation"), 0.0);
|
||||
//INFO_LOG(m_logger) << a_group << " m_Derivation : " << p_ammu.m_AmmunInfo.m_Derivation ;
|
||||
|
||||
QString s_paramtype = getString(a_group, QStringLiteral("ParamType"), QString());
|
||||
a_group += QLatin1Char('/') + s_paramtype;
|
||||
|
||||
if (s_paramtype == QStringLiteral("PolygonParams"))
|
||||
{
|
||||
p_ammu.m_PolygonParams.m_InitialAX = getFloat(a_group, QStringLiteral("InitialAX"), 0);
|
||||
|
||||
QVector<int> l_axindex = getIntegerVector(a_group, QStringLiteral("AXIndex"));
|
||||
QVector<double> l_axcoeff = getFloatVector(a_group, QStringLiteral("AXCoeff"));
|
||||
for (int i = 0; i < l_axcoeff.size(); i++)
|
||||
{
|
||||
N_Ballistic::PolygonParamType::PolyCoefficientType o_coeff;
|
||||
o_coeff.m_Index = l_axindex[i];
|
||||
o_coeff.m_Coeff = l_axcoeff[i];
|
||||
p_ammu.m_PolygonParams.m_AX.push_back(std::move(o_coeff));
|
||||
}
|
||||
|
||||
QVector<int> l_ayindex = getIntegerVector(a_group, QStringLiteral("AYIndex"));
|
||||
QVector<double> l_aycoeff = getFloatVector(a_group, QStringLiteral("AYCoeff"));
|
||||
for (int i = 0; i < l_aycoeff.size(); i++)
|
||||
{
|
||||
N_Ballistic::PolygonParamType::PolyCoefficientType o_coeff;
|
||||
o_coeff.m_Index = l_ayindex[i];
|
||||
o_coeff.m_Coeff = l_aycoeff[i];
|
||||
p_ammu.m_PolygonParams.m_AY.push_back(std::move(o_coeff));
|
||||
}
|
||||
|
||||
p_ammu.m_PolygonParams.m_Valid = true;
|
||||
}
|
||||
else if (s_paramtype == QStringLiteral("StandardParams"))
|
||||
{
|
||||
p_ammu.m_StandardParams.m_Time.m_CRhoT = getFloat(a_group, QStringLiteral("Time_CRhoT"), 0);
|
||||
p_ammu.m_StandardParams.m_Time.m_CT = getFloat(a_group, QStringLiteral("Time_CT"), 0);
|
||||
p_ammu.m_StandardParams.m_Time.m_CV0T = getFloat(a_group, QStringLiteral("Time_CV0T"), 0);
|
||||
p_ammu.m_StandardParams.m_Time.m_ConstT = getFloat(a_group, QStringLiteral("Time_ConstT"), 0);
|
||||
|
||||
p_ammu.m_StandardParams.m_Angle.m_CRhoA = getFloat(a_group, QStringLiteral("Angle_CRhoA"), 0);
|
||||
p_ammu.m_StandardParams.m_Angle.m_CGammaA = getFloat(a_group, QStringLiteral("Angle_CGammaA"), 0);
|
||||
p_ammu.m_StandardParams.m_Angle.m_CA = getFloat(a_group, QStringLiteral("Angle_CA"), 0);
|
||||
p_ammu.m_StandardParams.m_Angle.m_CV0A = getFloat(a_group, QStringLiteral("Angle_CV0A"), 0);
|
||||
p_ammu.m_StandardParams.m_Angle.m_ConstA = getFloat(a_group, QStringLiteral("Angle_ConstA"), 0);
|
||||
|
||||
p_ammu.m_StandardParams.m_CrossWind.m_ConstX3 = getFloat(a_group, QStringLiteral("CrossWind_ConstX3"), 0);
|
||||
p_ammu.m_StandardParams.m_CrossWind.m_ConstX2 = getFloat(a_group, QStringLiteral("CrossWind_ConstX2"), 0);
|
||||
p_ammu.m_StandardParams.m_CrossWind.m_ConstX1 = getFloat(a_group, QStringLiteral("CrossWind_ConstX1"), 0);
|
||||
p_ammu.m_StandardParams.m_CrossWind.m_ConstX0 = getFloat(a_group, QStringLiteral("CrossWind_ConstX0"), 0);
|
||||
|
||||
p_ammu.m_StandardParams.m_Speed.m_V0ConstX0 = getFloat(a_group, QStringLiteral("Speed_V0ConstX0"), 0);
|
||||
p_ammu.m_StandardParams.m_Speed.m_V0ConstX1 = getFloat(a_group, QStringLiteral("Speed_V0ConstX1"), 0);
|
||||
|
||||
//INFO_LOG(m_logger) << a_group << " Speed_V0Const0 : " << p_ammu.m_StandardParams.m_Speed.m_V0ConstX0 ;
|
||||
//INFO_LOG(m_logger) << a_group << " Speed_V0Const1 : " << p_ammu.m_StandardParams.m_Speed.m_V0ConstX1 ;
|
||||
p_ammu.m_StandardParams.m_Valid = true;
|
||||
}
|
||||
else if (s_paramtype == QStringLiteral("CWParams"))
|
||||
{
|
||||
QString l_groupp = a_group.replace(QStringLiteral("Ammunition"), QStringLiteral("AmmunitionP"));
|
||||
p_ammu.m_CWParams.m_V0 = getFloatVector(l_groupp, QStringLiteral("V0"));
|
||||
p_ammu.m_CWParams.m_CW = getFloatVector(l_groupp, QStringLiteral("CW"));
|
||||
p_ammu.m_CWParams.m_XW = getFloatVector(l_groupp, QStringLiteral("XW"));
|
||||
p_ammu.m_CWParams.m_Weight = getFloat(l_groupp, QStringLiteral("Weight"), 1);
|
||||
|
||||
for (int i = 0; i < p_ammu.m_CWParams.m_CW.size(); i++)
|
||||
{
|
||||
//INFO_LOG(m_logger) << "CWParams V0 " << i << " : " << p_ammu.m_CWParams.m_V0[i] ;
|
||||
//INFO_LOG(m_logger) << "CWParams CW " << i << " : " << p_ammu.m_CWParams.m_CW[i] ;
|
||||
//INFO_LOG(m_logger) << "CWParams XW " << i << " : " << p_ammu.m_CWParams.m_XW[i] ;
|
||||
}
|
||||
//INFO_LOG(m_logger) << "CWParams read, V0 count=" << p_ammu.m_CWParams.m_V0.size() ;
|
||||
//INFO_LOG(m_logger) << "CWParams read, CW count=" << p_ammu.m_CWParams.m_CW.size() ;
|
||||
//INFO_LOG(m_logger) << "CWParams read, XW count=" << p_ammu.m_CWParams.m_XW.size() ;
|
||||
//INFO_LOG(m_logger) << "CWParams read, Weight = " << p_ammu.m_CWParams.m_Weight ;
|
||||
|
||||
p_ammu.m_CWParams.m_Valid = true;
|
||||
}
|
||||
else if (s_paramtype == QStringLiteral("DiscreteParams"))
|
||||
{
|
||||
//ERROR_LOG(m_logger) << "not yet implemented : " << s_paramtype ;
|
||||
}
|
||||
else
|
||||
{
|
||||
//ERROR_LOG(m_logger) << "Unknown ParamType : " << s_paramtype ;
|
||||
}
|
||||
return p_ammu;
|
||||
}
|
||||
|
||||
|
||||
//bool AmmuConfig::loadAmmunitions(const QString &a_configFilename, QVector<Ammunition *> &a_ammunitions)
|
||||
void AmmuConfig::loadAmmunitions()
|
||||
{
|
||||
m_ammunitions.clear();
|
||||
|
||||
int l_numberOfAmmunitions = getInteger(QStringLiteral("Ammunitions"), QStringLiteral("NumberOfEntries"), 0);
|
||||
//INFO_LOG(m_logger) << "d_numberOfEntries : " << d_numberOfEntries ;
|
||||
for (int i = 0; i < l_numberOfAmmunitions; i++)
|
||||
{
|
||||
QString s_ammu_group = QStringLiteral("Ammunition") + QString::number(i + 1);
|
||||
m_ammunitions.push_back(loadAmmunition(s_ammu_group));
|
||||
// INFO_LOG(m_logger) << "Ammunition " << p_ammu.m_AmmunInfo.m_Name << " added to list" ;
|
||||
}
|
||||
|
||||
bool l_RandomizerOff = existsKey(QStringLiteral("Ammunitions"), QStringLiteral("DisableRandomSeed"));
|
||||
if (!l_RandomizerOff)
|
||||
srand(time(nullptr));
|
||||
//else
|
||||
// WARNING_LOG(m_logger) << "Randomizer is NOT seeded with Time..." ;
|
||||
|
||||
//INFO_LOG(m_logger) << "Total Ammunition count : " << m_ammunitions.size() ;
|
||||
|
||||
}
|
||||
|
||||
} // namespace N_ConfigSystem
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
#include "configsettings.h"
|
||||
#include <FW_Ballistic/Ammunition.hpp>
|
||||
|
||||
namespace N_ConfigSystem
|
||||
{
|
||||
|
||||
class AmmuConfig: public ConfigSettings
|
||||
{
|
||||
private:
|
||||
AmmuConfig() = default;
|
||||
public:
|
||||
static AmmuConfig *getInstance();
|
||||
void initFilename(const QString &fileName);
|
||||
QVector<N_Ballistic::Ammunition>* GetAmmunitions(){return &m_ammunitions;}
|
||||
|
||||
private:
|
||||
N_Ballistic::Ammunition loadAmmunition(QString a_group);
|
||||
|
||||
void loadAmmunitions();
|
||||
|
||||
QVector<N_Ballistic::Ammunition> m_ammunitions;
|
||||
};
|
||||
}
|
||||
Executable
+102
@@ -0,0 +1,102 @@
|
||||
#include "configsettings.h"
|
||||
|
||||
ConfigSettings::~ConfigSettings()
|
||||
{
|
||||
delete m_settings;
|
||||
}
|
||||
|
||||
void ConfigSettings::initFilename(const QString &fileName)
|
||||
{
|
||||
delete m_settings;
|
||||
m_settings = new QSettings(fileName, QSettings::IniFormat);
|
||||
}
|
||||
|
||||
int ConfigSettings::getInteger(const QString &a_group, const QString &a_key, const int &defaultValue)
|
||||
{
|
||||
int result;
|
||||
if (!existsKey(a_group, a_key) )
|
||||
return defaultValue;
|
||||
QString keygrp = a_group + QLatin1Char('/') + a_key;
|
||||
result = m_settings->value(keygrp).toInt();
|
||||
return result;
|
||||
}
|
||||
|
||||
QVector<int> ConfigSettings::getIntegerVector(const QString &a_group, const QString &a_key)
|
||||
{
|
||||
QVector<int> result;
|
||||
if (!existsKey(a_group, a_key) )
|
||||
return result;
|
||||
const QString keygrp = a_group + QLatin1Char('/') + a_key;
|
||||
const QStringList list = m_settings->value(keygrp).toStringList();
|
||||
|
||||
result.reserve(list.size());
|
||||
for (const QString &value : list)
|
||||
result.append(value.toInt());
|
||||
return result;
|
||||
}
|
||||
|
||||
QMap<int, bool> ConfigSettings::getBoolMap(const QString &a_group, const QString &a_key)
|
||||
{
|
||||
QMap<int, bool> result;
|
||||
QVector<int> intVector = getIntegerVector(a_group, a_key);
|
||||
for (int i = 0; i < intVector.size(); i++)
|
||||
result.insert(i, static_cast<bool>(intVector.at(i)));
|
||||
return result;
|
||||
}
|
||||
|
||||
QString ConfigSettings::getString(const QString &a_group, const QString &a_key, const QString &defaultValue)
|
||||
{
|
||||
QString result;
|
||||
if ( !existsKey(a_group, a_key) )
|
||||
return defaultValue;
|
||||
QString keygrp = a_group + QLatin1Char('/') + a_key;
|
||||
result = m_settings->value(keygrp).toString();
|
||||
return result;
|
||||
}
|
||||
|
||||
double ConfigSettings::getFloat(const QString &a_group, const QString &a_key, const double &defaultValue)
|
||||
{
|
||||
double result;
|
||||
if ( !existsKey(a_group, a_key) )
|
||||
return defaultValue;
|
||||
QString keygrp = a_group + QLatin1Char('/') + a_key;
|
||||
result = m_settings->value(keygrp).toDouble();
|
||||
return result;
|
||||
}
|
||||
|
||||
QVector<double> ConfigSettings::getFloatVector(const QString &a_group, const QString &a_key)
|
||||
{
|
||||
QVector<double> result;
|
||||
if (!existsKey(a_group, a_key) )
|
||||
return result;
|
||||
const QString keygrp = a_group + QLatin1Char('/') + a_key;
|
||||
const QStringList list = m_settings->value(keygrp).toStringList();
|
||||
|
||||
result.reserve(list.size());
|
||||
for (const QString &value : list)
|
||||
result.append(value.toDouble());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool ConfigSettings::existsGroup(const QString &a_group)
|
||||
{
|
||||
QStringList groups = m_settings->childGroups();
|
||||
|
||||
return groups.contains(a_group);
|
||||
}
|
||||
|
||||
QStringList ConfigSettings::getKeys(const QString &a_group)
|
||||
{
|
||||
QStringList keys;
|
||||
m_settings->beginGroup(a_group);
|
||||
keys = m_settings->allKeys();
|
||||
m_settings->endGroup();
|
||||
return keys;
|
||||
}
|
||||
|
||||
bool ConfigSettings::existsKey(const QString &a_group, const QString &a_key)
|
||||
{
|
||||
QStringList keys = getKeys(a_group);
|
||||
return keys.contains(a_key);
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#ifndef CONFIGSETTINGS_H
|
||||
#define CONFIGSETTINGS_H
|
||||
|
||||
#include <QString>
|
||||
#include <QSettings>
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
|
||||
class ConfigSettings
|
||||
{
|
||||
protected:
|
||||
ConfigSettings() = default;
|
||||
virtual ~ConfigSettings();
|
||||
|
||||
public:
|
||||
void initFilename(const QString &fileName);
|
||||
int getInteger(const QString &a_group, const QString &a_key, const int &defaultValue);
|
||||
QVector<int> getIntegerVector(const QString &a_group, const QString &a_key);
|
||||
QMap<int, bool> getBoolMap(const QString &a_group, const QString &a_key);
|
||||
QString getString(const QString &a_group, const QString &a_key, const QString &defaultValue);
|
||||
double getFloat(const QString &a_group, const QString &a_key, const double &defaultValue);
|
||||
QVector<double> getFloatVector(const QString &a_group, const QString &a_key);
|
||||
bool existsGroup(const QString &a_group);
|
||||
QStringList getKeys(const QString &a_group);
|
||||
bool existsKey(const QString &a_group, const QString &a_key);
|
||||
|
||||
private:
|
||||
QSettings *m_settings = nullptr;
|
||||
|
||||
};
|
||||
|
||||
#endif // CONFIGSETTINGS_H
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* Geopairing Config
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, ESZS, 2016-04-14
|
||||
*/
|
||||
|
||||
#include "geoconfig.h"
|
||||
#include <QFileInfo>
|
||||
|
||||
namespace N_ConfigSystem
|
||||
{
|
||||
|
||||
GeoConfig::GeoConfig()
|
||||
//: m_logger(CesGeoPairing::getLogger("GeoConfig"))
|
||||
{
|
||||
}
|
||||
|
||||
GeoConfig::~GeoConfig()
|
||||
{
|
||||
}
|
||||
|
||||
GeoConfig *GeoConfig::getInstance()
|
||||
{
|
||||
static GeoConfig geoConfig;
|
||||
return &geoConfig;
|
||||
}
|
||||
|
||||
bool GeoConfig::initFilename(const QString &fileName)
|
||||
{
|
||||
// const QFileInfo qFileInfo(fileName);
|
||||
// INFO_LOG(m_logger) << LOGFUNCTION << " START, GeoConfig::absoluteFilePath ='" << qFileInfo.absoluteFilePath() << "'";
|
||||
|
||||
// AmmunitionMap
|
||||
ConfigSettings::initFilename(fileName);
|
||||
initializeAmmu();
|
||||
|
||||
// Elevation (srtm_38_02.tif -> Norddeutschland)
|
||||
const QString elevationName = getString(QStringLiteral("Elevation"), QStringLiteral("MapFile"), QStringLiteral("/usr/share/arcgis/resources/elevation/srtm_38_02.tif"));
|
||||
|
||||
const QStringList &filePaths_rough_to_fine = elevationName.split(QStringLiteral(";"));
|
||||
|
||||
// INFO_LOG(m_logger) << LOGFUNCTION << " use following file(s) for ElevationMap: '" << elevationName << "'";
|
||||
|
||||
if (!m_elevationMapManager)
|
||||
{
|
||||
m_elevationMapManager = std::make_shared<SituationMap::ElevationMapManager>();
|
||||
m_elevationMapManager->init(filePaths_rough_to_fine);
|
||||
}
|
||||
|
||||
// TRACE_LOG(m_logger) << LOGFUNCTION << " END, filename ='" << fileName << "'";
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Initialize the GeoPairing implementation
|
||||
// ---------------------------------------------------------------
|
||||
void GeoConfig::initializeAmmu()
|
||||
{
|
||||
int l_numberOfAmmunitions = getInteger(QStringLiteral("GeoPairing"), QStringLiteral("NumberOfEntries"), 0);
|
||||
QString s_filter = getString(QStringLiteral("GeoPairing"), QStringLiteral("KeyOfEntries"), QStringLiteral("Ammunition"));
|
||||
|
||||
m_AmmuMap.clear();
|
||||
QString s_group = QStringLiteral("AmmunitionMap");
|
||||
for (int i=0; i< l_numberOfAmmunitions; i++)
|
||||
{
|
||||
QString s_ammu_group = s_filter + QString::number(i+1);
|
||||
QString s_unknown = QStringLiteral("<unknown>");
|
||||
QString s_ammu_value = getString(s_group, s_ammu_group, s_unknown);
|
||||
m_AmmuMap[i] = s_ammu_value;
|
||||
}
|
||||
|
||||
m_ChargeMap.clear();
|
||||
for (int i = 0; i < l_numberOfAmmunitions; i++)
|
||||
{
|
||||
QString s_ammu_group = s_filter + QString::number(i + 1);
|
||||
|
||||
QVector<double> l_charges = getFloatVector(QStringLiteral("ChargeMap"), s_ammu_group);
|
||||
m_ChargeMap[i] = l_charges;
|
||||
// INFO_LOG(m_logger) << "Store ChargeMap Entry: " << " i=" << i << " s_ammu_group = '" << s_ammu_group << "'";
|
||||
// for (int j = 0; j < l_charges.size(); j++)
|
||||
// INFO_LOG(m_logger) << j << " = " << l_charges[j];
|
||||
}
|
||||
}
|
||||
|
||||
double GeoConfig::getElevation(const double lon, const double lat) const
|
||||
{
|
||||
if (!m_elevationMapManager)
|
||||
return 0;
|
||||
m_elevationMapManager->waitForInitialization();
|
||||
return m_elevationMapManager->elevation(lon, lat);
|
||||
}
|
||||
|
||||
} // namespace N_ConfigSystem
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Geopairing Config
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Gerlinde Rudolphus, ESZS, 2016-04-14
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
//class GeoConfig
|
||||
#include "configsettings.h"
|
||||
//#include "../logger.h"
|
||||
|
||||
#include <ElevationMap/elevation_map_manager.h>
|
||||
#include <QString>
|
||||
|
||||
#include <iostream> // std::cout, std::endl, std::cin
|
||||
#include <stdlib.h> // EXIT_SUCCESS
|
||||
#include <memory>
|
||||
|
||||
|
||||
// forward declaration:
|
||||
namespace SituationMap
|
||||
{
|
||||
class ElevationMap;
|
||||
}
|
||||
|
||||
namespace CesGeoPairing
|
||||
{
|
||||
class HandlerGeoPairing;
|
||||
}
|
||||
|
||||
|
||||
namespace N_ConfigSystem
|
||||
{
|
||||
class GeoConfig: public ConfigSettings
|
||||
{
|
||||
private:
|
||||
explicit GeoConfig();
|
||||
~GeoConfig();
|
||||
public:
|
||||
static GeoConfig *getInstance();
|
||||
|
||||
|
||||
QMap<int, QString> getAmmuMap() const { return m_AmmuMap; }
|
||||
QMap<int, QVector<double> > getChargeMap() const { return m_ChargeMap; }
|
||||
double getElevation(const double lon, const double lat) const;
|
||||
|
||||
private:
|
||||
friend class CesGeoPairing::HandlerGeoPairing; // for initFilename
|
||||
bool initFilename(const QString &fileName);
|
||||
|
||||
void initializeAmmu();
|
||||
QMap<int, QString> m_AmmuMap ;
|
||||
QMap<int, QVector<double> > m_ChargeMap;
|
||||
|
||||
std::shared_ptr<SituationMap::ElevationMapManager> m_elevationMapManager;
|
||||
|
||||
// CesGeoPairing::LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user