WSF
WsfSolarElevationAtTargetComponent.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 2021 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_SOLAR_ELEVATION_AT_TARGET_SENSOR_COMPONENT_HPP
13#define WSF_SOLAR_ELEVATION_AT_TARGET_SENSOR_COMPONENT_HPP
14
15#include "wsf_export.h"
16
17#include <vector>
18
19#include "WsfComponentRoles.hpp"
20#include "WsfSensor.hpp"
22
26{
27public:
29 static void RegisterComponentFactory(WsfScenario& aScenario);
34
36
37 bool Initialize(double aSimTime) override;
38 bool ProcessModeInput(UtInput& aInput, WsfSensorMode& aSensorMode) override;
39
40 void PostAttemptToDetect(double aSimTime, WsfPlatform* aTargetPtr, WsfSensorResult& aResult) override;
42
44
45 WsfComponent* CloneComponent() const override;
46 WsfStringId GetComponentName() const override;
47 const int* GetComponentRoles() const override;
48 void* QueryInterface(int aRole) override;
50
53 {
54 public:
55 bool IsEnabled() const { return mEnabled; }
56 double GetMinAngle() const { return mMinAngle; }
57 double GetMaxAngle() const { return mMaxAngle; }
58 void SetBounds(double aMinAngle, double aMaxAngle);
59
60 private:
61 double mMinAngle = 0;
62 double mMaxAngle = 0;
63 bool mEnabled = false;
64 };
65
66private:
67 ElevationMode& GetOrCreateElevationMode(const WsfSensorMode& aSensorMode);
68
69 std::vector<ElevationMode> mModes;
70 ElevationMode mTemplate;
71};
72
74
75#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_SOLAR_ELEVATION_AT_TARGET
A solar elevation from target sensor component.
Definition WsfComponentRoles.hpp:151
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
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
Class that stores the defined elevation angles for each individual mode.
Definition WsfSolarElevationAtTargetComponent.hpp:53
bool IsEnabled() const
Definition WsfSolarElevationAtTargetComponent.hpp:55
double GetMinAngle() const
Definition WsfSolarElevationAtTargetComponent.hpp:56
double GetMaxAngle() const
Definition WsfSolarElevationAtTargetComponent.hpp:57
Definition WsfSolarElevationAtTargetComponent.hpp:26
static WsfSolarElevationAtTargetSensorComponent * Find(const WsfSensor &aParent)
Returns the parent sensor's component, or nullptr if not found.
Definition WsfSolarElevationAtTargetComponent.cpp:47
static WsfSolarElevationAtTargetSensorComponent * FindOrCreate(WsfSensor &aParent)
Returns the parent sensor's component, or creates one if not found.
Definition WsfSolarElevationAtTargetComponent.cpp:55
static void RegisterComponentFactory(WsfScenario &aScenario)
Called by WsfScenario::CreateTypeLists on initialization.
Definition WsfSolarElevationAtTargetComponent.cpp:41
Copyrights Multiple, All Rights Reserved