VR-Engage  2.2
Loading...
Searching...
No Matches
sarSettingsManager.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright (c) 2025 MAK Technologies
3 * All rights reserved.
4 *****************************************************************************/
5
6//! \file sarSettingsManager.h
7//! \brief Defines the settings manager for SAR configuration
8//! \ingroup sarClient
9
10#pragma once
11
12#include "sarClientPlugin.h"
13#include "sarSettingsRecord.h"
14
15#include <vrvCore/DtElementData.h>
16#include <vrvUtil/DtBaseSettingsManager.h>
17
18#include <matrix/vlVector.h>
19
20namespace makVrv
21{
22//! \brief Forward declaration of the display element class
23class DtDe;
24
25//! \brief Forward declaration of the observer class
26class DtObserver;
27
28//! \brief Forward declaration of the record settings backup interface
29class DtRecordSettingsBackupInterface;
30} // namespace makVrv
31
32namespace makVre
33{
34//! \brief Type definition for entity name-ID pairs
35using DtEntityNameIdPair = std::pair<std::string, std::string>;
36
37//! \brief Type definition for a collection of entity name-ID pairs
38using DtEntityNameIdPairs = std::vector<DtEntityNameIdPair>;
39
40//! \brief Manager for SAR settings configuration
41//!
42//! DtSarSettingsManager is responsible for maintaining SAR settings state,
43//! providing validation, and notifying interested components of changes to settings.
44//! It manages ownship and target configurations, image parameters, server settings,
45//! and other SAR-specific options required for synthetic aperture radar imagery.
46//! \ingroup sarClient
47class DT_DLL_sarClient DtSarSettingsManager : public makVrv::DtBaseSettingsManager<DtSarSettingsRecord>
48{
49public:
50 //! \brief Gets the singleton instance of the settings manager
51 //! \param de Reference to the display element
52 //! \return Reference to the singleton instance
53 //!
54 //! This method implements the singleton pattern, creating the instance if it doesn't exist
55 static DtSarSettingsManager& instance(makVrv::DtDe& de);
56
57 //! \brief Virtual destructor
58 virtual ~DtSarSettingsManager() override;
59
60 //! \brief Initializes the settings manager
61 //! \param de Reference to the display element
62 //! \return True if initialization was successful, false otherwise
63 virtual bool initialize(makVrv::DtDe& de);
64
65 //! \brief Checks if the ownship configuration is valid
66 //! \return True if ownship settings are valid, false otherwise
67 virtual bool ownshipIsValid();
68
69 //! \brief Checks if the target configuration is valid
70 //! \return True if target settings are valid, false otherwise
71 virtual bool targetIsValid();
72
73 //! \brief Updates the settings validity state and notifies listeners
74 //!
75 //! Validates all settings and emits appropriate signals if validity changes
76 virtual void updateSettingsAreValid();
77
78 //! @name Setters/getters for settings
79 //! @{
80
81 //! \brief Sets the ownship mode
82 //! \param val Mode value (typically 0=Entity, 1=Observer, 2=Absolute Position)
83 virtual void setOwnshipMode(int val);
84
85 //! \brief Gets the current ownship mode
86 //! \return Current ownship mode value
87 virtual int ownshipMode() const;
88
89 //! \brief Checks if entity mode is active for ownship
90 //! \return True if ownship mode is set to entity, false otherwise
92
93 //! \brief Checks if observer mode is active for ownship
94 //! \return True if ownship mode is set to observer, false otherwise
96
97 //! \brief Checks if absolute position mode is active for ownship
98 //! \return True if ownship mode is set to absolute position, false otherwise
100
101 //! \brief Checks if entity mode is active for target
102 //! \return True if target mode is set to entity, false otherwise
104
105 //! \brief Checks if sensor mode is active for target
106 //! \return True if target mode is set to sensor, false otherwise
108
109 //! \brief Checks if absolute position mode is active for target
110 //! \return True if target mode is set to absolute position, false otherwise
112
113 //! \brief Checks if mouse click mode is active for target
114 //! \return True if target mode is set to mouse click, false otherwise
116
117 //! \brief Sets the ownship entity name
118 //! \param val Entity name for the ownship
119 virtual void setOwnshipEntityName(const std::string& val);
120
121 //! \brief Gets the current ownship entity name
122 //! \return Current ownship entity name
123 virtual const std::string& ownshipEntityName() const;
124
125 //! \brief Sets the ownship observer name
126 //! \param val Observer name for the ownship
127 virtual void setOwnshipObserverName(const std::string& val);
128
129 //! \brief Gets the current ownship observer name
130 //! \return Current ownship observer name
131 virtual const std::string& ownshipObserverName() const;
132
133 //! \brief Sets the ownship absolute latitude
134 //! \param val Latitude value
135 virtual void setOwnshipAbsoluteLat(double val);
136
137 //! \brief Gets the current ownship absolute latitude
138 //! \return Current ownship latitude
139 virtual double ownshipAbsoluteLat() const;
140
141 //! \brief Sets the ownship absolute longitude
142 //! \param val Longitude value
143 virtual void setOwnshipAbsoluteLon(double val);
144
145 //! \brief Gets the current ownship absolute longitude
146 //! \return Current ownship longitude
147 virtual double ownshipAbsoluteLon() const;
148
149 //! \brief Sets the ownship absolute altitude
150 //! \param val Altitude value
151 virtual void setOwnshipAbsoluteAlt(double val);
152
153 //! \brief Gets the current ownship absolute altitude
154 //! \return Current ownship altitude
155 virtual double ownshipAbsoluteAlt() const;
156
157 //! \brief Sets the ownship absolute location vector
158 //! \param val Vector containing lat/lon/alt coordinates
159 virtual void setOwnshipAbsoluteLocation(const DtVector& val);
160
161 //! \brief Gets the current ownship absolute location vector
162 //! \return Current ownship location as a vector
163 virtual DtVector ownshipAbsoluteLocation() const;
164
165 //! \brief Sets the target mode
166 //! \param val Mode value (typically 0=Entity, 1=Sensor, 2=Absolute Position, 3=MouseClick)
167 virtual void setTargetMode(int val);
168
169 //! \brief Gets the current target mode
170 //! \return Current target mode value
171 virtual int targetMode() const;
172
173 //! \brief Sets the target entity name
174 //! \param val Entity name for the target
175 virtual void setTargetEntityName(const std::string& val);
176
177 //! \brief Gets the current target entity name
178 //! \return Current target entity name
179 virtual const std::string& targetEntityName() const;
180
181 //! \brief Sets the target observer name
182 //! \param val Observer name for the target
183 virtual void setTargetObserverName(const std::string& val);
184
185 //! \brief Gets the current target observer name
186 //! \return Current target observer name
187 virtual const std::string& targetObserverName() const;
188
189 //! \brief Sets the target sensor name
190 //! \param val Sensor name for the target
191 virtual void setTargetSensorName(const std::string& val);
192
193 //! \brief Gets the current target sensor name
194 //! \return Current target sensor name
195 virtual const std::string& targetSensorName() const;
196
197 //! \brief Sets the target absolute latitude
198 //! \param val Latitude value
199 virtual void setTargetAbsoluteLat(double val);
200
201 //! \brief Gets the current target absolute latitude
202 //! \return Current target latitude
203 virtual double targetAbsoluteLat() const;
204
205 //! \brief Sets the target absolute longitude
206 //! \param val Longitude value
207 virtual void setTargetAbsoluteLon(double val);
208
209 //! \brief Gets the current target absolute longitude
210 //! \return Current target longitude
211 virtual double targetAbsoluteLon() const;
212
213 //! \brief Sets the target absolute altitude
214 //! \param val Altitude value
215 virtual void setTargetAbsoluteAlt(double val);
216
217 //! \brief Gets the current target absolute altitude
218 //! \return Current target altitude
219 virtual double targetAbsoluteAlt() const;
220
221 //! \brief Sets the target absolute location vector
222 //! \param val Vector containing lat/lon/alt coordinates
223 virtual void setTargetAbsoluteLocation(const DtVector& val);
224
225 //! \brief Gets the current target absolute location vector
226 //! \return Current target location as a vector
227 virtual DtVector targetAbsoluteLocation() const;
228
229 //! \brief Sets the image X dimension (width)
230 //! \param val Width in pixels
231 virtual void setImageSizeX(int val);
232
233 //! \brief Gets the current image X dimension
234 //! \return Current image width in pixels
235 virtual int imageSizeX() const;
236
237 //! \brief Sets the image Y dimension (height)
238 //! \param val Height in pixels
239 virtual void setImageSizeY(int val);
240
241 //! \brief Gets the current image Y dimension
242 //! \return Current image height in pixels
243 virtual int imageSizeY() const;
244
245 //! \brief Sets the image rotation
246 //! \param val Rotation angle in degrees
247 virtual void setImageRotation(int val);
248
249 //! \brief Gets the current image rotation
250 //! \return Current image rotation in degrees
251 virtual int imageRotation() const;
252
253 //! \brief Sets the image format
254 //! \param val Image format index
255 virtual void setImageFormat(int val);
256
257 //! \brief Gets the current image format
258 //! \return Current image format index
259 virtual int imageFormat() const;
260
261 //! \brief Sets the image data type
262 //! \param val Image data type index
263 virtual void setImageDataType(int val);
264
265 //! \brief Gets the current image data type
266 //! \return Current image data type index
267 virtual int imageDataType() const;
268
269 //! \brief Sets the sensor to use for SAR imagery
270 //! \param val Sensor name
271 virtual void setSensorToUse(const std::string& val);
272
273 //! \brief Gets the current sensor used for SAR imagery
274 //! \return Current sensor name
275 virtual const std::string& sensorToUse() const;
276
277 //! \brief Sets whether to save SAR images on the server
278 //! \param val True to save on server, false otherwise
279 virtual void setSaveOnServer(bool val);
280
281 //! \brief Gets whether SAR images are saved on the server
282 //! \return True if saving on server is enabled, false otherwise
283 virtual bool saveOnServer() const;
284
285 //! \brief Sets the path where images are saved on the server
286 //! \param val Server save path
287 virtual void setServerSavePath(const std::string& val);
288
289 //! \brief Gets the current server save path
290 //! \return Path where images are saved on the server
291 virtual const std::string& serverSavePath() const;
292
293 //! \brief Sets whether Automatic Gain Control is enabled for power
294 //! \param val True to enable AGC, false otherwise
295 virtual void setIsAcgPowerEnabled(bool val);
296
297 //! \brief Gets whether Automatic Gain Control is enabled for power
298 //! \return True if AGC is enabled, false otherwise
299 virtual bool isAgcPowerEnabled() const;
300
301 //! \brief Sets the radar power level
302 //! \param val Power level value
303 virtual void setPower(double val);
304
305 //! \brief Gets the current radar power level
306 //! \return Current power level
307 virtual double power() const;
308
309 //! \brief Sets the crossrange distance
310 //! \param val Crossrange value in meters
311 virtual void setCrossrange(double val);
312
313 //! \brief Gets the current crossrange distance
314 //! \return Current crossrange in meters
315 virtual double crossrange() const;
316
317 //! \brief Sets the downrange distance
318 //! \param val Downrange value in meters
319 virtual void setDownrange(double val);
320
321 //! \brief Gets the current downrange distance
322 //! \return Current downrange in meters
323 virtual double downrange() const;
324
325 //! \brief Sets the ownship speed
326 //! \param val Speed value in meters per second
327 virtual void setOwnshipSpeed(float val);
328
329 //! \brief Gets the current ownship speed
330 //! \return Current ownship speed in meters per second
331 virtual float ownshipSpeed() const;
332
333 //! \brief Sets the RadarFx server IP address
334 //! \param val IP address string
335 virtual void setServerIp(const std::string& val);
336
337 //! \brief Gets the current RadarFx server IP address
338 //! \return Current server IP address
339 virtual const std::string& serverIp() const;
340
341 //! \brief Sets the RadarFx server port
342 //! \param val Port number
343 virtual void setServerPort(int val);
344
345 //! \brief Gets the current RadarFx server port
346 //! \return Current server port number
347 virtual int serverPort() const;
348
349 //! \brief Sets whether to automatically open the SAR response window
350 //! \param val True to open window, false otherwise
351 virtual void setOpenSarResponseWindow(bool val);
352
353 //! \brief Gets whether the SAR response window opens automatically
354 //! \return True if window opens automatically, false otherwise
355 virtual bool openSarResponseWindow() const;
356
357 //! @}
358
359 //! \brief Sets the connection status to RadarFx server
360 //! \param connected True if connected, false otherwise
361 virtual void setIsConnected(bool connected);
362
363 //! \brief Gets the current connection status to RadarFx server
364 //! \return True if connected, false otherwise
365 virtual bool isConnected() const;
366
367 //! @name Boost signals for changed settings
368 //! @{
369 //! \brief Signal emitted when ownship mode changes
370 boost::signalslib::signal<void(int)> signal_ownshipModeSet;
371
372 //! \brief Signal emitted when ownship entity name changes
373 boost::signalslib::signal<void(std::string)> signal_ownshipEntityNameSet;
374
375 //! \brief Signal emitted when ownship observer name changes
376 boost::signalslib::signal<void(std::string)> signal_ownshipObserverNameSet;
377
378 //! \brief Signal emitted when ownship absolute latitude changes
379 boost::signalslib::signal<void(double)> signal_ownshipAbsoluteLatSet;
380
381 //! \brief Signal emitted when ownship absolute longitude changes
382 boost::signalslib::signal<void(double)> signal_ownshipAbsoluteLonSet;
383
384 //! \brief Signal emitted when ownship absolute altitude changes
385 boost::signalslib::signal<void(double)> signal_ownshipAbsoluteAltSet;
386
387 //! \brief Signal emitted when target mode changes
388 boost::signalslib::signal<void(int)> signal_targetModeSet;
389
390 //! \brief Signal emitted when target entity name changes
391 boost::signalslib::signal<void(std::string)> signal_targetEntityNameSet;
392
393 //! \brief Signal emitted when target observer name changes
394 boost::signalslib::signal<void(std::string)> signal_targetObserverNameSet;
395
396 //! \brief Signal emitted when target sensor name changes
397 boost::signalslib::signal<void(std::string)> signal_targetSensorNameSet;
398
399 //! \brief Signal emitted when target absolute latitude changes
400 boost::signalslib::signal<void(double)> signal_targetAbsoluteLatSet;
401
402 //! \brief Signal emitted when target absolute longitude changes
403 boost::signalslib::signal<void(double)> signal_targetAbsoluteLonSet;
404
405 //! \brief Signal emitted when target absolute altitude changes
406 boost::signalslib::signal<void(double)> signal_targetAbsoluteAltSet;
407
408 //! \brief Signal emitted when image X size changes
409 boost::signalslib::signal<void(int)> signal_imageSizeXSet;
410
411 //! \brief Signal emitted when image Y size changes
412 boost::signalslib::signal<void(int)> signal_imageSizeYSet;
413
414 //! \brief Signal emitted when image rotation changes
415 boost::signalslib::signal<void(int)> signal_imageRotationSet;
416
417 //! \brief Signal emitted when image format changes
418 boost::signalslib::signal<void(int)> signal_imageFormatSet;
419
420 //! \brief Signal emitted when image data type changes
421 boost::signalslib::signal<void(int)> signal_imageDataTypeSet;
422
423 //! \brief Signal emitted when sensor to use changes
424 boost::signalslib::signal<void(std::string)> signal_sensorToUseSet;
425
426 //! \brief Signal emitted when save on server setting changes
427 boost::signalslib::signal<void(bool)> signal_saveOnServerSet;
428
429 //! \brief Signal emitted when server save path changes
430 boost::signalslib::signal<void(std::string)> signal_serverSavePathSet;
431
432 //! \brief Signal emitted when AGC power enabled setting changes
433 boost::signalslib::signal<void(double)> signal_isAgcPowerEnabledSet;
434
435 //! \brief Signal emitted when radar power changes
436 boost::signalslib::signal<void(double)> signal_powerSet;
437
438 //! \brief Signal emitted when downrange changes
439 boost::signalslib::signal<void(double)> signal_downrangeSet;
440
441 //! \brief Signal emitted when crossrange changes
442 boost::signalslib::signal<void(double)> signal_crossrangeSet;
443
444 //! \brief Signal emitted when ownship speed changes
445 boost::signalslib::signal<void(double)> signal_ownshipSpeedSet;
446
447 //! \brief Signal emitted when server IP changes
448 boost::signalslib::signal<void(std::string)> signal_serverIpSet;
449
450 //! \brief Signal emitted when server port changes
451 boost::signalslib::signal<void(int)> signal_serverPortSet;
452
453 //! \brief Signal emitted when open SAR response window setting changes
454 boost::signalslib::signal<void(bool)> signal_openSarResponseWindowSet;
455
456 //! \brief Signal emitted when RadarFx connection status changes
457 //!
458 //! Used to update connection status text in SAR Settings dialog
459 boost::signalslib::signal<void(bool)> signal_isConnectedSet;
460
461 //! \brief Signal emitted when settings validity changes
462 //! \param valid Whether the settings are valid
463 //! \param tooltip Error message explaining why settings are invalid
464 boost::signalslib::signal<void(bool, const std::string&)> signal_areSettingsValid;
465
466 //! \brief Signal emitted when the list of valid ownship entities changes
467 boost::signalslib::signal<void(const std::vector<std::string>&)> signal_validOwnshipEntitiesChanged;
468
469 //! \brief Signal emitted when the list of valid target entities changes
470 boost::signalslib::signal<void(const std::vector<std::string>&)> signal_validTargetEntitiesChanged;
471
472 //! \brief Signal emitted when the list of valid observers changes
473 boost::signalslib::signal<void(const std::vector<std::string>&)> signal_validObserversChanged;
474
475 //! \brief Signal emitted when the list of valid target sensors changes
476 boost::signalslib::signal<void(const std::vector<std::string>&)> signal_validTargetSensorsChanged;
477
478 //! \brief Handles simulation element addition/removal
479 //!
480 //! Updates lists of available entities, observers, and sensors when
481 //! elements are added or removed from the simulation
483
484 //! \brief Handles element initialization
485 //! \param elements List of element IDs that have been initialized
486 void slot_elementsInitialized(const makVrv::DtElementData::ElementIdList& elements);
487
488 //! \brief Handles element removal
489 //! \param elements List of element IDs that will be removed
490 void slot_elementsToBeRemoved(const makVrv::DtElementData::ElementIdList& elements);
491
492 //! \brief Handles observer addition
493 //! \param observerName Name of the added observer
494 void slot_observerAdded(const std::string& observerName);
495
496 //! \brief Handles observer removal
497 //! \param observerName Name of the removed observer
498 void slot_observerRemoved(const std::string& observerName);
499
500 //! \brief Handles observer mode changes
501 //! \param observer Pointer to the observer that changed
502 //! \param newMode New observer mode value
503 void slot_observerModeChanged(makVrv::DtObserver* observer, int newMode);
504
505 //! @}
506
507 //! @name Setting Persistence Methods
508 //! @{
509
510 //! \brief Sets the current settings state from the given record
511 //! \param rec Settings record to load from
512 //!
513 //! Loads all settings values from the provided record
514 virtual void setFromRecord(const DtSarSettingsRecord& rec) override;
515
516 //! \brief Stores the current settings state in the given record
517 //! \param rec Settings record to store to
518 //!
519 //! Saves all current settings values to the provided record
520 virtual void getRecord(DtSarSettingsRecord& rec) const override;
521
522 //! @}
523
524protected:
525 //! \brief Befriend the manager instance functions for instance retrieval/creation
526 //! \tparam ManagerClass Type of manager class
527 template <typename ManagerClass>
528 friend ManagerClass& makVrv::defaultManagerInstanceFunction(makVrv::DtDe&, bool);
529
530 //! \brief Befriend the manager instance functions for instance registration
531 //! \tparam ManagerClass Type of manager class
532 template <typename ManagerClass>
533 friend void makVrv::defaultManagerRegisterInstanceFunction(makVrv::DtDe&, ManagerClass*);
534
535 //! \brief Protected constructor
536 //! \param de Reference to the display element
537 //!
538 //! Constructor is protected to enforce the singleton pattern
539 DtSarSettingsManager(makVrv::DtDe& de);
540
541 //! \brief Gets overrides to the factory record, if any
542 //! \param rec Reference to the record to apply overrides to
543 //! \return True if overrides were applied, false otherwise
544 //!
545 //! This is an internal utility function used by VR-Vantage engineers to update factory defaults.
546 //! As a result, this function returns false in releases but can be overriden by toolkit users
547 //! if desired; however, generally toolkit users can and should use
548 //! DtDeInitializer::addDefaultSettingsRecord(...) instead.
549 virtual bool applyFactoryOverrides(DtSarSettingsRecord& rec) const override;
550
551protected:
552 //! \brief Current settings record containing all SAR settings
554
555 //! \brief Flag indicating if connected to RadarFx server
557
558 //! \brief Element ID of the current ownship entity
559 makVrv::DtElementID myOwnshipElementId;
560
561 //! \brief Element ID of the current target entity
562 makVrv::DtElementID myTargetElementId;
563
564 //! \brief Flag indicating if ownship observer is valid
566
567 //! \brief Flag indicating if target observer is valid
569};
570} // namespace makVre
virtual bool initialize(makVrv::DtDe &de)
Initializes the settings manager.
DtSarSettingsRecord mySettingsRecord
Current settings record containing all SAR settings.
Definition sarSettingsManager.h:553
boost::signalslib::signal< void(std::string)> signal_ownshipEntityNameSet
Signal emitted when ownship entity name changes.
Definition sarSettingsManager.h:373
virtual void getRecord(DtSarSettingsRecord &rec) const override
Stores the current settings state in the given record.
virtual double downrange() const
Gets the current downrange distance.
virtual bool useEntityAsOwnship() const
Checks if entity mode is active for ownship.
Definition sarSettingsManager.h:91
virtual int imageSizeX() const
Gets the current image X dimension.
virtual int ownshipMode() const
Gets the current ownship mode.
virtual void updateSettingsAreValid()
Updates the settings validity state and notifies listeners.
virtual bool useAbsoluteAsTarget() const
Checks if absolute position mode is active for target.
Definition sarSettingsManager.h:111
virtual double power() const
Gets the current radar power level.
DtSarSettingsManager(makVrv::DtDe &de)
Protected constructor.
virtual void setTargetObserverName(const std::string &val)
Sets the target observer name.
virtual int imageDataType() const
Gets the current image data type.
virtual double targetAbsoluteAlt() const
Gets the current target absolute altitude.
boost::signalslib::signal< void(bool, const std::string &)> signal_areSettingsValid
Signal emitted when settings validity changes.
Definition sarSettingsManager.h:464
virtual bool useSensorAsTarget() const
Checks if sensor mode is active for target.
Definition sarSettingsManager.h:107
virtual void setImageFormat(int val)
Sets the image format.
boost::signalslib::signal< void(double)> signal_ownshipAbsoluteLonSet
Signal emitted when ownship absolute longitude changes.
Definition sarSettingsManager.h:382
boost::signalslib::signal< void(std::string)> signal_targetObserverNameSet
Signal emitted when target observer name changes.
Definition sarSettingsManager.h:394
virtual bool openSarResponseWindow() const
Gets whether the SAR response window opens automatically.
virtual double targetAbsoluteLat() const
Gets the current target absolute latitude.
virtual void setTargetAbsoluteAlt(double val)
Sets the target absolute altitude.
virtual void setOwnshipAbsoluteAlt(double val)
Sets the ownship absolute altitude.
virtual void setDownrange(double val)
Sets the downrange distance.
boost::signalslib::signal< void(double)> signal_ownshipAbsoluteAltSet
Signal emitted when ownship absolute altitude changes.
Definition sarSettingsManager.h:385
boost::signalslib::signal< void(double)> signal_crossrangeSet
Signal emitted when crossrange changes.
Definition sarSettingsManager.h:442
virtual void setServerPort(int val)
Sets the RadarFx server port.
makVrv::DtElementID myOwnshipElementId
Element ID of the current ownship entity.
Definition sarSettingsManager.h:559
virtual void setSensorToUse(const std::string &val)
Sets the sensor to use for SAR imagery.
virtual double ownshipAbsoluteLon() const
Gets the current ownship absolute longitude.
boost::signalslib::signal< void(int)> signal_imageFormatSet
Signal emitted when image format changes.
Definition sarSettingsManager.h:418
boost::signalslib::signal< void(double)> signal_ownshipSpeedSet
Signal emitted when ownship speed changes.
Definition sarSettingsManager.h:445
boost::signalslib::signal< void(std::string)> signal_serverSavePathSet
Signal emitted when server save path changes.
Definition sarSettingsManager.h:430
void slot_observerRemoved(const std::string &observerName)
Handles observer removal.
boost::signalslib::signal< void(int)> signal_ownshipModeSet
Signal emitted when ownship entity name changes.
Definition sarSettingsManager.h:370
virtual ~DtSarSettingsManager() override
Virtual destructor.
boost::signalslib::signal< void(const std::vector< std::string > &)> signal_validTargetEntitiesChanged
Signal emitted when the list of valid target entities changes.
Definition sarSettingsManager.h:470
boost::signalslib::signal< void(double)> signal_targetAbsoluteAltSet
Signal emitted when target absolute altitude changes.
Definition sarSettingsManager.h:406
virtual bool isConnected() const
Gets the current connection status to RadarFx server.
virtual bool saveOnServer() const
Gets whether SAR images are saved on the server.
virtual double targetAbsoluteLon() const
Gets the current target absolute longitude.
virtual void setImageDataType(int val)
Sets the image data type.
void slot_observerModeChanged(makVrv::DtObserver *observer, int newMode)
Handles observer mode changes.
boost::signalslib::signal< void(std::string)> signal_serverIpSet
Signal emitted when server IP changes.
Definition sarSettingsManager.h:448
boost::signalslib::signal< void(int)> signal_imageRotationSet
Signal emitted when image rotation changes.
Definition sarSettingsManager.h:415
virtual void setServerSavePath(const std::string &val)
Sets the path where images are saved on the server.
virtual void setCrossrange(double val)
Sets the crossrange distance.
virtual bool targetIsValid()
Checks if the target configuration is valid.
virtual float ownshipSpeed() const
Gets the current ownship speed.
boost::signalslib::signal< void(double)> signal_isAgcPowerEnabledSet
Signal emitted when AGC power enabled setting changes.
Definition sarSettingsManager.h:433
boost::signalslib::signal< void(double)> signal_downrangeSet
Signal emitted when downrange changes.
Definition sarSettingsManager.h:439
virtual void setOwnshipAbsoluteLocation(const DtVector &val)
Sets the ownship absolute location vector.
virtual const std::string & sensorToUse() const
Gets the current sensor used for SAR imagery.
virtual void setOwnshipAbsoluteLat(double val)
Sets the ownship absolute latitude.
virtual const std::string & targetEntityName() const
Gets the current target entity name.
virtual void setServerIp(const std::string &val)
Sets the RadarFx server IP address.
virtual void setTargetAbsoluteLon(double val)
Sets the target absolute longitude.
boost::signalslib::signal< void(int)> signal_imageSizeXSet
Signal emitted when image X size changes.
Definition sarSettingsManager.h:409
virtual void setTargetSensorName(const std::string &val)
Sets the target sensor name.
boost::signalslib::signal< void(int)> signal_serverPortSet
Signal emitted when server port changes.
Definition sarSettingsManager.h:451
virtual void setTargetEntityName(const std::string &val)
Sets the target entity name.
bool myIsConnected
Flag indicating if connected to RadarFx server.
Definition sarSettingsManager.h:556
virtual const std::string & targetObserverName() const
Gets the current target observer name.
virtual double ownshipAbsoluteAlt() const
Gets the current ownship absolute altitude.
virtual void setOwnshipEntityName(const std::string &val)
Sets the ownship entity name.
virtual void setOwnshipMode(int val)
Sets the ownship mode.
virtual const std::string & ownshipEntityName() const
Gets the current ownship entity name.
virtual void setIsAcgPowerEnabled(bool val)
Sets whether Automatic Gain Control is enabled for power.
virtual void setOwnshipAbsoluteLon(double val)
Sets the ownship absolute longitude.
virtual void setImageSizeY(int val)
Sets the image Y dimension (height)
boost::signalslib::signal< void(const std::vector< std::string > &)> signal_validOwnshipEntitiesChanged
Signal emitted when the list of valid ownship entities changes.
Definition sarSettingsManager.h:467
virtual void setImageSizeX(int val)
Sets the image X dimension (width)
virtual int imageSizeY() const
Gets the current image Y dimension.
virtual bool useMouseClickAsTarget() const
Checks if mouse click mode is active for target.
Definition sarSettingsManager.h:115
void onElementsAddedOrRemoved()
Handles simulation element addition/removal.
boost::signalslib::signal< void(std::string)> signal_targetSensorNameSet
Signal emitted when target sensor name changes.
Definition sarSettingsManager.h:397
boost::signalslib::signal< void(double)> signal_targetAbsoluteLonSet
Signal emitted when target absolute longitude changes.
Definition sarSettingsManager.h:403
virtual const std::string & targetSensorName() const
Gets the current target sensor name.
boost::signalslib::signal< void(std::string)> signal_sensorToUseSet
Signal emitted when sensor to use changes.
Definition sarSettingsManager.h:424
virtual void setTargetMode(int val)
Sets the target mode.
virtual DtVector ownshipAbsoluteLocation() const
Gets the current ownship absolute location vector.
makVrv::DtElementID myTargetElementId
Element ID of the current target entity.
Definition sarSettingsManager.h:562
virtual double crossrange() const
Gets the current crossrange distance.
virtual double ownshipAbsoluteLat() const
Gets the current ownship absolute latitude.
virtual const std::string & serverIp() const
Gets the current RadarFx server IP address.
void slot_elementsToBeRemoved(const makVrv::DtElementData::ElementIdList &elements)
Handles element removal.
virtual bool useEntityAsTarget() const
Checks if entity mode is active for target.
Definition sarSettingsManager.h:103
void slot_observerAdded(const std::string &observerName)
Handles observer addition.
virtual void setSaveOnServer(bool val)
Sets whether to save SAR images on the server.
boost::signalslib::signal< void(double)> signal_powerSet
Signal emitted when radar power changes.
Definition sarSettingsManager.h:436
static DtSarSettingsManager & instance(makVrv::DtDe &de)
Gets the singleton instance of the settings manager.
virtual int imageRotation() const
Gets the current image rotation.
virtual const std::string & ownshipObserverName() const
Gets the current ownship observer name.
boost::signalslib::signal< void(std::string)> signal_targetEntityNameSet
Signal emitted when target entity name changes.
Definition sarSettingsManager.h:391
boost::signalslib::signal< void(bool)> signal_saveOnServerSet
Signal emitted when save on server setting changes.
Definition sarSettingsManager.h:427
boost::signalslib::signal< void(double)> signal_ownshipAbsoluteLatSet
Signal emitted when ownship absolute latitude changes.
Definition sarSettingsManager.h:379
boost::signalslib::signal< void(int)> signal_imageSizeYSet
Signal emitted when image Y size changes.
Definition sarSettingsManager.h:412
virtual int targetMode() const
Gets the current target mode.
virtual bool useObserverAsOwnship() const
Checks if observer mode is active for ownship.
Definition sarSettingsManager.h:95
virtual void setOwnshipObserverName(const std::string &val)
Sets the ownship observer name.
bool myTargetObserverValid
Flag indicating if target observer is valid.
Definition sarSettingsManager.h:568
virtual void setIsConnected(bool connected)
Sets the connection status to RadarFx server.
virtual void setTargetAbsoluteLocation(const DtVector &val)
Sets the target absolute location vector.
virtual bool applyFactoryOverrides(DtSarSettingsRecord &rec) const override
Gets overrides to the factory record, if any.
virtual bool ownshipIsValid()
Checks if the ownship configuration is valid.
boost::signalslib::signal< void(const std::vector< std::string > &)> signal_validObserversChanged
Signal emitted when the list of valid observers changes.
Definition sarSettingsManager.h:473
virtual const std::string & serverSavePath() const
Gets the current server save path.
virtual int serverPort() const
Gets the current RadarFx server port.
virtual void setImageRotation(int val)
Sets the image rotation.
boost::signalslib::signal< void(const std::vector< std::string > &)> signal_validTargetSensorsChanged
Signal emitted when the list of valid target sensors changes.
Definition sarSettingsManager.h:476
virtual int imageFormat() const
Gets the current image format.
virtual DtVector targetAbsoluteLocation() const
Gets the current target absolute location vector.
virtual void setOpenSarResponseWindow(bool val)
Sets whether to automatically open the SAR response window.
virtual void setPower(double val)
Sets the radar power level.
boost::signalslib::signal< void(int)> signal_targetModeSet
Signal emitted when target mode changes.
Definition sarSettingsManager.h:388
bool myOwnshipObserverValid
Flag indicating if ownship observer is valid.
Definition sarSettingsManager.h:565
boost::signalslib::signal< void(int)> signal_imageDataTypeSet
Signal emitted when image data type changes.
Definition sarSettingsManager.h:421
virtual bool useAbsoluteAsOwnship() const
Checks if absolute position mode is active for ownship.
Definition sarSettingsManager.h:99
virtual void setOwnshipSpeed(float val)
Sets the ownship speed.
boost::signalslib::signal< void(bool)> signal_isConnectedSet
Signal emitted when RadarFx connection status changes.
Definition sarSettingsManager.h:459
boost::signalslib::signal< void(double)> signal_targetAbsoluteLatSet
Signal emitted when target absolute latitude changes.
Definition sarSettingsManager.h:400
virtual bool isAgcPowerEnabled() const
Gets whether Automatic Gain Control is enabled for power.
void slot_elementsInitialized(const makVrv::DtElementData::ElementIdList &elements)
Handles element initialization.
virtual void setFromRecord(const DtSarSettingsRecord &rec) override
Sets the current settings state from the given record.
boost::signalslib::signal< void(bool)> signal_openSarResponseWindowSet
Signal emitted when open SAR response window setting changes.
Definition sarSettingsManager.h:454
boost::signalslib::signal< void(std::string)> signal_ownshipObserverNameSet
Signal emitted when ownship observer name changes.
Definition sarSettingsManager.h:376
virtual void setTargetAbsoluteLat(double val)
Sets the target absolute latitude.
Settings record for storing SAR configuration data.
Definition sarSettingsRecord.h:27
@ 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
@ TargetModeEntity
Use an entity as the target position source.
Definition sarSettingsRecord.h:40
@ 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
std::pair< std::string, std::string > DtEntityNameIdPair
Type definition for entity name-ID pairs.
Definition sarSettingsManager.h:35
std::vector< DtEntityNameIdPair > DtEntityNameIdPairs
Type definition for a collection of entity name-ID pairs.
Definition sarSettingsManager.h:38
Definition appLauncherComponent.h:28
Defines DLL export macros for the SAR client plugin.
#define DT_DLL_sarClient
Definition sarClientPlugin.h:19
Defines the settings record for storing SAR configuration data.
makVrv::DtDe * de()
Gets the display element pointer used by the plugin.