Robot Simulator of the Robotics Group for Self-Organization of Control: SineWhiteNoise Class Reference

# SineWhiteNoise Class Reference

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

`#include <noisegenerator.h>`

Inherits NoiseGenerator.

Collaboration diagram for SineWhiteNoise:
[legend]

List of all members.

## 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.
virtual void | add (double *value, double noiseStrength)
| adds multidimensional noise to the value field.
void | setOmega (double omega)
void | setPhaseShift (double phaseShift)
## Protected Attributes
long int | t
double | omega
double | amplitude
unsigned int | channels
double | phaseShift

## 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:

  | omega | anglerate
  | amplitude | weighting of sine wave against noise strength
  | phaseShift | phase shift between channels in rad
  | channels | number of channel for sine noise (and the rest get white noise)

virtual ~SineWhiteNoise | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual void add | ( | double * | value,
|  | double | noiseStrength |
| ) |  |  | `[inline, virtual]`

adds multidimensional noise to the value field.

Parameters:

  | value | field where noise is added. Must have length dimension (init())

Reimplemented from NoiseGenerator.

virtual double generate | ( |  | ) | `[inline, virtual]`

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:

- noisegenerator.h