Robotsystem from Robot Group Leipzig: SineWhiteNoise Class Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# SineWhiteNoise Class Reference

`#include <noisegenerator.h>`

Inheritance diagram for SineWhiteNoise:

[legend]
Collaboration diagram for SineWhiteNoise:

[legend]
List of all members.

## Detailed Description

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

Definition at line 214 of file noisegenerator.h.

## Public Member Functions
| SineWhiteNoise (double omega, double amplitude, double phaseShift=M_PI/2, unsigned int channels=0xFFFF)
virtual | ~SineWhiteNoise ()
virtual double | generate (double min, double max)
| generate somehow distributed random number between parameterized with p1 and p2 valid only for ONE random number, use add(.
virtual void | add (double *value, double min, double max)
| 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

## Constructor & Destructor Documentation

SineWhiteNoise | ( | double | omega,
|  | double | amplitude,
|  | double | phaseShift = `M_PI/2`,
|  | unsigned int | channels = `0xFFFF`
| ) | `[inline]`

  | Parameters:
  | omega | anglerate
  | amplitude | amplitude of the sine wave in respect to the noise strength
  | channels | number of channel for sine noise (and the rest get white noise)
Definition at line 220 of file noisegenerator.h.

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

| Definition at line 227 of file noisegenerator.h.

## Member Function Documentation

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

  | adds multidimensional noise to the value field. Generic implementation calls generate for each channel. Overload this if you need different behavior. Parameters:
  | value | field where noise is added. Must have length dimension (see init())
  | p1 | first parameter for random number distribution
  | p2 | second parameter for random number distribution
Reimplemented from NoiseGenerator. Definition at line 233 of file noisegenerator.h.

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

| generate somehow distributed random number between parameterized with p1 and p2 valid only for ONE random number, use add(. ..) for adding this kind of noise to several channels Implements NoiseGenerator. Definition at line 229 of file noisegenerator.h.

void setOmega | ( | double | omega | ) | `[inline]`

| Definition at line 242 of file noisegenerator.h.

void setPhaseShift | ( | double | phaseShift | ) | `[inline]`

| Definition at line 245 of file noisegenerator.h.

## Member Data Documentation

double amplitude`[protected]`

| Definition at line 252 of file noisegenerator.h.

unsigned int channels`[protected]`

| Definition at line 253 of file noisegenerator.h.

double omega`[protected]`

| Definition at line 251 of file noisegenerator.h.

double phaseShift`[protected]`

| Definition at line 254 of file noisegenerator.h.

long int t`[protected]`

| Definition at line 250 of file noisegenerator.h.