VR-Engage  2.2
Loading...
Searching...
No Matches
sarSettingsRecord.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright (c) 2025 MAK Technologies
3 * All rights reserved.
4 *****************************************************************************/
5
6//! \file sarSettingsRecord.h
7//! \brief Defines the settings record for storing SAR configuration data
8//! \ingroup sarClient
9
10#pragma once
11
12#include "sarClientPlugin.h"
13
14#include <makArchives/makArchives.h>
15
16namespace makVre
17{
18//! \brief Settings record for storing SAR configuration data
19//!
20//! DtSarSettingsRecord stores all configuration settings related to
21//! Synthetic Aperture Radar (SAR) imagery. It provides storage for ownship
22//! and target positions, image parameters, server settings, and other
23//! SAR-specific options. This class is used for persisting settings and
24//! transferring them between components.
25//! \ingroup sarClient
27{
28public:
29 //! \brief Enumeration for ownship positioning modes
31 {
32 OwnshipModeEntity, //!< Use an entity as the ownship position source
33 OwnshipModeObserver, //!< Use an observer as the ownship position source
34 OwnshipModeAbsolute //!< Use absolute coordinates as the ownship position
35 };
36
37 //! \brief Enumeration for target positioning modes
39 {
40 TargetModeEntity, //!< Use an entity as the target position source
41 TargetModeObserver, //!< Use an observer as the target position source
42 TargetModeAbsolute, //!< Use absolute coordinates as the target position
43 TargetModeMouseClick, //!< Use mouse-clicked position as the target position
44 TargetModeSensor //!< Use a sensor as the target position source
45 };
46
47 //! \brief Default constructor
48 //!
49 //! Initializes all settings to their default values
51
52 //! \brief Copy constructor
53 //! \param orig Source record to copy from
54 //!
55 //! Creates a new record that is a copy of the original
57
58 //! \brief Assignment operator
59 //! \param orig Source record to assign from
60 //! \return Reference to this record
61 //!
62 //! Copies all settings from the original record
64
65 //! \brief Virtual destructor
67
68 //! \brief Sets the ownship mode
69 //! \param val Mode value (typically 0=Entity, 1=Observer, 2=Absolute Position)
70 virtual void setOwnshipMode(int val);
71
72 //! \brief Gets the current ownship mode
73 //! \return Current ownship mode value
74 virtual int ownshipMode() const;
75
76 //! \brief Sets the ownship entity name
77 //! \param val Entity name for the ownship
78 virtual void setOwnshipEntityName(const std::string& val);
79
80 //! \brief Gets the current ownship entity name
81 //! \return Current ownship entity name
82 virtual const std::string& ownshipEntityName() const;
83
84 //! \brief Sets the ownship observer name
85 //! \param val Observer name for the ownship
86 virtual void setOwnshipObserverName(const std::string& val);
87
88 //! \brief Gets the current ownship observer name
89 //! \return Current ownship observer name
90 virtual const std::string& ownshipObserverName() const;
91
92 //! \brief Sets the ownship absolute latitude
93 //! \param val Latitude value
94 virtual void setOwnshipAbsoluteLat(double val);
95
96 //! \brief Gets the current ownship absolute latitude
97 //! \return Current ownship latitude
98 virtual double ownshipAbsoluteLat() const;
99
100 //! \brief Sets the ownship absolute longitude
101 //! \param val Longitude value
102 virtual void setOwnshipAbsoluteLon(double val);
103
104 //! \brief Gets the current ownship absolute longitude
105 //! \return Current ownship longitude
106 virtual double ownshipAbsoluteLon() const;
107
108 //! \brief Sets the ownship absolute altitude
109 //! \param val Altitude value
110 virtual void setOwnshipAbsoluteAlt(double val);
111
112 //! \brief Gets the current ownship absolute altitude
113 //! \return Current ownship altitude
114 virtual double ownshipAbsoluteAlt() const;
115
116 //! \brief Sets the target mode
117 //! \param val Mode value (typically 0=Entity, 1=Observer, 2=Absolute Position, 3=MouseClick, 4=Sensor)
118 virtual void setTargetMode(int val);
119
120 //! \brief Gets the current target mode
121 //! \return Current target mode value
122 virtual int targetMode() const;
123
124 //! \brief Sets the target entity name
125 //! \param val Entity name for the target
126 virtual void setTargetEntityName(const std::string& val);
127
128 //! \brief Gets the current target entity name
129 //! \return Current target entity name
130 virtual const std::string& targetEntityName() const;
131
132 //! \brief Sets the target observer name
133 //! \param val Observer name for the target
134 virtual void setTargetObserverName(const std::string& val);
135
136 //! \brief Gets the current target observer name
137 //! \return Current target observer name
138 virtual const std::string& targetObserverName() const;
139
140 //! \brief Sets the target sensor name
141 //! \param val Sensor name for the target
142 virtual void setTargetSensorName(const std::string& val);
143
144 //! \brief Gets the current target sensor name
145 //! \return Current target sensor name
146 virtual const std::string& targetSensorName() const;
147
148 //! \brief Sets the target absolute latitude
149 //! \param val Latitude value
150 virtual void setTargetAbsoluteLat(double val);
151
152 //! \brief Gets the current target absolute latitude
153 //! \return Current target latitude
154 virtual double targetAbsoluteLat() const;
155
156 //! \brief Sets the target absolute longitude
157 //! \param val Longitude value
158 virtual void setTargetAbsoluteLon(double val);
159
160 //! \brief Gets the current target absolute longitude
161 //! \return Current target longitude
162 virtual double targetAbsoluteLon() const;
163
164 //! \brief Sets the target absolute altitude
165 //! \param val Altitude value
166 virtual void setTargetAbsoluteAlt(double val);
167
168 //! \brief Gets the current target absolute altitude
169 //! \return Current target altitude
170 virtual double targetAbsoluteAlt() const;
171
172 //! \brief Sets the image X dimension (width)
173 //! \param val Width in pixels
174 virtual void setImageSizeX(int val);
175
176 //! \brief Gets the current image X dimension
177 //! \return Current image width in pixels
178 virtual int imageSizeX() const;
179
180 //! \brief Sets the image Y dimension (height)
181 //! \param val Height in pixels
182 virtual void setImageSizeY(int val);
183
184 //! \brief Gets the current image Y dimension
185 //! \return Current image height in pixels
186 virtual int imageSizeY() const;
187
188 //! \brief Sets the image rotation
189 //! \param val Rotation angle in degrees
190 virtual void setImageRotation(int val);
191
192 //! \brief Gets the current image rotation
193 //! \return Current image rotation in degrees
194 virtual int imageRotation() const;
195
196 //! \brief Sets the image format
197 //! \param val Image format index
198 virtual void setImageFormat(int val);
199
200 //! \brief Gets the current image format
201 //! \return Current image format index
202 virtual int imageFormat() const;
203
204 //! \brief Sets the image data type
205 //! \param val Image data type index
206 virtual void setImageDataType(int val);
207
208 //! \brief Gets the current image data type
209 //! \return Current image data type index
210 virtual int imageDataType() const;
211
212 //! \brief Sets the sensor to use for SAR imagery
213 //! \param val Sensor name
214 virtual void setSensorToUse(const std::string& val);
215
216 //! \brief Gets the current sensor used for SAR imagery
217 //! \return Current sensor name
218 virtual const std::string& sensorToUse() const;
219
220 //! \brief Sets whether to save SAR images on the server
221 //! \param val True to save on server, false otherwise
222 virtual void setSaveOnServer(bool val);
223
224 //! \brief Gets whether SAR images are saved on the server
225 //! \return True if saving on server is enabled, false otherwise
226 virtual bool saveOnServer() const;
227
228 //! \brief Sets the path where images are saved on the server
229 //! \param val Server save path
230 virtual void setServerSavePath(const std::string& val);
231
232 //! \brief Gets the current server save path
233 //! \return Path where images are saved on the server
234 virtual const std::string& serverSavePath() const;
235
236 //! \brief Sets the radar power level
237 //! \param val Power level value
238 virtual void setPower(double val);
239
240 //! \brief Gets the current radar power level
241 //! \return Current power level
242 virtual double power() const;
243
244 //! \brief Sets whether Automatic Gain Control is enabled for power
245 //! \param isAgcPowerEnabled True to enable AGC, false otherwise
247
248 //! \brief Gets whether Automatic Gain Control is enabled for power
249 //! \return True if AGC is enabled, false otherwise
250 virtual bool isAgcPowerEnabled() const;
251
252 //! \brief Sets the crossrange distance
253 //! \param val Crossrange value in meters
254 virtual void setCrossrange(double val);
255
256 //! \brief Gets the current crossrange distance
257 //! \return Current crossrange in meters
258 virtual double crossrange() const;
259
260 //! \brief Sets the downrange distance
261 //! \param val Downrange value in meters
262 virtual void setDownrange(double val);
263
264 //! \brief Gets the current downrange distance
265 //! \return Current downrange in meters
266 virtual double downrange() const;
267
268 //! \brief Sets the ownship speed
269 //! \param speed Speed value in meters per second
270 //!
271 //! Speed of the observer when the SAR image is requested
272 void setOwnshipSpeed(float speed);
273
274 //! \brief Gets the current ownship speed
275 //! \return Current ownship speed in meters per second
276 float ownshipSpeed() const;
277
278 //! \brief Sets the RadarFx server IP address
279 //! \param val IP address string
280 virtual void setServerIp(const std::string& val);
281
282 //! \brief Gets the current RadarFx server IP address
283 //! \return Current server IP address
284 virtual const std::string& serverIp() const;
285
286 //! \brief Sets the RadarFx server port
287 //! \param val Port number
288 virtual void setServerPort(int val);
289
290 //! \brief Gets the current RadarFx server port
291 //! \return Current server port number
292 virtual int serverPort() const;
293
294 //! \brief Sets whether to automatically open the SAR response window
295 //! \param val True to open window, false otherwise
296 virtual void setOpenSarResponseWindow(bool val);
297
298 //! \brief Gets whether the SAR response window opens automatically
299 //! \return True if window opens automatically, false otherwise
300 virtual bool openSarResponseWindow() const;
301
302protected:
303 //! \brief Grants access to boost serialization
304 friend class boost::serialization::access;
305
306 //! \brief Serializes the settings record to/from an archive
307 //! \tparam Archive Type of archive (input or output)
308 //! \param ar Reference to the archive
309 //! \param version Version number for the serialization format
310 //!
311 //! When the Archive corresponds to an output archive, the & operator
312 //! is defined similar to <<. Likewise, when the Archive is a type of
313 //! input archive, the & operator is defined similar to >>.
314 template <class Archive>
315 void serialize(Archive& ar, const unsigned int version)
316 {
317 ar& BOOST_SERIALIZATION_NVP(myOwnshipMode);
318 ar& BOOST_SERIALIZATION_NVP(myOwnshipEntityName);
319 ar& BOOST_SERIALIZATION_NVP(myOwnshipObserverName);
320 ar& BOOST_SERIALIZATION_NVP(myOwnshipAbsoluteLat);
321 ar& BOOST_SERIALIZATION_NVP(myOwnshipAbsoluteLon);
322 ar& BOOST_SERIALIZATION_NVP(myOwnshipAbsoluteAlt);
323
324 ar& BOOST_SERIALIZATION_NVP(myTargetMode);
325 ar& BOOST_SERIALIZATION_NVP(myTargetEntityName);
326 ar& BOOST_SERIALIZATION_NVP(myTargetObserverName);
327 ar& BOOST_SERIALIZATION_NVP(myTargetSensorName);
328 ar& BOOST_SERIALIZATION_NVP(myTargetAbsoluteLat);
329 ar& BOOST_SERIALIZATION_NVP(myTargetAbsoluteLon);
330 ar& BOOST_SERIALIZATION_NVP(myTargetAbsoluteAlt);
331
332 ar& BOOST_SERIALIZATION_NVP(myImageSizeX);
333 ar& BOOST_SERIALIZATION_NVP(myImageSizeY);
334 ar& BOOST_SERIALIZATION_NVP(myImageRotation);
335 ar& BOOST_SERIALIZATION_NVP(myImageFormat);
336 ar& BOOST_SERIALIZATION_NVP(myImageDataType);
337 ar& BOOST_SERIALIZATION_NVP(mySensorToUse);
338
339 ar& BOOST_SERIALIZATION_NVP(mySaveOnServer);
340 ar& BOOST_SERIALIZATION_NVP(myServerSavePath);
341
342 ar& BOOST_SERIALIZATION_NVP(myIsAgcPowerEnabled);
343 ar& BOOST_SERIALIZATION_NVP(myPower);
344
345 ar& BOOST_SERIALIZATION_NVP(myCrossrange);
346 ar& BOOST_SERIALIZATION_NVP(myDownrange);
347
348 ar& BOOST_SERIALIZATION_NVP(myServerIp);
349 ar& BOOST_SERIALIZATION_NVP(myServerPort);
350
351 ar& BOOST_SERIALIZATION_NVP(myOwnshipSpeed);
352
353 ar& BOOST_SERIALIZATION_NVP(myOpenSarResponseWindow);
354 }
355
356protected:
357 //! \brief Ownship positioning mode
358 //! 1=simulated entity location
359 //! 2=observer location
360 //! 3=geodetic (deg) location
362
363 //! \brief Name of the entity to use for ownship positioning
365
366 //! \brief Name of the observer to use for ownship positioning
368
369 //! \brief Absolute latitude for ownship positioning (degrees)
371
372 //! \brief Absolute longitude for ownship positioning (degrees)
374
375 //! \brief Absolute altitude for ownship positioning (meters)
377
378 //! \brief Target positioning mode
379 //! 1=simulated entity location
380 //! 2=observer location
381 //! 3=geodetic (deg) location
382 //! 4=mouse click location
383 //! 5=sensor location
385
386 //! \brief Name of the entity to use for target positioning
388
389 //! \brief Name of the observer to use for target positioning
391
392 //! \brief Name of the sensor to use for target positioning
394
395 //! \brief Absolute latitude for target positioning (degrees)
397
398 //! \brief Absolute longitude for target positioning (degrees)
400
401 //! \brief Absolute altitude for target positioning (meters)
403
404 //! \brief Image width in pixels
406
407 //! \brief Image height in pixels
409
410 //! \brief Image rotation in degrees
412
413 //! \brief Image format index
415
416 //! \brief Image data type index
418
419 //! \brief Name of the sensor to use for imaging
420 std::string mySensorToUse;
421
422 //! \brief Flag indicating if images should be saved on the server
424
425 //! \brief Path where images are saved on the server
426 std::string myServerSavePath;
427
428 //! \brief Flag indicating if Automatic Gain Control is enabled for power
430
431 //! \brief Radar power level
432 double myPower;
433
434 //! \brief Downrange distance in meters
435 //!
436 //! Distance in direction of aircraft heading
438
439 //! \brief Crossrange distance in meters
440 //!
441 //! Distance perpendicular to aircraft heading
443
444 //! \brief Ownship speed in meters per second when SAR image is requested
446
447 //! \brief RadarFx server IP address
448 std::string myServerIp;
449
450 //! \brief RadarFx server port number
452
453 //! \brief Flag indicating if SAR response window should automatically open
455};
456
457} // namespace makVre
458
459//! \brief Set the version number for boost serialization of DtSarSettingsRecord
460//!
461//! This macro sets the version number to 0 for the class's serialization format
462BOOST_CLASS_VERSION(makVre::DtSarSettingsRecord, 0)
Settings record for storing SAR configuration data.
Definition sarSettingsRecord.h:27
double myOwnshipAbsoluteLat
Absolute latitude for ownship positioning (degrees)
Definition sarSettingsRecord.h:370
double myTargetAbsoluteAlt
Absolute altitude for target positioning (meters)
Definition sarSettingsRecord.h:402
virtual void setOwnshipAbsoluteLat(double val)
Sets the ownship absolute latitude.
TargetMode
Enumeration for target positioning modes.
Definition sarSettingsRecord.h:39
@ TargetModeAbsolute
Use absolute coordinates as the target position.
Definition sarSettingsRecord.h:42
@ TargetModeSensor
Use a sensor as the target position source.
Definition sarSettingsRecord.h:44
@ TargetModeMouseClick
Use mouse-clicked position as the target position.
Definition sarSettingsRecord.h:43
@ TargetModeObserver
Use an observer as the target position source.
Definition sarSettingsRecord.h:41
@ TargetModeEntity
Use an entity as the target position source.
Definition sarSettingsRecord.h:40
virtual void setServerPort(int val)
Sets the RadarFx server port.
virtual double targetAbsoluteLat() const
Gets the current target absolute latitude.
int myImageRotation
Image rotation in degrees.
Definition sarSettingsRecord.h:411
virtual void setServerSavePath(const std::string &val)
Sets the path where images are saved on the server.
virtual ~DtSarSettingsRecord()
Virtual destructor.
virtual void setTargetAbsoluteLon(double val)
Sets the target absolute longitude.
virtual int ownshipMode() const
Gets the current ownship mode.
virtual void setTargetAbsoluteAlt(double val)
Sets the target absolute altitude.
int myImageSizeX
Image width in pixels.
Definition sarSettingsRecord.h:405
virtual void setTargetSensorName(const std::string &val)
Sets the target sensor name.
virtual void setOwnshipAbsoluteLon(double val)
Sets the ownship absolute longitude.
virtual bool isAgcPowerEnabled() const
Gets whether Automatic Gain Control is enabled for power.
std::string myOwnshipObserverName
Name of the observer to use for ownship positioning.
Definition sarSettingsRecord.h:367
double myPower
Radar power level.
Definition sarSettingsRecord.h:432
virtual int serverPort() const
Gets the current RadarFx server port.
virtual double ownshipAbsoluteLon() const
Gets the current ownship absolute longitude.
virtual void setImageSizeX(int val)
Sets the image X dimension (width)
std::string myTargetEntityName
Name of the entity to use for target positioning.
Definition sarSettingsRecord.h:387
virtual double targetAbsoluteAlt() const
Gets the current target absolute altitude.
float ownshipSpeed() const
Gets the current ownship speed.
DtSarSettingsRecord(const DtSarSettingsRecord &orig)
Copy constructor.
virtual void setTargetEntityName(const std::string &val)
Sets the target entity name.
int myImageDataType
Image data type index.
Definition sarSettingsRecord.h:417
virtual const std::string & sensorToUse() const
Gets the current sensor used for SAR imagery.
virtual const std::string & serverIp() const
Gets the current RadarFx server IP address.
virtual void setImageFormat(int val)
Sets the image format.
virtual double ownshipAbsoluteAlt() const
Gets the current ownship absolute altitude.
void serialize(Archive &ar, const unsigned int version)
Serializes the settings record to/from an archive.
Definition sarSettingsRecord.h:315
virtual int imageFormat() const
Gets the current image format.
std::string myServerSavePath
Path where images are saved on the server.
Definition sarSettingsRecord.h:426
double myCrossrange
Crossrange distance in meters.
Definition sarSettingsRecord.h:442
double myDownrange
Downrange distance in meters.
Definition sarSettingsRecord.h:437
virtual void setServerIp(const std::string &val)
Sets the RadarFx server IP address.
virtual double targetAbsoluteLon() const
Gets the current target absolute longitude.
virtual const std::string & targetObserverName() const
Gets the current target observer name.
int myTargetMode
Target positioning mode 1=simulated entity location 2=observer location 3=geodetic (deg) location 4=m...
Definition sarSettingsRecord.h:384
virtual void setTargetObserverName(const std::string &val)
Sets the target observer name.
double myOwnshipAbsoluteAlt
Absolute altitude for ownship positioning (meters)
Definition sarSettingsRecord.h:376
virtual int imageSizeX() const
Gets the current image X dimension.
virtual void setOwnshipAbsoluteAlt(double val)
Sets the ownship absolute altitude.
virtual void setTargetAbsoluteLat(double val)
Sets the target absolute latitude.
virtual const std::string & targetEntityName() const
Gets the current target entity name.
int myImageFormat
Image format index.
Definition sarSettingsRecord.h:414
virtual void setImageDataType(int val)
Sets the image data type.
bool mySaveOnServer
Flag indicating if images should be saved on the server.
Definition sarSettingsRecord.h:423
virtual void setDownrange(double val)
Sets the downrange distance.
virtual int imageRotation() const
Gets the current image rotation.
double myTargetAbsoluteLon
Absolute longitude for target positioning (degrees)
Definition sarSettingsRecord.h:399
virtual const std::string & ownshipEntityName() const
Gets the current ownship entity name.
std::string mySensorToUse
Name of the sensor to use for imaging.
Definition sarSettingsRecord.h:420
virtual double power() const
Gets the current radar power level.
virtual void setCrossrange(double val)
Sets the crossrange distance.
virtual void setSensorToUse(const std::string &val)
Sets the sensor to use for SAR imagery.
bool myOpenSarResponseWindow
Flag indicating if SAR response window should automatically open.
Definition sarSettingsRecord.h:454
bool myIsAgcPowerEnabled
Flag indicating if Automatic Gain Control is enabled for power.
Definition sarSettingsRecord.h:429
virtual void setOwnshipMode(int val)
Sets the ownship mode.
virtual int targetMode() const
Gets the current target mode.
std::string myTargetObserverName
Name of the observer to use for target positioning.
Definition sarSettingsRecord.h:390
virtual void setOwnshipObserverName(const std::string &val)
Sets the ownship observer name.
virtual double ownshipAbsoluteLat() const
Gets the current ownship absolute latitude.
virtual int imageDataType() const
Gets the current image data type.
virtual void setSaveOnServer(bool val)
Sets whether to save SAR images on the server.
virtual int imageSizeY() const
Gets the current image Y dimension.
virtual void setImageSizeY(int val)
Sets the image Y dimension (height)
std::string myOwnshipEntityName
Name of the entity to use for ownship positioning.
Definition sarSettingsRecord.h:364
virtual double downrange() const
Gets the current downrange distance.
virtual void setOwnshipEntityName(const std::string &val)
Sets the ownship entity name.
float myOwnshipSpeed
Ownship speed in meters per second when SAR image is requested.
Definition sarSettingsRecord.h:445
virtual void setIsAgcPowerEnabled(bool isAgcPowerEnabled)
Sets whether Automatic Gain Control is enabled for power.
std::string myServerIp
RadarFx server IP address.
Definition sarSettingsRecord.h:448
virtual void setImageRotation(int val)
Sets the image rotation.
void setOwnshipSpeed(float speed)
Sets the ownship speed.
virtual const std::string & serverSavePath() const
Gets the current server save path.
DtSarSettingsRecord()
Default constructor.
int myOwnshipMode
Ownship positioning mode 1=simulated entity location 2=observer location 3=geodetic (deg) location.
Definition sarSettingsRecord.h:361
virtual void setTargetMode(int val)
Sets the target mode.
virtual bool saveOnServer() const
Gets whether SAR images are saved on the server.
double myOwnshipAbsoluteLon
Absolute longitude for ownship positioning (degrees)
Definition sarSettingsRecord.h:373
virtual bool openSarResponseWindow() const
Gets whether the SAR response window opens automatically.
virtual void setOpenSarResponseWindow(bool val)
Sets whether to automatically open the SAR response window.
virtual void setPower(double val)
Sets the radar power level.
virtual double crossrange() const
Gets the current crossrange distance.
virtual const std::string & ownshipObserverName() const
Gets the current ownship observer name.
int myImageSizeY
Image height in pixels.
Definition sarSettingsRecord.h:408
int myServerPort
RadarFx server port number.
Definition sarSettingsRecord.h:451
double myTargetAbsoluteLat
Absolute latitude for target positioning (degrees)
Definition sarSettingsRecord.h:396
virtual const std::string & targetSensorName() const
Gets the current target sensor name.
DtSarSettingsRecord & operator=(const DtSarSettingsRecord &orig)
Assignment operator.
std::string myTargetSensorName
Name of the sensor to use for target positioning.
Definition sarSettingsRecord.h:393
OwnshipMode
Enumeration for ownship positioning modes.
Definition sarSettingsRecord.h:31
@ OwnshipModeEntity
Use an entity as the ownship position source.
Definition sarSettingsRecord.h:32
@ OwnshipModeAbsolute
Use absolute coordinates as the ownship position.
Definition sarSettingsRecord.h:34
@ OwnshipModeObserver
Use an observer as the ownship position source.
Definition sarSettingsRecord.h:33
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Defines DLL export macros for the SAR client plugin.
#define DT_DLL_sarClient
Definition sarClientPlugin.h:19