|
VR-Engage
2.2
|
DtRotaryWingJoyFlightController extends the base rotary wing pilot controller to provide joystick control functionality for helicopters and other rotary-wing aircraft. It translates joystick inputs into appropriate control commands for cyclic, collective, and anti-torque controls, managing the complex flight dynamics of rotary-wing vehicles.
The controller includes stabilization functionality with configurable gains to assist pilot control while still allowing for realistic helicopter flight characteristics.
Uses Descriptor Type: DtRotaryWingPilotDescriptor
#include <rotaryWingJoyFlightController.h>
Public Member Functions | |
| DtRotaryWingJoyFlightController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtRotaryWingJoyFlightController () override |
| virtual bool | init () override |
| virtual const char * | type () const override |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
Protected Member Functions | |
| virtual void | calculateGains (const DtReal manuverConst, const DtReal riseTime, DtReal &velGain, DtReal &oriGain) |
| virtual void | calcAndSetPortValues (const DtString &functionGroup, const DtString &function, double value, bool repeat) override |
| virtual void | joystickConnected () override |
| virtual void | joystickDisconnected () override |
| DtRotaryWingJoyFlightController () | |
| DtRotaryWingJoyFlightController (const DtRotaryWingJoyFlightController &orig) | |
| DtRotaryWingJoyFlightController & | operator= (const DtRotaryWingJoyFlightController &orig) |
Protected Attributes | |
| DtReal | myPitchVelGain |
| DtReal | myPitchOriGain |
| DtReal | myRollVelGain |
| DtReal | myRollOriGain |
| DtReal | myYawVelGain |
| DtReal | myYawOriGain |
| makVre::DtRotaryWingJoyFlightController::DtRotaryWingJoyFlightController | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = 0, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new rotary wing joystick flight controller component with the specified parameters. Initializes control gains and joystick input mappings for helicopter flight control.
Referenced by DtRotaryWingJoyFlightController(), and operator=().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the rotary wing joystick flight controller component.
|
protected |
Default constructor (not implemented)
Default constructor is protected and not implemented to prevent creation of instances without proper initialization.
|
protected |
Copy constructor (not implemented)
Copy constructor is protected and not implemented to prevent copy construction.
References DtRotaryWingJoyFlightController().
|
overridevirtual |
Initializes the controller.
Initializes the rotary wing joystick flight controller, setting up control gains and registering with the joystick system. Called during component creation.
Reimplemented in RlCgfVrf::DtVreRlJoyController.
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
Reimplemented in RlCgfVrf::DtVreRlJoyController.
|
static |
Factory method to create a new instance of this component.
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
Static factory method used by the component creation system to instantiate new instances of this component type.
|
protectedvirtual |
Calculates stabilizing control gains for rotary wing flight.
| manuverConst | Maneuverability constant affecting control responsiveness |
| riseTime | Time to desired rise in response to control inputs |
| velGain | Output parameter for calculated velocity gain |
| oriGain | Output parameter for calculated orientation gain |
Calculates stabilizing gains using the input parameters and internal configuration. These gains are used to establish the proper balance between control responsiveness and stability for the rotary wing aircraft.
|
overrideprotectedvirtual |
Processes joystick input and sets corresponding port values.
| functionGroup | The function group identifier for the input |
| function | The specific function name for the input |
| value | The input value (typically in range [-1.0, 1.0]) |
| repeat | Flag indicating whether the function should repeat |
Handles joystick input by translating joystick function calls into appropriate helicopter control values. Maps joystick axes and buttons to cyclic, collective, and anti-torque controls for rotary wing flight.
Reimplemented in RlCgfVrf::DtVreRlJoyController.
|
overrideprotectedvirtual |
Handles joystick connection events.
Required by the DtJoystickControllerInterface. Called when a joystick is connected to the system. Sets up initial joystick mappings and prepares the controller to receive joystick inputs.
|
overrideprotectedvirtual |
Handles joystick disconnection events.
Required by the DtJoystickControllerInterface. Called when a joystick is disconnected from the system. Ensures the controller gracefully handles the loss of joystick input.
|
protected |
Assignment operator (not implemented)
Assignment operator is protected and not implemented to prevent assignment.
References DtRotaryWingJoyFlightController().
|
protected |
Feedback gain for the pitch angular velocity control.
Controls the responsiveness of the pitch rate to joystick inputs. Higher values result in faster pitch rate changes.
|
protected |
Feedback gain for the pitch orientation control.
Controls the responsiveness of the pitch angle to joystick inputs. Higher values result in more direct pitch angle control.
|
protected |
Feedback gain for the roll angular velocity control.
Controls the responsiveness of the roll rate to joystick inputs. Higher values result in faster roll rate changes.
|
protected |
Feedback gain for the roll orientation control.
Controls the responsiveness of the roll angle to joystick inputs. Higher values result in more direct roll angle control.
|
protected |
Feedback gain for the yaw angular velocity control.
Controls the responsiveness of the yaw rate to joystick inputs. Higher values result in faster yaw rate changes.
|
protected |
Feedback gain for the yaw orientation control.
Controls the responsiveness of the yaw angle to joystick inputs. Higher values result in more direct yaw angle control.