WSF
WsfPlatform Class Reference

Platforms represent a entity within the simulation. More...

#include <WsfPlatform.hpp>

Inheritance diagram for WsfPlatform:
Collaboration diagram for WsfPlatform:

Public Types

enum  OnBrokenAction { cON_BROKEN_REMOVE , cON_BROKEN_DISABLE , cON_BROKEN_MOVABLE_DISABLED }
 Define what should be done when the platform is broken. More...
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Public Types inherited from WsfComponentT< WsfPlatform >
typedef WsfPlatform ParentType
 This is needed to support the WsfComponentList template.
Public Types inherited from WsfComponentListT< WsfPlatformComponent >
using ComponentType
using ParentType
Public Types inherited from WsfComponentList
using NameAndComponent = std::pair<WsfStringId, WsfComponent*>
using ComponentList = std::vector<NameAndComponent>

Public Member Functions

 WsfPlatform (const WsfScenario &aScenario)
 ~WsfPlatform () override
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)
Public Member Functions inherited from WsfComponentT< WsfPlatform >
 WsfComponentT ()
 WsfComponentT (const WsfComponentT &) noexcept
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 bool PreInitialize (double aSimTime)
virtual bool Initialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual void PreInput ()
Iterator Begin () const
 Return an iterator for the beginning of the component list.
Iterator End () const
 Return an iterator for the end of the component list.
 WsfComponentListT ()
 WsfComponentListT (const WsfComponentListT &aSrc)
 WsfComponentListT (WsfComponentListT &&)=default
 ~WsfComponentListT () override
WsfComponentListToperator= (const WsfComponentListT &aRhs)
WsfComponentListToperator= (WsfComponentListT &&aRhs)
ParentTypeGetParentOfComponents () const
void SetParentOfComponents (ParentType *aComponentParentPtr)
bool AddComponent (ComponentType *aComponentPtr)
ComponentTypeFindComponent (WsfStringId aName) const
ComponentTypeFindComponent (WsfStringId aName, int aRole) const
ComponentTypeFindComponentByRole (int aRole) const
ComponentTypeGetComponentEntryByRole (int aRole, unsigned int aEntry) const
std::vector< ComponentType * > GetComponentsByInitializationOrder () const
 Return a vector of components in the order in which they should be initialized.
bool RemoveComponent (ComponentType *aComponentPtr)
bool ProcessComponentInput (UtInput &aInput)
Public Member Functions inherited from WsfComponentList
 WsfComponentList ()
 WsfComponentList (const WsfComponentList &aSrc)
 WsfComponentList (WsfComponentList &&)=default
virtual ~WsfComponentList ()
WsfComponentListoperator= (const WsfComponentList &aRhs)
WsfComponentListoperator= (WsfComponentList &&)
bool HasComponents () const
 Returns true if the component list has at least one component.
void DeleteAllComponents ()
 Delete all of the components maintained by the list.
bool DeleteComponent (WsfStringId aName, int aRole)
unsigned int GetComponentCount (int aRole) const
template<class T>
bool DeleteComponent (WsfStringId aName)
template<class T>
bool DeleteComponent ()
template<class T>
T * GetComponent () const
template<class T>
T * GetComponent (WsfStringId aName) const
template<class T>
unsigned int GetComponentCount () const
template<class T>
T * GetComponentEntry (unsigned int aEntry) const
template<class T>
bool FindByRole (T *&aPtr) const
template<typename T>
RoleRange< T > GetComponentRange ()
Public Member Functions inherited from WsfUniqueId
 WsfUniqueId ()
 Construtor initializes the unique identifier to 0.
 WsfUniqueId (const WsfUniqueId &)
 Copy constructor initializes the unique identifier to 0.
WsfUniqueIdoperator= (const WsfUniqueId &)
unsigned int GetUniqueId () const
 Get the unique identifier assigned to this object.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
Public Member Functions inherited from WsfAuxDataEnabled
 WsfAuxDataEnabled ()=default
 WsfAuxDataEnabled (const WsfAuxDataEnabled &aSrc)=default
WsfAuxDataEnabledoperator= (const WsfAuxDataEnabled &aRhs)
 WsfAuxDataEnabled (WsfAuxDataEnabled &&)=default
WsfAuxDataEnabledoperator= (WsfAuxDataEnabled &&)=default
virtual ~WsfAuxDataEnabled () noexcept
void SetAuxData (const WsfAttributeContainer &aAuxData)
void DeleteAuxData ()
 Delete the aux data container from the object.
void MergeAuxData (const WsfAuxDataEnabled &aSrc)
 Merge the object's aux data with aux data from an existing object.
void UpdateAuxData (const WsfAuxDataEnabled &aSrc)
 Update the object's aux data with aux data from an existing object.
bool HasAuxData () const
 Returns true if this object has aux data.
bool ProcessInput (UtInput &aInput)
template<typename T>
void Serialize (T &aBuff)
 (De)serialization for XIO
WsfAttributeContainerGetAuxData ()
const WsfAttributeContainerGetAuxData () const noexcept
const WsfAttributeContainerGetAuxDataConst () const noexcept

Friends

class WsfSimulation
class WsfSimulationBase

Component infrastructure methods.

WsfStringId GetComponentName () const override
WsfComponentCloneComponent () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override

Common framework methods.

const char * GetScriptClassName () const override
UtScriptContext * GetScriptAccessibleContext () const override
WsfPlatformClone () const override
void AssignToSimulation (WsfSimulation *aSimulationPtr)
virtual void CompleteLoad (WsfScenario &aScenario)
bool ProcessInput (UtInput &aInput) override
virtual bool Initialize (WsfSimulation *aSimulationPtr, double aSimTime)
virtual bool Initialize2 (WsfSimulation *aSimulationPtr, double aSimTime)
void Update (double aSimTime)
void UpdateMultiThread (double aSimTime)
void NotifyUpdate (double aSimTime)
void ExecuteScript (double aSimTime)
void SendQueuedMessages (double aSimTime)

Simulation interface methods.

double GetCreationTime () const
 Get the time when the platform was (or is to be) added to the simulation.
bool InitializeCreationTime ()
void SetCreationTime (double aCreationTime)
double GetLastUpdateTime () const
 Return the time of the last call to Update or UpdateFrame.
double GetSimTime () const
void SetUpdateLocked (bool aUpdateLocked)
bool IsExternallyControlled () const
void SetIsExternallyControlled (bool aIsExternallyControlled)
bool IsExternallyMoved () const
void SetIsExternallyMoved (bool aIsExternallyMoved)
bool IsExternalShadow () const
void SetIsExternalShadow (bool aIsExternalShadow)
bool IsIndestructible () const
void SetIsIndestructible (bool aIsIndestructible)
OnBrokenAction GetOnBrokenAction () const
 Get the action to occur when the platform is broken.
void SetOnBrokenAction (OnBrokenAction aOnBrokenAction)
 Set the action to occur when the platform is broken.
void OnBrokenEvent (double aSimTime)
 Process the Broken Event.
bool IsBroken () const
bool IsDeleted () const
 Returns 'true' if the platform has been scheduled for deletion, but hasn't been physically deleted yet.
bool IsInitialized () const
 Returns 'true' if the platform has been initialized.
size_t GetIndex () const
void SetIndex (size_t aIndex)
WsfSimulationGetSimulation () const
 If the platform is a member of a simulation, this is the containing simulation.
const WsfScenarioGetScenario () const
 The platform type/instance belongs to this scenario.
virtual void PlatformAdded (double aSimTime, WsfPlatform *aPlatformPtr)
virtual void PlatformDeleted (WsfPlatform *aPlatformPtr)

Self-perception methods.

These methods deal with the platforms position of itself. If navigation errors are defined then the path of the platform can be altered and errors can be introduced into sensor reports.

void GetLocationErrorWCS (double aLocationErrorWCS[3]) const

'side' (team) methods.

const std::string & GetSide () const
 Get the 'side' (affiliation) to which this platform belongs.
void SetSide (WsfStringId aSide)
 Set the 'side' (affiliation) to which this platform belongs.
WsfStringId GetSideId () const
 Get the string ID of the side (affiliation) to which this platform belongs.

'icon' methods.

const std::string & GetIcon () const
 Get the name of the icon associated with this platform.
void SetIcon (WsfStringId aIcon)
 Set the name of the icon associated with this platform.
WsfStringId GetIconId () const
 Get the string ID of the name of the icon associated with this platform.

'marking' methods.

const std::string & GetMarking () const
 Get the marking associated with this platform.
void SetMarking (WsfStringId aMarking)
 Set the marking associated with this platform.
WsfStringId GetMarkingId () const
 Get the string ID of the marking associated with this platform.

Spatial domain methods.

The spatial domain represents the primary domain where the platform exists (land, air, space, etc.)

WsfSpatialDomain GetSpatialDomain () const
 Get the spatial domain of the platform.
void SetSpatialDomain (const WsfSpatialDomain &aSpatialDomain)
 Set the spatial domain of the platform.

Script methods

bool ExecuteScript (double aSimTime, WsfStringId aName, UtScriptData &aScriptRetVal, const std::vector< ut::script::Data > &aScriptArgs)
bool ExecuteScript (double aSimTime, WsfStringId aName)
void ExecuteScriptAtTime (double aTime, WsfStringId aName, const std::vector< ut::script::Data > &aScriptArgs)
bool HasScript (WsfStringId aScriptNameId) const
 Returns 'true' if the platform has a script with the specified name.
WSF_DEPRECATED WsfScriptContextGetContext ()
 Return a reference to the script context.
WsfScriptContextGetScriptContext ()

Component methods that are not implemented in WsfComponentList.

WsfArticulatedPartGetArticulatedPart (unsigned int aUniqueId) const
const WsfPlatformComponentListGetComponents () const
 Return a reference to the raw component list.

Mover system methods

void SetMover (WsfMover *aMoverPtr)
bool SwapMover (double aSimTime, WsfMover *&aNewMoverPtr, WsfMover *&aOldMoverPtr)
WsfMoverGetMover () const
WsfFuelGetFuel () const

Terrain context methods.

wsf::TerrainGetTerrain () const
 Return a reference to the associated terrain object.
double GetHeightAboveTerrain ()
 Returns the height of the platform above the terrain at the location of the platform.
double GetTerrainHeight ()
 Returns the height of the terrain at the current location of the platform.

Platform false target methods.

A platform is a false target if it does not represent a physical object.

bool IsFalseTarget () const
void SetIsFalseTarget (bool aBoolState)

Platform mass accounting methods (total, empty, payload, and fuel masses).

double GetMass () const
double GetEmptyMass () const
double GetPayloadMass () const
double GetFuelMass () const
void SetFuelMass (double aValue)
void SetPayloadMass (double aValue)
 Set Payload mass for the platform.
void SetEmptyMass (double aValue)
 Set Empty mass for the platform.

Platform appearance and capabilities methods.

WsfSignatureListGetSignatureList ()
 Return a reference to the 'signature list' object that encapsulates all the signature processing.
double GetHeight () const
double GetLength () const
double GetWidth () const
void SetLength (double aValue)
 Set overall length for the platform.
void SetWidth (double aValue)
 Set overall width for the platform (i.e. wingspan for an aircraft).
void SetHeight (double aValue)
 Set overall height for the platform.
unsigned int GetAppearance (unsigned int aLSB, unsigned int aNumBits) const
 Gets the appearance.
unsigned int GetAppearance () const
void SetAppearance (unsigned int aLSB, unsigned int aNumBits, unsigned int aValue, bool aFromScript=false)
bool ScriptOverride (unsigned int aLSB, unsigned int aNumBits) const
 Returns true if data in the appearance word has been set from script.
unsigned int GetCapabilities () const
 Get the 'capabilities' word, a bit-field of boolean capabilities. See WsfExchange.hpp for details.
void SetCapabilities (unsigned int aCapabilitiesWord)
 Set the 'capabilities' word, a bit-field of boolean capabilities. See WsfExchange.hpp for details.
float GetConcealmentFactor () const
void SetConcealmentFactor (float aConcealmentFactor)
double GetDamageFactor () const
void SetDamageFactor (double aDamageFactor)
void Comment (const double aTime, const std::string &aString)

Platform motion methods. Generally, these methods should be queried in the order given.

bool IsStopped () const
 Indicates that the platform is currently at rest, and with zero commanded velocity.
bool IsPaused () const
bool IsExtrapolating () const

Track management.

const WsfTrackIdGetNextTrackId ()
WsfLocalTrackListGetMasterTrackList ()
 Return a pointer to the master track list.
WsfTrackListGetMasterRawTrackList ()
WsfTrackManagerGetTrackManager ()

Category management.

const WsfCategoryListGetCategories () const
 Get the categories to which this platform belongs.
void AddCategory (WsfStringId aCategoryId)
 Adds the provided category to the platform's category list.
bool IsCategoryMember (WsfStringId aCategoryId) const

Group management.

const WsfGroupListGetGroups () const
 Get the Groups to which this platform belongs.
void JoinGroup (WsfGroup *aGroupPtr)
 Join the given group.
void LeaveGroup (WsfGroup *aGroupPtr)
 Leave the given group.
bool IsGroupMember (WsfStringId aGroupId)

Methods to attach observers to the platform.

Observers receive notification of mover updates and deletion.

void AttachObserver (WsfSinglePlatformObserver *aObserverPtr)
void DetachObserver (WsfSinglePlatformObserver *aObserverPtr)
void NotifyDeleted (double aSimTime)
void NotifyDeleting (double aSimTime)

Methods used to process input for loading of types and instances.

These are only called by input processing routines and not for general use.

void ProcessInputBlock (UtInputBlock &aInputBlock, bool aLoadingType)
 This is called by WsfPlatformTypes.
void SetBroken ()
 Methods only for use by WsfSimulation.
void SetDeleted (bool aDeleted=true)
 WsfPlatform (const WsfPlatform &aSrc)
 Copy constructor (for Clone()).
virtual void DoUpdate (double aSimTime)
virtual void DoUpdateMultiThread (double aSimTime)
virtual void DoMoverUpdate (double aSimTime)
virtual void DoNotifyUpdate (double aSimTime)
virtual void DoExecuteScript (double aSimTime)
virtual void DoSendQueuedMessages (double aSimTime)

Callbacks from WsfComponentList.

void ComponentAdded (WsfComponent *aComponentPtr) override
 A callback from WsfComponentList whenever a component is added to the component list.
void ComponentDeleted (WsfComponent *aComponentPtr) override
 A callback from WsfComponentList when a component is about to be removed from the component list.

Additional Inherited Members

Static Public Attributes inherited from WsfAuxDataEnabled
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataAccessed
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataDestroyed
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
bool AddComponentP (WsfComponent *aComponentPtr, bool aDoNotify)
void CopyAllP (const WsfComponentList &aSrc, bool aDoNotify)
 Base class implementation of copying a component list.
void DeleteAllP (bool aDoNotify)
 Base class implementation of deleting all components in the list.
bool DeleteComponentP (WsfStringId aName, int aRole, bool aDoNotify)
WsfComponentFindComponentP (WsfStringId aName, int aRole) const
WsfComponentFindComponentP (WsfStringId aName) const
WsfComponentFindComponentByRoleP (int aRole) const
WsfComponentGetComponentEntryByRoleP (int aRole, unsigned int aEntry) const
bool RemoveComponentP (WsfStringId aName, int aRole, bool aDelete, bool aDoNotify)
Protected Member Functions inherited from WsfUniqueId
void AssignUniqueId (WsfSimulation *aSimulationPtr)
ComponentList mComponentsByName

Detailed Description

Platforms represent a entity within the simulation.

A platform is basically acts as a container for the 'systems' that define how the platform operates.

The general sequence for creating a platform is as follows:

  • Instantiate a WsfPlatform object.
  • Set the name of the platform with SetName() (every platform in the simulation MUST have a unique name).
  • Set the side (team/affiliation) of the platform with SetSide().
  • Instantiate the appropriate specialization of the WsfMover object and call SetMover().
  • Instantiate systems (specializations of WsfComm, WsfProcessor, WsfSensor, etc.) and add to the platform using AddComponent().


The above sequence can involve hundreds of lines of code to define all the appropriated attributes. It is typically much easier to use the simulation input to allow the creation of simulation objects from text files.

Note

Platforms may be 'destroyed' at any time during a simulation. As such, persistent pointers to a platform should not be maintained (except between objects that are 'owned' by the platform such as sensors, processors, etc). Instead of retaining pointers you should retain a platform index:
platformIndex = platformPtr->GetIndex();
WsfPlatform * platformPtr
Definition WsfScriptTrackClass.cpp:507

To retrieve the pointer to the platform:

WsfSimulation * GetSimulation() const
If the platform is a member of a simulation, this is the containing simulation.
Definition WsfPlatform.hpp:323
WsfPlatform * GetPlatformByIndex(size_t aIndex) const
Definition WsfSimulation.cpp:717

The return value will be nullptr if the platform no longer exists.

See also
WsfSimulation

Member Enumeration Documentation

◆ OnBrokenAction

Define what should be done when the platform is broken.

Enumerator
cON_BROKEN_REMOVE 

Remove the platform from the simulation.

cON_BROKEN_DISABLE 

Retain the platform, disable all its subsystems, and halt movement.

cON_BROKEN_MOVABLE_DISABLED 

Retain the platform, disable all its subsystems, but allow movement.

Constructor & Destructor Documentation

◆ WsfPlatform() [1/2]

WsfPlatform::WsfPlatform ( const WsfScenario & aScenario)

◆ ~WsfPlatform()

WsfPlatform::~WsfPlatform ( )
override

◆ WsfPlatform() [2/2]

Member Function Documentation

◆ AddCategory()

void WsfPlatform::AddCategory ( WsfStringId aCategoryId)

Adds the provided category to the platform's category list.

Referenced by wsf::coverage::Grid::CategorizeAssets().

◆ AssignToSimulation()

void WsfPlatform::AssignToSimulation ( WsfSimulation * aSimulationPtr)

May be called prior to Initialize() to bind this platform to a simulation. This allows the platform to be used in a limited fashion without actually being in the simulation.

References WsfUniqueId::AssignUniqueId(), GetSimulation(), WsfSimulation::Initialize(), and WsfSimulation.

Referenced by WsfExplicitWeapon::FireP(), and Initialize().

◆ AttachObserver()

void WsfPlatform::AttachObserver ( WsfSinglePlatformObserver * aObserverPtr)

◆ Clone()

WsfPlatform * WsfPlatform::Clone ( ) const
overridevirtual

Clone a platform.

Returns
A pointer to the new platform.
Note
The source of the clone should be a platform that has not yet been added to the simulation (i.e.: it should be a platform 'type object')

Implements WsfObject.

References WsfPlatform().

Referenced by WsfSimulation::AddInputPlatforms(), WsfXIO_AutoDisMapping::NewDisPlatform(), and WsfFalseTarget::WsfFalseTarget().

◆ CloneComponent()

WsfComponent * WsfPlatform::CloneComponent ( ) const
inlineoverridevirtual

Clones a component. May return null if component does not support clone.

Implements WsfComponent.

References WsfObject::Clone().

◆ Comment()

◆ CompleteLoad()

void WsfPlatform::CompleteLoad ( WsfScenario & aScenario)
virtual

Complete processing of platform inputs. Called after all inputs have been processed.

Parameters
aScenarioThe scenario containing the platform

References wsf::TerrainInterface::Get(), wsf::Terrain::GetElevInterp(), GetLocationLLA(), and mInputAltAGL.

◆ ComponentAdded()

void WsfPlatform::ComponentAdded ( WsfComponent * aComponentPtr)
overrideprotectedvirtual

A callback from WsfComponentList whenever a component is added to the component list.

Reimplemented from WsfComponentList.

◆ ComponentDeleted()

void WsfPlatform::ComponentDeleted ( WsfComponent * aComponentPtr)
overrideprotectedvirtual

A callback from WsfComponentList when a component is about to be removed from the component list.

Reimplemented from WsfComponentList.

◆ DetachObserver()

◆ DoExecuteScript()

void WsfPlatform::DoExecuteScript ( double aSimTime)
protectedvirtual

References mHasOnUpdateScript.

Referenced by DoUpdate(), and ExecuteScript().

◆ DoMoverUpdate()

void WsfPlatform::DoMoverUpdate ( double aSimTime)
protectedvirtual

Referenced by DoUpdate(), and DoUpdateMultiThread().

◆ DoNotifyUpdate()

void WsfPlatform::DoNotifyUpdate ( double aSimTime)
protectedvirtual

◆ DoSendQueuedMessages()

void WsfPlatform::DoSendQueuedMessages ( double aSimTime)
protectedvirtual

Referenced by SendQueuedMessages().

◆ DoUpdate()

void WsfPlatform::DoUpdate ( double aSimTime)
protectedvirtual

Perform the actual update of the platform position.

Update() calls this method when it has determined that an update is actually necessary. A derived class may override this, but it is really preferable to simply provide special movers as this routine is also responsible for calling observers, etc.

Parameters
aSimTimeThe current simulation time.
Note
Update() is often called by script methods to ensure a platforms location is current before performing any operation involving the platform. In some cases these methods are called BEFORE the platform is added to the simulation, so the mover is not initialized. While it does prevent this call from bombing, it doesn't cover every conceivable situation. WsfScriptPlatformClass probably needs to consider other operations (system TurnOn/Off, etc). The check for 'mUpdateAllowed' in Update() ensures we don't get here until we are initialized.

References DoExecuteScript(), DoMoverUpdate(), DoNotifyUpdate(), and GetSimulation().

Referenced by Update().

◆ DoUpdateMultiThread()

void WsfPlatform::DoUpdateMultiThread ( double aSimTime)
protectedvirtual

References DoMoverUpdate(), and GetSimulation().

Referenced by UpdateMultiThread().

◆ ExecuteScript() [1/3]

void WsfPlatform::ExecuteScript ( double aSimTime)
inline

◆ ExecuteScript() [2/3]

bool WsfPlatform::ExecuteScript ( double aSimTime,
WsfStringId aName )

Execute the script with the specified string name ID.

Parameters
aSimTimeThe current simulation time
aNameThe name of the script to be executed.
Returns
'true' if executed or 'false' if the script could not be found.

References ExecuteScript().

◆ ExecuteScript() [3/3]

bool WsfPlatform::ExecuteScript ( double aSimTime,
WsfStringId aScriptName,
UtScriptData & aScriptRetVal,
const std::vector< ut::script::Data > & aScriptArgs )

Execute the script with the specified string name ID.

Parameters
aSimTimeThe current simulation time
aScriptNameThe name of the script to be executed.
aScriptRetValThe return value of the script, which is filled by reference. If the return type is void, the return value will be marked as invalid.
aScriptArgsThe list of arguments to pass to the script.
Returns
'true' if executed or 'false' if the script could not be found.

References WsfObject::GetName(), and ok.

◆ ExecuteScriptAtTime()

void WsfPlatform::ExecuteScriptAtTime ( double aTime,
WsfStringId aName,
const std::vector< ut::script::Data > & aScriptArgs )

Execute the script with the specified string name ID at the specified time.

Parameters
aTimeThe time at which to execute the script.
aNameThe name of the script to be executed.
aScriptArgsThe list of arguments to pass to the script.

References WsfSimulation::AddEvent(), and GetSimulation().

Referenced by WsfTBM_Mover::ScheduleScriptEvents().

◆ GetAppearance() [1/2]

unsigned int WsfPlatform::GetAppearance ( ) const
inline

◆ GetAppearance() [2/2]

unsigned int WsfPlatform::GetAppearance ( unsigned int aLSB,
unsigned int aNumBits ) const

Gets the appearance.

Get the 'appearance' field.

Returns
The appearance field value.
See also
SetAppearance.

References WsfUtil::GenerateBitMask().

Referenced by WsfSOSM_Interaction::GetTargetThrottle(), and WsfDisInterface::UpdatePlatformFromAppearance().

◆ GetArticulatedPart()

WsfArticulatedPart * WsfPlatform::GetArticulatedPart ( unsigned int aUniqueId) const

Returns a pointer to the articulated part with the specified unique ID. This is a convenience method to locate an articulated part with the specified unique Id. This exists because it is called enough to make it useful.

Parameters
aUniqueIdThe unique ID of the articulated part to be located.
Returns
The pointer to the requested articulated part, or 0 if it could not be found.

References WsfComponentList::RoleIterator< T >::AtEnd(), and WsfUniqueId::GetUniqueId().

◆ GetCapabilities()

unsigned int WsfPlatform::GetCapabilities ( ) const
inline

Get the 'capabilities' word, a bit-field of boolean capabilities. See WsfExchange.hpp for details.

Referenced by WsfExchange::IsCapable(), and WsfExchange::SetCapabilityFlag().

◆ GetCategories()

◆ GetComponentName()

WsfStringId WsfPlatform::GetComponentName ( ) const
inlineoverridevirtual

Returns the component's name. Each component in a component list has a unique name. Names are usually defined by the user, but they may also be generated by code and prefixed with a '#' to guarantee no collisions with user-defined names.

Implements WsfComponent.

References WsfObject::GetNameId().

Referenced by WsfVariableBase::ObjectName().

◆ GetComponentRoles()

const int * WsfPlatform::GetComponentRoles ( ) const
overridevirtual

Returns a zero-terminated array of component roles. Note that the array should be in decreasing order of specificity and should generally the inheritance hierarchy. The first entry should be the components 'primary' role. For example a sensor would do the following:

return roles;
@ cWSF_COMPONENT_SENSOR
A 'sensor' component (WsfSensor).
Definition WsfComponentRoles.hpp:105
@ cWSF_COMPONENT_PLATFORM_PART
The component derives from WsfPlatformPart.
Definition WsfComponentRoles.hpp:98
@ cWSF_COMPONENT_ARTICULATED_PART
The component derives from WsfArticulatedPart.
Definition WsfComponentRoles.hpp:99

Implements WsfComponent.

References cWSF_COMPONENT_NULL, and cWSF_COMPONENT_PLATFORM.

◆ GetComponents()

◆ GetConcealmentFactor()

◆ GetContext()

WSF_DEPRECATED WsfScriptContext * WsfPlatform::GetContext ( )
inline

Return a reference to the script context.

Referenced by WsfMaskingPattern::GetFactor(), and WsfAdvancedBehaviorTree::GetScriptAccessibleContext().

◆ GetCreationTime()

double WsfPlatform::GetCreationTime ( ) const
inline

Get the time when the platform was (or is to be) added to the simulation.

Referenced by notifyOfPlatformsNotPresentInSimulation(), and WsfWeaponTrackProcessor::Update().

◆ GetDamageFactor()

◆ GetEmptyMass()

double WsfPlatform::GetEmptyMass ( ) const
inline

Get the empty mass of platform. Unusable fuel (if any) should be accounted with empty weight.

Returns
Returns empty mass of the platform.

Referenced by WsfGuidedMover::GetPropertyDouble(), WsfGuidedMover::InitiateStage(), and WsfSA_Processor::UpdateFuelData().

◆ GetFuel()

WsfFuel * WsfPlatform::GetFuel ( ) const
inline

Return the pointer to the Fuel object for this platform.

Returns
A pointer to the Fuel object or nullptr if a Fuel has not been defined.

◆ GetFuelMass()

double WsfPlatform::GetFuelMass ( ) const
inline

Get the usable fuel mass on the platform. Unusable fuel should be accounted with empty weight.

Returns
Returns fuel mass of the platform.

Referenced by WsfGuidedMover::InitiateStage().

◆ GetGroups()

const WsfGroupList & WsfPlatform::GetGroups ( ) const
inline

Get the Groups to which this platform belongs.

◆ GetHeight()

double WsfPlatform::GetHeight ( ) const
inline

◆ GetHeightAboveTerrain()

double WsfPlatform::GetHeightAboveTerrain ( )

Returns the height of the platform above the terrain at the location of the platform.

References GetLocationLLA().

◆ GetIcon()

const std::string & WsfPlatform::GetIcon ( ) const
inline

Get the name of the icon associated with this platform.

Referenced by WsfXIO_ObjectInfoLoad::Load_Platform().

◆ GetIconId()

WsfStringId WsfPlatform::GetIconId ( ) const
inline

Get the string ID of the name of the icon associated with this platform.

Referenced by WsfExtData::SelectEntityType(), and WsfChaffWeapon::WeaponPlatformUserInitialize().

◆ GetIndex()

size_t WsfPlatform::GetIndex ( ) const
inline

Get the unique index of the platform within the simulation.

The index returned by GetIndex is unique within the simulation. It will never be reassigned even if the platform is deleted. This index can be used to determine if a platform still exists and safely access the pointer to the platform. WsfSimulation::GetPlatformByIndex will return the pointer a platform with a given index or 0 if the platform no longer exists.

Note
This is valid only after the platform has been added to the simulation (WsfSimulation::AddPlatform) and the simulation has been initialized (WsfSimulation::Initialize).

Referenced by WsfMobilityAndFirepowerLethality::AddCM_State(), WsfEmitterTypeReporting::AddEmitterReportState(), WsfPassiveSensor::PassiveMode::AddInteractor(), WsfMultiThreadManager::AddPlatform(), WsfSimulation::AddPlatform(), WsfXIO_SimService::AddRequiredPlatform(), XWsfOSM_Traffic::AddScriptedVehicle(), WsfTargetTypeReporting::AddTargetReportState(), WsfSimulation::AddToPlatformList(), WsfWeaponEffects::ApplyDamageResultToOtherPlatform(), WsfWeaponEffects::ApplyEffectIncrement(), WsfTaskManager::AssignTask(), WsfWeaponTaskManager::AssignTask(), WsfCTD_SensorComponent::AttemptToDetect(), WsfLaserDesignator::LaserDesignationMode::AttemptToDetect(), WsfOpticalSensor::OpticalMode::AttemptToDetect(), WsfPassiveSensor::AttemptToDetect(), WsfPassiveSensor::PassiveMode::AttemptToDetect(), WsfSOSM_Sensor::SOSM_Mode::AttemptToDetect(), WsfTRIMSIM_Processor::AttemptToDetect(), WsfEOIR_IRST_SensorMode::AttemptToDetectVisual(), WsfRouteFinder::Avoid(), WsfImplicitWeapon::BeginEngagement(), WsfDisVisualization::BehaviorChange(), WsfTaskManager::ChangeOperatingLevel(), WsfWeaponFuse::CheckAllTargets(), WsfRF_Repeater::CheckDetectAndUpdate(), WsfDisInterface::Comment(), WsfDisInterface::CommFrequencyChanged(), WsfDisInterface::CommTurnedOff(), WsfDisInterface::CommTurnedOn(), WsfBallisticMissileLaunchComputer::ComputeAirIntercept(), WsfBallisticMissileLaunchComputer::ComputeLateralTargetOffset(), WsfLaserDesignator::TargetAssociation::Consider(), WsfTruthCorrelation::CorrelateImpl(), WsfSA_Perceive::CreateAssetsList(), WsfBeamDirector::WsfBeamDirectorMode::CreateTrackFromResult(), WsfSimulation::DeleteFromPlatformList(), WsfMultiThreadManager::DeletePlatform(), WsfSimulation::DeletePlatform(), WsfTankedFuel::DisconnectFrom(), WsfDisUtil::DisToWsfPlayers(), WsfXIO_PlatformInfoService::DR_Change(), WsfPassiveSensor::PassiveMode::EmitterActiveCallback(), WsfExchangeProcessor::ExchangeCompleted(), WsfExchangeProcessor::ExchangeRequestFailed(), FlightPathAnalysisFunction::Execute(), WsfExtDetonation::Execute(), WsfScriptContext::ExecuteTimedEventScript::ExecuteTimedEventScript(), WsfL16::Interface::FilterMessageSend(), WsfL16::Interface::FilterMessageSend(), AirToAirLaunchComputerGenerator::FireNewWeapon(), WsfExplicitWeapon::FireP(), WsfExtEntityDeadReckon::ForceUpdate(), WsfBMUtils::GetAssignedIDRecord(), WsfDisInterface::GetEntityId(), WsfInterceptCalculator::GetInterceptCalculatorOnPlatform(), WsfTaskManager::GetMessageSender(), WsfWeaponEngagement::GetMissDistance(), WsfWeaponEngagement::GetTargetLocationWCS(), WsfBMUtils::GetUnitIDFromPlatform(), WsfBMUtils::GetUnitIDRecordFromPlatform(), WsfWeaponEngagement::GetWeaponLocationWCS(), WsfBallisticMissileLaunchComputerSharedData::GlobalPlatformDeleted(), WsfXIO_MessageService::HandleMessage(), WsfL16::Interface_J11::HandoffControlChange(), WsfPerceptionProcessor::Important(), WsfSA_Perceive::Important(), WsfExchange::Query::Initialize(), WsfTask::Initialize(), WsfTrack::Initialize(), WsfWeaponEngagement::Initialize(), WsfMover::Initialize2(), WsfDisWeaponEvents::InitiateWeaponTransfer(), WsfBMUtils::IsAssignedBy(), WsfBMUtils::IsDirectCommander(), WsfUplinkProcessor::IsUplinkingTo(), WsfWeaponEffects::IsVulnerable(), WsfMilEventPipe::JammingRequestCanceled(), WsfMilEventPipe::JammingRequestInitiated(), JoinGroup(), WsfMilInterface::KillPlatform(), LeaveGroup(), WsfXIO_ObjectInfoLoad::Load_Platform(), WsfXIO_ObjectInfoLoad::Load_PlatformPart(), WsfUtil::MakeTrack(), WsfPerceptionProcessor::MarkAssetAsImportant(), WsfSA_Perceive::MarkAssetAsImportant(), WsfPerceptionProcessor::MarkAssetAsUnimportant(), WsfSA_Perceive::MarkAssetAsUnimportant(), WeaponObserver::MoverBurnedOut(), WsfXIO_PlatformInfoService::MoverChanged(), WsfImage::Object::Object(), WsfLOS_Manager::PartMoved(), WsfTaskManager::PendingMessage::PendingMessage(), SAM_LaunchComputerGenerator::PlaceNewTarget(), WsfEventPipeInterface::Platform(), WsfCTD_SensorComponent::PlatformAdded(), WsfDefaultSensorScheduler::PlatformAdded(), WsfEOIR_Sensor::PlatformAdded(), WsfPhysicalScanSensorScheduler::PlatformAdded(), WsfSA_Processor::PlatformAdded(), WsfSectorScanSensorScheduler::PlatformAdded(), WsfSpinSensorScheduler::PlatformAdded(), WsfWeaponServer::PlatformAdded(), WsfExchangeProcessor::PlatformCapabilityChanged(), WeaponObserver::PlatformDeleted(), WsfCTD_SensorComponent::PlatformDeleted(), WsfDefaultSensorScheduler::PlatformDeleted(), WsfDisInterface::PlatformDeleted(), WsfEOIR_Sensor::PlatformDeleted(), WsfExchangeProcessor::PlatformDeleted(), WsfLaserDesignations::PlatformDeleted(), WsfLaserDesignator::PlatformDeleted(), WsfOpticalSensor::OpticalMode::PlatformDeleted(), WsfSA_Processor::PlatformDeleted(), WsfSAR_Sensor::PlatformDeleted(), WsfSOSM_Sensor::SOSM_Mode::PlatformDeleted(), WsfTaskManager::PlatformDeleted(), WsfWeaponServer::PlatformDeleted(), WsfDisInterface::PlatformInitialized(), WsfXIO_AutoDisMapping::PlatformInitialized(), WsfSA_Processor::PlatformInTrackListMWS(), WsfLOS_Manager::PlatformMoved(), WsfCTD_SensorComponent::PostAttemptToDetect(), WsfDisDirectedEnergyFire::Process(), WsfDisFire::Process(), WsfWeaponServer::ProcessCommand(), WsfWeaponEffects::ProcessEffectExplicit(), Fires::DisObserver::ProcessFirePDU(), WsfL16::Interface_J11::ProcessWIFT_Event(), wsf::xio::CommComponent::Receive(), WsfPassiveSensor::PassiveMode::RemoveInteractor(), WsfExchange::Transactor::RequestFrom(), WsfWeaponTaskManager::RoundsFiredAt(), SafeRIPRProc::SafeRIPRProc(), SafeRIPRProc::SafeRIPRProc(), wsf::comm::Event::ScheduleDeliverMessageEvent(), WsfWeaponFuse::SelectPCA_ForDetonation(), WsfSectorScanSensorScheduler::SelectTarget(), WsfEventPipeInterface::SendDependent(), WsfL16::Interface::SendJMessage(), WsfBMDisseminateC2::SendMessage(), WsfJTIDS_SlotGroup::SendMessage(), WsfDisPlatform::SendOrQueueEmissionsPDU(), WsfL16::Interface::SendRawJMessage(), WsfXIO_PlatformInfoService::SendTrackManagerState(), WsfL16::Interface::SendUserDefinedJMessage(), WsfDisInterface::SensorDetectionChanged(), WsfDisInterface::SensorFrequencyChanged(), WsfDisInterface::SensorModeActivated(), WsfDisInterface::SensorModeDeactivated(), WsfDisInterface::SensorRequestCanceled(), WsfDisInterface::SensorRequestInitiated(), WsfDisInterface::SensorRequestUpdated(), WsfDisInterface::SensorScanUpdated(), WsfDisInterface::SensorTrackDropped(), WsfDisInterface::SensorTrackInitiated(), WsfDisInterface::SensorTurnedOff(), WsfDisInterface::SensorTurnedOn(), WsfTask::SetAssignee(), WsfVisualization::SetBehavior(), WsfWeaponEngagement::SetFiringPlatform(), WeaponObserver::SetInFlight(), WsfFormationFlyer::SetLeadAircraft(), WsfRIPRProcessor::SetNumJobChannels(), WsfMessage::SetOriginator(), WsfStatusMessage::SetPlatform(), WsfTrack::SetPlatformOriginator(), WsfTrack::SetTarget(), WsfRIPRProcessor::SetTargetByPlatform(), WsfWeaponEngagement::SetTargetLocationWCS(), WsfWeaponEngagement::SetWeaponLocationWCS(), WsfRIPRProcessor::StartUplinking(), WsfRIPRProcessor::StartUplinking(), WsfUplinkProcessor::StartUplinking(), WsfUplinkProcessor::StartUplinking(), WsfDefaultSensorTracker::State::State(), WsfRIPRProcessor::StopUplinking(), WsfRIPRProcessor::StopUplinking(), WsfUplinkProcessor::StopUplinking(), WsfUplinkProcessor::StopUplinking(), WsfDefaultSensorTracker::TargetDetected(), WsfDefaultSensorTracker::TargetUndetected(), WsfTaskManager::TasksAssignedTo(), WsfCTD_SensorComponent::TrackerAllowTracking(), WsfTSPI_Mover::TranslateAndRotateToNewFile(), WsfXIO_AutoDisMapping::TranslateTrack(), WsfL16::Interface::UnfilterMessageSend(), WsfL16::Interface::UnfilterMessageSend(), WsfPerceptionProcessor::Unimportant(), WsfSA_Perceive::Unimportant(), WsfLaserTracker::Update(), WsfPerfectTracker::Update(), WsfPerceptionProcessor::UpdateAssets(), WsfSA_Perceive::UpdateAssetsData(), WsfHighEnergyLaser::UpdateEngagementGeometry(), WsfSA_Assess::UpdateEngagementsData(), XWsfAirTraffic::UpdateFlightStatus(), WsfXIO_AutoDisMapping::UpdateRemovedPlatforms(), WsfEmitterTypeReporting::UpdateReportedEmitterType(), WsfTargetTypeReporting::UpdateReportedTargetType(), WsfJamStrobeDetector::UpdateTrack(), WsfSensorMode::UpdateTrack(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), WsfDraw::Vertex(), WsfDraw::VertexECS(), WsfDraw::VertexNED(), WsfDraw::VertexScreenPlat(), WsfDisVisualization::VisibleChange(), WsfWeaponTaskManager::WeaponFireAborted(), Fires::Observer::WeaponFired(), WsfL16::Interface_J11::WeaponFired(), WsfWeaponTaskManager::WeaponsActiveFor(), Fires::Observer::WeaponTerminated(), WsfL16::Interface_J11::WeaponTerminated(), WsfMilEventPipe::WeaponTurnedOff(), WsfAssetPerception::WsfAssetPerception(), WsfPlatform(), WsfSA_EntityPerception::WsfSA_EntityPerception(), WsfTrack::WsfTrack(), and WsfWeaponEngagement::WsfWeaponEngagement().

◆ GetLastUpdateTime()

◆ GetLength()

double WsfPlatform::GetLength ( ) const
inline

Get length of platform.

Returns
Returns the length of platform.

Referenced by WsfOpticalSignature::GetValue(), and WsfLaserDesignations::Spot::LocalUpdate().

◆ GetLocationErrorWCS()

void WsfPlatform::GetLocationErrorWCS ( double aLocationErrorWCS[3]) const

Return the difference between where the platform thinks it is and where it actual is located. This can be used to compute the perceived location as follows:

perceived_location = truth_location + location_error;
Parameters
aLocationErrorWCSThe difference between the perceived location and the true location.

Referenced by WsfEOIR_Sensor::Update(), WsfSensorMode::UpdateTrack(), WsfSensorMode::UpdateTrackPosition(), WsfGuidanceComputer::UpdateWeaponPerception(), and WsfP6DOF_GuidanceComputer::UpdateWeaponPerception().

◆ GetMarking()

const std::string & WsfPlatform::GetMarking ( ) const
inline

Get the marking associated with this platform.

◆ GetMarkingId()

WsfStringId WsfPlatform::GetMarkingId ( ) const
inline

Get the string ID of the marking associated with this platform.

◆ GetMass()

double WsfPlatform::GetMass ( ) const
inline

Get the current mass of platform. The mass of the platform may be fixed through the input stream, or controlled independently during run time by internal processes. (For instance, if the platform contains a WsfFuel object, the fuel mass may be overwritten during run time.) The total mass of a platform is the sum of its empty mass, fuel mass, and payload mass components. Each mass value defaults to zero.

Returns
Returns current mass of the platform.

Referenced by WsfGuidedMover::AdvanceTimeRK(), WsfGuidedMover::AdvanceTimeSinglestep(), WsfGuidedMover::InitiateStage(), WsfGuidedMover::PostUpdate(), WsfGuidanceComputer::UpdateGuidance(), WsfGuidedMoverBase::WriteKinematicStatus(), WsfP6DOF_Mover::WriteKinematicStatus(), and WsfGuidedMoverBase::WriteTrajectoryOutput().

◆ GetMasterRawTrackList()

◆ GetMasterTrackList()

◆ GetMover()

WsfMover * WsfPlatform::GetMover ( ) const
inline

Return the pointer to the mover object for this platform.

Returns
A pointer to the mover object or nullptr if a mover has not been defined.

Referenced by WsfMultiThreadManager::AddPlatform(), XWsfOSM_Traffic::AddScriptedVehicle(), WsfBrawlerProcessor::Alpha(), WsfBrawlerProcessor::AlphaCL0(), WsfMobilityAndFirepowerLethality::ApplyEffectTo(), WsfBrawlerProcessor::Area(), WsfBrawlerFuel::CalcConsumptionRate(), XWsfOSM_Traffic::ChangeScriptedLane(), wsf::six_dof::Mover::CommonSubobjectJettisonTasks(), WsfP6DOF_Mover::CommonSubobjectJettisonTasks(), WsfBallisticMissileLaunchComputer::ComputeAirIntercept(), WsfBallisticMissileLaunchComputer::ComputeLateralTargetOffset(), WsfBrawlerProcessor::CorneringVelocity_fps(), WsfBrawlerProcessor::CurrentFuelWeight_lbs(), WsfBrawlerProcessor::CurrentStructuralGLimit_g(), WsfBrawlerProcessor::CurrentWeight_lbs(), WsfBrawlerProcessor::DesignWeightForMaxG_lbs(), WsfBrawlerProcessor::Drag(), WsfBrawlerProcessor::DynamicPressure_psf(), WsfBrawlerProcessor::EmptyWeight_lbs(), WsfBrawlerProcessor::EvaluateHeadingSpeedAltitude(), WsfBrawlerProcessor::EvaluateRates(), WsfBrawlerProcessor::EvaluateTurnInPlaneWithSpeed(), WsfBrawlerProcessor::EvaluateTurnInPlaneWithThrottle(), WsfBrawlerProcessor::EvaluateVectorWithSpeed(), WsfBrawlerProcessor::EvaluateVectorWithThrottle(), FlightPathAnalysisFunction::Execute(), wsf::six_dof::ExplicitWeapon::Fire(), WsfP6DOF_ExplicitWeapon::Fire(), AirToAirLaunchComputerGenerator::FireNewWeapon(), WsfExplicitWeapon::FireP(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetAlphaAtMaxCL_deg(), WsfBrawlerProcessor::GetMaxCL(), WsfBrawlerProcessor::GetMaxCL(), WsfBrawlerProcessor::GetMaxCL(), WsfOrbitalManeuver::GetTargetPropagatorPerception(), WsfOrbitalManeuver::GetTargetPropagatorTruth(), WsfBrawlerProcessor::Initialize(), WsfGuidanceComputer::Initialize(), WsfL16::PPLI_Part::Initialize(), WsfL16::SystemStatusPart::Initialize(), WsfP6DOF_GuidanceComputer::Initialize(), WsfBrawlerProcessor::Lift(), WsfExtEntityDeadReckon::DR_State::LoadFromPlatform(), WsfBrawlerProcessor::Mach(), WsfBrawlerProcessor::MaxForwardAcceleration_fps2(), WsfBrawlerProcessor::MaxForwardAccelerationWithGravity_fps2(), WsfBrawlerProcessor::MaxInstantaneousGLoad_g(), WsfBrawlerProcessor::MaxInstantaneousTurnRate_rps(), WsfBrawlerProcessor::MaxSustainedGLoad_g(), WsfBrawlerProcessor::MaxSustainedTurnRate_rps(), WsfBrawlerProcessor::MaxTacticalTurnRate_rps(), WsfBrawlerProcessor::MinForwardAcceleration_fps2(), WsfBrawlerProcessor::MinForwardAccelerationWithGravity_fps2(), WsfBrawlerProcessor::MinInstantaneousTurnRadius_ft(), WsfBrawlerProcessor::MinSustainedTurnRadius_ft(), WsfBrawlerProcessor::MinTacticalTurnRadius_ft(), WsfXIO_PlatformInfoService::MoverChanged(), SAM_LaunchComputerGenerator::PlaceNewTarget(), WsfEventStepSimulation::PlatformInitialized(), WsfEclipseReport::PlatformInitializedHandler(), WsfPlatformAvailability::PlatformIsAvailable(), WsfSpaceMoverBase::PreInitialize(), WsfExplicitWeapon::ProcessDeferredLaunchEvent(), XWsfOSM_Traffic::ScriptGoOffroad(), SetConcealmentFactor(), WsfBrawlerProcessor::SetLocationECI(), WsfBrawlerProcessor::SetLocationLLA(), WsfBrawlerProcessor::SetLocationWCS(), WsfBrawlerProcessor::SpecificEnergyRate_fps(), WsfBrawlerProcessor::StructuralGLimitAtDesignWeight_g(), WsfBrawlerProcessor::Throttle(), WsfBrawlerProcessor::Thrust(), WsfSA_Processor::UpdateNavData(), XWsfOSM_Traffic::UpdateScriptedVehicleRoute(), and UT_DEFINE_SCRIPT_METHOD().

◆ GetNextTrackId()

◆ GetOnBrokenAction()

OnBrokenAction WsfPlatform::GetOnBrokenAction ( ) const
inline

Get the action to occur when the platform is broken.

Referenced by WsfMilInterface::KillPlatform().

◆ GetPayloadMass()

double WsfPlatform::GetPayloadMass ( ) const
inline

Get the Payload mass on the platform.

Returns
Returns Payload mass of the platform.

Referenced by WsfGuidedMover::GetPropertyDouble(), WsfGuidedMover::InitiateStage(), and WsfGuidedMover::JettisonEjectables().

◆ GetScenario()

◆ GetScriptAccessibleContext()

UtScriptContext * WsfPlatform::GetScriptAccessibleContext ( ) const
override

◆ GetScriptClassName()

const char * WsfPlatform::GetScriptClassName ( ) const
override

◆ GetScriptContext()

◆ GetSide()

◆ GetSideId()

WsfStringId WsfPlatform::GetSideId ( ) const
inline

◆ GetSignatureList()

WsfSignatureList & WsfPlatform::GetSignatureList ( )
inline

Return a reference to the 'signature list' object that encapsulates all the signature processing.

Referenced by WsfAcousticSignature::GetInputType(), WsfInfraredSignature::GetInputType(), WsfInherentContrast::GetInputType(), WsfOpticalReflectivity::GetInputType(), WsfOpticalSignature::GetInputType(), WsfRadarSignature::GetInputType(), WsfOpticalSignature::GetProjectedArea(), WsfOpticalSignature::GetRadiantIntensity(), WsfAcousticSignature::GetScaleFactor(), WsfInfraredSignature::GetScaleFactor(), WsfInherentContrast::GetScaleFactor(), WsfOpticalReflectivity::GetScaleFactor(), WsfOpticalSignature::GetScaleFactor(), WsfRadarSignature::GetScaleFactor(), WsfRadarSignature::GetSignature(), WsfAcousticSignature::GetState(), WsfInfraredSignature::GetState(), WsfInherentContrast::GetState(), WsfOpticalReflectivity::GetState(), WsfOpticalSignature::GetState(), WsfRadarSignature::GetState(), WsfAcousticSignature::GetValue(), WsfAcousticSignature::GetValue(), WsfInfraredSignature::GetValue(), WsfInherentContrast::GetValue(), WsfOpticalReflectivity::GetValue(), WsfOpticalSignature::GetValue(), WsfRadarSignature::GetValue(), WsfRadarSignature::GetValue(), Initialize(), ProcessInput(), WsfAcousticSignature::SetScaleFactor(), WsfInfraredSignature::SetScaleFactor(), WsfInherentContrast::SetScaleFactor(), WsfOpticalReflectivity::SetScaleFactor(), WsfOpticalSignature::SetScaleFactor(), WsfRadarSignature::SetScaleFactor(), WsfRadarSignature::SetSignature(), WsfAcousticSignature::SetState(), WsfInfraredSignature::SetState(), WsfInherentContrast::SetState(), WsfOpticalReflectivity::SetState(), WsfOpticalSignature::SetState(), WsfRadarSignature::SetState(), WsfDisInterface::UpdatePlatformFromAppearance(), and WsfOpticalSignature::UsesInherentContrast().

◆ GetSimTime()

◆ GetSimulation()

WsfSimulation * WsfPlatform::GetSimulation ( ) const
inline

If the platform is a member of a simulation, this is the containing simulation.

References WsfSimulation.

Referenced by WsfBrawlerProcessor::AddSelfCalledConsciousnessEvent(), WsfExtEmission::AddSensor(), WsfMilExtInterface::AddWeapon(), AssignToSimulation(), Comment(), WsfDefaultWeaponsManagerImpl::CreateSelfDefenseAssignment(), DoNotifyUpdate(), DoUpdate(), DoUpdateMultiThread(), WsfScriptCallback::Execute(), WsfCallback::ExecuteAndNotify(), ExecuteScriptAtTime(), WsfBrawlerProcessor::GetConsciousnessEventTime(), UCI_Util::GetInterface(), getLinkedAndReachablePlatformParts(), WsfSolarTerminator::GetPlatformSolarIllumination(), WsfFalseTargetBlip::GetReferenceJammerToRadarRange(), wsf::UCI_Component::GetSimulation(), GetTrackManager(), WsfBMUtils::GetUnitIDRecordFromPlatform(), WsfClusterCorrelation::Initialize(), WsfExchange::Query::Initialize(), WsfFalseTarget::Initialize(), WsfGroupList::Initialize(), WsfOpticalEnvironment::Initialize(), Initialize(), WsfScriptContext::Initialize(), WsfSignatureInterface::Initialize(), InitializeCreationTime(), WsfIntersectMesh::Intersect(), WsfIntersectProcessor::Intersect(), WsfBMUtils::IsAssignedBy(), WsfBMUtils::IsTrackGeneratedByLocalSensor(), WsfUtil::MakeTrack(), WsfExchange::ModifyCapabilities(), WsfDefaultAssetManagerImpl::on_update(), WsfDefaultBattleManagerImpl::on_update(), WsfDefaultSensorsManagerImpl::on_update(), WsfDefaultWeaponsManagerImpl::on_update(), WsfExchange::Transactor::OppositePlatformName(), WsfExchange::Transactor::OwningPlatformName(), WsfDefaultSensorScheduler::PlatformAdded(), WsfSpinSensorScheduler::PlatformAdded(), wsf::altloc::Component::PreInitialize(), wsf::event::ExchangeCompleted::Print(), wsf::event::ExchangeNegotiated::Print(), wsf::event::ExchangeQueried::Print(), wsf::event::ExchangeRequestFailed::Print(), wsf::event::WeaponFired::Print(), wsf::event::ExchangeCompleted::PrintCSV(), wsf::event::ExchangeNegotiated::PrintCSV(), wsf::event::ExchangeQueried::PrintCSV(), wsf::event::ExchangeRequestFailed::PrintCSV(), wsf::event::WeaponFired::PrintCSV(), WsfExchange::Transactor::RequestorPlatformName(), WsfExchange::Transactor::ResponderPlatformName(), wsf::comm::util::SelectRecipients(), SetAppearance(), WsfWeaponServer::SetCommander(), SetConcealmentFactor(), SetDamageFactor(), SetMover(), SwapMover(), WsfEmitterTypeReporting::UpdateReportedEmitterType(), WsfTargetTypeReporting::UpdateReportedTargetType(), UT_DEFINE_SCRIPT_METHOD(), WsfOrbitalLaunchComputer::WriteOrbits(), and WsfScriptEvent::WsfScriptEvent().

◆ GetSpatialDomain()

◆ GetTerrain()

◆ GetTerrainHeight()

double WsfPlatform::GetTerrainHeight ( )

◆ GetTrackManager()

WsfTrackManager & WsfPlatform::GetTrackManager ( )

Return a pointer to the "master" track manager (i.e., the WsfTrackManager object that owns and maintains the master track list).

References WsfComponentListT< WsfPlatformComponent >::AddComponent(), GetScenario(), GetSimTime(), GetSimulation(), and simTime.

Referenced by WsfUplinkProcessor::AddTrackUplink(), WsfUplinkProcessor::AddUplink(), WsfFusionCenter::AdjustTrackQuantities(), WsfCuedLaserWeapon::CeaseFire(), WsfGuidanceComputer::ComputeInterceptData(), WsfBMSensorInfoRecord::Cue(), WsfWeapon::CueToTarget(), WsfBMSensorInfoRecord::CueTrackUpdated(), WsfPerfectTracker::EstablishNewTrack(), WsfCuedLaserWeapon::Fire(), WsfExplicitWeapon::FireP(), WsfBrawlerProcessor::GetConsciousnessEventTime(), WsfWeaponTrackProcessor::GetInterceptData(), GetMasterRawTrackList(), GetMasterTrackList(), WsfBMUtils::GetOriginalTracks(), WsfSA_Assess::GetPerceivedTrackedPlatformWithTarget(), WsfXIO_TaskService::HandleCommand(), WsfL16::Interface_J11::InFlightTargetUpdate(), WsfL16::SurveillancePart::Initialize(), WsfPerceptionProcessor::Initialize(), WsfTrackProcessor::Initialize(), WsfTrackStateControllerProcessor::Initialize(), WsfUplinkProcessor::Initialize(), WsfAssetManager::Initialize2(), WsfGuidanceComputer::Initialize2(), WsfGuidedMoverBase::Initialize2(), WsfPerfectTracker::Initialize2(), WsfTaskManager::Initialize2(), WsfTBM_Mover::Initialize2(), WsfWeaponFuse::Initialize2(), WsfWeaponTrackProcessor::Initialize2(), WsfGuidedMover::InitiateMotion(), WsfParabolicMover::InitShot(), WsfBMUtils::IsTrackGeneratedByLocalSensor(), WsfUplinkProcessor::LocalTrackCorrelation(), WsfFusionCenter::PrintFuserState(), WsfWeaponFuse::PrivateDetonate(), WsfWeaponServer::ProcessCommand(), ProcessInput(), WsfWeaponTaskManager::ProcessTaskStatusMessage(), WsfWeaponTrackProcessor::ProcessTrackDrop(), WsfWeaponTrackProcessor::ProcessTrackUpdate(), WsfBMHEFIRMOELogger::RegisterScriptObservers(), WsfUplinkProcessor::RemoveUplink(), WsfL16::Interface_J11::SendBombHitIndicationReport(), WsfXIO_PlatformInfoService::SendTrackManagerState(), WsfWeaponTrackProcessor::SetCurrentTarget(), WsfRIPRProcessor::StartUplinking(), WsfRIPRProcessor::StartUplinking(), WsfUplinkProcessor::StartUplinking(), WsfUplinkProcessor::StopUplinking(), WsfP6DOF_Mover::Update(), WsfStraightLineMover::Update(), WsfPerfectTracker::UpdateExistingTrack(), WsfFusionCenter::UpdateFalseTargetTracks(), WsfP6DOF_GuidanceComputer::UpdateGuidance(), WsfWeaponEngagement::UpdateIntendedTarget(), WsfFusionCenter::UpdateRealTargetTracks(), WsfGuidanceComputer::UpdateTargetPerception(), WsfP6DOF_GuidanceComputer::UpdateTargetPerception(), WsfWeaponFuse::UpdateTargetState(), WsfWeaponTrackProcessor::UpdateTargetTrack(), and WsfWeaponTaskManager::UplinkStart().

◆ GetWidth()

double WsfPlatform::GetWidth ( ) const
inline

Get width of platform.

Returns
Returns width of platform.

Referenced by WsfOpticalSignature::GetValue(), and WsfLaserDesignations::Spot::LocalUpdate().

◆ HasScript()

bool WsfPlatform::HasScript ( WsfStringId aScriptNameId) const

Returns 'true' if the platform has a script with the specified name.

◆ Initialize()

bool WsfPlatform::Initialize ( WsfSimulation * aSimulationPtr,
double aSimTime )
virtual

◆ Initialize2()

bool WsfPlatform::Initialize2 ( WsfSimulation * aSimulationPtr,
double aSimTime )
virtual

Post-Initialize the platform and all its aggregate parts.

Parameters
aSimulationPtrPointer to the simulation
aSimTimeThe current simulation time.
Returns
'true' if successful or 'false' if some sort of error occurred.
Note
This method is invoked automatically when a object is added to the WsfSimulation object.

References WsfComponent::GetComponentName(), WsfComponentListT< WsfPlatformComponent >::GetComponentsByInitializationOrder(), WsfObject::GetName(), WsfComponent::Initialize2(), mHasOnUpdateScript, mInitPass, mIsInitialized, mUpdateAllowed, ok, and WsfSimulation.

Referenced by WsfSimulation::AddPlatform().

◆ InitializeCreationTime()

bool WsfPlatform::InitializeCreationTime ( )

Initialize the creation time. This is called by WsfSimulation to initialize the creation time of the platform. If the creation time was selected to be drawn from a random number distribution, perform the one and only draw to define the actual creation time.

References GetSimulation(), and ok.

◆ IsBroken()

bool WsfPlatform::IsBroken ( ) const
inline

Is the platform broken? Depending on the 'on_broken_action', a platform may exist in the simulation but still be broken.

References mIsBroken.

Referenced by WsfTrackScriptMethods::if(), WsfMilInterface::KillPlatform(), WsfSimulation::PlatformDeleted(), WsfMilEventPipe::PlatformKilled(), and WsfSA_Perceive::TruthAssets().

◆ IsCategoryMember()

bool WsfPlatform::IsCategoryMember ( WsfStringId aCategoryId) const

Is this a member of the indicated category?

Parameters
aCategoryIdString Id of the category to be checked.
Returns
'true' if a member of the category.

Referenced by wsf::coverage::Coverage::IsFreeAsset(), wsf::coverage::Coverage::IsGridAsset(), and WsfEventPipeOptionsCriteria::Matches().

◆ IsDeleted()

bool WsfPlatform::IsDeleted ( ) const
inline

Returns 'true' if the platform has been scheduled for deletion, but hasn't been physically deleted yet.

References mIsDeleted.

Referenced by WsfSimulation::DeletePlatform(), WsfTrackScriptMethods::if(), WsfWeaponEffects::IsVulnerable(), WsfSA_Perceive::TruthAssets(), and ~WsfPlatform().

◆ IsExternallyControlled()

bool WsfPlatform::IsExternallyControlled ( ) const
inline

Is the platform being controlled by something external to this application? This is typically used to allow the introduction of entities that may be modeled by some other application that may be connected to us over a network.

Returns
'true' if controlled by another application or 'false' if controlled by this application.

References mIsExternallyControlled.

Referenced by WsfSimulation::AddPlatform(), WsfExplicitWeapon::AddWeaponToSimulation(), WsfWeaponEffects::ApplyDamageResultToOtherPlatform(), WsfHEL_Lethality::ApplyEffectIncrement(), WsfWeaponEffects::ApplyEffectIncrement(), WsfDisInterface::Comment(), WsfDisInterface::CommFrequencyChanged(), WsfDisInterface::CommTurnedOff(), WsfDisInterface::CommTurnedOn(), WsfDisWeaponEvents::DirectedEnergyWeaponFired(), WsfDisWeaponEvents::DirectedEnergyWeaponHit(), WsfDisUtil::DisToWsfPlayers(), WsfDisWeaponEvents::InitiateWeaponTransfer(), WsfDisWeaponEvents::IsOutgoingWeaponTransfer(), WsfXIO_ObjectInfoLoad::Load_Platform(), WsfXIO_AutoDisMapping::PlatformInitialized(), WsfDisDirectedEnergyFire::Process(), WsfDisEmission::Process(), WsfDisFire::Process(), WsfDisResupplyOffer::Process(), WsfDisResupplyReceived::Process(), WsfEventPipeInterface::SendDependent(), WsfDisInterface::SensorDetectionChanged(), WsfDisInterface::SensorFrequencyChanged(), WsfDisInterface::SensorModeActivated(), WsfDisInterface::SensorModeDeactivated(), WsfDisInterface::SensorRequestCanceled(), WsfDisInterface::SensorRequestInitiated(), WsfDisInterface::SensorRequestUpdated(), WsfDisInterface::SensorScanUpdated(), WsfDisInterface::SensorTrackDropped(), WsfDisInterface::SensorTrackInitiated(), WsfDisInterface::SensorTurnedOff(), WsfDisInterface::SensorTurnedOn(), SwapMover(), WsfWeaponEffects::Terminate(), WsfL16::Interface_J11::WeaponFired(), WsfDisWeaponEvents::WeaponTerminated(), WsfDisPlatform::WsfDisPlatform(), and WsfDisUtil::WsfToDisPlayers().

◆ IsExternallyMoved()

bool WsfPlatform::IsExternallyMoved ( ) const
inline

Is the platform being moved by something external to this application? This is typically used to allow to be driven by some other application that may be connected to us over a network yet allow this platform to remain local.

Returns
'true' if moved by another application or 'false' if moved by this application.

References mIsExternallyMoved.

Referenced by WsfDisWeaponEvents::DirectedEnergyWeaponFired(), WsfDisWeaponEvents::InitiateWeaponTransfer(), SwapMover(), WsfDisWeaponEvents::WeaponTerminated(), and WsfDisPlatform::WsfDisPlatform().

◆ IsExternalShadow()

bool WsfPlatform::IsExternalShadow ( ) const
inline

Is the platform a shadow of an external entity? An 'external shadow platform' is a debugging tool that provides a locally controlled platform that mirrors the movement of another platform that is marked 'IsExternallyControlled'. This local shadow platform may then be written to the external simulation where a stealth viewer can be used to see that our internal perception of the platform matches the external entity that we are shadowing.

Returns
'true' if this is a shadow platform or 'false' if not.
Note
Sensors and certain other objects should test this attribute and not detect or remove shadow entities.
See also
WsfDisInterface for an example of shadow entity use.

References mIsExternalShadow.

Referenced by WsfSensor::AllowDetectionChancesFor(), and WsfWeaponEffects::IsVulnerable().

◆ IsExtrapolating()

bool WsfPlatform::IsExtrapolating ( ) const

Replaces the bool AtEndOfPath() function. True indicates that the platform has reached its final path destination, but may or may not be continuing on toward a specified heading, altitude, and speed. Note that the platform can be sent a new path at which time this will be set back to 'false'.

Referenced by FlightPathAnalysisFunction::Execute().

◆ IsFalseTarget()

◆ IsGroupMember()

bool WsfPlatform::IsGroupMember ( WsfStringId aGroupId)

Is this a member of the indicated group?

Parameters
aGroupIdString Id of the group to be checked.
Returns
'true' if a member of the group.

◆ IsIndestructible()

bool WsfPlatform::IsIndestructible ( ) const
inline

Is the platform indestructible? A platform may be marked as indestructible in order prevent it from being destroyed or removed. When this value is set 'true', any applied damage accumulates in a logarithmically decaying fashion, so GetDamageFactor(), rather than returning an actual damage state, reflects an ever decreasing (but never reaching zero) probability of survival.

Returns
'true' if indestructible or 'false' if not.

References mIsIndestructible.

Referenced by WsfWeaponEffects::ApplyEffectIncrement(), WsfMobilityAndFirepowerLethality::ApplyEffectTo(), WsfWeaponEffects::ApplyEffectTo(), and WsfWeaponEffects::Terminate().

◆ IsInitialized()

bool WsfPlatform::IsInitialized ( ) const
inline

◆ IsPaused()

bool WsfPlatform::IsPaused ( ) const

Indicates that the platform is currently in "pause" mode; is not moving but may begin moving at some future time.

Referenced by WsfExtEntityDeadReckon::DR_State::LoadFromPlatform().

◆ IsStopped()

bool WsfPlatform::IsStopped ( ) const

Indicates that the platform is currently at rest, and with zero commanded velocity.

Referenced by WsfThreatProcessor::IsThreatening(), and WsfExtEntityDeadReckon::DR_State::LoadFromPlatform().

◆ JoinGroup()

void WsfPlatform::JoinGroup ( WsfGroup * aGroupPtr)

Join the given group.

References GetIndex().

Referenced by WsfGroupTypes::JoinGroupType(), and WsfGroupManager::LoadInstance().

◆ LeaveGroup()

void WsfPlatform::LeaveGroup ( WsfGroup * aGroupPtr)

Leave the given group.

References GetIndex().

◆ NotifyDeleted()

void WsfPlatform::NotifyDeleted ( double aSimTime)

◆ NotifyDeleting()

void WsfPlatform::NotifyDeleting ( double aSimTime)

◆ NotifyUpdate()

void WsfPlatform::NotifyUpdate ( double aSimTime)
inline

References DoNotifyUpdate(), and mUpdateAllowed.

◆ OnBrokenEvent()

◆ PlatformAdded()

void WsfPlatform::PlatformAdded ( double aSimTime,
WsfPlatform * aPlatformPtr )
virtual

Some other platform has been added to the simulation.

This method is called by WsfSimulation whenever another platform has been added to the simulation. This platform can then take whatever action it deems necessary.

Parameters
aSimTimeThe current simulation time.
aPlatformPtrPointer to the platform being added.

References WsfComponentListT< WsfPlatformComponent >::Begin(), WsfComponentListT< WsfPlatformComponent >::End(), WsfCommandChain::PlatformAdded(), WsfPlatformPart::PlatformAdded(), WsfComponent::QueryInterfaceT(), and WsfPlatform().

◆ PlatformDeleted()

void WsfPlatform::PlatformDeleted ( WsfPlatform * aPlatformPtr)
virtual

Some other platform has been deleted from the simulation.

WsfSimulation invokes this method whenever another platform has been deleted from the simulation. This platform can then take whatever action it deems necessary.

Parameters
aPlatformPtrPointer to the platform being deleted.

References WsfComponentListT< WsfPlatformComponent >::Begin(), WsfComponentListT< WsfPlatformComponent >::End(), GetSimTime(), WsfCommandChain::PlatformDeleted(), WsfPlatformPart::PlatformDeleted(), WsfComponent::QueryInterfaceT(), and WsfPlatform().

Referenced by WsfSimulation::AddPlatform().

◆ ProcessInput()

bool WsfPlatform::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from WsfObject.

References WsfTrackManager::AddInitialTrack(), cON_BROKEN_DISABLE, cON_BROKEN_MOVABLE_DISABLED, cON_BROKEN_REMOVE, GetLocationLLA(), GetScenario(), GetSignatureList(), GetTrackManager(), WsfTrack::LoadTrackInstance(), mInputAltAGL, mIsIndestructible, WsfAuxDataEnabled::ProcessInput(), WsfComponentFactoryList< PARENT_TYPE >::ProcessInput(), WsfObject::ProcessInput(), ProcessInput(), WsfTypes::StringToEnum(), and trackPtr.

Referenced by ProcessInput(), and ProcessInputBlock().

◆ ProcessInputBlock()

void WsfPlatform::ProcessInputBlock ( UtInputBlock & aInputBlock,
bool aLoadingType )

This is called by WsfPlatformTypes.

References GetScenario(), and ProcessInput().

Referenced by WsfScenario::LoadPlatformInstance().

◆ QueryInterface()

void * WsfPlatform::QueryInterface ( int aRole)
overridevirtual

Requests a component's role interface. A component can support one or more roles.

Parameters
aRoleThe role whose interface is to be returned.
Returns
A pointer to the object if it supports the indicated role, or 'null' if it does not. Usage: WsfProcessor* procPtrOrNull = (WsfProcessor*)componentPtr->QueryComponentInterface(cWSF_COMPONENT_PROCESSOR);

Implements WsfComponent.

References cWSF_COMPONENT_PLATFORM.

◆ ScriptOverride()

bool WsfPlatform::ScriptOverride ( unsigned int aLSB,
unsigned int aNumBits ) const

Returns true if data in the appearance word has been set from script.

References WsfUtil::CountBitsOn(), and WsfUtil::GenerateBitMask().

Referenced by SetConcealmentFactor(), wsf::six_dof::Mover::UpdateAppearance(), and WsfP6DOF_Mover::UpdateAppearance().

◆ SendQueuedMessages()

void WsfPlatform::SendQueuedMessages ( double aSimTime)
inline

◆ SetAppearance()

void WsfPlatform::SetAppearance ( unsigned int aLSB,
unsigned int aNumBits,
unsigned int aValue,
bool aFromScript = false )

◆ SetBroken()

void WsfPlatform::SetBroken ( )
inline

Methods only for use by WsfSimulation.

Indicate the platform is broken.

Note
This is intended to be called only by WsfSimulation extensions.

References mIsBroken.

Referenced by WsfMilInterface::KillPlatform().

◆ SetCapabilities()

void WsfPlatform::SetCapabilities ( unsigned int aCapabilitiesWord)

Set the 'capabilities' word, a bit-field of boolean capabilities. See WsfExchange.hpp for details.

References WsfExchange::ModifyCapabilities().

Referenced by WsfExchange::SetCapabilityFlag(), and WsfDisInterface::UpdatePlatformFromEntityState().

◆ SetConcealmentFactor()

void WsfPlatform::SetConcealmentFactor ( float aConcealmentFactor)

Set the 'concealment factor'.

The concealment factor is a number in the range [0, 1] and is used to denote how well a platform is VISUALLY concealed. A value of 0.0 means there is no attempt to hide. A factor of 1.0 means that it is hidden in such a way as to be undetectable (such as in a building or in an underground bunker). Values between the endpoints represent increasing amounts of camouflage.

At some point this could be replaced with optical signatures that can be varied by configuration.

Parameters
aConcealmentFactorThe concealment factor in the range [0 .. 1]

References WsfObserver::cCONCEALMENT_FACTOR, GetMover(), GetSimTime(), GetSimulation(), moverPtr, WsfObserver::PlatformAppearanceChanged(), ScriptOverride(), SetAppearance(), and WSF_SPATIAL_DOMAIN_LAND.

Referenced by Initialize(), WsfDisInterface::UpdatePlatformFromAppearance(), and Fires::Observer::WeaponFired().

◆ SetCreationTime()

void WsfPlatform::SetCreationTime ( double aCreationTime)

Set the time when the platform is to be added to the simulation.

Parameters
aCreationTimeThe time when the platform is to be added to the simulation.
Note
This is only effective for platforms created during simulation initialization.

References WsfRandomVariable::cNON_NEGATIVE.

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ SetDamageFactor()

void WsfPlatform::SetDamageFactor ( double aDamageFactor)

Set the 'damage factor'.

The damage factor is a value in the range [0 .. 1] and is used to indicate the amount of damage to the platform. A value of 0 indicates no damage while a value of 1 indicates the platform is 'dead'.

Parameters
aDamageFactorDamage factor in the range [0 .. 1]

References GetSimTime(), GetSimulation(), and WsfObserver::PlatformDamageChanged().

Referenced by WsfWeaponEffects::ApplyDamageResultToOtherPlatform(), WsfAirMover::AssessDamage(), WsfWeaponEffects::Terminate(), WsfOffsetMover::Update(), and WsfDisInterface::UpdatePlatformFromAppearance().

◆ SetDeleted()

void WsfPlatform::SetDeleted ( bool aDeleted = true)
inline

Specifies that the platform is scheduled for deletion.

Note
This is intended to be called only by WsfSimulation::DeletePlatform()

References mIsDeleted.

Referenced by WsfSimulation::AddPlatform(), WsfSimulation::DeletePlatform(), and WsfSimulation::ProcessRemovePlatformEvent().

◆ SetEmptyMass()

◆ SetFuelMass()

◆ SetHeight()

void WsfPlatform::SetHeight ( double aValue)
inline

Set overall height for the platform.

◆ SetIcon()

void WsfPlatform::SetIcon ( WsfStringId aIcon)
inline

Set the name of the icon associated with this platform.

Referenced by WsfChaffWeapon::WeaponPlatformUserInitialize().

◆ SetIndex()

void WsfPlatform::SetIndex ( size_t aIndex)
inline

Set the unique index of the platform within the simulation.

Parameters
aIndexIndex of the platform within the simulation.
Note
This is an internal method that should only be called by WsfSimulation.

Referenced by WsfSimulation::AddToPlatformList().

◆ SetIsExternallyControlled()

void WsfPlatform::SetIsExternallyControlled ( bool aIsExternallyControlled)
inline

Set the value of the 'IsExternallyControlled' attribute. Define the platform being controlled by something external to this application.

Parameters
aIsExternallyControlled'true' if controlled by another application or 'false' if controlled by this application. The default value is 'false'.
See also
IsExternallyControlled.

References mIsExternallyControlled.

Referenced by WsfWeaponServer::SendToOtherWeaponServer().

◆ SetIsExternallyMoved()

void WsfPlatform::SetIsExternallyMoved ( bool aIsExternallyMoved)
inline

Set the value of the 'IsExternallyMoved' attribute. Define the platform being moved by something external to this application.

Parameters
aIsExternallyMoved'true' if moved by another application or 'false' if moved by this application. The default is 'false'.
See also
IsExternallyMoved.

References mIsExternallyMoved.

◆ SetIsExternalShadow()

void WsfPlatform::SetIsExternalShadow ( bool aIsExternalShadow)
inline

Set the value of the 'IsExternalShadow' attribute.

Parameters
aIsExternalShadow'true' if this is a shadow of an externally controlled entity.
See also
IsExternalShadow.

References mIsExternalShadow.

◆ SetIsFalseTarget()

void WsfPlatform::SetIsFalseTarget ( bool aBoolState)
inline

References mIsFalseTarget.

◆ SetIsIndestructible()

void WsfPlatform::SetIsIndestructible ( bool aIsIndestructible)
inline

Set the value of the 'IsIndestructible' attribute.

Parameters
aIsIndestructible'true' if the platform is indestructible or 'false' if not.
See also
IsIndestructible.

References mIsIndestructible.

Referenced by Fires::Observer::WeaponFired().

◆ SetLength()

void WsfPlatform::SetLength ( double aValue)
inline

Set overall length for the platform.

◆ SetMarking()

void WsfPlatform::SetMarking ( WsfStringId aMarking)
inline

Set the marking associated with this platform.

Referenced by Fires::BallisticPlatforms::CreatePlatform().

◆ SetMover()

◆ SetOnBrokenAction()

void WsfPlatform::SetOnBrokenAction ( OnBrokenAction aOnBrokenAction)
inline

Set the action to occur when the platform is broken.

◆ SetPayloadMass()

void WsfPlatform::SetPayloadMass ( double aValue)
inline

◆ SetSide()

void WsfPlatform::SetSide ( WsfStringId aSide)

Set the 'side' (affiliation) to which this platform belongs.

References WsfObject::GetName(), GetSide(), and IsInitialized().

Referenced by WsfExplicitWeapon::FireP(), and WsfWeaponServer::PlatformInitialized().

◆ SetSpatialDomain()

void WsfPlatform::SetSpatialDomain ( const WsfSpatialDomain & aSpatialDomain)
inline

Set the spatial domain of the platform.

Referenced by WsfChaffWeapon::WeaponPlatformUserInitialize().

◆ SetUpdateLocked()

void WsfPlatform::SetUpdateLocked ( bool aUpdateLocked)
inline

Set the update locked flag to prevent updates to the platform. Currently used by the WsfMultiThreadManager to lock out updates other than in the multi-thread pool.

References mUpdateLocked.

Referenced by WsfMultiThreadManager::AddPlatform().

◆ SetWidth()

void WsfPlatform::SetWidth ( double aValue)
inline

Set overall width for the platform (i.e. wingspan for an aircraft).

◆ SwapMover()

bool WsfPlatform::SwapMover ( double aSimTime,
WsfMover *& aNewMoverPtr,
WsfMover *& aOldMoverPtr )

Swap Mover pointers in the Platform.

Parameters
aSimTimeCurrent simulated time.
aNewMoverPtrpointer to be swapped into the platform. The platform assumes ownership.
aOldMoverPtrpointer to be swapped out of the platform. The platform gives up ownership.
Returns
Bool to indicate whether the swap was performed or not.

References GetSimulation(), WsfMover::Initialize(), WsfMover::Initialize2(), WsfPlatformPart::InitiallyTurnedOn(), IsExternallyControlled(), IsExternallyMoved(), WsfComponent::PreInitialize(), WsfComponentListT< WsfPlatformComponent >::RemoveComponent(), WsfMover::SetLastUpdateTime(), SetMover(), WsfPlatformPart::SetPlatform(), WsfMover::SwapMoverInitiated(), WsfSimulation::TurnPartOn(), and Update().

Referenced by WsfExplicitWeapon::FireP(), and WsfExplicitWeapon::ProcessDeferredLaunchEvent().

◆ Update()

void WsfPlatform::Update ( double aSimTime)
inline

Update the platform to reflect the state at the specified time.

This only updates the platform position and fuel utilization. Updating of attached parts (sensors, comms, etc.) are left to the simulation executive because the simulation may required the updates to be performed in a certain order.

Parameters
aSimTimeThe current simulation time.
Note
This is a non-virtual method which will first check to see if an update is actually required. If an update is required then the protected virtual method DoUpdate() will be called.

References DoUpdate(), mUpdateAllowed, and mUpdateLocked.

Referenced by WsfFrameStepSimulation::AdvanceFrame(), WsfAcousticSensor::AcousticMode::AttemptToDetect(), WsfCompositeSensor::CompositeMode::AttemptToDetect(), WsfCTD_SensorComponent::AttemptToDetect(), WsfGeometricSensor::GeometricMode::AttemptToDetect(), WsfLADAR_Sensor::LADAR_Mode::AttemptToDetect(), WsfOpticalSensor::OpticalMode::AttemptToDetect(), WsfOTH_RadarSensor::OTH_Mode::AttemptToDetect(), WsfRadarSensor::RadarMode::AttemptToDetect(), WsfSAR_Sensor::SAR_Mode::AttemptToDetect(), WsfSOSM_Sensor::SOSM_Mode::AttemptToDetect(), WsfSurfaceWaveRadarSensor::RadarMode::AttemptToDetect(), WsfEOIR_IRST_SensorMode::BeginDetectionAttempt(), WsfWeaponFuse::CheckAllTargets(), WsfSatelliteBreakupModel::CollisionalBreakup(), WsfBallisticMissileLaunchComputer::ComputeAirIntercept(), WsfBallisticMissileLaunchComputer::ComputeLateralTargetOffset(), WsfLaserDesignator::TargetAssociation::Consider(), MTT_PerceivedCluster::CopyFrom(), WsfPerfectTracker::EstablishNewTrack(), FlightPathAnalysisFunction::Execute(), WsfOrbitalScriptEvent::ExecuteEvent(), WsfDisPlatform::ForceUpdate(), WsfBMUtils::GetOrientationWCS(), WsfWeaponEngagement::GetTargetLocationWCS(), WsfWeaponEngagement::GetWeaponLocationWCS(), WsfOffsetMover::Initialize(), WsfDisWeaponEvents::InitiateWeaponTransfer(), WsfTrack::LineOfSightRatesFrom(), WsfOffsetMover::OnPlatformUpdated(), WsfDefaultFusion::PerformStandardTrackUpdate(), WsfBeamDirector::WsfBeamDirectorMode::PointAtTargetUpdate(), WsfUtil::PotentiallyWithinRange(), WsfGuidedMoverBase::PrelaunchAdvanceTime(), WsfDisDirectedEnergyFire::Process(), WsfDisFire::Process(), WsfFalseTarget::Rescan(), WsfPhysicalScanSensorScheduler::SelectTarget(), WsfSectorScanSensorScheduler::SelectTarget(), WsfChaffEjector::SetLaunchState(), WsfOffsetMover::SetOffsetFromReference(), WsfOffsetMover::SetReference(), SwapMover(), BallisticMissileLaunchComputerGenerator::Update(), WsfWeaponFuse::Update(), WsfFalseTarget::UpdateBaseBlipPositions(), WsfFalseTarget::UpdateBlipPositions(), WsfHighEnergyLaser::UpdateEngagementGeometry(), WsfPerfectTracker::UpdateExistingTrack(), WsfDefaultFusion::UpdateLocalResultFromNonLocalResult(), WsfOrbitDeterminationFusion::UpdateLocalTrackFromNonLocalTrack(), WsfArticulatedPart::UpdatePosition(), wsf::six_dof::GuidanceComputer::UpdateTargetPerception(), WsfGuidanceComputer::UpdateTargetPerception(), WsfP6DOF_GuidanceComputer::UpdateTargetPerception(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), WsfLaunchComputer::WithinConstraintsAt(), WsfRF_Jammer::WithinFieldOfView(), WsfSensor::WithinFieldOfView(), WsfWeapon::WithinFieldOfView(), WsfAssetPerception::WsfAssetPerception(), and WsfSA_EntityPerception::WsfSA_EntityPerception().

◆ UpdateMultiThread()

void WsfPlatform::UpdateMultiThread ( double aSimTime)
inline

◆ WsfSimulation

◆ WsfSimulationBase

friend class WsfSimulationBase
friend

References WsfSimulationBase.

Referenced by WsfSimulationBase.

Member Data Documentation

◆ mFlags

unsigned int WsfPlatform::mFlags

Referenced by WsfPlatform(), and WsfPlatform().

◆ mHasOnUpdateScript

bool WsfPlatform::mHasOnUpdateScript

◆ mInitPass

bool WsfPlatform::mInitPass

◆ mInputAltAGL

bool WsfPlatform::mInputAltAGL

Referenced by CompleteLoad(), and ProcessInput().

◆ mIsBroken

bool WsfPlatform::mIsBroken

◆ mIsDeleted

bool WsfPlatform::mIsDeleted

Referenced by IsDeleted(), SetDeleted(), and WsfPlatform().

◆ mIsExternallyControlled

bool WsfPlatform::mIsExternallyControlled

◆ mIsExternallyMoved

bool WsfPlatform::mIsExternallyMoved

◆ mIsExternalShadow

bool WsfPlatform::mIsExternalShadow

◆ mIsFalseTarget

bool WsfPlatform::mIsFalseTarget

Referenced by IsFalseTarget(), and SetIsFalseTarget().

◆ mIsIndestructible

bool WsfPlatform::mIsIndestructible

◆ mIsInitialized

bool WsfPlatform::mIsInitialized

◆ mUpdateAllowed

◆ mUpdateLocked

bool WsfPlatform::mUpdateLocked

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