VR-Engage  2.2
Loading...
Searching...
No Matches
rfxMmwMessage.h
Go to the documentation of this file.
1// ******************************************************************************
2// ** Copyright (c) 2025 MAK Technologies
3// ** All rights reserved.
4// ******************************************************************************
5
6//! \file rfxMmwMessage.h
7//! \brief Defines the request and response messages for Millimeter Wave (MMW) radar images
8//! \ingroup vreRadarFxShared
9//!
10//! This file contains message classes for requesting Millimeter Wave (MMW) radar
11//! images from the server and processing the image responses. MMW radar operates
12//! at frequencies between 30-300 GHz, providing high-resolution imagery with the ability
13//! to penetrate certain materials. These classes extend the base image request and
14//! response classes from rfxImageMessage.h.
15
16#pragma once
17
18#include "export.h"
19#include "rfxMessage.h"
21#include <matrix/vlVector.h>
22#include <matrix/vlTaitBryan.h>
23
24#include <string>
25
26namespace makRadarFx
27{
28
29//! \brief Request message for Millimeter Wave (MMW) radar images
30//!
31//! This class encapsulates a request for a Millimeter Wave radar image from
32//! the RadarFX server. It contains parameters that specify the sensor platform position,
33//! target location, radar system settings, and image format settings. MMW radar
34//! provides high-resolution imagery with material penetration capabilities,
35//! making it useful for detection of objects through certain obscurants.
37{
38public:
39 //! \brief Default constructor
40 //!
41 //! Initializes a new MMW image request message with default settings
43
44 //! \brief Virtual destructor
45 virtual ~DtMmwRequest();
46
47 //! \brief calling this function causes the message to use the current observer's position and orientation for
48 //! the MMW 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 format of the returned image data
114 virtual void setImageFormat(DtImageFormat format);
116
117 //! \brief Requested data type of the returned image data. Only available for RAW/NITF image types
120
121 //! \brief Requested rotation of the image
122 virtual void setImageRotation(DtImageRotation rotate);
124
125 //! \brief Bitfield for image data return types.
126 virtual void setImageReturnMethod(unsigned int returnFlags);
127 virtual unsigned int imageReturnMethod();
128
129 //! \brief Requested path for image if it is to be saved by the server
130 //! If the path does not exist, the server will attempt to create it.
131 virtual void setImageSavePath(const std::string& filename);
132 virtual std::string imageSavePath();
133
134 //! \brief Requested filename for image if it is to be saved by the server
135 //! If this is not set, then the date/timestamp will be used as the filename
136 //! if this is set, then the filename will be used plus a date/time stamp
137 //! and the extension will be determined automatically
138 virtual void setImageFilename(const std::string& filename);
139 virtual std::string imageFilename();
140
141 //! \brief Lets the server know that it should restore the display/window/observer state after
142 //! an image capture process is completed.
143 virtual void setRestoreState(bool restoreState);
144 virtual bool restoreState();
145
146 //! \brief lets the server know if it should render the sky or not with this request.
147 virtual void setEnableSky(bool enableSky);
148 virtual bool enableSky();
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
157
158protected:
159 virtual void serialize(DtStreamWriter& writer);
160 virtual void deserialize(DtStreamReader& reader);
161
162
171
172 std::string myOwnshipName;
173 std::string myTargetName;
176
179 std::string myRadarName;
180 float myPower;
185 unsigned int myReturnMethod;
186
188
189 std::string myImageSavePath;
190 std::string myImageFilename;
191};
192
193
194//! \brief DtMmwResponse is the returned image data by the server
196{
197public:
198 //! \brief CTOR/DTOR
200 virtual ~DtMmwResponse();
201
202 //! \brief Error value if there is one
205
206 //! \brief Warning value if there is one
209
210 //! \brief Image return method that is used
211 virtual void setReturnMethod(unsigned int method);
212 virtual unsigned int returnMethod();
213
214 //! \brief Image return format
215 virtual void setImageFormat(DtImageFormat format);
217
218 //! \brief Size of the image returned by the server
219 virtual void setImageSize(const DtImageSize& size);
221
222 //! \brief Image data type Only available for RAW/NITF image types
225
226 //! \brief filename of saved image if it was saved on the server
227 virtual void setFilename(const std::string& filename);
228 virtual std::string filename();
229
230 //! \brief Size of data for the returned image
231 virtual int dataLength();
232
233 //! \brief Image data returned by the server. This message class will manage this memory.
234 virtual void setData(unsigned char* buffer, int length);
235 virtual unsigned char* data();
236
237 //! \brief size of the message
238 virtual int messageSize();
239 //! \brief decode a message. Used by the factory
240 static DtBaseMessage* decode(unsigned char* buffer, int length);
241 //! \brief clone a message. Caller of function is responsible managing this memory
243
244protected:
245 virtual void serialize(DtStreamWriter& writer);
246 virtual void deserialize(DtStreamReader& reader);
247
251 unsigned int myReturnMethod;
254 std::string myFilename;
256 unsigned char* myData;
257};
258} // namespace makRadarFx
Base class for all RadarFX messages.
Definition rfxMessage.h:35
DtImageRequest()
Default constructor.
DtImageResponse()
Default constructor.
virtual void setRadarOffsetLocation(DtVector offset)
the offset location of the sensor on the hosting entity. Only valid when a hosting entity is defined
virtual std::string imageSavePath()
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
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 myUseAbsoluteOwnship
Definition rfxMmwMessage.h:165
DtVector myOwnshipLocation
Definition rfxMmwMessage.h:174
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,...
bool myUseObserverForTarget
Definition rfxMmwMessage.h:166
bool myUseEntityAsTarget
Definition rfxMmwMessage.h:167
DtImageSize myImageSize
Definition rfxMmwMessage.h:181
virtual void setImageRotation(DtImageRotation rotate)
Requested rotation of the image.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
DtVector myRadarOffsetLocation
Definition rfxMmwMessage.h:177
virtual void setImageSize(const DtImageSize &size)
Requested image pixel size. This may not be the returned size due to image rotation.
bool myUseEntityAsHost
Definition rfxMmwMessage.h:164
virtual DtImageSize imageSize()
virtual std::string imageFilename()
unsigned int myReturnMethod
Definition rfxMmwMessage.h:185
virtual DtTaitBryan radarOffsetOrientation()
virtual bool isUsingEntityForTarget()
virtual void setRadarOffsetOrientation(DtTaitBryan offsetOrientation)
the offset orientation of the sensor from the hosting entite's orientation. Only valid when a hosting...
DtImageFormat myImageFormat
Definition rfxMmwMessage.h:182
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 void setRestoreState(bool restoreState)
Lets the server know that it should restore the display/window/observer state after an image capture ...
bool myIsAgcPowerEnabled
Definition rfxMmwMessage.h:170
virtual unsigned int imageReturnMethod()
virtual DtImageFormat imageFormat()
DtVector myTargetLocation
Definition rfxMmwMessage.h:175
DtImageRotation myImageRotation
Definition rfxMmwMessage.h:184
virtual bool isUsingObserverAsHost()
functions to determine how to place the sensor
virtual void setEnableSky(bool enableSky)
lets the server know if it should render the sky or not with this request.
virtual void setIsAgcPowerEnabled(bool isAgcPowerEnabled)
Whether or not to use AGC for Power.
float myPower
Definition rfxMmwMessage.h:180
bool myEnableSky
Definition rfxMmwMessage.h:169
std::string myImageFilename
Definition rfxMmwMessage.h:190
virtual std::string targetEntityId()
virtual int messageSize()
size of the message
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...
virtual void setOwnshipLocation(DtVector location)
if the ownship is not hosted in the simulation system, we can explicitly state where we want to perfo...
bool myUseObserverAsHost
Definition rfxMmwMessage.h:163
std::string myTargetName
Definition rfxMmwMessage.h:173
virtual ~DtMmwRequest()
Virtual destructor.
virtual DtImageRotation imageRotation()
virtual bool isUsingAbsoluteLocation()
virtual float power()
virtual DtVector ownshipLocation()
std::string myImageSavePath
Definition rfxMmwMessage.h:189
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 bool isUsingLocationForTarget()
bool myRestoreState
Definition rfxMmwMessage.h:187
virtual DtVector radarOffsetLocation()
virtual bool isUsingObserverForTarget()
functions to determine how to place the target
virtual DtVector targetLocation()
std::string myRadarName
Definition rfxMmwMessage.h:179
virtual void useObserverAsHost()
calling this function causes the message to use the current observer's position and orientation for t...
virtual bool isAgcPowerEnabled() const
DtMmwRequest()
Default constructor.
virtual DtImageDataType imageDataType()
bool myUseAbsoluteTarget
Definition rfxMmwMessage.h:168
DtImageDataType myImageDataType
Definition rfxMmwMessage.h:183
virtual void setTargetLocation(DtVector location)
this is the target that we would like to look at. Location format is latitude/longitude/altitude (in ...
virtual bool isUsingEntityAsHost()
virtual std::string ownshipEntityId()
virtual void setPower(float power)
Radar system power setting in Watts.
virtual void serialize(DtStreamWriter &writer)
Serializes the message data to a stream writer.
virtual void setImageDataType(DtImageDataType type)
Requested data type of the returned image data. Only available for RAW/NITF image types.
virtual std::string radarSystemName()
virtual bool restoreState()
virtual void useObserverForTarget()
calling this function causes the message to use the current observer's view to determine the target f...
virtual void setImageFormat(DtImageFormat format)
Requested format of the returned image data.
DtTaitBryan myRadarOffsetOrientation
Definition rfxMmwMessage.h:178
virtual void setImageReturnMethod(unsigned int returnFlags)
Bitfield for image data return types.
std::string myOwnshipName
Definition rfxMmwMessage.h:172
virtual void deserialize(DtStreamReader &reader)
Deserializes message data from a stream reader.
virtual bool enableSky()
virtual void setImageDataType(DtImageDataType type)
Image data type Only available for RAW/NITF image types.
virtual void setReturnMethod(unsigned int method)
Image return method that is used.
DtImageWarning myWarning
Definition rfxMmwMessage.h:249
virtual int messageSize()
size of the message
virtual DtImageFormat imageFormat()
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual int dataLength()
Size of data for the returned image.
virtual DtImageError error()
virtual void setData(unsigned char *buffer, int length)
Image data returned by the server. This message class will manage this memory.
virtual void setError(DtImageError error)
Error value if there is one.
virtual std::string filename()
unsigned int myReturnMethod
Definition rfxMmwMessage.h:251
DtImageSize myImageSize
Definition rfxMmwMessage.h:250
virtual void setFilename(const std::string &filename)
filename of saved image if it was saved on the server
virtual void serialize(DtStreamWriter &writer)
Serializes the message data to a stream writer.
std::string myFilename
Definition rfxMmwMessage.h:254
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
unsigned char * myData
Definition rfxMmwMessage.h:256
DtImageDataType myImageDataType
Definition rfxMmwMessage.h:253
DtImageError myError
Definition rfxMmwMessage.h:248
virtual DtImageDataType imageDataType()
virtual DtImageWarning warning()
virtual void setImageSize(const DtImageSize &size)
Size of the image returned by the server.
virtual void setImageFormat(DtImageFormat format)
Image return format.
DtImageFormat myImageFormat
Definition rfxMmwMessage.h:252
virtual unsigned char * data()
int myDataLength
Definition rfxMmwMessage.h:255
virtual DtImageSize imageSize()
virtual unsigned int returnMethod()
virtual void deserialize(DtStreamReader &reader)
Deserializes message data from a stream reader.
virtual void setWarning(DtImageWarning error)
Warning value if there is one.
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
DtImageRotation
Image orientation enumeration.
Definition rfxImageMessage.h:43
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