WSF
WsfExclusionSensorComponent Class Reference

#include <WsfExclusionSensorComponent.hpp>

Inheritance diagram for WsfExclusionSensorComponent:
Collaboration diagram for WsfExclusionSensorComponent:

Classes

class  ExclusionMode
 Class that stores the defined exclusion angles for each individual mode. More...

Public Types

enum  { cNONE = 0 , cSOLAR = 1 , cLUNAR = 2 , cBOTH = cSOLAR | cLUNAR }
Public Types inherited from WsfSensorComponent
using TrackerSettings = WsfSensorTrackerSettings
Public Types inherited from WsfComponentT< WsfSensor >
typedef WsfSensor ParentType
 This is needed to support the WsfComponentList template.

Static Public Member Functions

static void RegisterComponentFactory (WsfScenario &aScenario)
 Called by WsfScenario::CreateTypeLists on initialization.
static WsfExclusionSensorComponentFind (const WsfSensor &aParent)
static WsfExclusionSensorComponentFindOrCreate (WsfSensor &aParent)
static void AttemptToDetect (WsfSensor &aSensor, double aSimTime, WsfSensorResult &aResult)
 Convenience method to call AttemptToDetect on all the components.
static bool PostAttemptToDetect (WsfSensor &aSensor, double aSimTime, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
static WSF_DEPRECATED void ComputeMeasurementErrors (WsfSensor &aSensor, WsfSensorResult &aResult, double &aAzError, double &aElError, double &aRangeError, double &aRangeRateError)
 (DEPRECATED) Convenience method to call ComputeMeasurementErrors on all the components.
static void ComputeSphericalMeasurementErrors (WsfSensor &aSensor, const WsfSensorResult &aResult, wsf::SphericalMeasurementErrors &aErrors)
 Convenience method to call ComputeSphericalMeasurementErrors on all the components.
static void PrePerformScheduledDetections (WsfSensor &aSensor, double aSimTime)
 Convenience method to call PrePerformScheduledDetections on all the components.
static void PostPerformScheduledDetections (WsfSensor &aSensor, double aSimTime)
 Convenience method to call PostPerformScheduledDetections on all the components.
static void UpdateTrack (WsfSensor &aSensor, double aSimTime, WsfTrack *aTrackPtr, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
 Convenience method to call UpdateTrack on all the components.

Required interface from WsfComponent.

WsfComponentCloneComponent () const override
 Clones the component and returns it in a base class pointer.
WsfStringId GetComponentName () const override
 Returns the name of the component.
const int * GetComponentRoles () const override
 Returns the roles of the component.
void * QueryInterface (int aRole) override
 Returns a pointer to the object if aRole matches it, else returns nullptr.

Interface from WsfSensorComponent.

bool Initialize (double aSimTime) override
bool ProcessModeInput (UtInput &aInput, WsfSensorMode &aSensorMode) override
void PostAttemptToDetect (double aSimTime, WsfPlatform *aTargetPtr, WsfSensorResult &aResult) override

Additional Inherited Members

WsfSensorGetSensor () const
WsfPlatformGetPlatform () const
WsfSimulationGetSimulation () const
virtual bool ProcessBeamInput (UtInput &aInput, WsfSensorBeam &aSensorBeam)
virtual void PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr)
virtual void PlatformDeleted (WsfPlatform *aPlatformPtr)
virtual void SelectMode (double aSimTime, WsfStringId aModeNameId)
virtual void DeselectMode (double aSimTime, WsfStringId aModeNameId)
virtual void TurnOn (double aSimTime)
virtual void TurnOff (double aSimTime)
virtual bool Initialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual bool PreInitialize (double aSimTime)
virtual bool ProcessInput (UtInput &aInput)
virtual void AttemptToDetect (double aSimTime, WsfSensorResult &aResult)
 Extends the sensor-model implementation of AttemptToDetect.
virtual void ComputeSphericalMeasurementErrors (const WsfSensorResult &aResult, wsf::SphericalMeasurementErrors &aErrors) const
virtual void PrePerformScheduledDetections (double aSimTime)
virtual void PostPerformScheduledDetections (double aSimTime)
virtual void UpdateTrack (double aSimTime, WsfTrack *aTrackPtr, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
virtual bool TrackerAllowTracking (double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfTrack *aTrackPtr, WsfSensorResult &aResult)
virtual void TrackerInitializeTrack (double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *&aTrackPtr)
virtual void TrackerUpdateTrack (double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *aTrackPtr, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
virtual void TrackerDropTrack (double aSimTime, const TrackerSettings &aSettings, const WsfTrackId &aRequestId, size_t aObjectId, WsfSensorMode *aModePtr, WsfTrack *aTrackPtr)
Public Member Functions inherited from WsfComponentT< WsfSensor >
 WsfComponentT ()
WsfComponentToperator= (const WsfComponentT &) noexcept
 ~WsfComponentT () override=default
virtual void ComponentParentChanged (ParentType *aParentPtr)
ParentTypeGetComponentParent () const
void SetComponentParent (ParentType *aParentPtr)
Public Member Functions inherited from WsfComponent
virtual ~WsfComponent ()=default
virtual int GetComponentInitializationOrder () const
template<typename T>
bool QueryInterfaceT (T *&aRolePtr)
bool ComponentHasRole (int aRole)
 Returns true if the component has the specified role.
virtual void PreInput ()

Detailed Description

Component that checks if the sensor's line-of-sight is blocked by the Sun or Moon Created for every sensor, but has no affect unless solar_exclusion_angle or lunar_exclusion_angle commands are specified

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
cNONE 
cSOLAR 
cLUNAR 
cBOTH 

Member Function Documentation

◆ CloneComponent()

WsfComponent * WsfExclusionSensorComponent::CloneComponent ( ) const
overridevirtual

Clones the component and returns it in a base class pointer.

Implements WsfComponent.

◆ Find()

WsfExclusionSensorComponent * WsfExclusionSensorComponent::Find ( const WsfSensor & aParent)
static

Returns the parent sensor's component, or nullptr if not found

Parameters
aParentThe sensor that we are checking for components

References WsfComponentList::FindByRole(), and WsfSensor::GetComponents().

Referenced by FindOrCreate().

◆ FindOrCreate()

WsfExclusionSensorComponent * WsfExclusionSensorComponent::FindOrCreate ( WsfSensor & aParent)
static

Returns the parent sensor's component, and creates one if not found

Parameters
aParentThe sensor that we are checking for components

References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), Find(), and WsfSensor::GetComponents().

◆ GetComponentName()

WsfStringId WsfExclusionSensorComponent::GetComponentName ( ) const
overridevirtual

Returns the name of the component.

Implements WsfComponent.

◆ GetComponentRoles()

const int * WsfExclusionSensorComponent::GetComponentRoles ( ) const
overridevirtual

Returns the roles of the component.

Implements WsfComponent.

References cWSF_COMPONENT_NULL, cWSF_COMPONENT_SENSOR_COMPONENT, and cWSF_COMPONENT_SENSOR_EXCLUSION.

◆ Initialize()

bool WsfExclusionSensorComponent::Initialize ( double aSimTime)
overridevirtual

Perform phase 1 initialization. This is called by WsfPlatform::Initialize() during phase 1 initialization of the platform. The component should complete validation of input data that could not be done by ProcessInput, as well as any other functions to prepare for simulation use (subject to the next paragraph).

The order in which components are initialized is defined by GetComponentInitializationOrder. In general a component implementation of this method should not be dependent on the state of another component, i.e.: it should not assume that the other components Initialize() method has been called. If such a dependency exists one should use Initialize2() if possible, or specify a value GetComponentInitializationOrder to force things to initialize in a particular order.

Parameters
aSimTimeThe current simulation time.
Returns
true if successful or false if unsuccessful (bad input data, etc.)
Note
This method should NOT add any other components to the platform. This MUST be done in PreInitialize().

Reimplemented from WsfComponent.

References WsfSensorComponent::GetSensor().

◆ PostAttemptToDetect()

void WsfExclusionSensorComponent::PostAttemptToDetect ( double aSimTime,
WsfPlatform * aTargetPtr,
WsfSensorResult & aResult )
overridevirtual

Calculates if exclusion has occurred for the target platform, and sets aResult respectively.

Parameters
aSimTimeThe simulation time.
aTargetPtrThe platform that detection is attempted on.
aResultThe sensor result that holds success/failure details.

Reimplemented from WsfSensorComponent.

References WsfSensorResult::cEXCLUSION_LUNAR, WsfSensorResult::cEXCLUSION_SOLAR, cLUNAR, cSOLAR, WsfSensor::GetCurrentMode(), WsfDateTime::GetCurrentTime(), WsfSimulation::GetDateTime(), WsfMode::GetModeIndex(), WsfSensorComponent::GetSensor(), WsfSensorComponent::GetSimulation(), and WsfEM_Interaction::mFailedStatus.

◆ ProcessModeInput()

bool WsfExclusionSensorComponent::ProcessModeInput ( UtInput & aInput,
WsfSensorMode & aSensorMode )
overridevirtual

Enables component and sets exclusion angles if commands are found

Parameters
aInputThe input object to read from
aSensorModeThe current sensor mode that the input controls

Reimplemented from WsfSensorComponent.

References WsfExclusionSensorComponent::ExclusionMode::SetLunar(), and WsfExclusionSensorComponent::ExclusionMode::SetSolar().

◆ QueryInterface()

void * WsfExclusionSensorComponent::QueryInterface ( int aRole)
overridevirtual

Returns a pointer to the object if aRole matches it, else returns nullptr.

Implements WsfComponent.

References cWSF_COMPONENT_SENSOR_COMPONENT, and cWSF_COMPONENT_SENSOR_EXCLUSION.

◆ RegisterComponentFactory()

void WsfExclusionSensorComponent::RegisterComponentFactory ( WsfScenario & aScenario)
static

Called by WsfScenario::CreateTypeLists on initialization.

References WsfScenario::RegisterComponentFactory().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved