Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+56
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* Handle an impact from nasat aircraft and create single explosion
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2018-08-30
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QHash>
|
||||
#include <QObject>
|
||||
#include <AreaEffectSimulation/aes_ftc.h>
|
||||
#include <ProjectDataManagement/pdm.hpp>
|
||||
#include "guez_nasat_telegrams.h"
|
||||
#include "logger.h"
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
class Initialization;
|
||||
class HandlerNasatImpact final : public QObject
|
||||
, protected AreaEffectSimulation::Interface::Ftc::AirSupportImpactModifyReplyHandler
|
||||
, protected AreaEffectSimulation::Interface::Ftc::ExplosionClusterModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HandlerNasatImpact(Initialization *mainHandler);
|
||||
|
||||
bool init() const { return true; }
|
||||
|
||||
void onAirSupportImpactModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
void onExplosionClusterModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
public Q_SLOTS:
|
||||
void nasatWeaponRelease(const GuezNasat::NasatWeaponRelease &weaponRelease);
|
||||
void nasatImpact(int nasatId, const Core::GeoPosition &pos, qint64 flightTimeMsec, qint64 impactTimeMsec, int munitionCode, FuseType fuseType = FuseType::Instant);
|
||||
void onChargeTypeChanged(const ProjectDataManagement::ChargeType &ct);
|
||||
private:
|
||||
int chargeTypeFromMunitionCode(int nasatChargeCode) const;
|
||||
int fuseTypeToPdmIgniterType(FuseType fusetype) const;
|
||||
private:
|
||||
Initialization *m_mainHandler;
|
||||
QHash<int, int> m_chargeMapping; // nasatId -> chargeId
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
//#define NLDEVCTRL_844
|
||||
#ifdef NLDEVCTRL_844
|
||||
struct ForTesting
|
||||
{
|
||||
int requestCounter{0};
|
||||
int replyCounter{0};
|
||||
};
|
||||
ForTesting testing;
|
||||
#endif // NLDEVCTRL_844
|
||||
|
||||
};
|
||||
} // namespace GuezNasat
|
||||
Reference in new issue
Block a user