VR-Engage  2.2
Loading...
Searching...
No Matches
topAndDirectAttackMissileControllerDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file topAndDirectAttackMissileControllerDescriptor.h
7//! \ingroup vreVrfobjparam
8//! \brief Top and direct attack missile controller descriptor for VREngage
9//!
10//! This file defines the DtTopAndDirectAttackMissileControllerDescriptor class, which
11//! configures missile flight behavior for FGM-148 Javelin-style missiles in VREngage.
12//! It provides parameters for both top-attack and direct-attack flight profiles.
13
14#pragma once
15
17
18#include <vrfobjparam/componentDescriptor.h>
19
20//! \brief Flight modes and phases of the missile:
21//!
22//! The FGM-148 Javelin-style missile has two modes of flight:
23//!
24//! 1. Top-Attack Mode:
25//! - Climb-out Phase: Missile flies out at a steep angle
26//! - Altitude-hold Phase: Missile flies toward the target at maximum altitude
27//! - Terminal Phase: Missile flies directly toward the target at a specified terminal angle
28//!
29//! Note: If the target is close enough, the missile may not reach the altitude
30//! hold phase and may proceed directly to terminal phase.
31//!
32//! 2. Direct-Attack Mode:
33//! - Climb-out Phase: Missile flies out at a moderate angle
34//! - Terminal Phase: Missile flies directly toward the target at a specified terminal angle
35//!
36//! The default parameter values are based on estimates from FM 3-22.37
37//! "Javelin--Close Combat Missile System, Medium".
38
39namespace makVre
40{
41//! \brief Type identifier string for the top and direct attack missile controller descriptor
42//!
43//! Key used for this class in DtSimComponentFactory.
44const char DtTopAndDirectAttackMissileControllerDescriptorType[] = "top-and-direct-attack-missile-descriptor";
45
46//! \brief Top and direct attack missile controller descriptor for VREngage
47//!
48//! This class defines the flight behavior parameters for FGM-148 Javelin-style
49//! missiles in VREngage simulations. It provides configuration for both top-attack
50//! and direct-attack flight profiles, including climb angles, terminal angles,
51//! maximum altitudes, and range limitations.
53{
54public:
55 //! \brief Constructor with component name
56 //! \param componentName The name of this component
57 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
58 //!
59 //! Creates a new top and direct attack missile controller descriptor with the specified name.
60 //! The component name is the name of the descriptor entry as it appears in a parameter database file.
62 const DtString& componentName, DtReaderWriterRegistry* parentRegistry = NULL);
63
64 //! \brief Constructor with component name as symbol string
65 //! \param componentName The name of this component as a symbol string
66 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
67 //!
68 //! Creates a new top and direct attack missile controller descriptor with the specified name.
70 const DtSymbolString& componentName, DtReaderWriterRegistry* parentRegistry = NULL);
71
72 //! \brief Copy constructor
73 //! \param orig The source descriptor to copy from
74 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
75 //!
76 //! Creates a new top and direct attack missile controller descriptor as a copy of the provided original.
78 const DtTopAndDirectAttackMissileControllerDescriptor& orig, DtReaderWriterRegistry* parentRegistry = NULL);
79
80 //! \brief Assignment operator
81 //! \param orig The source descriptor to copy from
82 //! \return Reference to this descriptor after assignment
83 //!
84 //! Assigns the contents of the provided descriptor to this one.
87
88 //! \brief Virtual destructor
89 //!
90 //! Cleans up resources used by the descriptor.
92
93 //! \brief Gets the type identifier for this descriptor
94 //! \return String identifying this descriptor type
95 //!
96 //! Returns a unique type identifier string for this descriptor type.
97 //! Will return DtTopAndDirectAttackMissileControllerDescriptorType.
98 virtual DtString type() const override;
99
100 //! \brief Creates a clone of this descriptor
101 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
102 //! \return Pointer to a new descriptor that is a clone of this one
103 //!
104 //! Creates a new top and direct attack missile controller descriptor as a deep copy of this one.
105 virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = NULL) const override;
106
107 //! \brief Factory function to create a new instance of this descriptor
108 //! \return Pointer to a newly created descriptor
109 //!
110 //! Static factory function used by the descriptor creation system to instantiate
111 //! new instances of this descriptor type. Creation methods are registered with a
112 //! DtComponentDescriptorFactory, so they can be created on demand as they
113 //! are read in from a parameter database file.
114 static DtComponentDescriptor* creator();
115
116 //! \brief Equality operator
117 //! \param other The descriptor to compare with
118 //! \return True if the descriptors are equal, false otherwise
119 //!
120 //! Compares this descriptor with another to determine if they are equal.
122
123 //! \name Top-Attack Mode Parameters
124 //! @{
125
126 //! \brief Sets the climb-out angle for top-attack mode
127 //! \param angle The climb-out angle in radians
128 //!
129 //! Sets the angle at which the missile initially climbs during top-attack mode.
130 virtual void setTopAttackClimbOutAngle(double angle);
131
132 //! \brief Gets the climb-out angle for top-attack mode
133 //! \return The climb-out angle in radians
134 //!
135 //! Returns the angle at which the missile initially climbs during top-attack mode.
136 virtual double topAttackClimbOutAngle() const;
137
138 //! \brief Sets the terminal angle for top-attack mode
139 //! \param angle The terminal angle in radians
140 //!
141 //! Sets the angle at which the missile approaches the target in terminal phase
142 //! during top-attack mode.
143 virtual void setTopAttackTerminalAngle(double angle);
144
145 //! \brief Gets the terminal angle for top-attack mode
146 //! \return The terminal angle in radians
147 //!
148 //! Returns the angle at which the missile approaches the target in terminal phase
149 //! during top-attack mode.
150 virtual double topAttackTerminalAngle() const;
151
152 //! \brief Sets the maximum altitude for top-attack mode
153 //! \param altitude The maximum altitude in meters
154 //!
155 //! Sets the maximum altitude the missile reaches during altitude-hold phase
156 //! in top-attack mode.
157 virtual void setTopAttackMaxAltitude(double altitude);
158
159 //! \brief Gets the maximum altitude for top-attack mode
160 //! \return The maximum altitude in meters
161 //!
162 //! Returns the maximum altitude the missile reaches during altitude-hold phase
163 //! in top-attack mode.
164 virtual double topAttackMaxAltitude() const;
165
166 //! \brief Sets the minimum range for top-attack mode
167 //! \param range The minimum range in meters
168 //!
169 //! Sets the minimum range at which top-attack mode can be effectively used.
170 virtual void setTopAttackMinRange(double range);
171
172 //! \brief Gets the minimum range for top-attack mode
173 //! \return The minimum range in meters
174 //!
175 //! Returns the minimum range at which top-attack mode can be effectively used.
176 virtual double topAttackMinRange() const;
177
178 //! @}
179
180 //! \name Direct-Attack Mode Parameters
181 //! @{
182
183 //! \brief Sets the climb-out angle for direct-attack mode
184 //! \param angle The climb-out angle in radians
185 //!
186 //! Sets the angle at which the missile initially climbs during direct-attack mode.
187 virtual void setDirectAttackClimbOutAngle(double angle);
188
189 //! \brief Gets the climb-out angle for direct-attack mode
190 //! \return The climb-out angle in radians
191 //!
192 //! Returns the angle at which the missile initially climbs during direct-attack mode.
193 virtual double directAttackClimbOutAngle() const;
194
195 //! \brief Sets the terminal angle for direct-attack mode
196 //! \param angle The terminal angle in radians
197 //!
198 //! Sets the angle at which the missile approaches the target in terminal phase
199 //! during direct-attack mode.
200 virtual void setDirectAttackTerminalAngle(double angle);
201
202 //! \brief Gets the terminal angle for direct-attack mode
203 //! \return The terminal angle in radians
204 //!
205 //! Returns the angle at which the missile approaches the target in terminal phase
206 //! during direct-attack mode.
207 virtual double directAttackTerminalAngle() const;
208
209 //! \brief Sets the maximum altitude for direct-attack mode
210 //! \param altitude The maximum altitude in meters
211 //!
212 //! Sets the maximum altitude the missile reaches during the climb-out phase
213 //! in direct-attack mode.
214 virtual void setDirectAttackMaxAltitude(double altitude);
215
216 //! \brief Gets the maximum altitude for direct-attack mode
217 //! \return The maximum altitude in meters
218 //!
219 //! Returns the maximum altitude the missile reaches during the climb-out phase
220 //! in direct-attack mode.
221 virtual double directAttackMaxAltitude() const;
222
223 //! \brief Sets the minimum range for direct-attack mode
224 //! \param range The minimum range in meters
225 //!
226 //! Sets the minimum range at which direct-attack mode can be effectively used.
227 virtual void setDirectAttackMinRange(double range);
228
229 //! \brief Gets the minimum range for direct-attack mode
230 //! \return The minimum range in meters
231 //!
232 //! Returns the minimum range at which direct-attack mode can be effectively used.
233 virtual double directAttackMinRange() const;
234
235 //! @}
236
237 //! \name Common Parameters
238 //! @{
239
240 //! \brief Sets the maximum range for the missile
241 //! \param range The maximum range in meters
242 //!
243 //! Sets the maximum effective range of the missile, applicable to both
244 //! top-attack and direct-attack modes.
245 virtual void setMaxRange(double range);
246
247 //! \brief Gets the maximum range for the missile
248 //! \return The maximum range in meters
249 //!
250 //! Returns the maximum effective range of the missile, applicable to both
251 //! top-attack and direct-attack modes.
252 virtual double maxRange() const;
253
254 //! @}
255
256protected:
257 //! \brief Default constructor (not implemented)
258 //!
259 //! Default constructor is protected and not implemented to prevent
260 //! creation of instances without proper initialization.
262
263protected:
264 //! \brief Climb-out angle for top-attack mode
265 //!
266 //! The angle at which the missile initially climbs during top-attack mode.
267 //! Parameter name: "top-attack-climb-out-angle"
268 //! Default value: 0.314159 radians (18 degrees)
270
271 //! \brief Terminal angle for top-attack mode
272 //!
273 //! The angle at which the missile approaches the target in terminal phase
274 //! during top-attack mode.
275 //! Parameter name: "top-attack-terminal-angle"
276 //! Default value: 0.191986 radians (11 degrees)
278
279 //! \brief Maximum altitude for top-attack mode
280 //!
281 //! The maximum altitude the missile reaches during altitude-hold phase
282 //! in top-attack mode.
283 //! Parameter name: "top-attack-max-altitude"
284 //! Default value: 150 meters
286
287 //! \brief Minimum range for top-attack mode
288 //!
289 //! The minimum range at which top-attack mode can be effectively used.
290 //! Parameter name: "top-attack-min-range"
291 //! Default value: 150 meters
293
294 //! \brief Climb-out angle for direct-attack mode
295 //!
296 //! The angle at which the missile initially climbs during direct-attack mode.
297 //! Parameter name: "direct-attack-climb-out-angle"
298 //! Default value: 0.191986 radians (11 degrees)
300
301 //! \brief Terminal angle for direct-attack mode
302 //!
303 //! The angle at which the missile approaches the target in terminal phase
304 //! during direct-attack mode.
305 //! Parameter name: "direct-attack-terminal-angle"
306 //! Default value: 0.0349066 radians (2 degrees)
308
309 //! \brief Maximum altitude for direct-attack mode
310 //!
311 //! The maximum altitude the missile reaches during the climb-out phase
312 //! in direct-attack mode.
313 //! Parameter name: "direct-attack-max-altitude"
314 //! Default value: 60 meters
316
317 //! \brief Minimum range for direct-attack mode
318 //!
319 //! The minimum range at which direct-attack mode can be effectively used.
320 //! Parameter name: "direct-attack-min-range"
321 //! Default value: 65 meters
323
324 //! \brief Maximum range of the missile
325 //!
326 //! The maximum effective range of the missile, applicable to both
327 //! top-attack and direct-attack modes.
328 //! Parameter name: "max-range"
329 //! Default value: 2500 meters
330 DtRwReal myMaxRange;
331};
332} // namespace makVre
DtTopAndDirectAttackMissileControllerDescriptor & operator=(const DtTopAndDirectAttackMissileControllerDescriptor &orig)
Assignment operator.
virtual void setDirectAttackTerminalAngle(double angle)
Sets the terminal angle for direct-attack mode.
virtual double topAttackClimbOutAngle() const
Gets the climb-out angle for top-attack mode.
virtual void setMaxRange(double range)
Sets the maximum range for the missile.
virtual void setTopAttackMaxAltitude(double altitude)
Sets the maximum altitude for top-attack mode.
virtual double topAttackMaxAltitude() const
Gets the maximum altitude for top-attack mode.
DtRwReal myTopAttackMinRange
Minimum range for top-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:292
virtual void setTopAttackClimbOutAngle(double angle)
Sets the climb-out angle for top-attack mode.
DtTopAndDirectAttackMissileControllerDescriptor(const DtString &componentName, DtReaderWriterRegistry *parentRegistry=NULL)
Constructor with component name.
virtual void setDirectAttackMinRange(double range)
Sets the minimum range for direct-attack mode.
DtRwReal myDirectAttackMinRange
Minimum range for direct-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:322
virtual double topAttackMinRange() const
Gets the minimum range for top-attack mode.
virtual double maxRange() const
Gets the maximum range for the missile.
static DtComponentDescriptor * creator()
Factory function to create a new instance of this descriptor.
DtTopAndDirectAttackMissileControllerDescriptor(const DtTopAndDirectAttackMissileControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=NULL)
Copy constructor.
virtual double directAttackMaxAltitude() const
Gets the maximum altitude for direct-attack mode.
virtual double directAttackClimbOutAngle() const
Gets the climb-out angle for direct-attack mode.
virtual ~DtTopAndDirectAttackMissileControllerDescriptor() override
Virtual destructor.
virtual void setDirectAttackMaxAltitude(double altitude)
Sets the maximum altitude for direct-attack mode.
DtRwReal myDirectAttackMaxAltitude
Maximum altitude for direct-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:315
DtRwReal myTopAttackClimbOutAngle
Climb-out angle for top-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:269
DtRwReal myTopAttackTerminalAngle
Terminal angle for top-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:277
DtRwReal myDirectAttackClimbOutAngle
Climb-out angle for direct-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:299
DtTopAndDirectAttackMissileControllerDescriptor(const DtSymbolString &componentName, DtReaderWriterRegistry *parentRegistry=NULL)
Constructor with component name as symbol string.
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=NULL) const override
Creates a clone of this descriptor.
bool operator==(const DtTopAndDirectAttackMissileControllerDescriptor &other) const
Equality operator.
virtual double topAttackTerminalAngle() const
Gets the terminal angle for top-attack mode.
virtual DtString type() const override
Gets the type identifier for this descriptor.
virtual double directAttackTerminalAngle() const
Gets the terminal angle for direct-attack mode.
virtual void setDirectAttackClimbOutAngle(double angle)
Sets the climb-out angle for direct-attack mode.
virtual void setTopAttackMinRange(double range)
Sets the minimum range for top-attack mode.
DtRwReal myMaxRange
Maximum range of the missile.
Definition topAndDirectAttackMissileControllerDescriptor.h:330
DtTopAndDirectAttackMissileControllerDescriptor()
Default constructor (not implemented)
DtRwReal myDirectAttackTerminalAngle
Terminal angle for direct-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:307
virtual double directAttackMinRange() const
Gets the minimum range for direct-attack mode.
virtual void setTopAttackTerminalAngle(double angle)
Sets the terminal angle for top-attack mode.
DtRwReal myTopAttackMaxAltitude
Maximum altitude for top-attack mode.
Definition topAndDirectAttackMissileControllerDescriptor.h:285
Export macros for the VREngage Object Parameter library.
#define VREVRFOBJPARAM_DLL
Platform-specific DLL export/import declaration.
Definition export.h:27
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtTopAndDirectAttackMissileControllerDescriptorType[]
Type identifier string for the top and direct attack missile controller descriptor.
Definition topAndDirectAttackMissileControllerDescriptor.h:44