SineCosineGenerator
Generates a sine and a cosine wave (90° apart) with variable gain, initial angle and DC offset.
Processing
- Each IncrementDegree sample advances the internal angle: θ += IncrementDegree (degree), starting at InitAngleBias.
- Sine = Gain·sin(θ) + DC_bias, Cosine = Gain·cos(θ) + DC_bias.
Usage
- Typical inputs:
number_generator.o_float64→IncrementDegree;number_generator.o_float64→Gain;SineCosineGenerator.Sine→Gain. - Typical outputs:
Sine→Oscilloscope.inputA;Sine→SineCosineGenerator.Gain.
Data format
- Inputs: scalars. Outputs: Float64 scalars.
Notes
- The output frequency is (IncrementDegree / 360) × trigger rate.
Properties
| Name | Default | Description |
|---|---|---|
InitAngleBias | 0.0 | Initial angle θ in degree. |
DC_bias | 0.0 | Offset added to both outputs. |
Outputs
| Name | Description |
|---|---|
Sine | Gain·sin(θ) + DC_bias. Type: Float64 |
Cosine | Gain·cos(θ) + DC_bias. Type: Float64 |
Inputs
| Name | Description |
|---|---|
IncrementDegree | Angle increment in degree per sample. Each sample triggers one output. Type: Float64 |
Gain | Amplitude of the output waves. Type: Float64 |
RTMaps Toolkits Documentation