VR-Engage  2.2
Loading...
Searching...
No Matches
vreFwlParameters.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreFwlParameters.h
7//! \ingroup vreVrfRtdobjparam
8//! \brief Fixed-wing parameters for VREngage
9//!
10//! This file defines the DtVreFwlParameters class, which contains the configuration
11//! parameters for fixed-wing aircraft in VREngage. It includes settings for
12//! control response, aircraft limits, and simulation fidelity.
13
14#pragma once
15
17
20#include <vrfobjparam/fixedWingEntityParameters.h>
21#pragma warning(pop)
22
23 class DtString;
24class DtReaderWriterRegistry;
25
26namespace FwlCgfVrf
27{
28class Controller;
29
30//! \brief Type string for VREngage fixed-wing parameters
31//!
32//! Constant used to identify this parameter type in the simulation system.
33const char TS_Parameter[] = "fixedwinglib-cgf-vr-engage-param";
34//! \brief Fixed-wing parameters for VREngage
35//!
36//! This class contains the configuration parameters for fixed-wing aircraft
37//! in VREngage. It extends the base fixed-wing entity parameters with
38//! VREngage-specific settings for control response, aircraft limits, and
39//! simulation fidelity options.
40class RTD_VRF_BACKEND_OBJPARAM_DLL DtVreFwlParameters : public DtFixedWingEntityParameters
41{
42 //! Friend class that needs direct access to parameter internals
43 friend class Controller;
44
45public:
46#if RTD_VRF_PLUGIN_VER == 411
47 //! \brief Constructor
48 //! \param name The name of the parameters
49 //! \param parentRegistry Parent registry for reader/writer functionality
50 //!
51 //! Initializes a new fixed-wing parameters object with default values.
52 DtVreFwlParameters(const DtString& name = DtString::nullString(), DtReaderWriterRegistry* parentRegistry = NULL);
53#else
54 //! \brief Constructor
55 //! \param name The name of the parameters
56 //! \param parentRegistry Parent registry for reader/writer functionality
57 //! \param env Environment for parameter values
58 //! \param objectNode Node containing parameter values
59 //!
60 //! Initializes a new fixed-wing parameters object with values from the provided environment.
61 DtVreFwlParameters(const DtString& name = DtString::nullString(), DtReaderWriterRegistry* parentRegistry = NULL,
62 DtEnvironmentSP env = DtEnvironmentSP(), DtEnvValueSP* objectNode = NULL);
63#endif
64 //! \brief Copy constructor
65 //! \param orig The source parameters to copy from
66 //! \param name The name for the new parameters
67 //! \param parentRegistry Parent registry for reader/writer functionality
68 //!
69 //! Creates a new parameters object as a copy of the provided original parameters.
70 DtVreFwlParameters(const DtVreFwlParameters& orig, const DtString& name, DtReaderWriterRegistry* parentRegistry);
71
72 //! \brief Virtual destructor
73 //!
74 //! Cleans up resources used by the parameters object.
75 virtual ~DtVreFwlParameters() override;
76
77#if RTD_VRF_PLUGIN_VER == 411
78 //! \brief Creator function for this parameter type
79 //! \return Pointer to a new parameters object of this type
80 //!
81 //! Static factory function used for parameter creation.
82 static DtVrfObjectParameters* creator();
83#else
84 //! \brief Creator function for this parameter type
85 //! \param env Environment for parameter values
86 //! \param root Root node containing parameter values
87 //! \return Pointer to a new parameters object of this type
88 //!
89 //! Static factory function used for parameter creation with environment support.
90 static DtVrfObjectParameters* creator(DtEnvironmentSP env, DtEnvValueSP* root);
91#endif
92
93 //! \brief Assignment operator
94 //! \param orig The source parameters to copy from
95 //! \return Reference to this parameters object after assignment
96 //!
97 //! Assigns the contents of the provided parameters to this parameters object.
99
100 //! \brief Assignment operator from base class
101 //! \param orig The source base parameters to copy from
102 //! \return Reference to this parameters object after assignment
103 //!
104 //! Assigns the contents of the provided base parameters to this parameters object.
105 const DtVreFwlParameters& operator=(const DtFixedWingEntityParameters& orig);
106
107 //! \brief Creates a clone of these parameters
108 //! \param name The name for the cloned parameters
109 //! \param parentRegistry Parent registry for reader/writer functionality
110 //! \return Pointer to a new parameters object that is a clone of this one
111 //!
112 //! Creates a new parameters object as a deep copy of this parameters object.
113 virtual DtVrfObjectParameters* clone(const DtString& name = DtString::nullString(),
114 DtReaderWriterRegistry* parentRegistry = 0) const override;
115
116 //! \brief Gets the parameters type
117 //! \return The type string for these parameters
118 //!
119 //! Returns TS_Parameter as the parameters type identifier.
120 virtual DtString type() const override;
121
122 //! \brief Gets the aircraft dynamics parameter file path
123 //! \return The file path to the aircraft dynamics parameters
124 //!
125 //! Returns the path to the file containing detailed aircraft dynamics parameters.
127
128 //! \brief Gets the altitude offset
129 //! \return The altitude offset value
130 //!
131 //! Returns the altitude offset applied to the aircraft's position.
132 DtReal getAltitudeOffset() const;
133
134 //! \brief Gets the lateral control deadzone
135 //! \return The lateral control deadzone value
136 //!
137 //! Returns the deadzone value for lateral (roll) control inputs.
139
140 //! \brief Gets the longitudinal control deadzone
141 //! \return The longitudinal control deadzone value
142 //!
143 //! Returns the deadzone value for longitudinal (pitch) control inputs.
145
146 //! \brief Gets the pedal control deadzone
147 //! \return The pedal control deadzone value
148 //!
149 //! Returns the deadzone value for pedal (rudder) control inputs.
150 DtReal getPedalDeadzone() const;
151
152 //! \brief Gets the default maximum load factor
153 //! \return The default maximum load factor
154 //!
155 //! Returns the default maximum load factor (G-force) for the aircraft.
156 DtReal getDefaultMaxLoad() const;
157
158 //! \brief Gets the default roll rate
159 //! \return The default roll rate
160 //!
161 //! Returns the default roll rate for the aircraft.
162 DtReal getDefaultRollRate() const;
163
164 //! \brief Gets the default vertical speed
165 //! \return The default vertical speed
166 //!
167 //! Returns the default vertical speed for the aircraft.
168 DtReal getDefaultVertSpeed() const;
169
170 //! \brief Gets whether high-fidelity terrain queries are enabled
171 //! \return True if high-fidelity terrain queries are enabled, false otherwise
172 //!
173 //! Returns whether high-fidelity terrain queries are enabled for this aircraft.
175
176 //! \brief Gets the maximum altitude limit
177 //! \return Reference to the maximum altitude value
178 //!
179 //! Returns the maximum altitude limit for the aircraft.
180 const DtRwReal& getMaxAltitude() const { return myMaxAltitude; }
181
182 //! \brief Gets the maximum speed limit
183 //! \return Reference to the maximum speed value
184 //!
185 //! Returns the maximum speed limit for the aircraft.
186 const DtRwReal& getMaxSpeed() const { return myMaxSpeed; }
187
188 //! \brief Inherits values from another parameters object
189 //! \param benefactor The parameters object to inherit from
190 //! \return True if values were successfully inherited, false otherwise
191 //!
192 //! Inherits values from another parameters object, if it is of a compatible type.
193 virtual bool inheritValues(const DtVrfObjectParameters* benefactor) override;
194
195 //! \brief Inherits values from another parameters object of the same type
196 //! \param pars The parameters object to inherit from
197 //!
198 //! Inherits values from another parameters object of the same type.
200
201protected:
202 //! \brief Altitude offset value
203 //!
204 //! Offset applied to the aircraft's altitude.
206
207 //! \brief Lateral control deadzone value
208 //!
209 //! Deadzone for lateral (roll) control inputs.
211
212 //! \brief Longitudinal control deadzone value
213 //!
214 //! Deadzone for longitudinal (pitch) control inputs.
216
217 //! \brief Pedal control deadzone value
218 //!
219 //! Deadzone for pedal (rudder) control inputs.
221
222 //! \brief Default maximum load factor
223 //!
224 //! Default maximum load factor (G-force) for the aircraft.
226
227 //! \brief Default roll rate
228 //!
229 //! Default roll rate for the aircraft.
231
232 //! \brief Default vertical speed
233 //!
234 //! Default vertical speed for the aircraft.
236
237 //! \brief Flag for high-fidelity terrain queries
238 //!
239 //! When true, high-fidelity terrain queries are used for this aircraft.
241
242private:
243 //! \brief File path to the aircraft dynamics parameters
244 //!
245 //! Path to the file containing detailed aircraft dynamics parameters.
247};
248
249} // namespace FwlCgfVrf
Compiler warning configuration for external includes.
DtReal getLateralControlDeadzone() const
Gets the lateral control deadzone.
DtReal getDefaultVertSpeed() const
Gets the default vertical speed.
virtual bool inheritValues(const DtVrfObjectParameters *benefactor) override
Inherits values from another parameters object.
DtRwReal myAltitudeOffset
Altitude offset value.
Definition vreFwlParameters.h:205
DtRwReal myLongitudinalControlDeadZone
Longitudinal control deadzone value.
Definition vreFwlParameters.h:215
DtRwString myDynamicsParameterFile
File path to the aircraft dynamics parameters.
Definition vreFwlParameters.h:246
DtVreFwlParameters(const DtVreFwlParameters &orig, const DtString &name, DtReaderWriterRegistry *parentRegistry)
Copy constructor.
DtRwReal myDefaultMaxLoad
Default maximum load factor.
Definition vreFwlParameters.h:225
DtReal getDefaultMaxLoad() const
Gets the default maximum load factor.
DtString getSimpleAirplaneParameterFile() const
Gets the aircraft dynamics parameter file path.
virtual void inheritValuesFromThisType(const DtVreFwlParameters *pars)
Inherits values from another parameters object of the same type.
DtVreFwlParameters(const DtString &name=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=NULL, DtEnvironmentSP env=DtEnvironmentSP(), DtEnvValueSP *objectNode=NULL)
Constructor.
DtRwReal myPedalDeadZone
Pedal control deadzone value.
Definition vreFwlParameters.h:220
DtReal getDefaultRollRate() const
Gets the default roll rate.
static DtVrfObjectParameters * creator(DtEnvironmentSP env, DtEnvValueSP *root)
Creator function for this parameter type.
DtRwReal myDefaultVertSpeed
Default vertical speed.
Definition vreFwlParameters.h:235
DtRwBoolean myHighFidelityTerrainQueries
Flag for high-fidelity terrain queries.
Definition vreFwlParameters.h:240
virtual DtVrfObjectParameters * clone(const DtString &name=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of these parameters.
const DtRwReal & getMaxAltitude() const
Gets the maximum altitude limit.
Definition vreFwlParameters.h:180
const DtVreFwlParameters & operator=(const DtFixedWingEntityParameters &orig)
Assignment operator from base class.
DtReal getPedalDeadzone() const
Gets the pedal control deadzone.
friend class Controller
Friend class that needs direct access to parameter internals.
Definition vreFwlParameters.h:43
DtReal getAltitudeOffset() const
Gets the altitude offset.
virtual DtString type() const override
Gets the parameters type.
DtRwReal myDefaultRollRate
Default roll rate.
Definition vreFwlParameters.h:230
virtual ~DtVreFwlParameters() override
Virtual destructor.
const DtVreFwlParameters & operator=(const DtVreFwlParameters &orig)
Assignment operator.
const DtRwReal & getMaxSpeed() const
Gets the maximum speed limit.
Definition vreFwlParameters.h:186
DtRwReal myLateralControlDeadZone
Lateral control deadzone value.
Definition vreFwlParameters.h:210
DtBoolean getHighFidelityTerrainQueries() const
Gets whether high-fidelity terrain queries are enabled.
DtReal getLongitudinalControlDeadzone() const
Gets the longitudinal control deadzone.
Export macros for the VREngage RTD object parameter library.
#define RTD_VRF_BACKEND_OBJPARAM_DLL
Platform-specific DLL export/import declaration.
Definition export.h:27
Definition vreFwlActuator.h:35
const char TS_Parameter[]
Type string for VREngage fixed-wing parameters.
Definition vreFwlParameters.h:33
RTDVRFConfigWarnsForExternalIncludes() class DtString