New parameters for AP decoding in QRA64. Do not use this revision on the air!

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7340 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-11-27 15:50:47 +00:00
parent 840163ab97
commit 4838d97370
15 changed files with 1033 additions and 883 deletions

View File

@ -236,10 +236,10 @@ contains
integer, intent(in) :: nsum
integer, intent(in) :: minsync
integer i,nft,nap(0:11)
integer i,nft,nap(-1:11)
logical is_deep,is_average
character decoded*22,csync*2,cflags*3
data nap/0,2,4,2,4,5,2,4,6,5,6,6/
data nap/-1,0,2,4,2,4,5,2,4,6,5,6,6/
if(width.eq.-9999.0) stop !Silence compiler warning
!$omp critical(decode_results)
@ -254,11 +254,11 @@ contains
if(nft.lt.0) then
write(*,1009) params%nutc,snr,dt,freq,csync,decoded
else
write(*,1009) params%nutc,snr,dt,freq,csync,decoded,nap(nft)
1009 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,i2)
write(*,1009) params%nutc,snr,dt,freq,csync,decoded,nap(nft),nft
1009 format(i4.4,i4,f5.1,i5,1x,a2,1x,a22,i2,i3)
endif
write(13,1011) params%nutc,nint(sync),snr,dt,float(freq),drift, &
decoded,nft
decoded,nap(nft),nft
1011 format(i4.4,i4,i5,f6.2,f8.0,i4,3x,a22,' QRA64',i3)
go to 100
endif

View File

@ -99,8 +99,8 @@ contains
if(nsubmode.ge.100) then
! This is QRA64 mode
mode64=2**(nsubmode-100)
call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall, &
hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft)
call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
mycall,hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft)
if (associated(this%callback)) then
ndrift=0
nflip=1

View File

@ -1,327 +0,0 @@
/*
fadampgauss.c
Gaussian fading tables for QRA64 modes
(c) 2016 - Nico Palermo, IV3NWV
This file is part of the qracodes project, a Forward Error Control
encoding/decoding package based on Q-ary RA (Repeat and Accumulate) LDPC codes.
-------------------------------------------------------------------------------
qracodes is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
qracodes is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with qracodes source distribution.
If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------------
*/
static const int hlen_tab_gauss[64] = {
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 6,
6, 6, 7, 7, 8, 8, 9, 10,
10, 11, 12, 13, 14, 15, 17, 18,
19, 21, 23, 25, 27, 29, 32, 34,
37, 41, 44, 48, 52, 57, 62, 65
};
static const float hgauss1[2] = {
0.1722f, 0.9540f
};
static const float hgauss2[2] = {
0.1870f, 0.9463f
};
static const float hgauss3[2] = {
0.2028f, 0.9374f
};
static const float hgauss4[2] = {
0.2198f, 0.9273f
};
static const float hgauss5[2] = {
0.2378f, 0.9158f
};
static const float hgauss6[2] = {
0.2569f, 0.9030f
};
static const float hgauss7[2] = {
0.2769f, 0.8887f
};
static const float hgauss8[2] = {
0.2977f, 0.8730f
};
static const float hgauss9[2] = {
0.3190f, 0.8559f
};
static const float hgauss10[2] = {
0.3405f, 0.8374f
};
static const float hgauss11[2] = {
0.3619f, 0.8177f
};
static const float hgauss12[2] = {
0.3828f, 0.7970f
};
static const float hgauss13[2] = {
0.4026f, 0.7755f
};
static const float hgauss14[2] = {
0.4208f, 0.7533f
};
static const float hgauss15[2] = {
0.4371f, 0.7307f
};
static const float hgauss16[2] = {
0.4510f, 0.7078f
};
static const float hgauss17[3] = {
0.1729f, 0.4621f, 0.6849f
};
static const float hgauss18[3] = {
0.1920f, 0.4704f, 0.6620f
};
static const float hgauss19[3] = {
0.2131f, 0.4757f, 0.6393f
};
static const float hgauss20[3] = {
0.2350f, 0.4782f, 0.6170f
};
static const float hgauss21[3] = {
0.2565f, 0.4779f, 0.5949f
};
static const float hgauss22[3] = {
0.2767f, 0.4752f, 0.5733f
};
static const float hgauss23[3] = {
0.2948f, 0.4703f, 0.5522f
};
static const float hgauss24[3] = {
0.3102f, 0.4635f, 0.5316f
};
static const float hgauss25[4] = {
0.1874f, 0.3226f, 0.4551f, 0.5115f
};
static const float hgauss26[4] = {
0.2071f, 0.3319f, 0.4454f, 0.4919f
};
static const float hgauss27[4] = {
0.2253f, 0.3383f, 0.4347f, 0.4730f
};
static const float hgauss28[4] = {
0.2413f, 0.3419f, 0.4232f, 0.4546f
};
static const float hgauss29[5] = {
0.1701f, 0.2546f, 0.3429f, 0.4110f, 0.4368f
};
static const float hgauss30[5] = {
0.1874f, 0.2652f, 0.3417f, 0.3985f, 0.4196f
};
static const float hgauss31[5] = {
0.2028f, 0.2729f, 0.3386f, 0.3857f, 0.4029f
};
static const float hgauss32[6] = {
0.1569f, 0.2158f, 0.2780f, 0.3338f, 0.3728f, 0.3868f
};
static const float hgauss33[6] = {
0.1723f, 0.2263f, 0.2807f, 0.3278f, 0.3599f, 0.3713f
};
static const float hgauss34[6] = {
0.1857f, 0.2343f, 0.2812f, 0.3207f, 0.3471f, 0.3564f
};
static const float hgauss35[7] = {
0.1550f, 0.1968f, 0.2398f, 0.2799f, 0.3128f, 0.3344f, 0.3420f
};
static const float hgauss36[7] = {
0.1677f, 0.2055f, 0.2430f, 0.2770f, 0.3043f, 0.3220f, 0.3281f
};
static const float hgauss37[8] = {
0.1456f, 0.1783f, 0.2118f, 0.2442f, 0.2728f, 0.2953f, 0.3098f, 0.3147f
};
static const float hgauss38[8] = {
0.1572f, 0.1866f, 0.2160f, 0.2436f, 0.2675f, 0.2861f, 0.2979f, 0.3019f
};
static const float hgauss39[9] = {
0.1410f, 0.1667f, 0.1928f, 0.2182f, 0.2416f, 0.2615f, 0.2767f, 0.2863f,
0.2895f
};
static const float hgauss40[10] = {
0.1288f, 0.1511f, 0.1741f, 0.1970f, 0.2187f, 0.2383f, 0.2547f, 0.2672f,
0.2750f, 0.2776f
};
static const float hgauss41[10] = {
0.1391f, 0.1592f, 0.1795f, 0.1992f, 0.2176f, 0.2340f, 0.2476f, 0.2578f,
0.2641f, 0.2662f
};
static const float hgauss42[11] = {
0.1298f, 0.1475f, 0.1654f, 0.1830f, 0.1999f, 0.2153f, 0.2289f, 0.2401f,
0.2484f, 0.2535f, 0.2552f
};
static const float hgauss43[12] = {
0.1227f, 0.1382f, 0.1540f, 0.1696f, 0.1848f, 0.1991f, 0.2120f, 0.2232f,
0.2324f, 0.2391f, 0.2433f, 0.2447f
};
static const float hgauss44[13] = {
0.1173f, 0.1309f, 0.1448f, 0.1587f, 0.1722f, 0.1851f, 0.1971f, 0.2078f,
0.2171f, 0.2246f, 0.2301f, 0.2334f, 0.2346f
};
static const float hgauss45[14] = {
0.1132f, 0.1253f, 0.1375f, 0.1497f, 0.1617f, 0.1732f, 0.1841f, 0.1941f,
0.2030f, 0.2106f, 0.2167f, 0.2212f, 0.2239f, 0.2248f
};
static const float hgauss46[15] = {
0.1102f, 0.1208f, 0.1315f, 0.1423f, 0.1529f, 0.1632f, 0.1730f, 0.1821f,
0.1904f, 0.1978f, 0.2040f, 0.2089f, 0.2126f, 0.2148f, 0.2155f
};
static const float hgauss47[17] = {
0.0987f, 0.1079f, 0.1173f, 0.1267f, 0.1362f, 0.1455f, 0.1546f, 0.1634f,
0.1716f, 0.1792f, 0.1861f, 0.1921f, 0.1972f, 0.2012f, 0.2042f, 0.2059f,
0.2065f
};
static const float hgauss48[18] = {
0.0980f, 0.1062f, 0.1145f, 0.1228f, 0.1311f, 0.1393f, 0.1474f, 0.1551f,
0.1624f, 0.1693f, 0.1756f, 0.1813f, 0.1862f, 0.1904f, 0.1936f, 0.1960f,
0.1975f, 0.1979f
};
static const float hgauss49[19] = {
0.0976f, 0.1049f, 0.1122f, 0.1195f, 0.1268f, 0.1341f, 0.1411f, 0.1479f,
0.1544f, 0.1606f, 0.1663f, 0.1715f, 0.1762f, 0.1802f, 0.1836f, 0.1862f,
0.1881f, 0.1893f, 0.1897f
};
static const float hgauss50[21] = {
0.0911f, 0.0974f, 0.1038f, 0.1103f, 0.1167f, 0.1232f, 0.1295f, 0.1357f,
0.1417f, 0.1474f, 0.1529f, 0.1580f, 0.1627f, 0.1670f, 0.1708f, 0.1741f,
0.1768f, 0.1790f, 0.1805f, 0.1815f, 0.1818f
};
static const float hgauss51[23] = {
0.0861f, 0.0916f, 0.0973f, 0.1029f, 0.1086f, 0.1143f, 0.1199f, 0.1255f,
0.1309f, 0.1361f, 0.1412f, 0.1460f, 0.1505f, 0.1548f, 0.1587f, 0.1622f,
0.1653f, 0.1679f, 0.1702f, 0.1719f, 0.1732f, 0.1739f, 0.1742f
};
static const float hgauss52[25] = {
0.0823f, 0.0872f, 0.0922f, 0.0971f, 0.1021f, 0.1071f, 0.1121f, 0.1170f,
0.1219f, 0.1266f, 0.1312f, 0.1356f, 0.1398f, 0.1438f, 0.1476f, 0.1511f,
0.1543f, 0.1572f, 0.1597f, 0.1619f, 0.1637f, 0.1651f, 0.1661f, 0.1667f,
0.1669f
};
static const float hgauss53[27] = {
0.0795f, 0.0838f, 0.0882f, 0.0925f, 0.0969f, 0.1013f, 0.1057f, 0.1101f,
0.1144f, 0.1186f, 0.1227f, 0.1267f, 0.1306f, 0.1343f, 0.1378f, 0.1411f,
0.1442f, 0.1471f, 0.1497f, 0.1520f, 0.1541f, 0.1558f, 0.1573f, 0.1585f,
0.1593f, 0.1598f, 0.1599f
};
static const float hgauss54[29] = {
0.0774f, 0.0812f, 0.0850f, 0.0889f, 0.0928f, 0.0966f, 0.1005f, 0.1043f,
0.1081f, 0.1119f, 0.1155f, 0.1191f, 0.1226f, 0.1259f, 0.1292f, 0.1322f,
0.1351f, 0.1379f, 0.1404f, 0.1428f, 0.1449f, 0.1468f, 0.1485f, 0.1499f,
0.1511f, 0.1520f, 0.1527f, 0.1531f, 0.1532f
};
static const float hgauss55[32] = {
0.0726f, 0.0759f, 0.0792f, 0.0826f, 0.0860f, 0.0894f, 0.0928f, 0.0962f,
0.0996f, 0.1029f, 0.1062f, 0.1094f, 0.1126f, 0.1157f, 0.1187f, 0.1217f,
0.1245f, 0.1271f, 0.1297f, 0.1321f, 0.1343f, 0.1364f, 0.1383f, 0.1401f,
0.1416f, 0.1430f, 0.1442f, 0.1451f, 0.1459f, 0.1464f, 0.1467f, 0.1468f
};
static const float hgauss56[34] = {
0.0718f, 0.0747f, 0.0777f, 0.0807f, 0.0836f, 0.0866f, 0.0896f, 0.0926f,
0.0956f, 0.0985f, 0.1014f, 0.1043f, 0.1071f, 0.1098f, 0.1125f, 0.1151f,
0.1176f, 0.1201f, 0.1224f, 0.1246f, 0.1267f, 0.1287f, 0.1305f, 0.1322f,
0.1338f, 0.1352f, 0.1365f, 0.1376f, 0.1385f, 0.1393f, 0.1399f, 0.1403f,
0.1406f, 0.1407f
};
static const float hgauss57[37] = {
0.0687f, 0.0712f, 0.0738f, 0.0765f, 0.0791f, 0.0817f, 0.0843f, 0.0870f,
0.0896f, 0.0922f, 0.0948f, 0.0973f, 0.0998f, 0.1023f, 0.1047f, 0.1071f,
0.1094f, 0.1117f, 0.1138f, 0.1159f, 0.1179f, 0.1199f, 0.1217f, 0.1234f,
0.1250f, 0.1265f, 0.1279f, 0.1292f, 0.1304f, 0.1314f, 0.1323f, 0.1330f,
0.1337f, 0.1341f, 0.1345f, 0.1347f, 0.1348f
};
static const float hgauss58[41] = {
0.0640f, 0.0663f, 0.0686f, 0.0709f, 0.0732f, 0.0755f, 0.0778f, 0.0801f,
0.0824f, 0.0847f, 0.0870f, 0.0893f, 0.0915f, 0.0938f, 0.0960f, 0.0982f,
0.1003f, 0.1024f, 0.1044f, 0.1064f, 0.1083f, 0.1102f, 0.1120f, 0.1137f,
0.1154f, 0.1170f, 0.1185f, 0.1199f, 0.1212f, 0.1224f, 0.1236f, 0.1246f,
0.1255f, 0.1264f, 0.1271f, 0.1277f, 0.1282f, 0.1286f, 0.1289f, 0.1291f,
0.1291f
};
static const float hgauss59[44] = {
0.0625f, 0.0645f, 0.0665f, 0.0685f, 0.0705f, 0.0726f, 0.0746f, 0.0767f,
0.0787f, 0.0807f, 0.0827f, 0.0847f, 0.0867f, 0.0887f, 0.0907f, 0.0926f,
0.0945f, 0.0964f, 0.0982f, 0.1000f, 0.1017f, 0.1034f, 0.1051f, 0.1067f,
0.1083f, 0.1097f, 0.1112f, 0.1125f, 0.1138f, 0.1151f, 0.1162f, 0.1173f,
0.1183f, 0.1192f, 0.1201f, 0.1208f, 0.1215f, 0.1221f, 0.1226f, 0.1230f,
0.1233f, 0.1235f, 0.1237f, 0.1237f
};
static const float hgauss60[48] = {
0.0596f, 0.0614f, 0.0631f, 0.0649f, 0.0667f, 0.0685f, 0.0703f, 0.0721f,
0.0738f, 0.0756f, 0.0774f, 0.0792f, 0.0810f, 0.0827f, 0.0845f, 0.0862f,
0.0879f, 0.0896f, 0.0912f, 0.0929f, 0.0945f, 0.0960f, 0.0976f, 0.0991f,
0.1005f, 0.1019f, 0.1033f, 0.1046f, 0.1059f, 0.1071f, 0.1083f, 0.1094f,
0.1105f, 0.1115f, 0.1124f, 0.1133f, 0.1141f, 0.1149f, 0.1156f, 0.1162f,
0.1167f, 0.1172f, 0.1176f, 0.1179f, 0.1182f, 0.1184f, 0.1185f, 0.1185f
};
static const float hgauss61[52] = {
0.0575f, 0.0590f, 0.0606f, 0.0621f, 0.0637f, 0.0652f, 0.0668f, 0.0684f,
0.0700f, 0.0715f, 0.0731f, 0.0747f, 0.0762f, 0.0778f, 0.0793f, 0.0809f,
0.0824f, 0.0839f, 0.0854f, 0.0868f, 0.0883f, 0.0897f, 0.0911f, 0.0925f,
0.0938f, 0.0951f, 0.0964f, 0.0976f, 0.0988f, 0.1000f, 0.1011f, 0.1022f,
0.1033f, 0.1043f, 0.1053f, 0.1062f, 0.1070f, 0.1079f, 0.1086f, 0.1093f,
0.1100f, 0.1106f, 0.1112f, 0.1116f, 0.1121f, 0.1125f, 0.1128f, 0.1131f,
0.1133f, 0.1134f, 0.1135f, 0.1135f
};
static const float hgauss62[57] = {
0.0545f, 0.0558f, 0.0572f, 0.0586f, 0.0599f, 0.0613f, 0.0627f, 0.0641f,
0.0654f, 0.0668f, 0.0682f, 0.0696f, 0.0710f, 0.0723f, 0.0737f, 0.0751f,
0.0764f, 0.0778f, 0.0791f, 0.0804f, 0.0817f, 0.0830f, 0.0843f, 0.0855f,
0.0868f, 0.0880f, 0.0892f, 0.0903f, 0.0915f, 0.0926f, 0.0937f, 0.0948f,
0.0958f, 0.0968f, 0.0977f, 0.0987f, 0.0996f, 0.1004f, 0.1013f, 0.1020f,
0.1028f, 0.1035f, 0.1042f, 0.1048f, 0.1054f, 0.1059f, 0.1064f, 0.1068f,
0.1072f, 0.1076f, 0.1079f, 0.1082f, 0.1084f, 0.1085f, 0.1087f, 0.1087f,
0.1088f
};
static const float hgauss63[62] = {
0.0522f, 0.0534f, 0.0546f, 0.0558f, 0.0570f, 0.0582f, 0.0594f, 0.0606f,
0.0619f, 0.0631f, 0.0643f, 0.0655f, 0.0667f, 0.0679f, 0.0691f, 0.0703f,
0.0715f, 0.0727f, 0.0739f, 0.0751f, 0.0763f, 0.0774f, 0.0786f, 0.0797f,
0.0808f, 0.0819f, 0.0830f, 0.0841f, 0.0851f, 0.0861f, 0.0872f, 0.0882f,
0.0891f, 0.0901f, 0.0910f, 0.0919f, 0.0928f, 0.0936f, 0.0944f, 0.0952f,
0.0960f, 0.0967f, 0.0974f, 0.0981f, 0.0987f, 0.0994f, 0.0999f, 0.1005f,
0.1010f, 0.1014f, 0.1019f, 0.1023f, 0.1026f, 0.1030f, 0.1033f, 0.1035f,
0.1037f, 0.1039f, 0.1040f, 0.1041f, 0.1042f, 0.1042f
};
static const float hgauss64[65] = {
0.0526f, 0.0537f, 0.0547f, 0.0558f, 0.0569f, 0.0579f, 0.0590f, 0.0601f,
0.0611f, 0.0622f, 0.0633f, 0.0643f, 0.0654f, 0.0665f, 0.0675f, 0.0686f,
0.0696f, 0.0707f, 0.0717f, 0.0727f, 0.0737f, 0.0748f, 0.0758f, 0.0767f,
0.0777f, 0.0787f, 0.0796f, 0.0806f, 0.0815f, 0.0824f, 0.0833f, 0.0842f,
0.0850f, 0.0859f, 0.0867f, 0.0875f, 0.0883f, 0.0891f, 0.0898f, 0.0905f,
0.0912f, 0.0919f, 0.0925f, 0.0932f, 0.0938f, 0.0943f, 0.0949f, 0.0954f,
0.0959f, 0.0964f, 0.0968f, 0.0972f, 0.0976f, 0.0979f, 0.0983f, 0.0986f,
0.0988f, 0.0991f, 0.0993f, 0.0994f, 0.0996f, 0.0997f, 0.0998f, 0.0998f,
0.0998f
};
static const float *hptr_tab_gauss[64] = {
hgauss1, hgauss2, hgauss3, hgauss4,
hgauss5, hgauss6, hgauss7, hgauss8,
hgauss9, hgauss10, hgauss11, hgauss12,
hgauss13, hgauss14, hgauss15, hgauss16,
hgauss17, hgauss18, hgauss19, hgauss20,
hgauss21, hgauss22, hgauss23, hgauss24,
hgauss25, hgauss26, hgauss27, hgauss28,
hgauss29, hgauss30, hgauss31, hgauss32,
hgauss33, hgauss34, hgauss35, hgauss36,
hgauss37, hgauss38, hgauss39, hgauss40,
hgauss41, hgauss42, hgauss43, hgauss44,
hgauss45, hgauss46, hgauss47, hgauss48,
hgauss49, hgauss50, hgauss51, hgauss52,
hgauss53, hgauss54, hgauss55, hgauss56,
hgauss57, hgauss58, hgauss59, hgauss60,
hgauss61, hgauss62, hgauss63, hgauss64
};

View File

@ -1,329 +0,0 @@
/*
fadamplorentz.c
Lorentz fading tables for QRA64 modes
(c) 2016 - Nico Palermo, IV3NWV
This file is part of the qracodes project, a Forward Error Control
encoding/decoding package based on Q-ary RA (Repeat and Accumulate) LDPC codes.
-------------------------------------------------------------------------------
qracodes is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
qracodes is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with qracodes source distribution.
If not, see <http://www.gnu.org/licenses/>.
-----------------------------------------------------------------------------
*/
static const int hlen_tab_lorentz[64] = {
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 3, 3,
3, 3, 3, 3, 3, 4, 4, 4,
4, 4, 5, 5, 5, 5, 6, 6,
7, 7, 7, 8, 8, 9, 10, 10,
11, 12, 13, 14, 15, 16, 17, 19,
20, 22, 23, 25, 27, 30, 32, 35,
38, 41, 45, 49, 53, 57, 62, 65
};
static const float hlorentz1[2] = {
0.1464f, 0.9543f
};
static const float hlorentz2[2] = {
0.1563f, 0.9503f
};
static const float hlorentz3[2] = {
0.1672f, 0.9461f
};
static const float hlorentz4[2] = {
0.1773f, 0.9415f
};
static const float hlorentz5[2] = {
0.1868f, 0.9367f
};
static const float hlorentz6[2] = {
0.1970f, 0.9314f
};
static const float hlorentz7[2] = {
0.2063f, 0.9258f
};
static const float hlorentz8[2] = {
0.2151f, 0.9197f
};
static const float hlorentz9[2] = {
0.2236f, 0.9132f
};
static const float hlorentz10[2] = {
0.2320f, 0.9061f
};
static const float hlorentz11[2] = {
0.2406f, 0.8986f
};
static const float hlorentz12[2] = {
0.2494f, 0.8905f
};
static const float hlorentz13[2] = {
0.2584f, 0.8819f
};
static const float hlorentz14[2] = {
0.2674f, 0.8727f
};
static const float hlorentz15[3] = {
0.1400f, 0.2765f, 0.8629f
};
static const float hlorentz16[3] = {
0.1451f, 0.2857f, 0.8525f
};
static const float hlorentz17[3] = {
0.1504f, 0.2949f, 0.8414f
};
static const float hlorentz18[3] = {
0.1557f, 0.3041f, 0.8298f
};
static const float hlorentz19[3] = {
0.1611f, 0.3133f, 0.8174f
};
static const float hlorentz20[3] = {
0.1666f, 0.3223f, 0.8045f
};
static const float hlorentz21[3] = {
0.1721f, 0.3312f, 0.7909f
};
static const float hlorentz22[4] = {
0.1195f, 0.1778f, 0.3399f, 0.7766f
};
static const float hlorentz23[4] = {
0.1235f, 0.1835f, 0.3483f, 0.7618f
};
static const float hlorentz24[4] = {
0.1277f, 0.1893f, 0.3564f, 0.7463f
};
static const float hlorentz25[4] = {
0.1319f, 0.1952f, 0.3641f, 0.7303f
};
static const float hlorentz26[4] = {
0.1362f, 0.2011f, 0.3712f, 0.7138f
};
static const float hlorentz27[5] = {
0.1062f, 0.1407f, 0.2071f, 0.3779f, 0.6967f
};
static const float hlorentz28[5] = {
0.1097f, 0.1452f, 0.2132f, 0.3839f, 0.6793f
};
static const float hlorentz29[5] = {
0.1134f, 0.1499f, 0.2193f, 0.3891f, 0.6615f
};
static const float hlorentz30[5] = {
0.1172f, 0.1546f, 0.2254f, 0.3936f, 0.6434f
};
static const float hlorentz31[6] = {
0.0974f, 0.1211f, 0.1595f, 0.2314f, 0.3973f, 0.6251f
};
static const float hlorentz32[6] = {
0.1007f, 0.1251f, 0.1645f, 0.2374f, 0.4000f, 0.6066f
};
static const float hlorentz33[7] = {
0.0872f, 0.1042f, 0.1292f, 0.1695f, 0.2434f, 0.4017f, 0.5880f
};
static const float hlorentz34[7] = {
0.0902f, 0.1077f, 0.1335f, 0.1747f, 0.2491f, 0.4025f, 0.5694f
};
static const float hlorentz35[7] = {
0.0934f, 0.1114f, 0.1379f, 0.1799f, 0.2547f, 0.4022f, 0.5509f
};
static const float hlorentz36[8] = {
0.0832f, 0.0967f, 0.1152f, 0.1423f, 0.1851f, 0.2600f, 0.4008f, 0.5325f
};
static const float hlorentz37[8] = {
0.0862f, 0.1001f, 0.1192f, 0.1469f, 0.1903f, 0.2649f, 0.3985f, 0.5143f
};
static const float hlorentz38[9] = {
0.0784f, 0.0893f, 0.1036f, 0.1232f, 0.1515f, 0.1955f, 0.2694f, 0.3950f,
0.4964f
};
static const float hlorentz39[10] = {
0.0724f, 0.0813f, 0.0925f, 0.1072f, 0.1273f, 0.1562f, 0.2005f, 0.2733f,
0.3906f, 0.4787f
};
static const float hlorentz40[10] = {
0.0751f, 0.0842f, 0.0958f, 0.1109f, 0.1315f, 0.1609f, 0.2054f, 0.2767f,
0.3853f, 0.4614f
};
static const float hlorentz41[11] = {
0.0703f, 0.0779f, 0.0873f, 0.0992f, 0.1148f, 0.1358f, 0.1656f, 0.2101f,
0.2794f, 0.3790f, 0.4444f
};
static const float hlorentz42[12] = {
0.0665f, 0.0730f, 0.0808f, 0.0905f, 0.1027f, 0.1187f, 0.1401f, 0.1702f,
0.2145f, 0.2813f, 0.3720f, 0.4278f
};
static const float hlorentz43[13] = {
0.0634f, 0.0690f, 0.0757f, 0.0838f, 0.0938f, 0.1063f, 0.1226f, 0.1444f,
0.1747f, 0.2185f, 0.2824f, 0.3643f, 0.4117f
};
static const float hlorentz44[14] = {
0.0609f, 0.0658f, 0.0716f, 0.0785f, 0.0869f, 0.0971f, 0.1100f, 0.1266f,
0.1487f, 0.1791f, 0.2220f, 0.2826f, 0.3559f, 0.3960f
};
static const float hlorentz45[15] = {
0.0588f, 0.0632f, 0.0683f, 0.0743f, 0.0814f, 0.0900f, 0.1005f, 0.1137f,
0.1306f, 0.1529f, 0.1831f, 0.2250f, 0.2820f, 0.3470f, 0.3808f
};
static const float hlorentz46[16] = {
0.0571f, 0.0611f, 0.0657f, 0.0709f, 0.0771f, 0.0844f, 0.0932f, 0.1040f,
0.1175f, 0.1346f, 0.1570f, 0.1869f, 0.2274f, 0.2804f, 0.3377f, 0.3660f
};
static const float hlorentz47[17] = {
0.0557f, 0.0594f, 0.0635f, 0.0682f, 0.0736f, 0.0800f, 0.0875f, 0.0965f,
0.1076f, 0.1212f, 0.1385f, 0.1609f, 0.1903f, 0.2292f, 0.2781f, 0.3281f,
0.3517f
};
static const float hlorentz48[19] = {
0.0516f, 0.0546f, 0.0579f, 0.0617f, 0.0659f, 0.0708f, 0.0764f, 0.0829f,
0.0906f, 0.0999f, 0.1111f, 0.1249f, 0.1423f, 0.1645f, 0.1933f, 0.2302f,
0.2748f, 0.3182f, 0.3379f
};
static const float hlorentz49[20] = {
0.0509f, 0.0537f, 0.0567f, 0.0602f, 0.0640f, 0.0684f, 0.0734f, 0.0792f,
0.0859f, 0.0938f, 0.1032f, 0.1146f, 0.1286f, 0.1460f, 0.1679f, 0.1957f,
0.2305f, 0.2709f, 0.3082f, 0.3245f
};
static const float hlorentz50[22] = {
0.0480f, 0.0504f, 0.0529f, 0.0558f, 0.0589f, 0.0625f, 0.0665f, 0.0710f,
0.0761f, 0.0821f, 0.0889f, 0.0970f, 0.1066f, 0.1181f, 0.1321f, 0.1494f,
0.1709f, 0.1976f, 0.2300f, 0.2662f, 0.2981f, 0.3115f
};
static const float hlorentz51[23] = {
0.0477f, 0.0499f, 0.0523f, 0.0550f, 0.0580f, 0.0612f, 0.0649f, 0.0690f,
0.0736f, 0.0789f, 0.0850f, 0.0920f, 0.1002f, 0.1099f, 0.1215f, 0.1355f,
0.1526f, 0.1735f, 0.1989f, 0.2288f, 0.2609f, 0.2880f, 0.2991f
};
static const float hlorentz52[25] = {
0.0456f, 0.0475f, 0.0496f, 0.0519f, 0.0544f, 0.0572f, 0.0602f, 0.0636f,
0.0673f, 0.0715f, 0.0763f, 0.0817f, 0.0879f, 0.0951f, 0.1034f, 0.1132f,
0.1248f, 0.1387f, 0.1554f, 0.1755f, 0.1995f, 0.2268f, 0.2550f, 0.2779f,
0.2870f
};
static const float hlorentz53[27] = {
0.0438f, 0.0456f, 0.0474f, 0.0494f, 0.0516f, 0.0539f, 0.0565f, 0.0594f,
0.0625f, 0.0660f, 0.0698f, 0.0742f, 0.0790f, 0.0846f, 0.0909f, 0.0981f,
0.1065f, 0.1164f, 0.1279f, 0.1416f, 0.1579f, 0.1771f, 0.1994f, 0.2242f,
0.2487f, 0.2680f, 0.2754f
};
static const float hlorentz54[30] = {
0.0410f, 0.0424f, 0.0440f, 0.0456f, 0.0474f, 0.0493f, 0.0513f, 0.0536f,
0.0560f, 0.0587f, 0.0616f, 0.0648f, 0.0684f, 0.0724f, 0.0768f, 0.0818f,
0.0874f, 0.0938f, 0.1011f, 0.1096f, 0.1194f, 0.1308f, 0.1442f, 0.1599f,
0.1781f, 0.1987f, 0.2208f, 0.2421f, 0.2582f, 0.2643f
};
static const float hlorentz55[32] = {
0.0400f, 0.0413f, 0.0427f, 0.0441f, 0.0457f, 0.0474f, 0.0492f, 0.0512f,
0.0533f, 0.0557f, 0.0582f, 0.0609f, 0.0639f, 0.0672f, 0.0709f, 0.0749f,
0.0795f, 0.0845f, 0.0902f, 0.0967f, 0.1041f, 0.1125f, 0.1222f, 0.1334f,
0.1464f, 0.1614f, 0.1785f, 0.1973f, 0.2169f, 0.2351f, 0.2485f, 0.2535f
};
static const float hlorentz56[35] = {
0.0380f, 0.0391f, 0.0403f, 0.0416f, 0.0429f, 0.0444f, 0.0459f, 0.0475f,
0.0493f, 0.0512f, 0.0532f, 0.0554f, 0.0578f, 0.0604f, 0.0632f, 0.0663f,
0.0697f, 0.0734f, 0.0775f, 0.0821f, 0.0873f, 0.0930f, 0.0995f, 0.1069f,
0.1153f, 0.1248f, 0.1358f, 0.1483f, 0.1624f, 0.1782f, 0.1952f, 0.2125f,
0.2280f, 0.2391f, 0.2432f
};
static const float hlorentz57[38] = {
0.0364f, 0.0374f, 0.0384f, 0.0395f, 0.0407f, 0.0419f, 0.0432f, 0.0446f,
0.0461f, 0.0477f, 0.0494f, 0.0512f, 0.0531f, 0.0552f, 0.0575f, 0.0599f,
0.0626f, 0.0655f, 0.0686f, 0.0721f, 0.0759f, 0.0801f, 0.0848f, 0.0899f,
0.0957f, 0.1022f, 0.1095f, 0.1178f, 0.1271f, 0.1377f, 0.1496f, 0.1629f,
0.1774f, 0.1926f, 0.2076f, 0.2207f, 0.2299f, 0.2332f
};
static const float hlorentz58[41] = {
0.0351f, 0.0360f, 0.0369f, 0.0379f, 0.0389f, 0.0400f, 0.0411f, 0.0423f,
0.0436f, 0.0450f, 0.0464f, 0.0479f, 0.0496f, 0.0513f, 0.0532f, 0.0552f,
0.0573f, 0.0596f, 0.0621f, 0.0648f, 0.0678f, 0.0710f, 0.0745f, 0.0784f,
0.0826f, 0.0873f, 0.0925f, 0.0983f, 0.1048f, 0.1120f, 0.1201f, 0.1291f,
0.1392f, 0.1505f, 0.1628f, 0.1759f, 0.1894f, 0.2023f, 0.2134f, 0.2209f,
0.2237f
};
static const float hlorentz59[45] = {
0.0333f, 0.0341f, 0.0349f, 0.0357f, 0.0366f, 0.0375f, 0.0384f, 0.0394f,
0.0405f, 0.0416f, 0.0428f, 0.0440f, 0.0453f, 0.0467f, 0.0482f, 0.0498f,
0.0515f, 0.0532f, 0.0552f, 0.0572f, 0.0594f, 0.0618f, 0.0643f, 0.0671f,
0.0701f, 0.0734f, 0.0770f, 0.0809f, 0.0851f, 0.0898f, 0.0950f, 0.1008f,
0.1071f, 0.1142f, 0.1221f, 0.1307f, 0.1403f, 0.1508f, 0.1621f, 0.1739f,
0.1857f, 0.1968f, 0.2060f, 0.2123f, 0.2145f
};
static const float hlorentz60[49] = {
0.0319f, 0.0325f, 0.0332f, 0.0339f, 0.0347f, 0.0355f, 0.0363f, 0.0371f,
0.0380f, 0.0390f, 0.0400f, 0.0410f, 0.0421f, 0.0432f, 0.0444f, 0.0457f,
0.0471f, 0.0485f, 0.0500f, 0.0517f, 0.0534f, 0.0552f, 0.0572f, 0.0593f,
0.0615f, 0.0640f, 0.0666f, 0.0694f, 0.0724f, 0.0757f, 0.0793f, 0.0833f,
0.0875f, 0.0922f, 0.0974f, 0.1030f, 0.1093f, 0.1161f, 0.1237f, 0.1319f,
0.1409f, 0.1506f, 0.1608f, 0.1713f, 0.1816f, 0.1910f, 0.1987f, 0.2038f,
0.2056f
};
static const float hlorentz61[53] = {
0.0307f, 0.0313f, 0.0319f, 0.0325f, 0.0332f, 0.0338f, 0.0346f, 0.0353f,
0.0361f, 0.0369f, 0.0377f, 0.0386f, 0.0395f, 0.0405f, 0.0415f, 0.0426f,
0.0437f, 0.0449f, 0.0462f, 0.0475f, 0.0489f, 0.0504f, 0.0519f, 0.0536f,
0.0553f, 0.0572f, 0.0592f, 0.0614f, 0.0637f, 0.0661f, 0.0688f, 0.0716f,
0.0747f, 0.0780f, 0.0816f, 0.0856f, 0.0898f, 0.0945f, 0.0996f, 0.1051f,
0.1111f, 0.1177f, 0.1249f, 0.1327f, 0.1410f, 0.1499f, 0.1590f, 0.1683f,
0.1771f, 0.1851f, 0.1915f, 0.1957f, 0.1971f
};
static const float hlorentz62[57] = {
0.0297f, 0.0302f, 0.0308f, 0.0313f, 0.0319f, 0.0325f, 0.0332f, 0.0338f,
0.0345f, 0.0352f, 0.0359f, 0.0367f, 0.0375f, 0.0384f, 0.0392f, 0.0401f,
0.0411f, 0.0421f, 0.0432f, 0.0443f, 0.0454f, 0.0466f, 0.0479f, 0.0493f,
0.0507f, 0.0522f, 0.0538f, 0.0555f, 0.0573f, 0.0592f, 0.0613f, 0.0635f,
0.0658f, 0.0683f, 0.0710f, 0.0738f, 0.0769f, 0.0803f, 0.0839f, 0.0878f,
0.0920f, 0.0965f, 0.1015f, 0.1069f, 0.1127f, 0.1190f, 0.1258f, 0.1330f,
0.1406f, 0.1486f, 0.1568f, 0.1648f, 0.1724f, 0.1791f, 0.1844f, 0.1878f,
0.1890f
};
static const float hlorentz63[62] = {
0.0284f, 0.0289f, 0.0294f, 0.0299f, 0.0304f, 0.0309f, 0.0315f, 0.0320f,
0.0326f, 0.0332f, 0.0338f, 0.0345f, 0.0352f, 0.0359f, 0.0366f, 0.0374f,
0.0382f, 0.0390f, 0.0399f, 0.0408f, 0.0417f, 0.0427f, 0.0437f, 0.0448f,
0.0459f, 0.0471f, 0.0484f, 0.0497f, 0.0511f, 0.0525f, 0.0541f, 0.0557f,
0.0575f, 0.0593f, 0.0612f, 0.0633f, 0.0655f, 0.0679f, 0.0704f, 0.0731f,
0.0760f, 0.0791f, 0.0824f, 0.0859f, 0.0898f, 0.0939f, 0.0984f, 0.1032f,
0.1083f, 0.1139f, 0.1198f, 0.1261f, 0.1328f, 0.1398f, 0.1469f, 0.1541f,
0.1610f, 0.1675f, 0.1731f, 0.1774f, 0.1802f, 0.1811f
};
static const float hlorentz64[65] = {
0.0283f, 0.0287f, 0.0291f, 0.0296f, 0.0301f, 0.0306f, 0.0311f, 0.0316f,
0.0322f, 0.0327f, 0.0333f, 0.0339f, 0.0345f, 0.0352f, 0.0359f, 0.0366f,
0.0373f, 0.0381f, 0.0388f, 0.0397f, 0.0405f, 0.0414f, 0.0423f, 0.0433f,
0.0443f, 0.0454f, 0.0465f, 0.0476f, 0.0489f, 0.0501f, 0.0515f, 0.0529f,
0.0544f, 0.0560f, 0.0576f, 0.0594f, 0.0613f, 0.0632f, 0.0653f, 0.0676f,
0.0699f, 0.0724f, 0.0751f, 0.0780f, 0.0811f, 0.0843f, 0.0879f, 0.0916f,
0.0956f, 0.0999f, 0.1046f, 0.1095f, 0.1147f, 0.1202f, 0.1261f, 0.1321f,
0.1384f, 0.1447f, 0.1510f, 0.1569f, 0.1624f, 0.1670f, 0.1706f, 0.1728f,
0.1736f
};
static const float *hptr_tab_lorentz[64] = {
hlorentz1, hlorentz2, hlorentz3, hlorentz4,
hlorentz5, hlorentz6, hlorentz7, hlorentz8,
hlorentz9, hlorentz10, hlorentz11, hlorentz12,
hlorentz13, hlorentz14, hlorentz15, hlorentz16,
hlorentz17, hlorentz18, hlorentz19, hlorentz20,
hlorentz21, hlorentz22, hlorentz23, hlorentz24,
hlorentz25, hlorentz26, hlorentz27, hlorentz28,
hlorentz29, hlorentz30, hlorentz31, hlorentz32,
hlorentz33, hlorentz34, hlorentz35, hlorentz36,
hlorentz37, hlorentz38, hlorentz39, hlorentz40,
hlorentz41, hlorentz42, hlorentz43, hlorentz44,
hlorentz45, hlorentz46, hlorentz47, hlorentz48,
hlorentz49, hlorentz50, hlorentz51, hlorentz52,
hlorentz53, hlorentz54, hlorentz55, hlorentz56,
hlorentz57, hlorentz58, hlorentz59, hlorentz60,
hlorentz61, hlorentz62, hlorentz63, hlorentz64
};

302
lib/qra/qra64/fadengauss.c Normal file
View File

@ -0,0 +1,302 @@
// Gaussian energy fading tables for QRA64
static const int glen_tab_gauss[64] = {
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 6,
6, 6, 7, 7, 8, 8, 9, 10,
10, 11, 12, 13, 14, 15, 17, 18,
19, 21, 23, 25, 27, 29, 32, 34,
37, 41, 44, 48, 52, 57, 62, 65
};
static const float ggauss1[2] = {
0.0296f, 0.9101f
};
static const float ggauss2[2] = {
0.0350f, 0.8954f
};
static const float ggauss3[2] = {
0.0411f, 0.8787f
};
static const float ggauss4[2] = {
0.0483f, 0.8598f
};
static const float ggauss5[2] = {
0.0566f, 0.8387f
};
static const float ggauss6[2] = {
0.0660f, 0.8154f
};
static const float ggauss7[2] = {
0.0767f, 0.7898f
};
static const float ggauss8[2] = {
0.0886f, 0.7621f
};
static const float ggauss9[2] = {
0.1017f, 0.7325f
};
static const float ggauss10[2] = {
0.1159f, 0.7012f
};
static const float ggauss11[2] = {
0.1310f, 0.6687f
};
static const float ggauss12[2] = {
0.1465f, 0.6352f
};
static const float ggauss13[2] = {
0.1621f, 0.6013f
};
static const float ggauss14[2] = {
0.1771f, 0.5674f
};
static const float ggauss15[2] = {
0.1911f, 0.5339f
};
static const float ggauss16[2] = {
0.2034f, 0.5010f
};
static const float ggauss17[3] = {
0.0299f, 0.2135f, 0.4690f
};
static const float ggauss18[3] = {
0.0369f, 0.2212f, 0.4383f
};
static const float ggauss19[3] = {
0.0454f, 0.2263f, 0.4088f
};
static const float ggauss20[3] = {
0.0552f, 0.2286f, 0.3806f
};
static const float ggauss21[3] = {
0.0658f, 0.2284f, 0.3539f
};
static const float ggauss22[3] = {
0.0766f, 0.2258f, 0.3287f
};
static const float ggauss23[3] = {
0.0869f, 0.2212f, 0.3049f
};
static const float ggauss24[3] = {
0.0962f, 0.2148f, 0.2826f
};
static const float ggauss25[4] = {
0.0351f, 0.1041f, 0.2071f, 0.2616f
};
static const float ggauss26[4] = {
0.0429f, 0.1102f, 0.1984f, 0.2420f
};
static const float ggauss27[4] = {
0.0508f, 0.1145f, 0.1890f, 0.2237f
};
static const float ggauss28[4] = {
0.0582f, 0.1169f, 0.1791f, 0.2067f
};
static const float ggauss29[5] = {
0.0289f, 0.0648f, 0.1176f, 0.1689f, 0.1908f
};
static const float ggauss30[5] = {
0.0351f, 0.0703f, 0.1168f, 0.1588f, 0.1760f
};
static const float ggauss31[5] = {
0.0411f, 0.0745f, 0.1146f, 0.1488f, 0.1623f
};
static const float ggauss32[6] = {
0.0246f, 0.0466f, 0.0773f, 0.1115f, 0.1390f, 0.1497f
};
static const float ggauss33[6] = {
0.0297f, 0.0512f, 0.0788f, 0.1075f, 0.1295f, 0.1379f
};
static const float ggauss34[6] = {
0.0345f, 0.0549f, 0.0791f, 0.1029f, 0.1205f, 0.1270f
};
static const float ggauss35[7] = {
0.0240f, 0.0387f, 0.0575f, 0.0784f, 0.0979f, 0.1118f, 0.1169f
};
static const float ggauss36[7] = {
0.0281f, 0.0422f, 0.0590f, 0.0767f, 0.0926f, 0.1037f, 0.1076f
};
static const float ggauss37[8] = {
0.0212f, 0.0318f, 0.0449f, 0.0596f, 0.0744f, 0.0872f, 0.0960f, 0.0991f
};
static const float ggauss38[8] = {
0.0247f, 0.0348f, 0.0467f, 0.0593f, 0.0716f, 0.0819f, 0.0887f, 0.0911f
};
static const float ggauss39[9] = {
0.0199f, 0.0278f, 0.0372f, 0.0476f, 0.0584f, 0.0684f, 0.0766f, 0.0819f,
0.0838f
};
static const float ggauss40[10] = {
0.0166f, 0.0228f, 0.0303f, 0.0388f, 0.0478f, 0.0568f, 0.0649f, 0.0714f,
0.0756f, 0.0771f
};
static const float ggauss41[10] = {
0.0193f, 0.0254f, 0.0322f, 0.0397f, 0.0474f, 0.0548f, 0.0613f, 0.0664f,
0.0697f, 0.0709f
};
static const float ggauss42[11] = {
0.0168f, 0.0217f, 0.0273f, 0.0335f, 0.0399f, 0.0464f, 0.0524f, 0.0576f,
0.0617f, 0.0643f, 0.0651f
};
static const float ggauss43[12] = {
0.0151f, 0.0191f, 0.0237f, 0.0288f, 0.0342f, 0.0396f, 0.0449f, 0.0498f,
0.0540f, 0.0572f, 0.0592f, 0.0599f
};
static const float ggauss44[13] = {
0.0138f, 0.0171f, 0.0210f, 0.0252f, 0.0297f, 0.0343f, 0.0388f, 0.0432f,
0.0471f, 0.0504f, 0.0529f, 0.0545f, 0.0550f
};
static const float ggauss45[14] = {
0.0128f, 0.0157f, 0.0189f, 0.0224f, 0.0261f, 0.0300f, 0.0339f, 0.0377f,
0.0412f, 0.0444f, 0.0470f, 0.0489f, 0.0501f, 0.0505f
};
static const float ggauss46[15] = {
0.0121f, 0.0146f, 0.0173f, 0.0202f, 0.0234f, 0.0266f, 0.0299f, 0.0332f,
0.0363f, 0.0391f, 0.0416f, 0.0437f, 0.0452f, 0.0461f, 0.0464f
};
static const float ggauss47[17] = {
0.0097f, 0.0116f, 0.0138f, 0.0161f, 0.0186f, 0.0212f, 0.0239f, 0.0267f,
0.0294f, 0.0321f, 0.0346f, 0.0369f, 0.0389f, 0.0405f, 0.0417f, 0.0424f,
0.0427f
};
static const float ggauss48[18] = {
0.0096f, 0.0113f, 0.0131f, 0.0151f, 0.0172f, 0.0194f, 0.0217f, 0.0241f,
0.0264f, 0.0287f, 0.0308f, 0.0329f, 0.0347f, 0.0362f, 0.0375f, 0.0384f,
0.0390f, 0.0392f
};
static const float ggauss49[19] = {
0.0095f, 0.0110f, 0.0126f, 0.0143f, 0.0161f, 0.0180f, 0.0199f, 0.0219f,
0.0239f, 0.0258f, 0.0277f, 0.0294f, 0.0310f, 0.0325f, 0.0337f, 0.0347f,
0.0354f, 0.0358f, 0.0360f
};
static const float ggauss50[21] = {
0.0083f, 0.0095f, 0.0108f, 0.0122f, 0.0136f, 0.0152f, 0.0168f, 0.0184f,
0.0201f, 0.0217f, 0.0234f, 0.0250f, 0.0265f, 0.0279f, 0.0292f, 0.0303f,
0.0313f, 0.0320f, 0.0326f, 0.0329f, 0.0330f
};
static const float ggauss51[23] = {
0.0074f, 0.0084f, 0.0095f, 0.0106f, 0.0118f, 0.0131f, 0.0144f, 0.0157f,
0.0171f, 0.0185f, 0.0199f, 0.0213f, 0.0227f, 0.0240f, 0.0252f, 0.0263f,
0.0273f, 0.0282f, 0.0290f, 0.0296f, 0.0300f, 0.0303f, 0.0303f
};
static const float ggauss52[25] = {
0.0068f, 0.0076f, 0.0085f, 0.0094f, 0.0104f, 0.0115f, 0.0126f, 0.0137f,
0.0149f, 0.0160f, 0.0172f, 0.0184f, 0.0196f, 0.0207f, 0.0218f, 0.0228f,
0.0238f, 0.0247f, 0.0255f, 0.0262f, 0.0268f, 0.0273f, 0.0276f, 0.0278f,
0.0279f
};
static const float ggauss53[27] = {
0.0063f, 0.0070f, 0.0078f, 0.0086f, 0.0094f, 0.0103f, 0.0112f, 0.0121f,
0.0131f, 0.0141f, 0.0151f, 0.0161f, 0.0170f, 0.0180f, 0.0190f, 0.0199f,
0.0208f, 0.0216f, 0.0224f, 0.0231f, 0.0237f, 0.0243f, 0.0247f, 0.0251f,
0.0254f, 0.0255f, 0.0256f
};
static const float ggauss54[29] = {
0.0060f, 0.0066f, 0.0072f, 0.0079f, 0.0086f, 0.0093f, 0.0101f, 0.0109f,
0.0117f, 0.0125f, 0.0133f, 0.0142f, 0.0150f, 0.0159f, 0.0167f, 0.0175f,
0.0183f, 0.0190f, 0.0197f, 0.0204f, 0.0210f, 0.0216f, 0.0221f, 0.0225f,
0.0228f, 0.0231f, 0.0233f, 0.0234f, 0.0235f
};
static const float ggauss55[32] = {
0.0053f, 0.0058f, 0.0063f, 0.0068f, 0.0074f, 0.0080f, 0.0086f, 0.0093f,
0.0099f, 0.0106f, 0.0113f, 0.0120f, 0.0127f, 0.0134f, 0.0141f, 0.0148f,
0.0155f, 0.0162f, 0.0168f, 0.0174f, 0.0180f, 0.0186f, 0.0191f, 0.0196f,
0.0201f, 0.0204f, 0.0208f, 0.0211f, 0.0213f, 0.0214f, 0.0215f, 0.0216f
};
static const float ggauss56[34] = {
0.0052f, 0.0056f, 0.0060f, 0.0065f, 0.0070f, 0.0075f, 0.0080f, 0.0086f,
0.0091f, 0.0097f, 0.0103f, 0.0109f, 0.0115f, 0.0121f, 0.0127f, 0.0133f,
0.0138f, 0.0144f, 0.0150f, 0.0155f, 0.0161f, 0.0166f, 0.0170f, 0.0175f,
0.0179f, 0.0183f, 0.0186f, 0.0189f, 0.0192f, 0.0194f, 0.0196f, 0.0197f,
0.0198f, 0.0198f
};
static const float ggauss57[37] = {
0.0047f, 0.0051f, 0.0055f, 0.0058f, 0.0063f, 0.0067f, 0.0071f, 0.0076f,
0.0080f, 0.0085f, 0.0090f, 0.0095f, 0.0100f, 0.0105f, 0.0110f, 0.0115f,
0.0120f, 0.0125f, 0.0130f, 0.0134f, 0.0139f, 0.0144f, 0.0148f, 0.0152f,
0.0156f, 0.0160f, 0.0164f, 0.0167f, 0.0170f, 0.0173f, 0.0175f, 0.0177f,
0.0179f, 0.0180f, 0.0181f, 0.0181f, 0.0182f
};
static const float ggauss58[41] = {
0.0041f, 0.0044f, 0.0047f, 0.0050f, 0.0054f, 0.0057f, 0.0060f, 0.0064f,
0.0068f, 0.0072f, 0.0076f, 0.0080f, 0.0084f, 0.0088f, 0.0092f, 0.0096f,
0.0101f, 0.0105f, 0.0109f, 0.0113f, 0.0117f, 0.0121f, 0.0125f, 0.0129f,
0.0133f, 0.0137f, 0.0140f, 0.0144f, 0.0147f, 0.0150f, 0.0153f, 0.0155f,
0.0158f, 0.0160f, 0.0162f, 0.0163f, 0.0164f, 0.0165f, 0.0166f, 0.0167f,
0.0167f
};
static const float ggauss59[44] = {
0.0039f, 0.0042f, 0.0044f, 0.0047f, 0.0050f, 0.0053f, 0.0056f, 0.0059f,
0.0062f, 0.0065f, 0.0068f, 0.0072f, 0.0075f, 0.0079f, 0.0082f, 0.0086f,
0.0089f, 0.0093f, 0.0096f, 0.0100f, 0.0104f, 0.0107f, 0.0110f, 0.0114f,
0.0117f, 0.0120f, 0.0124f, 0.0127f, 0.0130f, 0.0132f, 0.0135f, 0.0138f,
0.0140f, 0.0142f, 0.0144f, 0.0146f, 0.0148f, 0.0149f, 0.0150f, 0.0151f,
0.0152f, 0.0153f, 0.0153f, 0.0153f
};
static const float ggauss60[48] = {
0.0036f, 0.0038f, 0.0040f, 0.0042f, 0.0044f, 0.0047f, 0.0049f, 0.0052f,
0.0055f, 0.0057f, 0.0060f, 0.0063f, 0.0066f, 0.0068f, 0.0071f, 0.0074f,
0.0077f, 0.0080f, 0.0083f, 0.0086f, 0.0089f, 0.0092f, 0.0095f, 0.0098f,
0.0101f, 0.0104f, 0.0107f, 0.0109f, 0.0112f, 0.0115f, 0.0117f, 0.0120f,
0.0122f, 0.0124f, 0.0126f, 0.0128f, 0.0130f, 0.0132f, 0.0134f, 0.0135f,
0.0136f, 0.0137f, 0.0138f, 0.0139f, 0.0140f, 0.0140f, 0.0140f, 0.0140f
};
static const float ggauss61[52] = {
0.0033f, 0.0035f, 0.0037f, 0.0039f, 0.0041f, 0.0043f, 0.0045f, 0.0047f,
0.0049f, 0.0051f, 0.0053f, 0.0056f, 0.0058f, 0.0060f, 0.0063f, 0.0065f,
0.0068f, 0.0070f, 0.0073f, 0.0075f, 0.0078f, 0.0080f, 0.0083f, 0.0085f,
0.0088f, 0.0090f, 0.0093f, 0.0095f, 0.0098f, 0.0100f, 0.0102f, 0.0105f,
0.0107f, 0.0109f, 0.0111f, 0.0113f, 0.0115f, 0.0116f, 0.0118f, 0.0120f,
0.0121f, 0.0122f, 0.0124f, 0.0125f, 0.0126f, 0.0126f, 0.0127f, 0.0128f,
0.0128f, 0.0129f, 0.0129f, 0.0129f
};
static const float ggauss62[57] = {
0.0030f, 0.0031f, 0.0033f, 0.0034f, 0.0036f, 0.0038f, 0.0039f, 0.0041f,
0.0043f, 0.0045f, 0.0047f, 0.0048f, 0.0050f, 0.0052f, 0.0054f, 0.0056f,
0.0058f, 0.0060f, 0.0063f, 0.0065f, 0.0067f, 0.0069f, 0.0071f, 0.0073f,
0.0075f, 0.0077f, 0.0080f, 0.0082f, 0.0084f, 0.0086f, 0.0088f, 0.0090f,
0.0092f, 0.0094f, 0.0096f, 0.0097f, 0.0099f, 0.0101f, 0.0103f, 0.0104f,
0.0106f, 0.0107f, 0.0108f, 0.0110f, 0.0111f, 0.0112f, 0.0113f, 0.0114f,
0.0115f, 0.0116f, 0.0116f, 0.0117f, 0.0117f, 0.0118f, 0.0118f, 0.0118f,
0.0118f
};
static const float ggauss63[62] = {
0.0027f, 0.0029f, 0.0030f, 0.0031f, 0.0032f, 0.0034f, 0.0035f, 0.0037f,
0.0038f, 0.0040f, 0.0041f, 0.0043f, 0.0045f, 0.0046f, 0.0048f, 0.0049f,
0.0051f, 0.0053f, 0.0055f, 0.0056f, 0.0058f, 0.0060f, 0.0062f, 0.0063f,
0.0065f, 0.0067f, 0.0069f, 0.0071f, 0.0072f, 0.0074f, 0.0076f, 0.0078f,
0.0079f, 0.0081f, 0.0083f, 0.0084f, 0.0086f, 0.0088f, 0.0089f, 0.0091f,
0.0092f, 0.0094f, 0.0095f, 0.0096f, 0.0098f, 0.0099f, 0.0100f, 0.0101f,
0.0102f, 0.0103f, 0.0104f, 0.0105f, 0.0105f, 0.0106f, 0.0107f, 0.0107f,
0.0108f, 0.0108f, 0.0108f, 0.0108f, 0.0109f, 0.0109f
};
static const float ggauss64[65] = {
0.0028f, 0.0029f, 0.0030f, 0.0031f, 0.0032f, 0.0034f, 0.0035f, 0.0036f,
0.0037f, 0.0039f, 0.0040f, 0.0041f, 0.0043f, 0.0044f, 0.0046f, 0.0047f,
0.0048f, 0.0050f, 0.0051f, 0.0053f, 0.0054f, 0.0056f, 0.0057f, 0.0059f,
0.0060f, 0.0062f, 0.0063f, 0.0065f, 0.0066f, 0.0068f, 0.0069f, 0.0071f,
0.0072f, 0.0074f, 0.0075f, 0.0077f, 0.0078f, 0.0079f, 0.0081f, 0.0082f,
0.0083f, 0.0084f, 0.0086f, 0.0087f, 0.0088f, 0.0089f, 0.0090f, 0.0091f,
0.0092f, 0.0093f, 0.0094f, 0.0094f, 0.0095f, 0.0096f, 0.0097f, 0.0097f,
0.0098f, 0.0098f, 0.0099f, 0.0099f, 0.0099f, 0.0099f, 0.0100f, 0.0100f,
0.0100f
};
static const float *gptr_tab_gauss[64] = {
ggauss1, ggauss2, ggauss3, ggauss4,
ggauss5, ggauss6, ggauss7, ggauss8,
ggauss9, ggauss10, ggauss11, ggauss12,
ggauss13, ggauss14, ggauss15, ggauss16,
ggauss17, ggauss18, ggauss19, ggauss20,
ggauss21, ggauss22, ggauss23, ggauss24,
ggauss25, ggauss26, ggauss27, ggauss28,
ggauss29, ggauss30, ggauss31, ggauss32,
ggauss33, ggauss34, ggauss35, ggauss36,
ggauss37, ggauss38, ggauss39, ggauss40,
ggauss41, ggauss42, ggauss43, ggauss44,
ggauss45, ggauss46, ggauss47, ggauss48,
ggauss49, ggauss50, ggauss51, ggauss52,
ggauss53, ggauss54, ggauss55, ggauss56,
ggauss57, ggauss58, ggauss59, ggauss60,
ggauss61, ggauss62, ggauss63, ggauss64
};

View File

@ -0,0 +1,304 @@
// Lorentz energy fading tables for QRA64
static const int glen_tab_lorentz[64] = {
2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 3, 3,
3, 3, 3, 3, 3, 4, 4, 4,
4, 4, 5, 5, 5, 5, 6, 6,
7, 7, 7, 8, 8, 9, 10, 10,
11, 12, 13, 14, 15, 16, 17, 19,
20, 22, 23, 25, 27, 30, 32, 35,
38, 41, 45, 49, 53, 57, 62, 65
};
static const float glorentz1[2] = {
0.0214f, 0.9107f
};
static const float glorentz2[2] = {
0.0244f, 0.9030f
};
static const float glorentz3[2] = {
0.0280f, 0.8950f
};
static const float glorentz4[2] = {
0.0314f, 0.8865f
};
static const float glorentz5[2] = {
0.0349f, 0.8773f
};
static const float glorentz6[2] = {
0.0388f, 0.8675f
};
static const float glorentz7[2] = {
0.0426f, 0.8571f
};
static const float glorentz8[2] = {
0.0463f, 0.8459f
};
static const float glorentz9[2] = {
0.0500f, 0.8339f
};
static const float glorentz10[2] = {
0.0538f, 0.8210f
};
static const float glorentz11[2] = {
0.0579f, 0.8074f
};
static const float glorentz12[2] = {
0.0622f, 0.7930f
};
static const float glorentz13[2] = {
0.0668f, 0.7777f
};
static const float glorentz14[2] = {
0.0715f, 0.7616f
};
static const float glorentz15[3] = {
0.0196f, 0.0765f, 0.7445f
};
static const float glorentz16[3] = {
0.0210f, 0.0816f, 0.7267f
};
static const float glorentz17[3] = {
0.0226f, 0.0870f, 0.7080f
};
static const float glorentz18[3] = {
0.0242f, 0.0925f, 0.6885f
};
static const float glorentz19[3] = {
0.0259f, 0.0981f, 0.6682f
};
static const float glorentz20[3] = {
0.0277f, 0.1039f, 0.6472f
};
static const float glorentz21[3] = {
0.0296f, 0.1097f, 0.6255f
};
static const float glorentz22[4] = {
0.0143f, 0.0316f, 0.1155f, 0.6031f
};
static const float glorentz23[4] = {
0.0153f, 0.0337f, 0.1213f, 0.5803f
};
static const float glorentz24[4] = {
0.0163f, 0.0358f, 0.1270f, 0.5570f
};
static const float glorentz25[4] = {
0.0174f, 0.0381f, 0.1325f, 0.5333f
};
static const float glorentz26[4] = {
0.0186f, 0.0405f, 0.1378f, 0.5095f
};
static const float glorentz27[5] = {
0.0113f, 0.0198f, 0.0429f, 0.1428f, 0.4855f
};
static const float glorentz28[5] = {
0.0120f, 0.0211f, 0.0455f, 0.1473f, 0.4615f
};
static const float glorentz29[5] = {
0.0129f, 0.0225f, 0.0481f, 0.1514f, 0.4376f
};
static const float glorentz30[5] = {
0.0137f, 0.0239f, 0.0508f, 0.1549f, 0.4140f
};
static const float glorentz31[6] = {
0.0095f, 0.0147f, 0.0254f, 0.0536f, 0.1578f, 0.3907f
};
static const float glorentz32[6] = {
0.0101f, 0.0156f, 0.0270f, 0.0564f, 0.1600f, 0.3680f
};
static const float glorentz33[7] = {
0.0076f, 0.0109f, 0.0167f, 0.0287f, 0.0592f, 0.1614f, 0.3458f
};
static const float glorentz34[7] = {
0.0081f, 0.0116f, 0.0178f, 0.0305f, 0.0621f, 0.1620f, 0.3243f
};
static const float glorentz35[7] = {
0.0087f, 0.0124f, 0.0190f, 0.0324f, 0.0649f, 0.1618f, 0.3035f
};
static const float glorentz36[8] = {
0.0069f, 0.0093f, 0.0133f, 0.0203f, 0.0343f, 0.0676f, 0.1607f, 0.2836f
};
static const float glorentz37[8] = {
0.0074f, 0.0100f, 0.0142f, 0.0216f, 0.0362f, 0.0702f, 0.1588f, 0.2645f
};
static const float glorentz38[9] = {
0.0061f, 0.0080f, 0.0107f, 0.0152f, 0.0230f, 0.0382f, 0.0726f, 0.1561f,
0.2464f
};
static const float glorentz39[10] = {
0.0052f, 0.0066f, 0.0086f, 0.0115f, 0.0162f, 0.0244f, 0.0402f, 0.0747f,
0.1526f, 0.2291f
};
static const float glorentz40[10] = {
0.0056f, 0.0071f, 0.0092f, 0.0123f, 0.0173f, 0.0259f, 0.0422f, 0.0766f,
0.1484f, 0.2128f
};
static const float glorentz41[11] = {
0.0049f, 0.0061f, 0.0076f, 0.0098f, 0.0132f, 0.0184f, 0.0274f, 0.0441f,
0.0780f, 0.1437f, 0.1975f
};
static const float glorentz42[12] = {
0.0044f, 0.0053f, 0.0065f, 0.0082f, 0.0106f, 0.0141f, 0.0196f, 0.0290f,
0.0460f, 0.0791f, 0.1384f, 0.1831f
};
static const float glorentz43[13] = {
0.0040f, 0.0048f, 0.0057f, 0.0070f, 0.0088f, 0.0113f, 0.0150f, 0.0209f,
0.0305f, 0.0477f, 0.0797f, 0.1327f, 0.1695f
};
static const float glorentz44[14] = {
0.0037f, 0.0043f, 0.0051f, 0.0062f, 0.0075f, 0.0094f, 0.0121f, 0.0160f,
0.0221f, 0.0321f, 0.0493f, 0.0799f, 0.1267f, 0.1568f
};
static const float glorentz45[15] = {
0.0035f, 0.0040f, 0.0047f, 0.0055f, 0.0066f, 0.0081f, 0.0101f, 0.0129f,
0.0171f, 0.0234f, 0.0335f, 0.0506f, 0.0795f, 0.1204f, 0.1450f
};
static const float glorentz46[16] = {
0.0033f, 0.0037f, 0.0043f, 0.0050f, 0.0059f, 0.0071f, 0.0087f, 0.0108f,
0.0138f, 0.0181f, 0.0246f, 0.0349f, 0.0517f, 0.0786f, 0.1141f, 0.1340f
};
static const float glorentz47[17] = {
0.0031f, 0.0035f, 0.0040f, 0.0046f, 0.0054f, 0.0064f, 0.0077f, 0.0093f,
0.0116f, 0.0147f, 0.0192f, 0.0259f, 0.0362f, 0.0525f, 0.0773f, 0.1076f,
0.1237f
};
static const float glorentz48[19] = {
0.0027f, 0.0030f, 0.0034f, 0.0038f, 0.0043f, 0.0050f, 0.0058f, 0.0069f,
0.0082f, 0.0100f, 0.0123f, 0.0156f, 0.0203f, 0.0271f, 0.0374f, 0.0530f,
0.0755f, 0.1013f, 0.1141f
};
static const float glorentz49[20] = {
0.0026f, 0.0029f, 0.0032f, 0.0036f, 0.0041f, 0.0047f, 0.0054f, 0.0063f,
0.0074f, 0.0088f, 0.0107f, 0.0131f, 0.0165f, 0.0213f, 0.0282f, 0.0383f,
0.0531f, 0.0734f, 0.0950f, 0.1053f
};
static const float glorentz50[22] = {
0.0023f, 0.0025f, 0.0028f, 0.0031f, 0.0035f, 0.0039f, 0.0044f, 0.0050f,
0.0058f, 0.0067f, 0.0079f, 0.0094f, 0.0114f, 0.0139f, 0.0175f, 0.0223f,
0.0292f, 0.0391f, 0.0529f, 0.0709f, 0.0889f, 0.0971f
};
static const float glorentz51[23] = {
0.0023f, 0.0025f, 0.0027f, 0.0030f, 0.0034f, 0.0037f, 0.0042f, 0.0048f,
0.0054f, 0.0062f, 0.0072f, 0.0085f, 0.0100f, 0.0121f, 0.0148f, 0.0184f,
0.0233f, 0.0301f, 0.0396f, 0.0524f, 0.0681f, 0.0829f, 0.0894f
};
static const float glorentz52[25] = {
0.0021f, 0.0023f, 0.0025f, 0.0027f, 0.0030f, 0.0033f, 0.0036f, 0.0040f,
0.0045f, 0.0051f, 0.0058f, 0.0067f, 0.0077f, 0.0090f, 0.0107f, 0.0128f,
0.0156f, 0.0192f, 0.0242f, 0.0308f, 0.0398f, 0.0515f, 0.0650f, 0.0772f,
0.0824f
};
static const float glorentz53[27] = {
0.0019f, 0.0021f, 0.0022f, 0.0024f, 0.0027f, 0.0029f, 0.0032f, 0.0035f,
0.0039f, 0.0044f, 0.0049f, 0.0055f, 0.0062f, 0.0072f, 0.0083f, 0.0096f,
0.0113f, 0.0135f, 0.0164f, 0.0201f, 0.0249f, 0.0314f, 0.0398f, 0.0502f,
0.0619f, 0.0718f, 0.0759f
};
static const float glorentz54[30] = {
0.0017f, 0.0018f, 0.0019f, 0.0021f, 0.0022f, 0.0024f, 0.0026f, 0.0029f,
0.0031f, 0.0034f, 0.0038f, 0.0042f, 0.0047f, 0.0052f, 0.0059f, 0.0067f,
0.0076f, 0.0088f, 0.0102f, 0.0120f, 0.0143f, 0.0171f, 0.0208f, 0.0256f,
0.0317f, 0.0395f, 0.0488f, 0.0586f, 0.0666f, 0.0698f
};
static const float glorentz55[32] = {
0.0016f, 0.0017f, 0.0018f, 0.0019f, 0.0021f, 0.0022f, 0.0024f, 0.0026f,
0.0028f, 0.0031f, 0.0034f, 0.0037f, 0.0041f, 0.0045f, 0.0050f, 0.0056f,
0.0063f, 0.0071f, 0.0081f, 0.0094f, 0.0108f, 0.0127f, 0.0149f, 0.0178f,
0.0214f, 0.0261f, 0.0318f, 0.0389f, 0.0470f, 0.0553f, 0.0618f, 0.0643f
};
static const float glorentz56[35] = {
0.0014f, 0.0015f, 0.0016f, 0.0017f, 0.0018f, 0.0020f, 0.0021f, 0.0023f,
0.0024f, 0.0026f, 0.0028f, 0.0031f, 0.0033f, 0.0036f, 0.0040f, 0.0044f,
0.0049f, 0.0054f, 0.0060f, 0.0067f, 0.0076f, 0.0087f, 0.0099f, 0.0114f,
0.0133f, 0.0156f, 0.0184f, 0.0220f, 0.0264f, 0.0318f, 0.0381f, 0.0451f,
0.0520f, 0.0572f, 0.0591f
};
static const float glorentz57[38] = {
0.0013f, 0.0014f, 0.0015f, 0.0016f, 0.0017f, 0.0018f, 0.0019f, 0.0020f,
0.0021f, 0.0023f, 0.0024f, 0.0026f, 0.0028f, 0.0031f, 0.0033f, 0.0036f,
0.0039f, 0.0043f, 0.0047f, 0.0052f, 0.0058f, 0.0064f, 0.0072f, 0.0081f,
0.0092f, 0.0104f, 0.0120f, 0.0139f, 0.0162f, 0.0190f, 0.0224f, 0.0265f,
0.0315f, 0.0371f, 0.0431f, 0.0487f, 0.0529f, 0.0544f
};
static const float glorentz58[41] = {
0.0012f, 0.0013f, 0.0014f, 0.0014f, 0.0015f, 0.0016f, 0.0017f, 0.0018f,
0.0019f, 0.0020f, 0.0022f, 0.0023f, 0.0025f, 0.0026f, 0.0028f, 0.0030f,
0.0033f, 0.0036f, 0.0039f, 0.0042f, 0.0046f, 0.0050f, 0.0056f, 0.0061f,
0.0068f, 0.0076f, 0.0086f, 0.0097f, 0.0110f, 0.0125f, 0.0144f, 0.0167f,
0.0194f, 0.0226f, 0.0265f, 0.0309f, 0.0359f, 0.0409f, 0.0455f, 0.0488f,
0.0500f
};
static const float glorentz59[45] = {
0.0011f, 0.0012f, 0.0012f, 0.0013f, 0.0013f, 0.0014f, 0.0015f, 0.0016f,
0.0016f, 0.0017f, 0.0018f, 0.0019f, 0.0021f, 0.0022f, 0.0023f, 0.0025f,
0.0026f, 0.0028f, 0.0030f, 0.0033f, 0.0035f, 0.0038f, 0.0041f, 0.0045f,
0.0049f, 0.0054f, 0.0059f, 0.0065f, 0.0072f, 0.0081f, 0.0090f, 0.0102f,
0.0115f, 0.0130f, 0.0149f, 0.0171f, 0.0197f, 0.0227f, 0.0263f, 0.0302f,
0.0345f, 0.0387f, 0.0425f, 0.0451f, 0.0460f
};
static const float glorentz60[49] = {
0.0010f, 0.0011f, 0.0011f, 0.0012f, 0.0012f, 0.0013f, 0.0013f, 0.0014f,
0.0014f, 0.0015f, 0.0016f, 0.0017f, 0.0018f, 0.0019f, 0.0020f, 0.0021f,
0.0022f, 0.0024f, 0.0025f, 0.0027f, 0.0028f, 0.0030f, 0.0033f, 0.0035f,
0.0038f, 0.0041f, 0.0044f, 0.0048f, 0.0052f, 0.0057f, 0.0063f, 0.0069f,
0.0077f, 0.0085f, 0.0095f, 0.0106f, 0.0119f, 0.0135f, 0.0153f, 0.0174f,
0.0199f, 0.0227f, 0.0259f, 0.0293f, 0.0330f, 0.0365f, 0.0395f, 0.0415f,
0.0423f
};
static const float glorentz61[53] = {
0.0009f, 0.0010f, 0.0010f, 0.0011f, 0.0011f, 0.0011f, 0.0012f, 0.0012f,
0.0013f, 0.0014f, 0.0014f, 0.0015f, 0.0016f, 0.0016f, 0.0017f, 0.0018f,
0.0019f, 0.0020f, 0.0021f, 0.0023f, 0.0024f, 0.0025f, 0.0027f, 0.0029f,
0.0031f, 0.0033f, 0.0035f, 0.0038f, 0.0041f, 0.0044f, 0.0047f, 0.0051f,
0.0056f, 0.0061f, 0.0067f, 0.0073f, 0.0081f, 0.0089f, 0.0099f, 0.0110f,
0.0124f, 0.0139f, 0.0156f, 0.0176f, 0.0199f, 0.0225f, 0.0253f, 0.0283f,
0.0314f, 0.0343f, 0.0367f, 0.0383f, 0.0389f
};
static const float glorentz62[57] = {
0.0009f, 0.0009f, 0.0009f, 0.0010f, 0.0010f, 0.0011f, 0.0011f, 0.0011f,
0.0012f, 0.0012f, 0.0013f, 0.0013f, 0.0014f, 0.0015f, 0.0015f, 0.0016f,
0.0017f, 0.0018f, 0.0019f, 0.0020f, 0.0021f, 0.0022f, 0.0023f, 0.0024f,
0.0026f, 0.0027f, 0.0029f, 0.0031f, 0.0033f, 0.0035f, 0.0038f, 0.0040f,
0.0043f, 0.0047f, 0.0050f, 0.0055f, 0.0059f, 0.0064f, 0.0070f, 0.0077f,
0.0085f, 0.0093f, 0.0103f, 0.0114f, 0.0127f, 0.0142f, 0.0158f, 0.0177f,
0.0198f, 0.0221f, 0.0246f, 0.0272f, 0.0297f, 0.0321f, 0.0340f, 0.0353f,
0.0357f
};
static const float glorentz63[62] = {
0.0008f, 0.0008f, 0.0009f, 0.0009f, 0.0009f, 0.0010f, 0.0010f, 0.0010f,
0.0011f, 0.0011f, 0.0011f, 0.0012f, 0.0012f, 0.0013f, 0.0013f, 0.0014f,
0.0015f, 0.0015f, 0.0016f, 0.0017f, 0.0017f, 0.0018f, 0.0019f, 0.0020f,
0.0021f, 0.0022f, 0.0023f, 0.0025f, 0.0026f, 0.0028f, 0.0029f, 0.0031f,
0.0033f, 0.0035f, 0.0038f, 0.0040f, 0.0043f, 0.0046f, 0.0050f, 0.0053f,
0.0058f, 0.0062f, 0.0068f, 0.0074f, 0.0081f, 0.0088f, 0.0097f, 0.0106f,
0.0117f, 0.0130f, 0.0144f, 0.0159f, 0.0176f, 0.0195f, 0.0216f, 0.0237f,
0.0259f, 0.0280f, 0.0299f, 0.0315f, 0.0325f, 0.0328f
};
static const float glorentz64[65] = {
0.0008f, 0.0008f, 0.0008f, 0.0009f, 0.0009f, 0.0009f, 0.0010f, 0.0010f,
0.0010f, 0.0011f, 0.0011f, 0.0012f, 0.0012f, 0.0012f, 0.0013f, 0.0013f,
0.0014f, 0.0014f, 0.0015f, 0.0016f, 0.0016f, 0.0017f, 0.0018f, 0.0019f,
0.0020f, 0.0021f, 0.0022f, 0.0023f, 0.0024f, 0.0025f, 0.0027f, 0.0028f,
0.0030f, 0.0031f, 0.0033f, 0.0035f, 0.0038f, 0.0040f, 0.0043f, 0.0046f,
0.0049f, 0.0052f, 0.0056f, 0.0061f, 0.0066f, 0.0071f, 0.0077f, 0.0084f,
0.0091f, 0.0100f, 0.0109f, 0.0120f, 0.0132f, 0.0145f, 0.0159f, 0.0175f,
0.0192f, 0.0209f, 0.0228f, 0.0246f, 0.0264f, 0.0279f, 0.0291f, 0.0299f,
0.0301f
};
static const float *gptr_tab_lorentz[64] = {
glorentz1, glorentz2, glorentz3, glorentz4,
glorentz5, glorentz6, glorentz7, glorentz8,
glorentz9, glorentz10, glorentz11, glorentz12,
glorentz13, glorentz14, glorentz15, glorentz16,
glorentz17, glorentz18, glorentz19, glorentz20,
glorentz21, glorentz22, glorentz23, glorentz24,
glorentz25, glorentz26, glorentz27, glorentz28,
glorentz29, glorentz30, glorentz31, glorentz32,
glorentz33, glorentz34, glorentz35, glorentz36,
glorentz37, glorentz38, glorentz39, glorentz40,
glorentz41, glorentz42, glorentz43, glorentz44,
glorentz45, glorentz46, glorentz47, glorentz48,
glorentz49, glorentz50, glorentz51, glorentz52,
glorentz53, glorentz54, glorentz55, glorentz56,
glorentz57, glorentz58, glorentz59, glorentz60,
glorentz61, glorentz62, glorentz63, glorentz64
};

View File

@ -88,6 +88,7 @@ unsigned GetTickCount(void) {
// channel types
#define CHANNEL_AWGN 0
#define CHANNEL_RAYLEIGH 1
#define CHANNEL_FASTFADE 2
#define JT65_SNR_EBNO_OFFSET 29.1f // with the synch used in JT65
#define QRA64_SNR_EBNO_OFFSET 31.0f // with the costas array synch
@ -414,17 +415,18 @@ a particular type decode among the above 6 cases succeded.
return 0;
}
int test_fastfading(float EbNodB, float B90, int fadingModel, int submode, int apmode)
int test_fastfading(float EbNodB, float B90, int fadingModel, int submode, int apmode, int olddec, int channel_type, int ntx)
{
int x[QRA64_K], xdec[QRA64_K];
int y[QRA64_N];
float *rx;
float ebnodbest, ebnodbavg=0;
int rc,k;
float rxolddec[QRA64_N*QRA64_M]; // holds the energies at nominal tone freqs
int ndecok[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int nundet = 0;
int ntx = 100,ndec=0;
int ndec=0;
qra64codec *codec_iv3nwv;
qra64codec *codec_k1jt;
@ -432,22 +434,42 @@ int test_fastfading(float EbNodB, float B90, int fadingModel, int submode, int a
codec_iv3nwv=qra64_init(QRA_NOAP);
codec_k1jt =qra64_init(apmode);
printf("\nSimulating the QRA64 decoder with fast-fading metric\n");
printf("B90=%.2f Hz - Fading Model=%s - Submode=QRA64%c\n\n",B90,fadingModel?"Lorentz":"Gauss",submode+'A');
if (channel_type==2) { // fast-fading case
printf("Simulating the fast-fading channel\n");
printf("B90=%.2f Hz - Fading Model=%s - Submode=QRA64%c\n",B90,fadingModel?"Lorentz":"Gauss",submode+'A');
printf("Decoder metric = %s\n",olddec?"AWGN":"Matched to fast-fading signal");
}
else {
printf("Simulating the %s channel\n",channel_type?"Rayleigh block fading":"AWGN");
printf("Decoder metric = AWGN\n");
}
printf("\nEncoding msg [K1JT IV3NWV JN66]\n");
encodemsg_jt65(x,CALL_K1JT,CALL_IV3NWV,GRID_JN66);
// printf("[");
// for (k=0;k<11;k++) printf("%02hX ",x[k]); printf("%02hX]\n",x[11]);
qra64_encode(codec_iv3nwv, y, x);
printf("%d transmissions will be simulated\n\n",ntx);
if (apmode==QRA_USERAP) {
// This will enable K1JT's decoder to look for cq/qrz calls [CQ/QRZ ? ?/b]
printf("K1JT decoder enabled for [CQ ? ?/blank]\n");
qra64_apset(codec_k1jt, CALL_K1JT,0,0,APTYPE_CQQRZ);
// This will enable K1JT's decoder to look for calls directed to him [K1JT ? ?/b]
printf("K1JT decoder enabled for [K1JT ? ?/blank]\n");
qra64_apset(codec_k1jt, CALL_K1JT,0,0,APTYPE_MYCALL);
// This will enable K1JT's decoder to look for IV3NWV calls directed to him [K1JT IV3NWV ?/b]
printf("K1JT decoder enabled for [K1JT IV3NWV ?]\n");
qra64_apset(codec_k1jt, CALL_CQ,CALL_IV3NWV,0,APTYPE_BOTHCALLS);
// This will enable K1JT's decoder to look for msges sent by IV3NWV [? IV3NWV ?]
printf("K1JT decoder enabled for [? IV3NWV ?/blank]\n");
qra64_apset(codec_k1jt, 0,CALL_IV3NWV,GRID_BLANK,APTYPE_HISCALL);
// This will enable K1JT's decoder to look for IV3NWV calls directed to him [K1JT IV3NWV ?/b]
printf("K1JT decoder enabled for [K1JT IV3NWV ?]\n");
qra64_apset(codec_k1jt, CALL_K1JT,CALL_IV3NWV,0,APTYPE_BOTHCALLS);
// This will enable K1JT's decoder to look for full-knowledge [K1JT IV3NWV JN66] msgs
printf("K1JT decoder enabled for [K1JT IV3NWV JN66]\n");
qra64_apset(codec_k1jt, CALL_K1JT,CALL_IV3NWV,GRID_JN66,APTYPE_FULL);
@ -457,39 +479,84 @@ int test_fastfading(float EbNodB, float B90, int fadingModel, int submode, int a
qra64_apset(codec_k1jt, 0,CALL_IV3NWV,GRID_JN66,APTYPE_CQHISCALL);
}
printf("\nEncoding msg: [K1JT IV3NWV JN66]\n");
encodemsg_jt65(x,CALL_K1JT,CALL_IV3NWV,GRID_JN66);
qra64_encode(codec_iv3nwv, y, x);
printf("Decoding with K1JT's decoder\n");
printf("\nNow decoding with K1JT's decoder...\n");
/*
if (channel_type==2) // simulate a fast-faded signal
printf("Simulating a fast-fading channel with given B90 and spread type\n");
else
printf("Simulating a %s channel\n",channel_type?"Rayleigh block fading":"AWGN");
*/
for (k=0;k<ntx;k++) {
printf(".");
rc = qra64_fastfading_channel(&rx,y,submode,EbNodB,B90,fadingModel);
if (rc<0) {
printf("qra64_fastfading_channel error. rc=%d\n",rc);
return -1;
if ((k%10)==0)
printf(" %5.1f %%\r",100.0*k/ntx);
// printf("."); // work in progress
if (channel_type==2) {
// generate a fast-faded signal
rc = qra64_fastfading_channel(&rx,y,submode,EbNodB,B90,fadingModel);
if (rc<0) {
printf("\nqra64_fastfading_channel error. rc=%d\n",rc);
return -1;
}
}
rc = qra64_decode_fastfading(codec_k1jt,&ebnodbest,xdec,rx,submode,B90,fadingModel);
else // generate a awgn or Rayleigh block fading signal
rx = mfskchannel(y, channel_type, EbNodB);
if (channel_type==2) // fast-fading case
if (olddec==1) {
int k, j;
int jj = 1<<submode;
int bps = QRA64_M*(2+jj);
float *rxbase;
float *out = rxolddec;
// calc energies at nominal freqs
for (k=0;k<QRA64_N;k++) {
rxbase = rx + QRA64_M + k*bps;
for (j=0;j<QRA64_M;j++) {
*out++=*rxbase;
rxbase+=jj;
}
}
// decode with awgn decoder
rc = qra64_decode(codec_k1jt,&ebnodbest,xdec,rxolddec);
}
else // use fast-fading decoder
rc = qra64_decode_fastfading(codec_k1jt,&ebnodbest,xdec,rx,submode,B90,fadingModel);
else // awgn or rayleigh channel. use the old decoder whatever the olddec option is
rc = qra64_decode(codec_k1jt,&ebnodbest,xdec,rx);
if (rc>=0) {
ebnodbavg +=ebnodbest;
if (memcmp(xdec,x,12*sizeof(int))==0)
ndecok[rc]++;
else
nundet++;
}
else {
fprintf(stderr,"\nUndetected error with rc=%d\n",rc);
nundet++;
}
}
}
printf(" %5.1f %%\r",100.0*k/ntx);
printf("\n\n");
printf("Transimtted msgs:%d\nDecoded msgs:\n\n",ntx);
printf("Msgs transmitted:%d\nMsg decoded:\n\n",ntx);
for (k=0;k<12;k++) {
printf("%3d with %s\n",ndecok[k],decode_type[k]);
printf("rc=%2d %3d with %s\n",k,ndecok[k],decode_type[k]);
ndec += ndecok[k];
}
printf("\nTotal: %d/%d (%d undetected errors)\n\n",ndec,ntx,nundet);
printf("");
ebnodbavg/=(ndec+nundet);
printf("Estimated SNR (average in dB) = %.2f dB\n\n",ebnodbavg-QRA64_SNR_EBNO_OFFSET);
if (ndec>0) {
ebnodbavg/=(ndec+nundet);
printf("Estimated SNR (average in dB) = %.2f dB\n\n",ebnodbavg-QRA64_SNR_EBNO_OFFSET);
}
return 0;
}
@ -498,22 +565,34 @@ int test_fastfading(float EbNodB, float B90, int fadingModel, int submode, int a
void syntax(void)
{
printf("\nQRA64 Mode Tests\n");
printf("2016, Nico Palermo - IV3NWV\n\n");
printf("---------------------------\n\n");
printf("Syntax: qra64 [-s<snrdb>] [-c<channel>] [-a<ap-type>] [-t<testtype>] [-h]\n");
printf("Options: \n");
printf(" -s<snrdb> : set simulation SNR in 2500 Hz BW (default:-27.5 dB)\n");
printf(" -c<channel> : set channel type 0=AWGN (default) 1=Rayleigh\n");
printf(" -c<channel> : set channel type 0=AWGN (default) 1=Rayleigh 2=Fast-fading\n");
printf(" -a<ap-type> : set decode type 0=NOAP 1=AUTOAP (default) 2=USERAP\n");
printf(" -t<testtype>: 0=simulate seq of msgs between IV3NWV and K1JT (default)\n");
printf(" 1=simulate K1JT receiving K1JT IV3NWV JN66\n");
printf(" 2=simulate fast-fading routines (option -c ignored)\n");
printf("Options used only for fast-fading simulations:\n");
printf(" 2=simulate fast-fading/awgn/rayliegh decoders performance\n");
printf(" -n<ntx> : simulate the transmission of ntx codewords (default=100)\n");
printf("Options used only for fast-fading simulations (-c2):\n");
printf(" -b : 90%% fading bandwidth in Hz [1..230 Hz] (default = 2.5 Hz)\n");
printf(" -m : fading model. 0=Gauss, 1=Lorentz (default = Lorentz)\n");
printf(" -q : qra64 submode. 0=QRA64A,... 4=QRA64E (default = QRA64A)\n");
printf(" -d : use the old awgn decoder\n");
printf(" -h: this help\n");
printf("Example:\n");
printf(" qra64 -t2 -c2 -a2 -b50 -m1 -q2 -n10000 -s-26\n");
printf(" runs the error performance test (-t2)\n");
printf(" with USER_AP (-a2)\n");
printf(" simulating a fast fading channel (-c2)\n");
printf(" with B90 = 50 Hz (-b50), Lorentz Doppler (-m1), mode QRA64C (-q2)\n");
printf(" ntx = 10000 codewords (-n10000) and SNR = -26 dB (-s-26)\n");
}
int main(int argc, char* argv[])
@ -528,6 +607,8 @@ int main(int argc, char* argv[])
float B90 = 2.5;
int fadingModel = 1;
int submode = 0;
int olddec = 0;
int ntx = 100;
// Parse the command line
while(--argc) {
@ -538,6 +619,15 @@ int main(int argc, char* argv[])
return 0;
}
else
if (strncmp(*argv,"-n",2)==0) {
ntx = ( int)atoi((*argv)+2);
if (ntx<100 || ntx>1000000) {
printf("Invalid -n option. ntx must be in the range [100..1000000]\n");
syntax();
return -1;
}
}
else
if (strncmp(*argv,"-a",2)==0) {
mode = ( int)atoi((*argv)+2);
if (mode>2) {
@ -567,7 +657,7 @@ int main(int argc, char* argv[])
else
if (strncmp(*argv,"-c",2)==0) {
channel = ( int)atoi((*argv)+2);
if (channel>CHANNEL_RAYLEIGH) {
if (channel>CHANNEL_FASTFADE) {
printf("Invalid channel type\n");
syntax();
return -1;
@ -600,6 +690,10 @@ int main(int argc, char* argv[])
return -1;
}
}
else
if (strncmp(*argv,"-d",2)==0) {
olddec = 1;
}
else {
printf("Invalid option\n");
syntax();
@ -607,6 +701,11 @@ int main(int argc, char* argv[])
}
}
if (testtype<2) // old tests
if (channel==CHANNEL_FASTFADE) {
printf("Invalid Option. Test type 0 and 1 supports only AWGN or Rayleigh Channel model\n");
return -1;
}
EbNodB = SNRdB+QRA64_SNR_EBNO_OFFSET;
@ -637,11 +736,11 @@ int main(int argc, char* argv[])
);
}
else {
test_fastfading(EbNodB,B90,fadingModel,submode,mode);
printf("Input SNR = %.1fdB ap-mode=%s\n\n",
SNRdB,
apmode_type[mode]
);
test_fastfading(EbNodB,B90,fadingModel,submode,mode,olddec, channel, ntx);
}
return 0;
}

View File

@ -58,19 +58,22 @@ static int qra64_decode_attempts(qra64codec *pcodec, int *xdec, const float *ix)
static int qra64_do_decode(int *x, const float *pix, const int *ap_mask,
const int *ap_x);
static float qra64_fastfading_estim_noise_std(
float *rxen,
const float *rxen,
const float esnometric,
const int submode);
static void qra64_fastfading_intrinsics(
float *pix,
const float *rxamp,
const float *rxen,
const float *hptr,
const int hlen,
const float cmetric,
const float sigma,
const float EsNoMetric,
const int submode);
static float qra64_fastfading_msg_esno(
const int *ydec,
const float *rxamp,
const float *rxen,
const float sigma,
const float EsNoMetric,
const int hlen,
@ -78,14 +81,31 @@ static float qra64_fastfading_msg_esno(
// a-priori information masks for fields in JT65-like msgs --------------------
#define MASK_CQQRZ 0xFFFFFFC // CQ/QRZ calls common bits
// when defined limits the AP masks to reduce the false decode rate
#define LIMIT_AP_MASKS
#ifdef LIMIT_AP_MASKS
#define MASK_CQQRZ 0xFFFFFFC
#define MASK_CALL1 0xFFFFFFC
#define MASK_CALL2 0xFFFFFFC
#define MASK_GRIDFULL 0x3FFC
#define MASK_GRIDFULL12 0x3FFC
#define MASK_GRIDBIT 0x8000
#else
#define MASK_CQQRZ 0xFFFFFFC
#define MASK_CALL1 0xFFFFFFF
#define MASK_CALL2 0xFFFFFFF
#define MASK_GRIDFULL 0xFFFF
#define MASK_GRIDFULL12 0x3FFC // less aggressive mask (to be used with full AP decoding)
#define MASK_GRIDFULL12 0x3FFC
#define MASK_GRIDBIT 0x8000 // b[15] is 1 for free text, 0 otherwise
#endif
// ----------------------------------------------------------------------------
qra64codec *qra64_init(int flags)
{
@ -248,6 +268,7 @@ void qra64_encode(qra64codec *pcodec, int *y, const int *x)
}
#define EBNO_MIN -10.0f // minimum Eb/No value returned by the decoder (in dB)
// AWGN metric decoder
int qra64_decode(qra64codec *pcodec, float *ebno, int *x, const float *rxen)
{
int k;
@ -336,18 +357,21 @@ int qra64_decode(qra64codec *pcodec, float *ebno, int *x, const float *rxen)
return rc;
}
// Tables of fading amplitudes coefficients for QRA64 (Ts=6912/12000)
//
// Fast-fading / Rayleigh channel metric decoder ----------------------------------------------
//
// Tables of fading energies coefficients for QRA64 (Ts=6912/12000)
// As the fading is assumed to be symmetric around the nominal frequency
// only the leftmost and the central coefficient are stored in the tables.
// (files have been generated with the Matlab code efgengauss.m and efgenlorentz.m)
#include "fadampgauss.c"
#include "fadamplorentz.c"
// (files have been generated with the Matlab code efgengaussenergy.m and efgenlorentzenergy.m)
#include "fadengauss.c"
#include "fadenlorentz.c"
int qra64_decode_fastfading(
qra64codec *pcodec, // ptr to the codec structure
float *ebno, // ptr to where the estimated Eb/No value will be saved
int *x, // ptr to decoded message
float *rxen, // ptr to received symbol energies array
const float *rxen, // ptr to received symbol energies array
const int submode, // submode idx (0=QRA64A ... 4=QRA64E)
const float B90, // spread bandwidth (90% fractional energy)
const int fadingModel) // 0=Gaussian 1=Lorentzian fade model
@ -413,7 +437,8 @@ int qra64_decode_fastfading(
float noisestd; // estimated noise std
float esno,ebnoval; // estimated Eb/No
float tempf;
float EsNoMetric, cmetric;
float EsNoMetric;
int rc;
int hidx, hlen;
const float *hptr;
@ -434,14 +459,14 @@ int qra64_decode_fastfading(
return -19; // index of weighting function out of range
if (fadingModel==0) { // gaussian fading model
// point to gaussian weighting taps
hlen = hlen_tab_gauss[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = hptr_tab_gauss[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
// point to gaussian energy weighting taps
hlen = glen_tab_gauss[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = gptr_tab_gauss[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
}
else if (fadingModel==1) {
// point to lorentzian weighting taps
hlen = hlen_tab_lorentz[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = hptr_tab_lorentz[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
// point to lorentzian energy weighting taps
hlen = glen_tab_lorentz[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = gptr_tab_lorentz[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
}
else
return -20; // invalid fading model index
@ -455,18 +480,15 @@ int qra64_decode_fastfading(
tempf = 8.0f*(float)log((float)B90)/(float)log(240.0f);
EsNoMetric = pcodec->decEsNoMetric*(float)pow(10.0f,tempf/10.0f);
// Step 1 -----------------------------------------------------------------------------------
// Evaluate the noise stdev from the received energies at nominal tone frequencies
// and transform energies to amplitudes
tempf = hptr[hlen-1]; // amplitude weigth at nominal freq;
tempf = tempf*tempf; // fractional energy at nominal freq. bin
noisestd = qra64_fastfading_estim_noise_std(rxen, EsNoMetric, submode);
cmetric = (float)sqrt(M_PI_2*EsNoMetric)/noisestd;
// Step 2 -----------------------------------------------------------------------------------
// Compute message symbols probability distributions
qra64_fastfading_intrinsics(ix, rxen, hptr, hlen, cmetric, submode);
qra64_fastfading_intrinsics(ix, rxen, hptr, hlen, noisestd, EsNoMetric, submode);
// Step 3 ---------------------------------------------------------------------------
// De-puncture observations adding a uniform distribution for the crc symbol
@ -508,7 +530,7 @@ int qra64_decode_fastfading(
// we could compute the unbiased esno with:
// esno = esno/0.9;
// this would be the exact value if the noisestd were not overestimated at high Eb/No
// Es/N0 --> Eb/N0 conversion
ebnoval = 1.0f/(1.0f*QRA64_K/QRA64_N*QRA64_m)*esno;
// compute value in dB
@ -526,7 +548,7 @@ int qra64_decode_fastfading(
}
/*
int qra64_fastfading_channel(float **rxen, const int *xmsg, const int submode, const float EbN0dB, const float B90, const int fadingModel)
{
// Simulate transmission over a fading channel and non coherent detection
@ -548,10 +570,9 @@ int qra64_fastfading_channel(float **rxen, const int *xmsg, const int submode, c
float iq[2];
float *curi, *curq;
float sigmasig[65]; // signal standard deviation taps
// float tote=0; // debug
float N0, EsN0, Es, A, sigmanoise, sigmasig;
float N0, EsN0, Es, sigmanoise;
if (rxen==NULL)
return -1; // rxen must be a non-null ptr
@ -575,7 +596,7 @@ int qra64_fastfading_channel(float **rxen, const int *xmsg, const int submode, c
if (B90<1.0f || B90>238.0f)
return -18; // B90 out of range
// compute index to most appropriate amplitude weighting function coefficients
// compute index to most appropriate energy weighting function coefficients
hidx = (int)(log((float)B90)/log(1.09f) - 0.499f);
if (hidx<0 || hidx > 64)
@ -583,13 +604,13 @@ int qra64_fastfading_channel(float **rxen, const int *xmsg, const int submode, c
if (fadingModel==0) { // gaussian fading model
// point to gaussian weighting taps
hlen = hlen_tab_gauss[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = hptr_tab_gauss[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
hlen = glen_tab_gauss[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = gptr_tab_gauss[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
}
else if (fadingModel==1) {
// point to lorentzian weighting taps
hlen = hlen_tab_lorentz[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = hptr_tab_lorentz[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
hlen = glen_tab_lorentz[hidx]; // hlen = (L+1)/2 (where L=(odd) number of taps of w fun)
hptr = gptr_tab_lorentz[hidx]; // pointer to the first (L+1)/2 coefficients of w fun
}
else
return -20; // invalid fading model index
@ -600,13 +621,15 @@ int qra64_fastfading_channel(float **rxen, const int *xmsg, const int submode, c
sigmanoise = (float)sqrt(N0/2);
EsN0 = (float)pow(10.0f,EbN0dB/10.0f)*QRA64_m*QRA64_K/QRA64_N; // Es/No = m*R*Eb/No
Es = EsN0*N0;
A = (float)sqrt(Es/2.0f); // unfaded tone amplitude (i^2+q^2 = Es/2+Es/2 = Es)
// compute signal bin sigmas
for (n=0;n<hlen;n++)
sigmasig[n] = (float)sqrt(hptr[n]*Es/2.0f);
// Generate gaussian noise iq components
normrnd_s(channel_out, bpm*2, 0 , sigmanoise);
// Add message symbols energies
// Add symbols, bin by bin energies
for (n=0;n<QRA64_N;n++) {
cursym = channel_out+n*bps + QRA64_M; // point to n-th symbol
@ -616,26 +639,18 @@ int qra64_fastfading_channel(float **rxen, const int *xmsg, const int submode, c
// generate Rayleigh faded bins with given average energy and add to noise
for (j=0;j<hlen;j++) {
sigmasig = A*hptr[j];
normrnd_s(iq, 2, 0 , sigmasig);
// iq[0]=sigmasig*sqrt(2); iq[1]=0; debug: used to verify Eb/No
normrnd_s(iq, 2, 0 , sigmasig[j]);
*curi++ += iq[0];
*curq++ += iq[1];
// tote +=iq[0]*iq[0]+iq[1]*iq[1]; // debug
}
for (j=hlen-2;j>=0;j--) {
sigmasig = A*hptr[j];
normrnd_s(iq, 2, 0 , sigmasig);
// iq[0]=sigmasig*sqrt(2); iq[1]=0; debug: used to verify Eb/No
normrnd_s(iq, 2, 0 , sigmasig[j]);
*curi++ += iq[0];
*curq++ += iq[1];
// tote +=iq[0]*iq[0]+iq[1]*iq[1]; // debug
}
}
// tote = tote/QRA64_N; // debug
// compute total bin energies (S+N) and store in first half of buffer
curi = channel_out;
curq = channel_out+bpm;
@ -647,14 +662,14 @@ int qra64_fastfading_channel(float **rxen, const int *xmsg, const int submode, c
return 0;
}
*/
// Static functions definitions ----------------------------------------------
// fast-fading static functions --------------------------------------------------------------
static float qra64_fastfading_estim_noise_std(float *rxen, const float esnometric, const int submode)
static float qra64_fastfading_estim_noise_std(const float *rxen, const float esnometric, const int submode)
{
// estimate the noise standard deviation from nominal frequency symbol bins
// transform energies to amplitudes
@ -671,11 +686,9 @@ static float qra64_fastfading_estim_noise_std(float *rxen, const float esnometri
// estimate noise std
sigmaest = 0;
for (k=0;k<bpm;k++) {
for (k=0;k<bpm;k++)
sigmaest += rxen[k];
// convert energies to amplitudes for later use
rxen[k] = (float)sqrt(rxen[k]); // we do it in place to avoid memory allocations
}
sigmaest = sigmaest/bpm;
sigmaest = (float)sqrt(sigmaest/(1.0f+esnometric/bps)/2.0f);
@ -686,52 +699,55 @@ static float qra64_fastfading_estim_noise_std(float *rxen, const float esnometri
static void qra64_fastfading_intrinsics(
float *pix,
const float *rxamp,
const float *rxen,
const float *hptr,
const int hlen,
const float cmetric,
const float sigmaest,
const float EsNoMetric,
const int submode)
{
// For each symbol in a message:
// a) Compute tones loglikelihoods as a sum of products between of the expected
// amplitude fading coefficient and received amplitudes.
// Each product is computed as log(I0(hk*xk*cmetric)) where hk is the average fading amplitude,
// xk is the received amplitude at bin offset k, and cmetric is a constant dependend on the
// Eb/N0 value for which the metric is optimized
// The function y = log(I0(x)) is approximated as y = x^2/(x+e)
// energy fading coefficient and received energies.
// b) Compute intrinsic symbols probability distributions from symbols loglikelihoods
int n,k,j, bps, bpt;
const float *cursym, *curbin;
float *curix;
float u, maxloglh, loglh, sumix;
float u, maxloglh, loglh, sumix,hh;
float w[65];
int hhsz = hlen-1;
int hlast = 2*hhsz;
float npwrest = 2.0f*sigmaest*sigmaest;
bpt = 1<<submode; // bins per tone
bps = QRA64_M*(2+bpt); // bins per symbol
u = EsNoMetric;
// compute weights from energy tables
for (j=0;j<hlen;j++) {
hh = hptr[j]*u;
w[j] = hh/(1+hh)/npwrest;
}
for (n=0;n<QRA64_N;n++) { // for each symbol in the message
cursym = rxamp+n*bps + QRA64_M; // point to current symbol nominal bin
cursym = rxen+n*bps + QRA64_M; // point to current symbol nominal bin
maxloglh = 0;
curix = pix+n*QRA64_M;
for (k=0;k<QRA64_M;k++) { // for each tone in the current symbol
curbin = cursym + k*bpt -hlen+1; // ptr to lowest bin of the current tone
// compute tone loglikelihood as a weighted sum of bins loglikelihoods
curbin = cursym + k*bpt -hlen+1;
// compute tone loglikelihood (symmetric fir with given weights)
loglh = 0.f;
for (j=0;j<hlen;j++) {
u = *curbin++ * hptr[j]*cmetric;
u = u*u/(u+(float)M_E); // log(I0(u)) approx.
loglh = loglh + u;
}
for (j=hlen-2;j>=0;j--) {
u = *curbin++ * hptr[j]*cmetric;
u = u*u/(u+(float)M_E); // log(I0(u)) approx.
loglh = loglh + u;
}
for (j=0;j<hhsz;j++)
loglh += w[j]*(curbin[j] + curbin[hlast-j]);
loglh += w[hhsz]*curbin[hhsz];
if (loglh>maxloglh) // keep track of the max loglikelihood
maxloglh = loglh;
curix[k]=loglh;
}
// scale to likelihoods
sumix = 0.f;
for (k=0;k<QRA64_M;k++) {
@ -748,7 +764,7 @@ static void qra64_fastfading_intrinsics(
static float qra64_fastfading_msg_esno(
const int *ydec,
const float *rxamp,
const float *rxen,
const float sigma,
const float EsNoMetric,
const int hlen,
@ -766,19 +782,13 @@ static float qra64_fastfading_msg_esno(
msgsn = 0;
for (n=0;n<QRA64_N;n++) {
cursym = rxamp+n*bps + QRA64_M; // point to n-th symbol amplitudes
cursym = rxen+n*bps + QRA64_M; // point to n-th symbol amplitudes
curtone = cursym+ydec[n]*bpt; // point to decoded tone amplitudes
curbin = curtone-hlen+1; // point to first bin amplitude
// sum bin energies
for (j=0;j<hlen;j++) {
u = *curbin++;
msgsn += u*u;
}
for (j=hlen-2;j>=0;j--) {
u = *curbin++;
msgsn += u*u;
}
for (j=0;j<tothlen;j++)
msgsn += curbin[j];
}
@ -809,6 +819,39 @@ static float qra64_fastfading_msg_esno(
}
#ifdef LIMIT_AP_MASKS
static int call1_match(const int *papmsg, const int *pdec)
{
// assumes MASK_CALL1 = 0xFFFFFFC
int u = papmsg[4]^pdec[4];
return (u&0x3C)==0;
}
static int call2_match(const int *papmsg, const int *pdec)
{
// assumes MASK_CALL2 = 0xFFFFFFC
int u = papmsg[9]^pdec[9];
return (u&0x30)==0;
}
static int grid_match(const int *papmsg, const int *pdec)
{
// assumes MASK_GRIDFULL = 0x3FFC
int u = papmsg[11]^pdec[11];
int rc = (u&0x03)==0;
u = papmsg[9]^pdec[9];
return (u&0x0C)==0 && rc;
}
#else
#define call1_match(a,b) (1)
#define call2_match(a,b) (1)
#define grid_match(a,b) (1)
#endif
// Attempt to decode given intrisic information
static int qra64_decode_attempts(qra64codec *pcodec, int *xdec, const float *ix)
@ -826,39 +869,64 @@ static int qra64_decode_attempts(qra64codec *pcodec, int *xdec, const float *ix)
// Here we handle decoding with AP knowledge
// Attempt to decode CQ calls
rc = qra64_do_decode(xdec,ix,pcodec->apmask_cqqrz, pcodec->apmsg_cqqrz);
if (rc>=0) return 1; // decoded [cq/qrz ? ?]
if (rc>=0)
return 1; // decoded [cq/qrz ? ?]
rc = qra64_do_decode(xdec, ix, pcodec->apmask_cqqrz_ooo,
pcodec->apmsg_cqqrz);
if (rc>=0) return 2; // decoded [cq ? ooo]
if (rc>=0)
// check that ooo really matches
if (grid_match(pcodec->apmsg_cqqrz,xdec))
return 2; // decoded [cq/qrz ? ooo]
// attempt to decode calls directed to us
if (pcodec->apmsg_set[APTYPE_MYCALL]) {
rc = qra64_do_decode(xdec, ix, pcodec->apmask_call1,
pcodec->apmsg_call1);
if (rc>=0) return 3; // decoded [mycall ? ?]
if (rc>=0)
// check that mycall really matches
if (call1_match(pcodec->apmsg_call1,xdec))
return 3; // decoded [mycall ? ?]
rc = qra64_do_decode(xdec, ix, pcodec->apmask_call1_ooo,
pcodec->apmsg_call1);
if (rc>=0) return 4; // decoded [mycall ? ooo]
if (rc>=0)
// check that mycall and ooo really match
if (call1_match(pcodec->apmsg_call1,xdec) &&
grid_match(pcodec->apmsg_call1,xdec))
return 4; // decoded [mycall ? ooo]
}
// attempt to decode [mycall srccall ?] msgs
// attempt to decode [mycall hiscall ?] msgs
if (pcodec->apmsg_set[APTYPE_BOTHCALLS]) {
rc = qra64_do_decode(xdec, ix, pcodec->apmask_call1_call2,
pcodec->apmsg_call1_call2);
if (rc>=0) return 5; // decoded [mycall srccall ?]
if (rc>=0)
// check that mycall and hiscall really match
if (call1_match(pcodec->apmsg_call1_call2,xdec) &&
call2_match(pcodec->apmsg_call1_call2,xdec))
return 5; // decoded [mycall srccall ?]
}
// attempt to decode [? hiscall ?/b] msgs
if (pcodec->apmsg_set[APTYPE_HISCALL]) {
rc = qra64_do_decode(xdec, ix, pcodec->apmask_call2,
pcodec->apmsg_call2);
if (rc>=0) return 6; // decoded [? hiscall ?]
if (rc>=0)
// check that hiscall really match
if (call2_match(pcodec->apmsg_call2,xdec))
return 6; // decoded [? hiscall ?]
rc = qra64_do_decode(xdec, ix, pcodec->apmask_call2_ooo,
pcodec->apmsg_call2);
if (rc>=0) return 7; // decoded [? hiscall ooo]
if (rc>=0)
// check that hiscall and ooo match
if (call2_match(pcodec->apmsg_call2,xdec) &&
grid_match(pcodec->apmsg_call2,xdec))
return 7; // decoded [? hiscall ooo]
}
// attempt to decode [cq/qrz hiscall ?/b/grid] msgs
@ -866,7 +934,10 @@ static int qra64_decode_attempts(qra64codec *pcodec, int *xdec, const float *ix)
rc = qra64_do_decode(xdec, ix, pcodec->apmask_cq_call2,
pcodec->apmsg_cq_call2);
if (rc>=0) return 9; // decoded [cq/qrz hiscall ?]
if (rc>=0)
// check that hiscall matches
if (call2_match(pcodec->apmsg_call2,xdec))
return 9; // decoded [cq/qrz hiscall ?]
rc = qra64_do_decode(xdec, ix, pcodec->apmask_cq_call2_ooo,
pcodec->apmsg_cq_call2_grid);
@ -874,11 +945,9 @@ static int qra64_decode_attempts(qra64codec *pcodec, int *xdec, const float *ix)
// Full AP mask need special handling
// To minimize false decodes we check the decoded message
// with what passed in the ap_set call
if (memcmp(pcodec->apmsg_cq_call2_grid,xdec, QRA64_K*sizeof(int))!=0)
return -1;
else
if (memcmp(pcodec->apmsg_cq_call2_grid,xdec, QRA64_K*sizeof(int))==0)
return 11; // decoded [cq/qrz hiscall grid]
};
}
rc = qra64_do_decode(xdec, ix, pcodec->apmask_cq_call2_ooo,
pcodec->apmsg_cq_call2);
@ -886,9 +955,7 @@ static int qra64_decode_attempts(qra64codec *pcodec, int *xdec, const float *ix)
// Full AP mask need special handling
// To minimize false decodes we check the decoded message
// with what passed in the ap_set call
if (memcmp(pcodec->apmsg_cq_call2,xdec, QRA64_K*sizeof(int))!=0)
return -1;
else
if (memcmp(pcodec->apmsg_cq_call2,xdec, QRA64_K*sizeof(int))==0)
return 10; // decoded [cq/qrz hiscall ]
}
}
@ -902,15 +969,13 @@ static int qra64_decode_attempts(qra64codec *pcodec, int *xdec, const float *ix)
// All the three msg fields were given.
// To minimize false decodes we check the decoded message
// with what passed in the ap_set call
if (memcmp(pcodec->apmsg_call1_call2_grid,xdec, QRA64_K*sizeof(int))!=0)
return -1;
else
if (memcmp(pcodec->apmsg_call1_call2_grid,xdec, QRA64_K*sizeof(int))==0)
return 8; // decoded [mycall hiscall grid]
}
}
// all decoding attempts failed
return rc;
return -1;
}

View File

@ -48,7 +48,7 @@
#define APTYPE_MYCALL 1 // [mycall ? ?/blank]
#define APTYPE_HISCALL 2 // [? hiscall ?/blank]
#define APTYPE_BOTHCALLS 3 // [mycall hiscall ?]
#define APTYPE_FULL 4 // [mycall hiscall grid]
#define APTYPE_FULL 4 // [mycall hiscall grid]
#define APTYPE_CQHISCALL 5 // [cq/qrz hiscall ?/blank]
#define APTYPE_SIZE (APTYPE_CQHISCALL+1)
@ -58,9 +58,9 @@ typedef struct {
int apmsg_set[APTYPE_SIZE]; // indicate which ap type knowledge has
// been set by the user
// ap messages buffers
int apmsg_cqqrz[12]; // [cq/qrz ? ?/blank]
int apmsg_call1[12]; // [mycall ? ?/blank]
int apmsg_call2[12]; // [? hiscall ?/blank]
int apmsg_cqqrz[12]; // [cq/qrz ? ?/blank]
int apmsg_call1[12]; // [mycall ? ?/blank]
int apmsg_call2[12]; // [? hiscall ?/blank]
int apmsg_call1_call2[12]; // [mycall hiscall ?]
int apmsg_call1_call2_grid[12]; // [mycall hiscall grid]
int apmsg_cq_call2[12]; // [cq hiscall ?/blank]
@ -146,7 +146,7 @@ int qra64_decode_fastfading(
qra64codec *pcodec, // ptr to the codec structure
float *ebno, // ptr to where the estimated Eb/No value will be saved
int *x, // ptr to decoded message
float *rxen, // ptr to received symbol energies array
const float *rxen, // ptr to received symbol energies array
const int submode, // submode idx (0=QRA64A ... 4=QRA64E)
const float B90, // spread bandwidth (90% fractional energy)
const int fadingModel); // 0=Gaussian 1=Lorentzian fade model

View File

@ -4,8 +4,6 @@
#include "qra64.h"
#include <stdio.h>
//#define NICO_WANTS_SNR_DUMP
static qra64codec *pqra64codec = NULL;
void qra64_enc_(int x[], int y[])
@ -19,27 +17,33 @@ void qra64_dec_(float r[], int* nc1, int* nc2, int* ng2, int* APtype,
int xdec[], float* snr, int* rc)
{
/*
APtype:
-1 (no AP information)
0 [CQ/QRZ * ?_] (* means 26 or 28 bit info)
1 [call1 * ?_] (?_ means 16-bit info or "blank")
2 [* call2 ?_]
3 [call1 call2 ?_]
4 [call1 call2 grid]
APtype: AP
-----------------------------------------------------------------------
-1 0 (no AP information)
0 [CQ/QRZ ? ? ] 25/37
1 [MyCall ? ? ] 25/37
2 [ ? HisCall ? ] 25/37
3 [MyCall HisCall ? ] 49/68
4 [MyCall HisCall grid] 68
5 [CQ/QRZ HisCall ? ] 49/68
Return codes:
-16 Failed sanity check
-2 Decoded, but crc check failed
-1 No decode
0 [? ? ?] AP0 (decoding with no a-priori information)
1 [CQ ? ?] AP27
2 [CQ ? ] AP42
3 [CALL ? ?] AP29
4 [CALL ? ] AP44
5 [CALL CALL ?] AP57
6 [? CALL ?] AP29
7 [? CALL ] AP44
8 [CALL CALL G] AP72
rc Message format AP APTYPE Comments
------------------------------------------------------------------------
-16 Failed sanity check
-2 Decoded but CRC failed
-1 No decode
0 [ ? ? ? ] 0 -1 Decode with no AP info
1 [CQ/QRZ ? ? ] 25 0
2 [CQ/QRZ ? _ ] 37 0
3 [MyCall ? ? ] 25 1
4 [MyCall ? _ ] 37 1
5 [MyCall HisCall ? ] 49 3
6 [ ? HisCall ? ] 25 2 Optional
7 [ ? HisCall _ ] 37 2 Optional
8 [MyCall HisCall Grid] 68 4
9 [CQ/QRZ HisCall ? ] 49 5 Optional (not needed?)
10 [CQ/QRZ HisCall _ ] 68 5 Optional
11 [CQ/QRZ HisCall Grid] 68 ? Optional
*/
static int nc1z=-1;
float EbNodBEstimated;
@ -48,25 +52,14 @@ void qra64_dec_(float r[], int* nc1, int* nc2, int* ng2, int* APtype,
float b90=*b0;
int nFadingModel=*nf0;
#ifdef NICO_WANTS_SNR_DUMP
FILE *fout;
#endif
if(pqra64codec==NULL) pqra64codec = qra64_init(QRA_USERAP);
err=qra64_apset(pqra64codec,*nc1,*nc2,*ng2,*APtype);
if(err<0) printf("ERROR: qra64_apset returned %d\n",err);
if(*iset==0) {
// *rc = qra64_decode(pqra64codec,&EbNodBEstimated,xdec,r);
*rc = qra64_decode_fastfading(pqra64codec,&EbNodBEstimated,xdec,r,
nSubmode,b90,nFadingModel);
*snr = EbNodBEstimated - 31.0;
#ifdef NICO_WANTS_SNR_DUMP
fout = fopen("C:\\JTSDK\\snrdump.txt","a+");
if ((*rc)>=0) fprintf(fout,"rc=%d snr=%.2f dB\n",*rc,EbNodBEstimated-31.0f);
fclose(fout);
#endif
}
}

View File

@ -21,52 +21,68 @@ Options used only for fast-fading simulations:
#############################################################################
Usage example:
$ qra64 -a2 -t2 -b10.0 -m1 -q2 -s-28.0
qra64 -c2 -t2 -a2 -b50 -m1 -q2 -s-26.0 -n50000
Simulate fast-fading decoding (-t2) with
Simulate a fast-fading channel (-c2)
Evaluate decoder performance (-t2) with
USER_AP (-a2)
B90 = 10.0 Hz (-b10.0)
B90 = 50 Hz (-b50)
Lorentz model (-m1)
submode QRA64C (-q2)
Input SNR = -28.0 dB (-s-28.0)
Input SNR = -26.0 dB (-s-26.0)
Simulate 50000 transmissions (-n50000)
(type qra64 -h for command syntax)
Command Output:
Simulating the QRA64 decoder with fast-fading metric
B90=10.00 Hz - Fading Model=Lorentz - Submode=QRA64C
Input SNR = -26.0dB ap-mode=USER AP
Simulating the fast-fading channel
B90=50.00 Hz - Fading Model=Lorentz - Submode=QRA64C
Decoder metric = Matched to fast-fading signal
Encoding msg [K1JT IV3NWV JN66]
50000 transmissions will be simulated
K1JT decoder enabled for [CQ ? ?/blank]
K1JT decoder enabled for [K1JT ? ?/blank]
K1JT decoder enabled for [K1JT IV3NWV ?]
K1JT decoder enabled for [? IV3NWV ?/blank]
K1JT decoder enabled for [K1JT IV3NWV ?]
K1JT decoder enabled for [K1JT IV3NWV JN66]
K1JT decoder enabled for [CQ IV3NWV ?/b/JN66]
Encoding msg: [K1JT IV3NWV JN66]
Decoding with K1JT's decoder
....................................................................................................
Now decoding with K1JT's decoder...
5.5 %
Undetected error with rc=6
13.1 %
Undetected error with rc=7
70.8 %
Undetected error with rc=1
75.8 %
Undetected error with rc=9
88.9 %
Undetected error with rc=6
100.0 %
Transimtted msgs:100
Decoded msgs:
Msgs transmitted:50000
Msg decoded:
0 with [? ? ?] AP0
0 with [CQ ? ?] AP27
0 with [CQ ? ] AP42
4 with [CALL ? ?] AP29
0 with [CALL ? ] AP44
0 with [CALL CALL ?] AP57
2 with [? CALL ?] AP29
0 with [? CALL ] AP44
91 with [CALL CALL G] AP72
0 with [CQ CALL ?] AP55
0 with [CQ CALL ] AP70
0 with [CQ CALL G] AP70
rc= 0 0 with [? ? ?] AP0
rc= 1 0 with [CQ ? ?] AP27
rc= 2 0 with [CQ ? ] AP42
rc= 3 145 with [CALL ? ?] AP29
rc= 4 0 with [CALL ? ] AP44
rc= 5 12085 with [CALL CALL ?] AP57
rc= 6 0 with [? CALL ?] AP29
rc= 7 0 with [? CALL ] AP44
rc= 8 24307 with [CALL CALL G] AP72
rc= 9 0 with [CQ CALL ?] AP55
rc=10 0 with [CQ CALL ] AP70
rc=11 0 with [CQ CALL G] AP70
Total: 97/100 (0 undetected errors)
Estimated SNR (average in dB) = -28.39 dB
Input SNR = -28.0dB ap-mode=USER AP
Total: 36537/50000 (5 undetected errors)
Estimated SNR (average in dB) = -26.26 dB

View File

@ -1,5 +1,5 @@
subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
hiscall_12,hisgrid_6,sync,nsnr,dtx,nfreq,decoded,nft)
subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
mycall_12,hiscall_12,hisgrid_6,sync,nsnr,dtx,nfreq,decoded,nft)
use packjt
use timer_module, only: timer
@ -12,13 +12,14 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
logical ltext
complex c00(0:720000) !Complex spectrum of dd()
complex c0(0:720000) !Complex data for dd()
! integer*8 count0,count1,clkfreq
real a(3)
real dd(NMAX) !Raw data sampled at 12000 Hz
real s3(LN) !Symbol spectra
real s3a(LN) !Symbol spectra
integer dat4(12) !Decoded message (as 12 integers)
integer dat4x(12)
integer nap(0:11)
data nap/0,2,4,2,4,5,2,4,6,5,6,6/
data nc1z/-1/,nc2z/-1/,ng2z/-1/
save
@ -40,8 +41,11 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
if(mode64.eq.16) nSubmode=4
b90=1.0
nFadingModel=1
maxaptype=4
if(iand(ndepth,64).ne.0) maxaptype=5
if(nc1.ne.nc1z .or. nc2.ne.nc2z .or. ng2.ne.ng2z) then
do naptype=0,5
do naptype=0,maxaptype
if(naptype.eq.2 .and. maxaptype.eq.4) cycle
call qra64_dec(s3,nc1,nc2,ng2,naptype,1,nSubmode,b90, &
nFadingModel,dat4,snr2,irc)
enddo
@ -51,7 +55,6 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
endif
maxf1=0
! write(60) npts,dd(1:npts),nf1,nf2,nfqso,ntol,mode64,maxf1
call timer('sync64 ',0)
call sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk,sync,c00)
call timer('sync64 ',1)
@ -59,12 +62,11 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
if(sync.lt.float(minsync)) go to 900
npts2=npts/2
itz=10
itz=11
if(mode64.eq.4) itz=9
if(mode64.eq.2) itz=7
if(mode64.eq.1) itz=5
naptype=4
LL=64*(mode64+2)
NN=63
! do itry0=1,3
@ -81,8 +83,8 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
a(2)=-0.67*(idf1 + 0.67*kpk)
call twkfreq(c00,c0,npts2,6000.0,a)
call spec64(c0,npts2,mode64,jpk,s3a,LL,NN)
ircmin=99
do iter=itz,0,-1
napmin=99
do iter=itz,0,-2
b90=1.728**iter
s3(1:LL*NN)=s3a(1:LL*NN)
call timer('qra64_de',0)
@ -91,21 +93,22 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
call timer('qra64_de',1)
if(abs(snr2).gt.30.) snr2=-30.0
if(irc.eq.0) go to 10
if(irc.gt.0 .and. irc.le.ircmin) then
if(irc.lt.0) cycle
if(irc.gt.0 .and. nap(irc).le.napmin) then
dat4x=dat4
b90x=b90
snr2x=snr2
ircmin=irc
napmin=nap(irc)
irckeep=irc
endif
enddo
if(ircmin.ne.99) then
if(napmin.ne.99) then
dat4=dat4x
b90=b90x
snr2=snr2x
irc=ircmin
irc=irckeep
endif
10 decoded=' '
! write(73,3001) iter,b90,snr2,irc
if(irc.ge.0) then
call unpackmsg(dat4,decoded) !Unpack the user message
call fmtmsg(decoded,iz)
@ -129,11 +132,7 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall_12, &
if(nSubmode.eq.2) nsnr=nint(10.0*log10(sy)-34.0) !C
if(nSubmode.eq.3) nsnr=nint(10.0*log10(sy)-29.0) !D
if(nSubmode.eq.4) nsnr=nint(10.0*log10(sy)-24.0) !E
endif
! write(70,3303) sync,snr2,nsnr,irc
!3303 format(2f8.1,2i5)
endif
call timer('qra64a ',1)
return

View File

@ -4444,6 +4444,12 @@ void MainWindow::on_actionInclude_correlation_triggered()
ui->actionInclude_correlation->setChecked(m_ndepth&32);
}
void MainWindow::on_actionEnable_AP_DXcall_triggered()
{
m_ndepth=m_ndepth ^ 64;
ui->actionEnable_AP_DXcall->setChecked(m_ndepth&64);
}
void MainWindow::on_inGain_valueChanged(int n)
{
m_inGain=n;
@ -5218,6 +5224,7 @@ void::MainWindow::VHF_features_enabled(bool b)
ui->actionInclude_averaging->setEnabled(b);
ui->actionInclude_correlation->setEnabled(b);
ui->actionMessage_averaging->setEnabled(b);
ui->actionEnable_AP_DXcall->setEnabled(m_mode=="QRA64");
if(!b and m_msgAvgWidget!=NULL) {
if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->close();
}

View File

@ -218,6 +218,7 @@ private slots:
void on_actionMessage_averaging_triggered();
void on_actionInclude_averaging_triggered();
void on_actionInclude_correlation_triggered();
void on_actionEnable_AP_DXcall_triggered();
void VHF_features_enabled(bool b);
void on_sbSubmode_valueChanged(int n);
void on_cbShMsgs_toggled(bool b);

View File

@ -2,6 +2,14 @@
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>890</width>
<height>560</height>
</rect>
</property>
<property name="windowTitle">
<string>WSJT-X by K1JT</string>
</property>
@ -2280,7 +2288,7 @@ QPushButton[state=&quot;ok&quot;] {
<rect>
<x>0</x>
<y>0</y>
<width>756</width>
<width>890</width>
<height>21</height>
</rect>
</property>
@ -2323,6 +2331,7 @@ QPushButton[state=&quot;ok&quot;] {
<addaction name="separator"/>
<addaction name="actionInclude_averaging"/>
<addaction name="actionInclude_correlation"/>
<addaction name="actionEnable_AP_DXcall"/>
</widget>
<widget class="QMenu" name="menuSave">
<property name="title">
@ -2837,6 +2846,17 @@ QPushButton[state=&quot;ok&quot;] {
<string>Release Notes</string>
</property>
</action>
<action name="actionEnable_AP_DXcall">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Enable AP for DX Call</string>
</property>
<property name="shortcut">
<string/>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>