Skip to content

Commit

Permalink
Fix modulator bitrate math
Browse files Browse the repository at this point in the history
Double the bitrate for every modulator step, not multiply directly by the modulator bits.

resolves #21
  • Loading branch information
Capkirk123 authored Jul 3, 2024
1 parent 58afc32 commit 18a81c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RealAntennasProject/RAModulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class RAModulator
public double SymbolRate => Parent.SymbolRate; // Samples / sec.
public int ModulationBits { get; set; } // Bits / symbol (1=BPSK, 2=QPSK, 3=8-PSK, 4=16-QAM,...
public TechLevelInfo TechLevel => Parent.TechLevelInfo;
public double DataRate => SymbolRate * ModulationBits; // Data Rate in bits/sec.
public double DataRate => SymbolRate * Math.Pow(2, ModulationBits-1); // Data Rate in bits/sec.
public int SymbolSteps => (2 * TechLevel.Level) + 3;
public double MinSymbolRate => SymbolRate / Math.Pow(2, SymbolSteps);

Expand Down

0 comments on commit 18a81c2

Please sign in to comment.