VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtRotaryWingJoyFlightController Class Reference

DtRotaryWingJoyFlightController is a controller that enables joystick control of a rotary wing aircraft. More...

Inheritance diagram for DtRotaryWingJoyFlightController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtRotaryWingJoyFlightController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtRotaryWingJoyFlightController ()
 destructor
virtual bool init ()
 Overridden to initialize myRotaryWingEntityState.
virtual void tick ()
 Calculate new control values.
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void processSetJoyDeviceSwitch (DtSimMessage *msg)
 Process the callback message.
virtual void calcAndSetPortValues ()
 Calculate new control values and set them to the ports.
virtual bool joystickEnabled () const

Static Public Member Functions

static void setJoyDeviceSwitchCallbacks (DtSimMessage *msg, void *usrData)
 Callback for setting the enable switch.
static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual void calculateGains (const DtReal manuverConst, const DtReal riseTime, DtReal &velGain, DtReal &oriGain)
 Calculates stabilizing gains using the member rise-time variable and maneuverConst.
virtual void initializeJoyDevice ()
 Obtain the joyDevice and initialize it.
virtual void setRadio (DtSimRadio *radio)
 Overrides this so it can register it's interest in the set commands.
 DtRotaryWingJoyFlightController ()
 default constructor; not implemented
 DtRotaryWingJoyFlightController (const DtRotaryWingJoyFlightController &orig)
 copy constructor; not implemented
DtRotaryWingJoyFlightControlleroperator= (const DtRotaryWingJoyFlightController &orig)
 assignment operator; not implemented

Protected Attributes

DtJoyDevice * myJoyDevice
const
DtRotaryWingJoyDeviceControllerDescriptor
myJoyDeviceControllerDescriptor
 Pointer to the joydevice object.
bool myJoyDeviceInitialized
DtReal myPitchVelGain
DtReal myPitchOriGain
 Feedback gain for the pitch angular velocity control.
DtReal myRollVelGain
 Feedback gain for the pitch orientation control.
DtReal myRollOriGain
 Feedback gain for the roll angular velocity control.
DtReal myYawVelGain
 Feedback gain for the roll orientation control.
DtReal myYawOriGain
 Feedback gain for the yaw angular velocity control.
bool myJoystickEnabled
 Feedback gain for the yaw orientation control.

Detailed Description

DtRotaryWingJoyFlightController is a controller that enables joystick control of a rotary wing aircraft.

Uses Descriptor Type: DtRotaryWingPilotDescriptor


Constructor & Destructor Documentation

DtRotaryWingJoyFlightController::DtRotaryWingJoyFlightController ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor

default constructor; not implemented

copy constructor; not implemented


Member Function Documentation

Overridden to initialize myRotaryWingEntityState.

Reimplemented from DtRotaryWingPilotController.

virtual void DtRotaryWingJoyFlightController::tick ( ) [virtual]

Calculate new control values.

Reimplemented from DtRotaryWingPilotController.

virtual DtString DtRotaryWingJoyFlightController::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtRotaryWingJoyFlightControllerType

Reimplemented from DtRotaryWingPilotController.

static void DtRotaryWingJoyFlightController::setJoyDeviceSwitchCallbacks ( DtSimMessage msg,
void *  usrData 
) [static]

Callback for setting the enable switch.

Process the callback message.

Calculate new control values and set them to the ports.

static DtSimComponent* DtRotaryWingJoyFlightController::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.

Reimplemented from DtRotaryWingPilotController.

virtual void DtRotaryWingJoyFlightController::calculateGains ( const DtReal  manuverConst,
const DtReal  riseTime,
DtReal &  velGain,
DtReal &  oriGain 
) [protected, virtual]

Calculates stabilizing gains using the member rise-time variable and maneuverConst.

virtual void DtRotaryWingJoyFlightController::initializeJoyDevice ( ) [protected, virtual]

Obtain the joyDevice and initialize it.

virtual void DtRotaryWingJoyFlightController::setRadio ( DtSimRadio radio) [protected, virtual]

Overrides this so it can register it's interest in the set commands.

Reimplemented from DtControllerComponent.

DtRotaryWingJoyFlightController& DtRotaryWingJoyFlightController::operator= ( const DtRotaryWingJoyFlightController orig) [protected]

assignment operator; not implemented


Member Data Documentation

Pointer to the joydevice object.

Feedback gain for the pitch angular velocity control.

Feedback gain for the pitch orientation control.

Feedback gain for the roll angular velocity control.

Feedback gain for the roll orientation control.

Feedback gain for the yaw angular velocity control.

Feedback gain for the yaw orientation control.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)