WSF
WsfChaffCloud.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11#ifndef WSFCHAFFCLOUD_HPP
12#define WSFCHAFFCLOUD_HPP
13
14#include "wsf_nx_export.h"
15
16#include <list>
17#include <memory>
18
19#include "UtEntity.hpp"
22#include "WsfDraw.hpp"
24#include "WsfUniqueId.hpp"
25
28{
29public:
30 WsfChaffCloud(WsfSimulation& aSimulation, bool aDrawApproximation = false);
31 ~WsfChaffCloud() override;
32 WsfChaffCloud(const WsfChaffCloud& aSrc) = delete;
33 WsfChaffCloud& operator=(const WsfChaffCloud& aSrc) = delete;
34
35 void AddParcel(WsfChaffParcelInterface* aParcelPtr) override;
36 void DrawCloudApproximation(bool aEnabled) { mDrawApproximation = aEnabled; }
37
38 // Returns bistatic presented area of cloud for computing signal return of each parcel
39 // aXmtrLocationWCS [input] : Transmitter location in WCS coordinates
40 // aRcvrLocationWCS [input] : Receiver location in WCS coordinates
41 // aNumberParcels [output]: Number of parcels in the cloud
42 double GetBistaticPresentedArea(const double aXmtrLocationWCS[3],
43 const double aRcvrLocationWCS[3],
44 size_t& aNumberParcels) const override;
45
46protected:
47 // Single platform observer overrides to get notified when parcels expire or are updated (moved)
48 void OnPlatformDeleted(double aSimTime, WsfPlatform* aPlatformPtr) override;
49 void OnPlatformUpdated(double aSimTime, WsfPlatform* aPlatformPtr) override;
50
51private:
52 void UpdateFirstParcelEjectPoint();
53 double GetPresentedArea(const double aViewpointLocationWCS[3]) const;
54 void EraseWsfDrawCommands();
55
56 using ParcelList = std::list<const WsfChaffParcelInterface*>;
57
58 ParcelList mParcels; // The list of parcels that comprise the chaff cloud
59 UtEntity mFirstParcelEjectPoint; // Dummy entity representing the location of first parcel's ejection point
60 double mCloudCenterWCS[3]; // Location of center of cloud in WCS frame
61 double mCloudAxisUnitWCS[3]; // Unit vector in WCS pointing in direction of cloud axis
62 double mAreaFront; // Cloud cross-sectional area as viewed from front
63 double mAreaSide; // Cloud cross-sectional area as viewed from side
64
65 bool mDrawApproximation;
66 std::unique_ptr<WsfDraw> mDrawPtr; // Used to draw cloud approximation for debugging purposes
67 WsfStringId mDrawCloudId;
68 WsfStringId mDrawXmtrId;
69 WsfStringId mDrawRcvrId;
70};
71#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfChaffCloudInterface.hpp:21
virtual void AddParcel(WsfChaffParcelInterface *aParcelPtr)=0
virtual double GetBistaticPresentedArea(const double aXmtrLocationWCS[3], const double aRcvrLocationWCS[3], size_t &aNumberParcels) const =0
WsfChaffCloud(WsfSimulation &aSimulation, bool aDrawApproximation=false)
Definition WsfChaffCloud.cpp:35
void DrawCloudApproximation(bool aEnabled)
Definition WsfChaffCloud.hpp:36
WsfChaffCloud & operator=(const WsfChaffCloud &aSrc)=delete
WsfChaffCloud(const WsfChaffCloud &aSrc)=delete
Definition WsfChaffParcelInterface.hpp:19
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfSinglePlatformObserver.hpp:30
virtual void OnPlatformUpdated(double aSimTime, WsfPlatform *aPlatformPtr)
Called after each mover update.
Definition WsfSinglePlatformObserver.hpp:41
virtual void OnPlatformDeleted(double aSimTime, WsfPlatform *aPlatformPtr)
Called just before the platform is removed from the simulation.
Definition WsfSinglePlatformObserver.hpp:38
WsfUniqueId()
Construtor initializes the unique identifier to 0.
Definition WsfUniqueId.hpp:38
Copyrights Multiple, All Rights Reserved