WSF
WsfExclusionSensorComponent.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2020 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSF_EXCLUSION_SENSOR_COMPONENT_HPP
13#define WSF_EXCLUSION_SENSOR_COMPONENT_HPP
14
15#include "wsf_export.h"
16
17#include "WsfComponentRoles.hpp"
18#include "WsfSensor.hpp"
20
24{
25public:
26 enum
27 {
28 cNONE = 0,
29 cSOLAR = 1,
30 cLUNAR = 2,
32 };
33
34 static void RegisterComponentFactory(WsfScenario& aScenario);
35 static WsfExclusionSensorComponent* Find(const WsfSensor& aParent);
36 static WsfExclusionSensorComponent* FindOrCreate(WsfSensor& aParent);
37
39
40 bool Initialize(double aSimTime) override;
41 bool ProcessModeInput(UtInput& aInput, WsfSensorMode& aSensorMode) override;
42
43 void PostAttemptToDetect(double aSimTime, WsfPlatform* aTargetPtr, WsfSensorResult& aResult) override;
45
47
48 WsfComponent* CloneComponent() const override;
49 WsfStringId GetComponentName() const override;
50 const int* GetComponentRoles() const override;
51 void* QueryInterface(int aRole) override;
53
56 {
57 public:
58 unsigned int GetType() const { return mType; }
59 double GetSolar() const { return mSolarAngle; }
60 double GetLunar() const { return mLunarAngle; }
61 void SetSolar(double aAngle);
62 void SetLunar(double aAngle);
63
64 private:
65 unsigned int mType{cNONE};
66 double mSolarAngle;
67 double mLunarAngle;
68 };
69
70private:
71 ExclusionMode& GetOrCreateExclusionMode(const WsfSensorMode& aSensorMode);
72
73 std::vector<ExclusionMode> mModes;
74 ExclusionMode mTemplate;
75 bool mEnabled{false};
76};
77
79
80#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_SENSOR_EXCLUSION
A Solar or lunar exclusion angle component.
Definition WsfComponentRoles.hpp:148
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfComponent.hpp:39
virtual const int * GetComponentRoles() const =0
virtual WsfStringId GetComponentName() const =0
virtual WsfComponent * CloneComponent() const =0
virtual void * QueryInterface(int aRole)=0
Class that stores the defined exclusion angles for each individual mode.
Definition WsfExclusionSensorComponent.hpp:56
unsigned int GetType() const
Definition WsfExclusionSensorComponent.hpp:58
double GetSolar() const
Definition WsfExclusionSensorComponent.hpp:59
double GetLunar() const
Definition WsfExclusionSensorComponent.hpp:60
Definition WsfExclusionSensorComponent.hpp:24
@ cSOLAR
Definition WsfExclusionSensorComponent.hpp:29
@ cNONE
Definition WsfExclusionSensorComponent.hpp:28
@ cLUNAR
Definition WsfExclusionSensorComponent.hpp:30
@ cBOTH
Definition WsfExclusionSensorComponent.hpp:31
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfSensorComponent.hpp:36
virtual void PostAttemptToDetect(double aSimTime, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
Definition WsfSensorComponent.hpp:85
virtual bool Initialize(double aSimTime)
Definition WsfComponent.cpp:45
virtual bool ProcessModeInput(UtInput &aInput, WsfSensorMode &aSensorMode)
Definition WsfSensorComponent.hpp:61
Definition WsfSensorMode.hpp:36
Definition WsfSensorResult.hpp:27
Definition WsfSensor.hpp:92
Copyrights Multiple, All Rights Reserved