VR-Engage  2.2
Loading...
Searching...
No Matches
rfxIsarMessage.h
Go to the documentation of this file.
1// ******************************************************************************
2// ** Copyright (c) 2025 MAK Technologies
3// ** All rights reserved.
4// ******************************************************************************
5
6//! \file rfxIsarMessage.h
7//! \brief Defines the request and response messages for Inverse Synthetic Aperture Radar (ISAR) images
8//! \ingroup vreRadarFxShared
9//!
10//! This file contains message classes for requesting Inverse Synthetic Aperture Radar (ISAR)
11//! images from the server and processing the image responses. ISAR differs from SAR in that
12//! it focuses on imaging moving targets rather than stationary terrain. These classes extend
13//! the base image request and response classes from rfxImageMessage.h.
14
15#pragma once
16
17#include "export.h"
18#include "rfxMessage.h"
20
21#include <matrix/vlVector.h>
22#include <matrix/vlTaitBryan.h>
23
24#include <string>
25
26namespace makRadarFx
27{
28
29//! \brief Request message for Inverse Synthetic Aperture Radar (ISAR) images
30//!
31//! This class encapsulates a request for an Inverse Synthetic Aperture Radar (ISAR) image from
32//! the RadarFX server. It contains parameters that specify the sensor platform position,
33//! target entity, radar system settings, and image format settings. ISAR images provide
34//! detailed radar imagery of moving objects and vehicles, using the target's motion to
35//! create the synthetic aperture.
37{
38public:
39 //! \brief Default constructor
40 //!
41 //! Initializes a new ISAR image request message with default settings
43
44 //! \brief Virtual destructor
45 virtual ~DtIsarRequest();
46
47 //! \brief calling this function causes the message to use the current observer's position and orientation for
48 //! the SAR image setup. The client doees not need to set an ownship location or target location if using this
49 //! method to orient the sensor.
50 virtual void useObserverAsHost();
51
52 //! \brief if the ownship is not hosted in the simulation system, we can explicitly state where we want to
53 //! perform the elevation test from
54 virtual void setOwnshipLocation(DtVector location);
55 virtual DtVector ownshipLocation();
56
57 //! \brief If the ownship is hosted by the simulation system, we can use its global simulation name
58 //! to look it up
59 virtual void setOwnshipEntityId(const std::string& name);
60 virtual std::string ownshipEntityId();
61
62 //! \brief functions to determine how to place the sensor
63 virtual bool isUsingObserverAsHost();
64 virtual bool isUsingEntityAsHost();
66
67 //! \brief calling this function causes the message to use the current observer's view to determine the target for
68 //! the SAR image setup.
69 virtual void useObserverForTarget();
70
71 //! \brief If the ownship is the target of the sensor, we can use its global simulation name
72 //! to look it up
73 virtual void setTargetEntityId(const std::string& name);
74 virtual std::string targetEntityId();
75
76 //! \brief this is the target that we would like to look at. Location format is latitude/longitude/altitude (in
77 //! degrees/meters). the altitude of the target location is not required.
78 virtual void setTargetLocation(DtVector location);
79 virtual DtVector targetLocation();
80
81 //! \brief functions to determine how to place the target
83 virtual bool isUsingEntityForTarget();
85
86 //! \brief the offset location of the sensor on the hosting entity. Only valid when a hosting entity is
87 //! defined
88 virtual void setRadarOffsetLocation(DtVector offset);
89 virtual DtVector radarOffsetLocation();
90
91 //! \brief the offset orientation of the sensor from the hosting entite's orientation. Only valid when a hosting
92 //! entity is defined
93 virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation);
94 virtual DtTaitBryan radarOffsetOrientation();
95
96 //! \brief The name of the sensor system to use. This must match one of the sensors that the RadarFX server has
97 //! configured
98 virtual void setRadarSystemName(const std::string& name);
99 virtual std::string radarSystemName();
100
101 //! \brief Whether or not to use AGC for Power
103 virtual bool isAgcPowerEnabled() const;
104
105 //! \brief Radar system power setting in Watts
106 virtual void setPower(float power);
107 virtual float power();
108
109 //! \brief Requested image pixel size. This may not be the returned size due to image rotation
110 virtual void setImageSize(const DtImageSize& size);
112
113 //! \brief Requested data type of the returned image data. Only available for RAW/NITF image types
116
117 //! \brief Requested format of the returned image data
118 virtual void setImageFormat(DtImageFormat format);
120
121 //! \brief Bitfield for image data return types.
122 virtual void setImageReturnMethod(unsigned int returnFlags);
123 virtual unsigned int imageReturnMethod();
124
125 //! \brief Requested path for image if it is to be saved by the server
126 //! If the path does not exist, the server will attempt to create it.
127 virtual void setImageSavePath(const std::string& filename);
128 virtual std::string imageSavePath();
129
130 //! \brief Requested filename for image if it is to be saved by the server
131 //! If this is not set, then the date/timestamp will be used as the filename
132 //! if this is set, then the filename will be used plus a date/time stamp
133 //! and the extension will be determined automatically
134 virtual void setImageFilename(const std::string& filename);
135 virtual std::string imageFilename();
136
137 //! \brief accessors for the number of images/responses to generate
138 virtual int numRequestedImages();
139 virtual void setNumRequestedImages(int numImages);
140
141 //! \brief accessors for the view magnification to use for this request
142 virtual float viewMagnification();
143 virtual void setViewMagnification(float zoom);
144
145 //! \brief accessors for the integratino time to use for this request.
146 virtual double integrationTime();
147 virtual void setIntegrationTime(double time);
148
149
150 //! \brief size of the message
151 virtual int messageSize();
152 //! \brief decode a message. Used by the factory
153 static DtBaseMessage* decode(unsigned char* buffer, int length);
154 //! \brief clone a message. Caller of function is responsible managing this memory
156
157protected:
158 virtual void serialize(DtStreamWriter& writer);
159 virtual void deserialize(DtStreamReader& reader);
160
161
169
170 std::string myOwnshipName;
171 std::string myTargetName;
174
177 std::string myRadarName;
178 float myPower;
182 unsigned int myReturnMethod;
183 std::string myImageSavePath;
184 std::string myImageFilename;
187
189};
190
191
192//! \brief DtIsarResponse is the returned image data by the server
194{
195public:
196 //! \brief CTOR/DTOR
199
200 //! \brief Error value if there is one
203
204 //! \brief Warning value if there is one
207
208 //! \brief Image return method that is used
209 virtual void setReturnMethod(unsigned int method);
210 virtual unsigned int returnMethod();
211
212 //! \brief Image return format
213 virtual void setImageFormat(DtImageFormat format);
215
216 //! \brief Size of the image returned by the server
217 virtual void setImageSize(const DtImageSize& size);
219
220 //! \brief Image data type Only available for RAW/NITF image types
223
224 //! \brief filename of saved image if it was saved on the server
225 virtual void setFilename(const std::string& filename);
226 virtual std::string filename();
227
228 //! \brief Size of data for the returned image
229 virtual int dataLength();
230
231 //! \brief Image data returned by the server. This message class will manage this memory.
232 virtual void setData(unsigned char* buffer, int length);
233 virtual unsigned char* data();
234
235 //! \brief 0 starting index for this image response
236 virtual void setImageIndex(int index);
237 virtual int imageIndex();
238
239 //! \brief ownship location at the time of the request being processed
240 virtual void setOwnshipLocation(DtVector location);
241 virtual DtVector ownshipLocation();
242
243 //! \brief ownship orientation at the time of the request being processed
244 virtual void setOwnshipOrientation(DtTaitBryan orientation);
245 virtual DtTaitBryan ownshipOrientation();
246
247 //! \brief UTC time of the request being processed
248 virtual void setSystemTime(double time);
249 virtual double systemTime();
250
251 //! \brief the center hit point of the view vector for this response
252 virtual void setCenterPosition(double lat, double lon, double alt);
253 virtual void getCenterPosition(double& lat, double& lon, double& alt);
254
255 //! \brief the sensor view direction is azimuth from north and elevation from level in Radians.
256 virtual void setSensorViewDirection(double azimuth, double elevation);
257 virtual void getSensorViewDirection(double& azimuth, double& elevation);
258
259 //! \brief size of the message
260 virtual int messageSize();
261 //! \brief decode a message. Used by the factory
262 static DtBaseMessage* decode(unsigned char* buffer, int length);
263 //! \brief clone a message. Caller of function is responsible managing this memory
265
266protected:
267 virtual void serialize(DtStreamWriter& writer);
268 virtual void deserialize(DtStreamReader& reader);
269
273 unsigned int myReturnMethod;
276 std::string myFilename;
278 unsigned char* myData;
288};
289} // namespace makRadarFx
Base class for all RadarFX messages.
Definition rfxMessage.h:35
DtImageRequest()
Default constructor.
DtImageResponse()
Default constructor.
virtual std::string imageFilename()
std::string myRadarName
Definition rfxIsarMessage.h:177
bool myUseAbsoluteTarget
Definition rfxIsarMessage.h:167
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
virtual bool isAgcPowerEnabled() const
virtual void setIsAgcPowerEnabled(bool isAgcPowerEnabled)
Whether or not to use AGC for Power.
float myViewMagnification
Definition rfxIsarMessage.h:186
DtTaitBryan myRadarOffsetOrientation
Definition rfxIsarMessage.h:176
virtual DtVector targetLocation()
virtual void setImageSize(const DtImageSize &size)
Requested image pixel size. This may not be the returned size due to image rotation.
DtVector myOwnshipLocation
Definition rfxIsarMessage.h:172
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 std::string targetEntityId()
DtIsarRequest()
Default constructor.
virtual void useObserverAsHost()
calling this function causes the message to use the current observer's position and orientation for t...
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,...
DtVector myTargetLocation
Definition rfxIsarMessage.h:173
virtual bool isUsingAbsoluteLocation()
virtual void setImageReturnMethod(unsigned int returnFlags)
Bitfield for image data return types.
virtual bool isUsingEntityAsHost()
bool myUseObserverAsHost
Definition rfxIsarMessage.h:162
virtual void deserialize(DtStreamReader &reader)
Deserializes message data from a stream reader.
virtual float viewMagnification()
accessors for the view magnification to use for this request
std::string myOwnshipName
Definition rfxIsarMessage.h:170
virtual DtTaitBryan radarOffsetOrientation()
virtual std::string imageSavePath()
unsigned int myReturnMethod
Definition rfxIsarMessage.h:182
virtual DtVector ownshipLocation()
virtual void setTargetLocation(DtVector location)
this is the target that we would like to look at. Location format is latitude/longitude/altitude (in ...
virtual DtImageSize imageSize()
virtual bool isUsingLocationForTarget()
virtual bool isUsingEntityForTarget()
bool myUseAbsoluteOwnship
Definition rfxIsarMessage.h:164
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 setIntegrationTime(double time)
int myNumRequestedImages
Definition rfxIsarMessage.h:185
bool myIsAgcPowerEnabled
Definition rfxIsarMessage.h:168
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.
bool myUseEntityAsHost
Definition rfxIsarMessage.h:163
DtImageFormat myImageFormat
Definition rfxIsarMessage.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 ...
double myIntegrationTime
Definition rfxIsarMessage.h:188
virtual DtImageDataType imageDataType()
std::string myImageFilename
Definition rfxIsarMessage.h:184
virtual double integrationTime()
accessors for the integratino time to use for this request.
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 rfxIsarMessage.h:165
virtual bool isUsingObserverAsHost()
functions to determine how to place the sensor
DtVector myRadarOffsetLocation
Definition rfxIsarMessage.h:175
virtual void setNumRequestedImages(int numImages)
virtual DtImageFormat imageFormat()
virtual DtVector radarOffsetLocation()
virtual std::string radarSystemName()
virtual std::string ownshipEntityId()
float myPower
Definition rfxIsarMessage.h:178
std::string myTargetName
Definition rfxIsarMessage.h:171
virtual void setRadarOffsetLocation(DtVector offset)
the offset location of the sensor on the hosting entity. Only valid when a hosting entity is defined
virtual unsigned int imageReturnMethod()
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual bool isUsingObserverForTarget()
functions to determine how to place the target
virtual void setImageDataType(DtImageDataType type)
Requested data type of the returned image data. Only available for RAW/NITF image types.
DtImageSize myImageSize
Definition rfxIsarMessage.h:179
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...
DtImageDataType myImageDataType
Definition rfxIsarMessage.h:181
virtual int numRequestedImages()
accessors for the number of images/responses to generate
virtual void setViewMagnification(float zoom)
std::string myImageSavePath
Definition rfxIsarMessage.h:183
virtual int messageSize()
size of the message
virtual void useObserverForTarget()
calling this function causes the message to use the current observer's view to determine the target f...
bool myUseEntityAsTarget
Definition rfxIsarMessage.h:166
virtual ~DtIsarRequest()
Virtual destructor.
virtual void serialize(DtStreamWriter &writer)
Serializes the message data to a stream writer.
virtual void setPower(float power)
Radar system power setting in Watts.
virtual void setImageFormat(DtImageFormat format)
Requested format of the returned image data.
DtTaitBryan myOwnshipOrientation
Definition rfxIsarMessage.h:281
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
DtImageError myError
Definition rfxIsarMessage.h:270
virtual DtImageFormat imageFormat()
int myImageIndex
Definition rfxIsarMessage.h:279
virtual DtImageError error()
virtual void getCenterPosition(double &lat, double &lon, double &alt)
virtual void setOwnshipLocation(DtVector location)
ownship location at the time of the request being processed
virtual int dataLength()
Size of data for the returned image.
virtual DtVector ownshipLocation()
virtual void setImageSize(const DtImageSize &size)
Size of the image returned by the server.
virtual void setOwnshipOrientation(DtTaitBryan orientation)
ownship orientation at the time of the request being processed
double myCenterAlt
Definition rfxIsarMessage.h:285
DtImageWarning myWarning
Definition rfxIsarMessage.h:271
virtual unsigned int returnMethod()
virtual void setImageDataType(DtImageDataType type)
Image data type Only available for RAW/NITF image types.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual unsigned char * data()
DtImageDataType myImageDataType
Definition rfxIsarMessage.h:275
DtVector myOwnshipLocation
Definition rfxIsarMessage.h:280
virtual void setSensorViewDirection(double azimuth, double elevation)
the sensor view direction is azimuth from north and elevation from level in Radians.
DtImageSize myImageSize
Definition rfxIsarMessage.h:272
virtual void setSystemTime(double time)
UTC time of the request being processed.
double mySensorDirectionElevation
Definition rfxIsarMessage.h:287
virtual void setImageIndex(int index)
0 starting index for this image response
virtual void serialize(DtStreamWriter &writer)
Serializes the message data to a stream writer.
virtual void setWarning(DtImageWarning error)
Warning value if there is one.
virtual void getSensorViewDirection(double &azimuth, double &elevation)
int myDataLength
Definition rfxIsarMessage.h:277
virtual void setReturnMethod(unsigned int method)
Image return method that is used.
double myCenterLat
Definition rfxIsarMessage.h:283
virtual void setCenterPosition(double lat, double lon, double alt)
the center hit point of the view vector for this response
double mySensorDirectionAzimuth
Definition rfxIsarMessage.h:286
virtual void deserialize(DtStreamReader &reader)
Deserializes message data from a stream reader.
double myCenterLon
Definition rfxIsarMessage.h:284
unsigned int myReturnMethod
Definition rfxIsarMessage.h:273
unsigned char * myData
Definition rfxIsarMessage.h:278
virtual void setData(unsigned char *buffer, int length)
Image data returned by the server. This message class will manage this memory.
virtual DtTaitBryan ownshipOrientation()
virtual void setError(DtImageError error)
Error value if there is one.
virtual DtImageDataType imageDataType()
double mySystemTime
Definition rfxIsarMessage.h:282
virtual DtImageSize imageSize()
virtual DtImageWarning warning()
std::string myFilename
Definition rfxIsarMessage.h:276
virtual double systemTime()
DtImageFormat myImageFormat
Definition rfxIsarMessage.h:274
virtual void setFilename(const std::string &filename)
filename of saved image if it was saved on the server
virtual int messageSize()
size of the message
virtual std::string filename()
virtual void setImageFormat(DtImageFormat format)
Image return format.
Stream reader for decoding values from a byte array in little endian format.
Definition byteStream.h:32
Stream writer for encoding values into a byte array in little endian format.
Definition byteStream.h:159
Defines export macros for the RadarFx Shared library.
#define RFX_DLL_SHARED
Export/import macro for non-Windows platforms (empty)
Definition export.h:25
Definition radarFxConnectorDriver.h:21
DtImageFormat
Image format enumeration for radar images.
Definition rfxImageMessage.h:29
DtImageError
Error codes for radar image responses.
Definition rfxImageMessage.h:119
DtImageDataType
Image data type enumeration.
Definition rfxImageMessage.h:61
DtImageWarning
Warning codes for radar image responses.
Definition rfxImageMessage.h:131
Defines common base classes and types for all radar image messages.
Defines the base message class for RadarFX client-server communication.
Image dimensions structure.
Definition rfxImageMessage.h:71