VR-Vantage
Loading...
Searching...
No Matches
rfxSarMessage.h
Go to the documentation of this file.
1// ******************************************************************************
2// ** Copyright (c) 2020 MAK Technologies, Inc.
3// ** All rights reserved.
4// ******************************************************************************
5
9
10#pragma once
11
12#include "export.h"
13#include "rfxMessage.h"
15#include <matrix/vlVector.h>
16#include <matrix/vlTaitBryan.h>
17
18#include <string>
19
20namespace makRadarFx
21{
22
25{
26 public:
29 virtual ~DtSarRequest();
30
34 virtual void useObserverAsHost();
35
38 virtual void setOwnshipLocation(DtVector location);
39 virtual DtVector ownshipLocation();
40
43 virtual void setOwnshipEntityId(const std::string& name);
44 virtual std::string ownshipEntityId();
45
47 virtual bool isUsingObserverAsHost();
48 virtual bool isUsingEntityAsHost();
50
53 virtual void useObserverForTarget();
54
57 virtual void setTargetEntityId(const std::string& name);
58 virtual std::string targetEntityId();
59
62 virtual void setTargetLocation(DtVector location);
63 virtual DtVector targetLocation();
64
67 virtual bool isUsingEntityForTarget();
69
72 virtual void setRadarOffsetLocation(DtVector offset);
73 virtual DtVector radarOffsetLocation();
74
77 virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation);
78 virtual DtTaitBryan radarOffsetOrientation();
79
81 virtual void setRadarSystemName(const std::string& name);
82 virtual std::string radarSystemName();
83
85 virtual void setCrossrange(float width);
86 virtual float crossrange();
87
89 virtual void setDownrange(float height);
90 virtual float downrange();
91
94 virtual bool isAgcPowerEnabled() const;
95
97 virtual void setPower(float power);
98 virtual float power();
99
101 virtual void setImageSize(const DtImageSize& size);
103
105 virtual void setImageFormat(DtImageFormat format);
107
111
113 virtual void setImageRotation(DtImageRotation rotate);
115
117 virtual void setImageReturnMethod(unsigned int returnFlags);
118 virtual unsigned int imageReturnMethod();
119
122 virtual void setImageSavePath(const std::string& filename);
123 virtual std::string imageSavePath();
124
129 virtual void setImageFilename(const std::string& filename);
130 virtual std::string imageFilename();
131
134 virtual void setRestoreState(bool restoreState);
135 virtual bool restoreState();
136
138 void setOwnshipSpeed(float speed);
140
142 virtual int messageSize() const;
144 static DtBaseMessage* decode(unsigned char* buffer, int length);
147
149 virtual std::string csvHeader() const;
150
153 virtual std::string csvString() const;
154
155 protected:
156 virtual void serialize(DtStreamWriter& writer);
157 virtual void deserialize(DtStreamReader& reader);
158
159
167
168 std::string myOwnshipName;
169 std::string myTargetName;
172
175 std::string myRadarName;
178 float myPower;
183 unsigned int myReturnMethod;
184
186
188
189 std::string myImageSavePath;
190 std::string myImageFilename;
191
192};
193
194
197{
198 public:
201 virtual ~DtSarResponse();
202
206
210
212 virtual void setReturnMethod(unsigned int method);
213 virtual unsigned int returnMethod();
214
216 virtual void setImageFormat(DtImageFormat format);
218
220 virtual void setImageSize(const DtImageSize& size);
222
226
228 virtual void setFilename(const std::string& filename);
229 virtual std::string filename();
230
232 virtual int dataLength();
233
235 virtual void setData(unsigned char* buffer, int length);
236 virtual unsigned char* data();
237
239 virtual void setOwnshipLocation(DtVector location);
240 virtual DtVector ownshipLocation();
241
243 virtual void setOwnshipOrientation(DtTaitBryan orientation);
244 virtual DtTaitBryan ownshipOrientation();
245
247 virtual void setSystemTime(double time);
248 virtual double systemTime();
249
251 virtual void setCenterPosition(double lat, double lon, double alt);
252 virtual void getCenterPosition(double& lat, double& lon, double& alt);
253
255 virtual void setSensorViewDirection(double azimuth, double elevation);
256 virtual void getSensorViewDirection(double& azimuth, double& elevation);
257
259 virtual int messageSize() const;
261 static DtBaseMessage* decode(unsigned char* buffer, int length);
264
266 virtual std::string csvHeader() const;
267
270 virtual std::string csvString() const;
271
272 protected:
273 virtual void serialize(DtStreamWriter& writer);
274 virtual void deserialize(DtStreamReader& reader);
275
279 unsigned int myReturnMethod;
282 std::string myFilename;
284 unsigned char* myData;
285
294};
295}
296
DtBaseMessage is the base class for all messages that can be sent between the server and the client.
Definition rfxMessage.h:26
DtImageRequest(unsigned int messageType)
CTOR/DTOR.
DtImageResponse(unsigned int messageType)
CTOR/DTOR.
virtual std::string ownshipEntityId()
virtual void setPower(float power)
Radar system power setting in Watts.
std::string myOwnshipName
Definition rfxSarMessage.h:168
bool myIsAgcPowerEnabled
Definition rfxSarMessage.h:166
virtual DtVector ownshipLocation()
float myCrossrange
Definition rfxSarMessage.h:176
DtVector myRadarOffsetLocation
Definition rfxSarMessage.h:173
virtual void setOwnshipEntityId(const std::string &name)
If the ownship is hosted by the simulation system, we can use its global simulation name to look it u...
bool myUseObserverAsHost
Definition rfxSarMessage.h:160
DtTaitBryan myRadarOffsetOrientation
Definition rfxSarMessage.h:174
std::string myRadarName
Definition rfxSarMessage.h:175
virtual void setTargetLocation(DtVector location)
this is the target that we would like to look at. Location format is latitude/longitude/altitude (in ...
unsigned int myReturnMethod
Definition rfxSarMessage.h:183
virtual bool isUsingLocationForTarget()
float myDownrange
Definition rfxSarMessage.h:177
virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation)
the offset orientation of the sensor from the hosting entite's orientation. Only valid when a hosting...
bool myUseObserverForTarget
Definition rfxSarMessage.h:163
DtImageFormat myImageFormat
Definition rfxSarMessage.h:180
virtual void setRadarSystemName(const std::string &name)
The name of the sensor system to use. This must match one of the sensors that the RadarFX server has ...
virtual bool isAgcPowerEnabled() const
virtual void serialize(DtStreamWriter &writer)
virtual void useObserverForTarget()
calling this function causes the message to use the current observer's view to determine the target f...
float myPower
Definition rfxSarMessage.h:178
virtual bool restoreState()
DtImageDataType myImageDataType
Definition rfxSarMessage.h:181
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
virtual std::string csvHeader() const
Return a string representation of the CSV header for this message.
virtual void setRestoreState(bool restoreState)
Lets the server know that it should restore the display/window/observer state after an image capture ...
bool myRestoreState
Definition rfxSarMessage.h:185
virtual DtVector radarOffsetLocation()
void setOwnshipSpeed(float speed)
speed of the observer when the SAR image is requested.
virtual void setImageRotation(DtImageRotation rotate)
Requested rotation of the image.
virtual std::string targetEntityId()
virtual std::string imageFilename()
virtual void setDownrange(float height)
Size of the downrange in meters for the target area.
virtual void setImageSavePath(const std::string &filename)
Requested path for image if it is to be saved by the server If the path does not exist,...
virtual DtImageRotation imageRotation()
bool myUseEntityAsTarget
Definition rfxSarMessage.h:164
bool myUseAbsoluteTarget
Definition rfxSarMessage.h:165
virtual std::string radarSystemName()
virtual bool isUsingAbsoluteLocation()
virtual void deserialize(DtStreamReader &reader)
virtual std::string imageSavePath()
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual DtTaitBryan radarOffsetOrientation()
DtVector myTargetLocation
Definition rfxSarMessage.h:171
virtual void useObserverAsHost()
calling this function causes the message to use the current observer's position and orientation for t...
virtual float crossrange()
std::string myImageSavePath
Definition rfxSarMessage.h:189
virtual DtImageFormat imageFormat()
DtVector myOwnshipLocation
Definition rfxSarMessage.h:170
virtual bool isUsingEntityForTarget()
virtual int messageSize() const
size of the message
virtual void setTargetEntityId(const std::string &name)
If the ownship is the target of the sensor, we can use its global simulation name to look it up.
virtual DtImageDataType imageDataType()
virtual float power()
virtual void setImageFilename(const std::string &filename)
Requested filename for image if it is to be saved by the server If this is not set,...
virtual void setImageSize(const DtImageSize &size)
Requested image pixel size. This may not be the returned size due to image rotation.
virtual bool isUsingObserverForTarget()
functions to determine how to place the target
virtual std::string csvString() const
Return a CSV string representation of this RadarFx message The string expresses all the values in the...
virtual DtImageSize imageSize()
std::string myImageFilename
Definition rfxSarMessage.h:190
virtual float downrange()
DtImageRotation myImageRotation
Definition rfxSarMessage.h:182
virtual void setOwnshipLocation(DtVector location)
if the ownship is not hosted in the simulation system, we can explicitly state where we want to perfo...
virtual void setRadarOffsetLocation(DtVector offset)
the offset location of the sensor on the hosting entity. Only valid when a hosting entity is defined
DtImageSize myImageSize
Definition rfxSarMessage.h:179
float myOwnshipSpeed
Definition rfxSarMessage.h:187
bool myUseAbsoluteOwnship
Definition rfxSarMessage.h:162
std::string myTargetName
Definition rfxSarMessage.h:169
virtual DtVector targetLocation()
virtual unsigned int imageReturnMethod()
virtual void setCrossrange(float width)
Size of the crossrange in meters for the target area.
virtual bool isUsingEntityAsHost()
virtual void setImageDataType(DtImageDataType type)
Requested data type of the returned image data. Only available for RAW/NITF image types.
virtual void setImageFormat(DtImageFormat format)
Requested format of the returned image data.
bool myUseEntityAsHost
Definition rfxSarMessage.h:161
virtual void setImageReturnMethod(unsigned int returnFlags)
Bitfield for image data return types.
virtual bool isUsingObserverAsHost()
functions to determine how to place the sensor
virtual void setIsAgcPowerEnabled(bool isAgcPowerEnabled)
Whether or not to use AGC for Power.
virtual DtImageDataType imageDataType()
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
virtual void setFilename(const std::string &filename)
filename of saved image if it was saved on the server
double myCenterLon
Definition rfxSarMessage.h:290
DtTaitBryan myOwnshipOrientation
Definition rfxSarMessage.h:287
DtImageDataType myImageDataType
Definition rfxSarMessage.h:281
virtual void getSensorViewDirection(double &azimuth, double &elevation)
virtual void setError(DtImageError error)
Error value if there is one.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
DtImageSize myImageSize
Definition rfxSarMessage.h:278
virtual DtImageSize imageSize()
virtual void setImageSize(const DtImageSize &size)
Size of the image returned by the server.
DtVector myOwnshipLocation
Definition rfxSarMessage.h:286
double myCenterLat
Definition rfxSarMessage.h:289
DtImageWarning myWarning
Definition rfxSarMessage.h:277
double myCenterAlt
Definition rfxSarMessage.h:291
double mySensorDirectionElevation
Definition rfxSarMessage.h:293
virtual void serialize(DtStreamWriter &writer)
virtual void setWarning(DtImageWarning error)
Warning value if there is one.
DtImageFormat myImageFormat
Definition rfxSarMessage.h:280
virtual std::string filename()
virtual void setOwnshipOrientation(DtTaitBryan orientation)
ownship orientation at the time of the request being processed
virtual void setSensorViewDirection(double azimuth, double elevation)
the sensor view direction is azimuth from north and elevation from level in Radians.
virtual void setCenterPosition(double lat, double lon, double alt)
the center hit point of the view vector for this response
DtImageError myError
Definition rfxSarMessage.h:276
virtual void setSystemTime(double time)
UTC time of the request being processed.
virtual unsigned char * data()
virtual int messageSize() const
size of the message
virtual DtTaitBryan ownshipOrientation()
virtual std::string csvHeader() const
Return a string representation of the CSV header for this message.
virtual double systemTime()
virtual int dataLength()
Size of data for the returned image.
virtual DtImageWarning warning()
double mySystemTime
Definition rfxSarMessage.h:288
unsigned int myReturnMethod
Definition rfxSarMessage.h:279
virtual void setImageFormat(DtImageFormat format)
Image return format.
virtual void setOwnshipLocation(DtVector location)
ownship location at the time of the request being processed
double mySensorDirectionAzimuth
Definition rfxSarMessage.h:292
int myDataLength
Definition rfxSarMessage.h:283
virtual unsigned int returnMethod()
std::string myFilename
Definition rfxSarMessage.h:282
virtual void setImageDataType(DtImageDataType type)
Image data type Only available for RAW/NITF image types.
virtual void setData(unsigned char *buffer, int length)
Image data returned by the server. This message class will manage this memory.
virtual DtImageError error()
virtual DtVector ownshipLocation()
virtual std::string csvString() const
Return a CSV string representation of this RadarFx message The string expresses all the values in the...
virtual void setReturnMethod(unsigned int method)
Image return method that is used.
virtual DtImageFormat imageFormat()
virtual void deserialize(DtStreamReader &reader)
unsigned char * myData
Definition rfxSarMessage.h:284
virtual void getCenterPosition(double &lat, double &lon, double &alt)
Instances of DtStreamReader decode values from a byte array this assumes the data in the byte stream ...
Definition byteStream.h:28
Instances of DtStreamWriter encode values into a byte array this writes the data to the stream in lit...
Definition byteStream.h:75
#define RFX_DLL_SHARED
Definition include/radarFxShared/export.h:15
Definition radarFxConnector.h:28
DtImageRotation
Definition rfxImageMessage.h:23
DtImageFormat
Definition rfxImageMessage.h:22
DtImageError
Definition rfxImageMessage.h:46
DtImageDataType
Definition rfxImageMessage.h:25
DtImageWarning
Definition rfxImageMessage.h:47
Defines the messages requesting and responding SAR images from the server.
Defines the base class for all messages that can be sent between the server and the client.
Definition rfxImageMessage.h:28