|
WSF
|
#include <WsfLaserDesignations.hpp>


Classes | |
| class | Spot |
| class | UpdateEvent |
Public Member Functions | |
| WsfLaserDesignations ()=default | |
| WsfLaserDesignations (WsfLaserDesignationsData &aSetupData) | |
| ~WsfLaserDesignations () override | |
| void | Update (double aSimTime) |
| bool | Initialize () override |
| void | UpdateCallbacks () |
| bool | AddOrUpdate (const Spot &aDesignator, const double aEmitterLocationWCS[3]) |
| bool | Remove (const Spot &aDesignator) |
| void | GetAllSpots (std::vector< const Spot * > &aSpotPtrs) |
| void | GetSpecified (unsigned int aLaserCode, double aWaveLength, std::vector< const Spot * > &aSpotPtrs) |
| void | PlatformDeleted (double aSimTime, WsfPlatform *aPlatPtr) |
| Public Member Functions inherited from WsfSimulationExtension | |
| WsfSimulationExtension () | |
| ~WsfSimulationExtension () override=default | |
| WsfSimulation & | GetSimulation () const |
| const WsfScenario & | GetScenario () const |
| virtual void | AddedToSimulation () |
| virtual bool | PrepareExtension () |
| virtual bool | PlatformsInitialized () |
| virtual void | PendingStart () |
| virtual void | Start () |
| virtual void | Complete (double aSimTime) |
| Public Member Functions inherited from WsfExtension | |
| virtual | ~WsfExtension ()=default |
| const std::string & | GetExtensionName () const |
| Public Member Functions inherited from WsfLaserDesignationsData | |
| WsfLaserDesignationsData ()=default | |
| WsfLaserDesignationsData (const WsfLaserDesignationsData &aSrc)=default | |
| ~WsfLaserDesignationsData ()=default | |
| void | SetInputProcessed (bool aValue) |
| bool | InputIsProcessed () const |
| void | SetDebug (bool aValue) |
| bool | DebugEnabled () const |
Public Attributes | |
| UtCallbackListN< void(const Spot &)> | SpotUpdated |
Additional Inherited Members | |
| static void | __private_SetSim (WsfSimulationExtension &aExtension, WsfSimulation *aSimPtr) |
| Protected Member Functions inherited from WsfExtension | |
| void | InitializeExtensionName (const std::string &aName) |
| Protected Attributes inherited from WsfLaserDesignationsData | |
| bool | mDebug {false} |
| bool | mProcessedInput {false} |
| bool | mSendExternal {true} |
| unsigned int | mUpdatePrintModulus {157} |
| double | mStaleOutInterval {5.0} |
| double | mUpdateInterval {3.0} |
| double | mPlatformRadius {1.5} |
A singleton class to obtain information about Laser Designations that exist in the Simulation, produced either locally, or received externally via DIS connection. Currently makes several simplifying assumptions: Only one emitter per platform, one designation per emitter, and one designation per target platform (no overspill or underspill). As class is fleshed out, the assumptions may be removed. Also, the DIS dead reckoning algorithm enumeration is not used, nor is the spot acceleration.
When a spot is placed in the environment, a flag is set to permit target occlusion of the spot to be internally considered by this class or not. A high-fidelity laser designator model may itself consider target occlusion, with a detailed target facet model available for this purpose. If so, the Spot it would place should have its SetAddLocalOcclusion(false). Note that the default is true. If true, the non-occulted "ground-lase" WCS location is always set into the spot, and is available as GetLocationWCS(), if there is no target platform association. But if a target entity is associated with the spot, the provided WCS laser spot is relocated in target-relative coordinates if appropriate. The relo- cation is to place the spot on the surface of a sphere at radius R toward the designator from the target center reference. A target ECS-relative offset is computed, using the relocated spot position. Then the "true" WCS spot location is obtainable via the GetTargetAdjustedLocationWCS() function. To prevent latency or coordinate frame mismatches from causing a designation position error, when the designation is associated with an entity, the local ECS offset should be used, rather than WCS. The GetTargetAdjustedLocationWCS() function does this automatically. WHAT CONSITUTES A "RADIUS"? - For each target, if Length, Width, and Height values are set in the platform, then R is computed as the cube root of (L * L + W * W + H * H). But if any of (L,W,H) are zero, we will use the default radius mPlatformRadius provided to this class.
|
default |
References AddOrUpdate(), GetAllSpots(), GetSpecified(), Initialize(), PlatformDeleted(), Remove(), UpdateCallbacks(), WsfLaserDesignations(), and WsfLaserDesignationsData::WsfLaserDesignationsData().
Referenced by WsfLaserDesignations::Spot::GetTargetAdjustedLocationWCS(), WsfLaserDesignations::Spot::operator=(), WsfLaserDesignations::UpdateEvent::UpdateEvent(), WsfLaserDesignations::UpdateEvent::UpdateEvent(), WsfLaserDesignations::Spot::UpdateTo(), WsfLaserDesignations::Spot::UpdateTo(), and WsfLaserDesignations().
| WsfLaserDesignations::WsfLaserDesignations | ( | WsfLaserDesignationsData & | aSetupData | ) |
References Initialize(), and WsfLaserDesignationsData::WsfLaserDesignationsData().
|
override |
| bool WsfLaserDesignations::AddOrUpdate | ( | const Spot & | aDesignation, |
| const double | aEmitterLocationWCS[3] ) |
Function to refresh a particular laser designation.
| aDesignation | Laser designation to update. (The designation itself will contain a time stamp.) |
| aEmitterLocationWCS | Location of the designator. Is used to discern LOS of sensor. |
References WsfLaserDesignations::Spot::GetDesignatingIndex(), WsfSimulation::GetSimTime(), WsfSimulationExtension::GetSimulation(), WsfLaserDesignations::Spot::IsLocal(), WsfLaserDesignationsData::mDebug, WsfLaserDesignationsData::mPlatformRadius, WsfLaserDesignationsData::mSendExternal, WsfLaserDesignationsData::mUpdatePrintModulus, simTime, SpotUpdated, and UpdateCallbacks().
Referenced by WsfLaserDesignations().
| void WsfLaserDesignations::GetAllSpots | ( | std::vector< const Spot * > & | aSpotPtrs | ) |
Referenced by WsfLaserDesignations().
| void WsfLaserDesignations::GetSpecified | ( | unsigned int | aLaserCode, |
| double | aWaveLength, | ||
| std::vector< const Spot * > & | aSpotPtrs ) |
Referenced by WsfLaserDesignations().
|
overridevirtual |
Function to Initialize the laser designations. (Function is internally callback-queued, so does not need explicitly called by the user.)
Reimplemented from WsfSimulationExtension.
References WsfLaserDesignationsData::mProcessedInput, and success.
Referenced by WsfLaserDesignations(), and WsfLaserDesignations().
| void WsfLaserDesignations::PlatformDeleted | ( | double | aSimTime, |
| WsfPlatform * | aPlatPtr ) |
Function to inform the object of simulation platform deletions. Called by the simulation, users need not call it explicitly.
| aSimTime | Current simulation time. |
| aPlatPtr | Pointer to the platform to be deleted. |
References WsfPlatform::GetIndex(), and WsfSimulationExtension::GetSimulation().
Referenced by UpdateCallbacks(), and WsfLaserDesignations().
| bool WsfLaserDesignations::Remove | ( | const Spot & | aDesignation | ) |
Function to remove a particular laser designation.
| aDesignation | Laser designation to remove. |
References WsfLaserDesignations::Spot::GetDesignatingIndex(), WsfSimulation::GetSimTime(), WsfSimulationExtension::GetSimulation(), WsfLaserDesignations::Spot::IsExternal(), WsfLaserDesignationsData::mDebug, and simTime.
Referenced by WsfLaserDesignations().
| void WsfLaserDesignations::Update | ( | double | aSimTime | ) |
Function to refresh the laser designations, including getting rid of stale/orphaned ones. (Function is internally event-queued, so does not need explicitly called by the user.)
| aSimTime | Current simulation time. |
References WsfLaserDesignationsData::mDebug, and WsfLaserDesignationsData::mStaleOutInterval.
| void WsfLaserDesignations::UpdateCallbacks | ( | ) |
References WsfSimulationExtension::GetSimulation(), PlatformDeleted(), and WsfObserver::PlatformDeleted().
Referenced by AddOrUpdate(), and WsfLaserDesignations().
| UtCallbackListN<void(const Spot&)> WsfLaserDesignations::SpotUpdated |
Referenced by AddOrUpdate().