Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SineWhiteNoise Class Reference

Sine wave noise. Produces a 90 degree phase shifted sine wave or white noise. More...

#include <noisegenerator.h>

Inheritance diagram for SineWhiteNoise:
Collaboration diagram for SineWhiteNoise:

Public Member Functions

 SineWhiteNoise (double omega, double amplitude, double phaseShift=M_PI/2, unsigned int channels=0xFFFF)
 
virtual ~SineWhiteNoise ()
 
virtual double generate ()
 generate somehow distributed random number parameterized with min and max. More...
 
virtual void add (double *value, double noiseStrength)
 adds multidimensional noise to the value field. More...
 
void setOmega (double omega)
 
void setPhaseShift (double phaseShift)
 
- Public Member Functions inherited from NoiseGenerator
 NoiseGenerator ()
 
virtual ~NoiseGenerator ()
 
virtual void init (unsigned int dimension, RandGen *randGen=0)
 initialization with the the given dimension for multidimensional noise More...
 
virtual unsigned int getDimension () const
 
virtual void setDimension (unsigned int dim)
 

Protected Attributes

long int t
 
double omega
 
double amplitude
 
unsigned int channels
 
double phaseShift
 
- Protected Attributes inherited from NoiseGenerator
unsigned int dimension
 
RandGenrandGen
 
bool ownRandGen
 

Additional Inherited Members

- Protected Member Functions inherited from NoiseGenerator
double uniform (double min=-0.1, double max=0.1)
 
double uniform01 ()
 

Detailed Description

Sine wave noise. Produces a 90 degree phase shifted sine wave or white noise.

Constructor & Destructor Documentation

SineWhiteNoise ( double  omega,
double  amplitude,
double  phaseShift = M_PI/2,
unsigned int  channels = 0xFFFF 
)
inline
Parameters
omegaanglerate
amplitudeweighting of sine wave against noise strength
phaseShiftphase shift between channels in rad
channelsnumber of channel for sine noise (and the rest get white noise)
virtual ~SineWhiteNoise ( )
inlinevirtual

Member Function Documentation

virtual void add ( double *  value,
double  noiseStrength 
)
inlinevirtual

adds multidimensional noise to the value field.

Parameters
valuefield where noise is added. Must have length dimension (init())

Reimplemented from NoiseGenerator.

virtual double generate ( )
inlinevirtual

generate somehow distributed random number parameterized with min and max.

valid only for ONE random number, use add() for adding this kind of noise to several channels

Implements NoiseGenerator.

void setOmega ( double  omega)
inline
void setPhaseShift ( double  phaseShift)
inline

Member Data Documentation

double amplitude
protected
unsigned int channels
protected
double omega
protected
double phaseShift
protected
long int t
protected

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