VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtRotaryWingJoyFlightController Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtRotaryWingJoyFlightController:
[legend]

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)
 
DtRotaryWingJoyFlightControlleroperator= (const DtRotaryWingJoyFlightController &orig)
 

Protected Attributes

DtReal myPitchVelGain
 
DtReal myPitchOriGain
 
DtReal myRollVelGain
 
DtReal myRollOriGain
 
DtReal myYawVelGain
 
DtReal myYawOriGain
 

Constructor & Destructor Documentation

◆ DtRotaryWingJoyFlightController() [1/3]

makVre::DtRotaryWingJoyFlightController::DtRotaryWingJoyFlightController ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Parameters
nameThe name of this component
ownerThe local object that owns this component
simManagerThe simulation services manager
descComponent descriptor with configuration parameters
parentRegistryOptional 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=().

◆ ~DtRotaryWingJoyFlightController()

virtual makVre::DtRotaryWingJoyFlightController::~DtRotaryWingJoyFlightController ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the rotary wing joystick flight controller component.

◆ DtRotaryWingJoyFlightController() [2/3]

makVre::DtRotaryWingJoyFlightController::DtRotaryWingJoyFlightController ( )
protected

Default constructor (not implemented)

Default constructor is protected and not implemented to prevent creation of instances without proper initialization.

◆ DtRotaryWingJoyFlightController() [3/3]

makVre::DtRotaryWingJoyFlightController::DtRotaryWingJoyFlightController ( const DtRotaryWingJoyFlightController & orig)
protected

Copy constructor (not implemented)

Copy constructor is protected and not implemented to prevent copy construction.

References DtRotaryWingJoyFlightController().

Member Function Documentation

◆ init()

virtual bool makVre::DtRotaryWingJoyFlightController::init ( )
overridevirtual

Initializes the controller.

Returns
True if initialization was successful, false otherwise

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.

◆ type()

virtual const char * makVre::DtRotaryWingJoyFlightController::type ( ) const
overridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtRotaryWingJoyFlightControllerType)

Implements the DtSimComponent::type() method to return the type identifier for this component.

Reimplemented in RlCgfVrf::DtVreRlJoyController.

◆ creator()

static DtSimComponent * makVre::DtRotaryWingJoyFlightController::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
static

Factory method to create a new instance of this component.

Parameters
nameThe name for the new component
ownerThe local object that will own this component
simManagerThe simulation services manager
descOptional component descriptor
parentRegistryOptional parent registry for reader/writer functionality
Returns
Pointer to the newly created component

Static factory method used by the component creation system to instantiate new instances of this component type.

◆ calculateGains()

virtual void makVre::DtRotaryWingJoyFlightController::calculateGains ( const DtReal manuverConst,
const DtReal riseTime,
DtReal & velGain,
DtReal & oriGain )
protectedvirtual

Calculates stabilizing control gains for rotary wing flight.

Parameters
manuverConstManeuverability constant affecting control responsiveness
riseTimeTime to desired rise in response to control inputs
velGainOutput parameter for calculated velocity gain
oriGainOutput 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.

◆ calcAndSetPortValues()

virtual void makVre::DtRotaryWingJoyFlightController::calcAndSetPortValues ( const DtString & functionGroup,
const DtString & function,
double value,
bool repeat )
overrideprotectedvirtual

Processes joystick input and sets corresponding port values.

Parameters
functionGroupThe function group identifier for the input
functionThe specific function name for the input
valueThe input value (typically in range [-1.0, 1.0])
repeatFlag 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.

◆ joystickConnected()

virtual void makVre::DtRotaryWingJoyFlightController::joystickConnected ( )
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.

◆ joystickDisconnected()

virtual void makVre::DtRotaryWingJoyFlightController::joystickDisconnected ( )
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.

◆ operator=()

DtRotaryWingJoyFlightController & makVre::DtRotaryWingJoyFlightController::operator= ( const DtRotaryWingJoyFlightController & orig)
protected

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is protected and not implemented to prevent assignment.

References DtRotaryWingJoyFlightController().

Member Data Documentation

◆ myPitchVelGain

DtReal makVre::DtRotaryWingJoyFlightController::myPitchVelGain
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.

◆ myPitchOriGain

DtReal makVre::DtRotaryWingJoyFlightController::myPitchOriGain
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.

◆ myRollVelGain

DtReal makVre::DtRotaryWingJoyFlightController::myRollVelGain
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.

◆ myRollOriGain

DtReal makVre::DtRotaryWingJoyFlightController::myRollOriGain
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.

◆ myYawVelGain

DtReal makVre::DtRotaryWingJoyFlightController::myYawVelGain
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.

◆ myYawOriGain

DtReal makVre::DtRotaryWingJoyFlightController::myYawOriGain
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.


The documentation for this class was generated from the following file: