WSF
WsfImage.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 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
12#ifndef WSFIMAGE_HPP
13#define WSFIMAGE_HPP
14
15#include "wsf_export.h"
16
17#include <memory>
18#include <string>
19#include <vector>
20
21#include "UtScriptAccessible.hpp"
22class UtScriptClass;
23class UtScriptTypes;
24
25class WsfPlatform;
26class WsfProcessor;
27class WsfSensor;
28class WsfSimulation;
29#include "WsfStringId.hpp"
30
35class WSF_EXPORT WsfImage : public UtScriptAccessible
36{
37public:
40 {
41 public:
42 Object() = default;
43 Object(WsfPlatform* aPlatformPtr);
44
46 void GetLocationWCS(double aLocationWCS[3]) const;
47 void SetLocationWCS(const double aLocationWCS[3]);
48
50 double GetSignalLevel() const { return mSignalLevel; }
51 void SetSignalLevel(double aSignalLevel) { mSignalLevel = aSignalLevel; }
52
54 double GetPixelCount() const { return mPixelCount; }
55 void SetPixelCount(double aPixelCount) { mPixelCount = aPixelCount; }
56
59 double GetPixelIntensity() const { return mPixelIntensity; }
60 void SetPixelIntensity(double aPixelIntensity) { mPixelIntensity = aPixelIntensity; }
61
63 size_t GetTruthIndex() const { return mTruthIndex; }
64 void SetTruthIndex(unsigned int aTruthIndex) { mTruthIndex = aTruthIndex; }
65
66 WsfStringId GetTruthName(WsfSimulation& aSimulation) const;
67
69 WsfStringId GetTruthType() const { return mTruthType; }
70 void SetTruthType(WsfStringId aTruthType) { mTruthType = aTruthType; }
71
73 WsfStringId GetTruthSide() const { return mTruthSide; }
74 void SetTruthSide(WsfStringId aTruthSide) { mTruthSide = aTruthSide; }
75
76 private:
77 double mLocationWCS[3]{0.0, 0.0, 0.0};
78 double mSignalLevel{0.0};
79 double mPixelCount{1.0};
80 double mPixelIntensity{1.0};
81 size_t mTruthIndex{0};
82 WsfStringId mTruthType{nullptr};
83 WsfStringId mTruthSide{nullptr};
84 };
85
86 using ObjectList = std::vector<Object>;
87 using ObjectListIter = std::vector<Object>::iterator;
88
89 WsfImage() = default;
90 WsfImage(WsfSensor* aOriginatingSensorPtr);
91
92 virtual ~WsfImage() = default;
93
94 virtual WsfImage* Clone() const;
95
96 const char* GetScriptClassName() const override { return "WsfImage"; }
97
98 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
99
101 double GetMessageDataTag() const { return mMessageDataTag; }
102
104 void SetMessageDataTag(double aMessageDataTag) { mMessageDataTag = aMessageDataTag; }
105
112 int GetMessageLength() const { return mMessageLength; }
113 void SetMessageLength(int aMessageLength) { mMessageLength = aMessageLength; }
114
116 void GetOriginatorLocationWCS(double aOriginatorLocationWCS[3]) const;
117 void SetOriginatorLocationWCS(const double aOriginatorLocationWCS[3]);
118
120 void GetCenterLocationWCS(double aCenterLocationWCS[3]) const;
121 void SetCenterLocationWCS(const double aCenterLocationWCS[3]);
122
124 double GetImageTime() const { return mImageTime; }
125 void SetImageTime(double aImageTime) { mImageTime = aImageTime; }
126
134 unsigned int GetImageNumber() const { return mImageNumber; }
135 void SetImageNumber(unsigned int aImageNumber) { mImageNumber = aImageNumber; }
136
139 unsigned int GetStreamNumber() const { return mStreamNumber; }
140 void SetStreamNumber(unsigned int aStreamNumber) { mStreamNumber = aStreamNumber; }
141
143 size_t GetPlatformIndex() const { return mPlatformIndex; }
144
146 WsfStringId GetPlatformNameId() const { return mPlatformNameId; }
147
149 WsfStringId GetPlatformTypeId() const { return mPlatformTypeId; }
150
152 WsfStringId GetSensorNameId() const { return mSensorNameId; }
153
155 WsfStringId GetSensorTypeId() const { return mSensorTypeId; }
156
158 WsfStringId GetSensorModeId() const { return mSensorModeId; }
159
162 double GetFrameTime() const { return mFrameTime; }
163 void SetFrameTime(double aFrameTime) { mFrameTime = aFrameTime; }
164
166 double GetWidth() const { return mWidth; }
167 void SetWidth(double aWidth) { mWidth = aWidth; }
168
170 double GetHeight() const { return mHeight; }
171 void SetHeight(double aHeight) { mHeight = aHeight; }
172
174 double GetWidthResolution() const { return mWidthResolution; }
175 void SetWidthResolution(double aWidthResolution) { mWidthResolution = aWidthResolution; }
176
178 double GetHeightResolution() const { return mHeightResolution; }
179 void SetHeightResolution(double aHeightResolution) { mHeightResolution = aHeightResolution; }
180
182 double GetNoiseLevel() const { return mNoiseLevel; }
183 void SetNoiseLevel(double aNoiseLevel) { mNoiseLevel = aNoiseLevel; }
184
187 double GetBackgroundLevel() const { return mBackgroundLevel; }
188 void SetBackgroundLevel(double aBackgroundLevel) { mBackgroundLevel = aBackgroundLevel; }
189
191 double GetMinimumLevel() const { return mMinimumLevel; }
192 void SetMinimumLevel(double aMinimumLevel) { mMinimumLevel = aMinimumLevel; }
193
195 double GetMaximumLevel() const { return mMaximumLevel; }
196 void SetMaximumLevel(double aMaximumLevel) { mMaximumLevel = aMaximumLevel; }
197
199
200
201 double GetRangeError() const { return mRangeError; }
203 void SetRangeError(double aRangeError) { mRangeError = aRangeError; }
205 double GetBearingError() const { return mBearingError; }
207 void SetBearingError(double aBearingError) { mBearingError = aBearingError; }
209 double GetElevationError() const { return mElevationError; }
211 void SetElevationError(double aElevationError) { mElevationError = aElevationError; }
213 double GetRangeRateError() const { return mRangeRateError; }
215 void SetRangeRateError(double aRangeRateError) { mRangeRateError = aRangeRateError; }
217
224
225
226 double GetCollectionFactor() const { return mCollectionFactor; }
228 void SetCollectionFactor(double aCollectionFactor) { mCollectionFactor = aCollectionFactor; }
230
232
233
234 double GetTrackQuality() const { return mTrackQuality; }
236 void SetTrackQuality(double aTrackQuality) { mTrackQuality = aTrackQuality; }
238
240
241
242 void AddObject(Object& aObject) { mObjects.push_back(aObject); }
243
245 const ObjectList& GetObjects() const { return mObjects; }
247
248private:
249 double mMessageDataTag{0.0};
250 int mMessageLength{512};
251 size_t mPlatformIndex{0};
252 WsfStringId mPlatformNameId{nullptr};
253 WsfStringId mPlatformTypeId{nullptr};
254 WsfStringId mSensorNameId{nullptr};
255 WsfStringId mSensorTypeId{nullptr};
256 WsfStringId mSensorModeId{nullptr};
259 double mFrameTime{0.0};
261 double mImageTime{0.0};
264 unsigned int mImageNumber{0};
266 unsigned int mStreamNumber{0};
267
268 double mOriginatorLocationWCS[3]{0.0, 0.0, 0.0};
269 double mCenterLocationWCS[3]{0.0, 0.0, 0.0};
270
271 double mWidth{0.0};
272 double mHeight{0.0};
273 double mWidthResolution{0.0};
274 double mHeightResolution{0.0};
275 double mNoiseLevel{0.0};
276 double mBackgroundLevel{0.0};
277 double mMinimumLevel{0.0};
278 double mMaximumLevel{1.0};
279 double mCollectionFactor{1.0};
280 double mTrackQuality{0.5};
281
283
284 double mRangeError{0.0};
285 double mBearingError{0.0};
286 double mElevationError{0.0};
287 double mRangeRateError{0.0};
289
290 ObjectList mObjects;
291};
292
293#endif
pointPtr SetLocationWCS(finalPos.GetData())
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
A nested class that represents the appearance of a single object (platform) in the image.
Definition WsfImage.hpp:40
double GetSignalLevel() const
Get/Set the signal level (absolute, not dB).
Definition WsfImage.hpp:50
void SetTruthSide(WsfStringId aTruthSide)
Definition WsfImage.hpp:74
WsfStringId GetTruthType() const
Get/Set the truth type ID of the platform representing this object.
Definition WsfImage.hpp:69
double GetPixelIntensity() const
Definition WsfImage.hpp:59
WsfStringId GetTruthSide() const
Get/Set the truth side of the platform representing this object.
Definition WsfImage.hpp:73
double GetPixelCount() const
Get/Set the approximate number of pixels occupied by this object.
Definition WsfImage.hpp:54
void SetTruthType(WsfStringId aTruthType)
Definition WsfImage.hpp:70
void SetTruthIndex(unsigned int aTruthIndex)
Definition WsfImage.hpp:64
Object()=default
void GetLocationWCS(double aLocationWCS[3]) const
Get/Set the perceived location of the object in WCS.
Definition WsfImage.cpp:127
void SetPixelCount(double aPixelCount)
Definition WsfImage.hpp:55
size_t GetTruthIndex() const
Get/Set the truth platform index of the platform representing this object.
Definition WsfImage.hpp:63
void SetPixelIntensity(double aPixelIntensity)
Definition WsfImage.hpp:60
void SetSignalLevel(double aSignalLevel)
Definition WsfImage.hpp:51
const char * GetScriptClassName() const override
Definition WsfImage.hpp:96
double GetHeight() const
Get/Set the height of the image (pixels).
Definition WsfImage.hpp:170
void SetMinimumLevel(double aMinimumLevel)
Definition WsfImage.hpp:192
void SetWidth(double aWidth)
Definition WsfImage.hpp:167
WsfStringId GetPlatformTypeId() const
Get the type (ID) of the platform with the sensor that produced this image.
Definition WsfImage.hpp:149
void AddObject(Object &aObject)
Add an object to list of those contained in the image.
Definition WsfImage.hpp:242
void SetImageTime(double aImageTime)
Definition WsfImage.hpp:125
double GetTrackQuality() const
Get the track quality from the mode of the sensor that produced the image.
Definition WsfImage.hpp:234
double GetMessageDataTag() const
Get/Set the message data tag used for tagging the message.
Definition WsfImage.hpp:101
double GetBearingError() const
Get the standard deviation of the error in the bearing measurement.
Definition WsfImage.hpp:205
void SetHeight(double aHeight)
Definition WsfImage.hpp:171
void SetStreamNumber(unsigned int aStreamNumber)
Definition WsfImage.hpp:140
int GetMessageLength() const
Definition WsfImage.hpp:112
WsfStringId GetSensorNameId() const
Get the name (ID) of the sensor that produced this image.
Definition WsfImage.hpp:152
WsfStringId GetSensorModeId() const
Get the name (ID) of the mode of the sensor that was active when this image was produced.
Definition WsfImage.hpp:158
void SetFrameTime(double aFrameTime)
Definition WsfImage.hpp:163
double GetRangeRateError() const
Get the standard deviation of the error in the range rate measurement.
Definition WsfImage.hpp:213
void SetMessageLength(int aMessageLength)
Definition WsfImage.hpp:113
double GetMaximumLevel() const
Get/Set the signal value corresponding to a pixel intensity of 1.0.
Definition WsfImage.hpp:195
double GetNoiseLevel() const
Get/Set the noise signal level.
Definition WsfImage.hpp:182
unsigned int GetStreamNumber() const
Definition WsfImage.hpp:139
const ObjectList & GetObjects() const
Get the list of objects contained in the image.
Definition WsfImage.hpp:245
double GetCollectionFactor() const
Get the collection factor.
Definition WsfImage.hpp:226
unsigned int GetImageNumber() const
Definition WsfImage.hpp:134
void SetNoiseLevel(double aNoiseLevel)
Definition WsfImage.hpp:183
WsfStringId GetSensorTypeId() const
Get the type (ID) of the sensor that produced this image.
Definition WsfImage.hpp:155
double GetHeightResolution() const
Get/Set the height resolution of a pixel (m).
Definition WsfImage.hpp:178
double GetRangeError() const
Get the standard deviation of the error in the range measurement.
Definition WsfImage.hpp:201
std::vector< Object > ObjectList
Definition WsfImage.hpp:86
double GetElevationError() const
Get the standard deviation of the error in the elevation measurement.
Definition WsfImage.hpp:209
size_t GetPlatformIndex() const
Get the platform index of the platform that contains the reporting sensor.
Definition WsfImage.hpp:143
WsfImage()=default
void SetTrackQuality(double aTrackQuality)
Set the track quality from the mode of the sensor that produced the image.
Definition WsfImage.hpp:236
void SetBackgroundLevel(double aBackgroundLevel)
Definition WsfImage.hpp:188
virtual WsfImage * Clone() const
Definition WsfImage.cpp:74
double GetWidthResolution() const
Get/Set the width resolution of a pixel (m).
Definition WsfImage.hpp:174
double GetMinimumLevel() const
Get/Set the signal value corresponding to a pixel intensity of 0.0.
Definition WsfImage.hpp:191
void SetWidthResolution(double aWidthResolution)
Definition WsfImage.hpp:175
double GetImageTime() const
Get/Set the simulation when time the image was taken.
Definition WsfImage.hpp:124
double GetWidth() const
Get/Set the width of the image (pixels).
Definition WsfImage.hpp:166
std::vector< Object >::iterator ObjectListIter
Definition WsfImage.hpp:87
double GetFrameTime() const
Definition WsfImage.hpp:162
void SetMessageDataTag(double aMessageDataTag)
Set the 'data Id' to be used when the track is attached to a message.
Definition WsfImage.hpp:104
void SetElevationError(double aElevationError)
Set the standard deviation of the error in the elevation measurement.
Definition WsfImage.hpp:211
void SetBearingError(double aBearingError)
Set the standard deviation of the error in the bearing measurement.
Definition WsfImage.hpp:207
void SetMaximumLevel(double aMaximumLevel)
Definition WsfImage.hpp:196
virtual ~WsfImage()=default
void SetHeightResolution(double aHeightResolution)
Definition WsfImage.hpp:179
void SetRangeError(double aRangeError)
Set the standard deviation of the error in the range measurement.
Definition WsfImage.hpp:203
void SetImageNumber(unsigned int aImageNumber)
Definition WsfImage.hpp:135
double GetBackgroundLevel() const
Definition WsfImage.hpp:187
WsfStringId GetPlatformNameId() const
Get the name (ID) of the platform with the sensor that produced this image.
Definition WsfImage.hpp:146
void SetRangeRateError(double aRangeRateError)
Set the standard deviation of the error in the range rate measurement.
Definition WsfImage.hpp:215
void SetCollectionFactor(double aCollectionFactor)
Set the collection factor.
Definition WsfImage.hpp:228
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfProcessor.hpp:39
Definition WsfSensor.hpp:92
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Copyrights Multiple, All Rights Reserved