@@ -26,6 +26,7 @@ println("Tests for symbol mapper with QAM sequences");
2626 buff = [0x01 0x00 0x00 0x00 0x00 0x01 0x01 0x01 ];
2727 @show bitMappingQAM (2 ,buff)
2828 @test all (bitMappingQAM (2 ,buff) .≈ [1 ; - 1 ; - 1 ; - 1 ; - 1 ; 1 ; 1 ; 1 ]);
29+ @test all (bitMappingQAM (2 ,buff;unitaryPower= false ) .≈ [1 ; - 1 ; - 1 ; - 1 ; - 1 ; 1 ; 1 ; 1 ]);
2930end
3031
3132@testset " qpsk" begin
4445 # Some manual check due to gray coding
4546 buff = [0x01 0x00 0x00 0x00 0x00 0x01 0x01 0x01 ];
4647 @test all (bitMappingQAM (4 ,buff) .≈ 1 / sqrt (2 )* [1 - 1im ; - 1 - 1im ; - 1 + 1im ; 1 + 1im ]);
48+ @test all (bitMappingQAM (4 ,buff;unitaryPower= false ) .== [1 - 1im ; - 1 - 1im ; - 1 + 1im ; 1 + 1im ]);
4749end
4850
4951
6264 # Some manual check due to gray coding
6365 buff = [0x01 0x00 0x00 0x00 0x00 0x01 0x01 0x01 ];
6466 @test all (bitMappingQAM (mcs,buff) .≈ 1 / sqrt (10 )* [- 3 + 3im ;1 - 1im ]);
67+ @test all (bitMappingQAM (mcs,buff;unitaryPower= false ) .== [- 3 + 3im ;1 - 1im ]);
6568end
6669
6770
8083 # Some manual check due to gray coding
8184 buff = [0x01 0x00 0x00 0x00 0x00 0x01 0x01 0x01 0x01 0x00 0x01 0x00 ];
8285 @test all (bitMappingQAM (mcs,buff) .≈ 1 / sqrt (42 )* [- 7 + 5im ;- 3 - 7im ]);
86+ @test all (bitMappingQAM (mcs,buff;unitaryPower= false ) .== [- 7 + 5im ;- 3 - 7im ]);
8387end
8488
8589
100104 # Some manual check due to gray coding
101105 buff = [0x01 0x00 0x00 0x00 0x00 0x01 0x01 0x01 0x01 0x00 0x01 0x00 0x01 0x01 0x00 0x00 ];
102106 @test all (bitMappingQAM (mcs,buff) .≈ 1 / sqrt (170 )* [3 - 5im ;9 - 7im ]);
107+ @test all (bitMappingQAM (mcs,buff,unitaryPower= false ) .== [3 - 5im ;9 - 7im ]);
103108end
0 commit comments