Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

suGeneralizedForcePerturbation Class Reference

A derivatives callback used for applying a generalized force during a simulation. More...

#include <suGeneralizedForcePerturbation.h>

Inheritance diagram for suGeneralizedForcePerturbation:

rdDerivCallback rdCallback rdObject List of all members.

Public Member Functions

 suGeneralizedForcePerturbation (rdModel *aModel)
 Construct a derivative callback instance for perturbing a generalized force during an integration.

 suGeneralizedForcePerturbation (rdModel *aModel, rdGCVSpline *_aSpline)
 Construct a derivative callback instance for perturbing a generalized force during an integration.

virtual ~suGeneralizedForcePerturbation ()
 Destructor.

void setGenCoord (int aGenCoord)
 Set which generalized coordinate the force perturbation should be made.

int getGenCoord () const
 Get which generalized coordinate the force perturbation should be made.

void setScaleFactor (double aScaleFactor)
 Set the scale factor by which the perturbation will be multiplied.

double getScaleFactor () const
 Get the scale factor by which the perturbation will be multiplied.

void setPerturbation (double aPerturbation)
 Set the perturbation.

double getPerturbation () const
 Get the pertubation value.

virtual void computeActuation (double aT, double *aX, double *aY)
 Callback called right after actuation has been computed by the model.

virtual void applyActuation (double aT, double *aX, double *aY)
 Callback called right after actuation has been applied by the model.


Protected Attributes

int _genCoord
 Which generalized coordinate.

double _perturbation
 Perturbation to be applied.

double _scaleFactor
 Scaling factor to be applied to perturbation.

rdGCVSpline_genForceSpline
 The function defining the generalized force to be applied *.


Private Member Functions

void setNull ()
 Set member variables to approprate NULL values.


Detailed Description

A derivatives callback used for applying a generalized force during a simulation.

Author:
Frank C. Anderson, Saryn R. Goldberg
Version:
1.0


Constructor & Destructor Documentation

suGeneralizedForcePerturbation::suGeneralizedForcePerturbation rdModel aModel  ) 
 

Construct a derivative callback instance for perturbing a generalized force during an integration.

When this default constructor is used, the perturbation for to the generalized force is set to be a unit torque. This can then be scaled if the user wants to apply a constant torque to a generalized coordinate.

Parameters:
aModel Model for which actuator forces are to be perturbed.

suGeneralizedForcePerturbation::suGeneralizedForcePerturbation rdModel aModel,
rdGCVSpline _aSpline
 

Construct a derivative callback instance for perturbing a generalized force during an integration.

When this constructor is used, the rdStorage sent in by the user is used to define a function object. This function is used to define the generalized force that is applied during the simulation.

Parameters:
aModel Model for which actuator forces are to be perturbed.
aFunction Function that defines the generalized force to be applied.


Member Function Documentation

void suGeneralizedForcePerturbation::applyActuation double  aT,
double *  aX,
double *  aY
[virtual]
 

Callback called right after actuation has been applied by the model.

The nominal atuator force is restored.

Reimplemented from rdDerivCallback.

void suGeneralizedForcePerturbation::computeActuation double  aT,
double *  aX,
double *  aY
[virtual]
 

Callback called right after actuation has been computed by the model.

The perturbation generalized force is applied to the generalized coordinate.

Parameters:
aT Normalized time.
aX Controls.
aY States.

Reimplemented from rdDerivCallback.

int suGeneralizedForcePerturbation::getGenCoord  )  const
 

Get which generalized coordinate the force perturbation should be made.

Returns:
Generalized coordiante to which force is applied..

double suGeneralizedForcePerturbation::getPerturbation  )  const
 

Get the pertubation value.

Returns:
Factor by which perturbation is multiplied

double suGeneralizedForcePerturbation::getScaleFactor  )  const
 

Get the scale factor by which the perturbation will be multiplied.

Returns:
Factor by which perturbation is multiplied

void suGeneralizedForcePerturbation::setGenCoord int  aGenCoord  ) 
 

Set which generalized coordinate the force perturbation should be made.

Parameters:
aIndex Index of the generalized coordinate.

void suGeneralizedForcePerturbation::setPerturbation double  aPerturbation  ) 
 

Set the perturbation.

This is only neccesary if you want to apply a constant perturbation that does not come from a spline.

Parameters:
aPerturbation Value of constatn perturbation

void suGeneralizedForcePerturbation::setScaleFactor double  aScaleFactor  ) 
 

Set the scale factor by which the perturbation will be multiplied.

Parameters:
aScaleFactor Factor by which perturbation is multiplied


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:14 2003 for Simulation Software by doxygen1.3