mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-14 23:43:43 -04:00
FT8 demod: isolate call1, all2 and locator in callback
This commit is contained in:
+31
-188
@@ -406,181 +406,23 @@ public:
|
||||
// bits being one. measured from reconstructed correct
|
||||
// codewords, into ft8bits, then python bprob.py.
|
||||
// from ft8-n4
|
||||
float apriori174[] = {
|
||||
0.47,
|
||||
0.32,
|
||||
0.29,
|
||||
0.37,
|
||||
0.52,
|
||||
0.36,
|
||||
0.40,
|
||||
0.42,
|
||||
0.42,
|
||||
0.53,
|
||||
0.44,
|
||||
0.44,
|
||||
0.39,
|
||||
0.46,
|
||||
0.39,
|
||||
0.38,
|
||||
0.42,
|
||||
0.43,
|
||||
0.45,
|
||||
0.51,
|
||||
0.42,
|
||||
0.48,
|
||||
0.31,
|
||||
0.45,
|
||||
0.47,
|
||||
0.53,
|
||||
0.59,
|
||||
0.41,
|
||||
0.03,
|
||||
0.50,
|
||||
0.30,
|
||||
0.26,
|
||||
0.40,
|
||||
0.65,
|
||||
0.34,
|
||||
0.49,
|
||||
0.46,
|
||||
0.49,
|
||||
0.69,
|
||||
0.40,
|
||||
0.45,
|
||||
0.45,
|
||||
0.60,
|
||||
0.46,
|
||||
0.43,
|
||||
0.49,
|
||||
0.56,
|
||||
0.45,
|
||||
0.55,
|
||||
0.51,
|
||||
0.46,
|
||||
0.37,
|
||||
0.55,
|
||||
0.52,
|
||||
0.56,
|
||||
0.55,
|
||||
0.50,
|
||||
0.01,
|
||||
0.19,
|
||||
0.70,
|
||||
0.88,
|
||||
0.75,
|
||||
0.75,
|
||||
0.74,
|
||||
0.73,
|
||||
0.18,
|
||||
0.71,
|
||||
0.35,
|
||||
0.60,
|
||||
0.58,
|
||||
0.36,
|
||||
0.60,
|
||||
0.38,
|
||||
0.50,
|
||||
0.02,
|
||||
0.01,
|
||||
0.98,
|
||||
0.48,
|
||||
0.49,
|
||||
0.54,
|
||||
0.50,
|
||||
0.49,
|
||||
0.53,
|
||||
0.50,
|
||||
0.49,
|
||||
0.49,
|
||||
0.51,
|
||||
0.51,
|
||||
0.51,
|
||||
0.47,
|
||||
0.50,
|
||||
0.53,
|
||||
0.51,
|
||||
0.46,
|
||||
0.51,
|
||||
0.51,
|
||||
0.48,
|
||||
0.51,
|
||||
0.52,
|
||||
0.50,
|
||||
0.52,
|
||||
0.51,
|
||||
0.50,
|
||||
0.49,
|
||||
0.53,
|
||||
0.52,
|
||||
0.50,
|
||||
0.46,
|
||||
0.47,
|
||||
0.48,
|
||||
0.52,
|
||||
0.50,
|
||||
0.49,
|
||||
0.51,
|
||||
0.49,
|
||||
0.49,
|
||||
0.50,
|
||||
0.50,
|
||||
0.50,
|
||||
0.50,
|
||||
0.51,
|
||||
0.50,
|
||||
0.49,
|
||||
0.49,
|
||||
0.55,
|
||||
0.49,
|
||||
0.51,
|
||||
0.48,
|
||||
0.55,
|
||||
0.49,
|
||||
0.48,
|
||||
0.50,
|
||||
0.51,
|
||||
0.50,
|
||||
0.51,
|
||||
0.50,
|
||||
0.51,
|
||||
0.53,
|
||||
0.49,
|
||||
0.54,
|
||||
0.50,
|
||||
0.48,
|
||||
0.49,
|
||||
0.46,
|
||||
0.51,
|
||||
0.51,
|
||||
0.52,
|
||||
0.49,
|
||||
0.51,
|
||||
0.49,
|
||||
0.51,
|
||||
0.50,
|
||||
0.49,
|
||||
0.50,
|
||||
0.50,
|
||||
0.47,
|
||||
0.49,
|
||||
0.52,
|
||||
0.49,
|
||||
0.51,
|
||||
0.49,
|
||||
0.48,
|
||||
0.52,
|
||||
0.48,
|
||||
0.49,
|
||||
0.47,
|
||||
0.50,
|
||||
0.48,
|
||||
0.50,
|
||||
0.49,
|
||||
0.51,
|
||||
0.51,
|
||||
0.51,
|
||||
0.49,
|
||||
double apriori174[] = {
|
||||
0.47, 0.32, 0.29, 0.37, 0.52, 0.36, 0.40, 0.42, 0.42, 0.53, 0.44,
|
||||
0.44, 0.39, 0.46, 0.39, 0.38, 0.42, 0.43, 0.45, 0.51, 0.42, 0.48,
|
||||
0.31, 0.45, 0.47, 0.53, 0.59, 0.41, 0.03, 0.50, 0.30, 0.26, 0.40,
|
||||
0.65, 0.34, 0.49, 0.46, 0.49, 0.69, 0.40, 0.45, 0.45, 0.60, 0.46,
|
||||
0.43, 0.49, 0.56, 0.45, 0.55, 0.51, 0.46, 0.37, 0.55, 0.52, 0.56,
|
||||
0.55, 0.50, 0.01, 0.19, 0.70, 0.88, 0.75, 0.75, 0.74, 0.73, 0.18,
|
||||
0.71, 0.35, 0.60, 0.58, 0.36, 0.60, 0.38, 0.50, 0.02, 0.01, 0.98,
|
||||
0.48, 0.49, 0.54, 0.50, 0.49, 0.53, 0.50, 0.49, 0.49, 0.51, 0.51,
|
||||
0.51, 0.47, 0.50, 0.53, 0.51, 0.46, 0.51, 0.51, 0.48, 0.51, 0.52,
|
||||
0.50, 0.52, 0.51, 0.50, 0.49, 0.53, 0.52, 0.50, 0.46, 0.47, 0.48,
|
||||
0.52, 0.50, 0.49, 0.51, 0.49, 0.49, 0.50, 0.50, 0.50, 0.50, 0.51,
|
||||
0.50, 0.49, 0.49, 0.55, 0.49, 0.51, 0.48, 0.55, 0.49, 0.48, 0.50,
|
||||
0.51, 0.50, 0.51, 0.50, 0.51, 0.53, 0.49, 0.54, 0.50, 0.48, 0.49,
|
||||
0.46, 0.51, 0.51, 0.52, 0.49, 0.51, 0.49, 0.51, 0.50, 0.49, 0.50,
|
||||
0.50, 0.47, 0.49, 0.52, 0.49, 0.51, 0.49, 0.48, 0.52, 0.48, 0.49,
|
||||
0.47, 0.50, 0.48, 0.50, 0.49, 0.51, 0.51, 0.51, 0.49,
|
||||
};
|
||||
|
||||
class FT8
|
||||
@@ -3772,38 +3614,41 @@ void entry(
|
||||
|
||||
// decodes from previous runs, for subtraction.
|
||||
std::vector<cdecode> prevdecs;
|
||||
for (int i = 0; i < nprevdecs; i++)
|
||||
{
|
||||
|
||||
for (int i = 0; i < nprevdecs; i++) {
|
||||
prevdecs.push_back(xprevdecs[i]);
|
||||
}
|
||||
|
||||
std::vector<float> samples(nsamples);
|
||||
for (int i = 0; i < nsamples; i++)
|
||||
{
|
||||
|
||||
for (int i = 0; i < nsamples; i++) {
|
||||
samples[i] = xsamples[i];
|
||||
}
|
||||
|
||||
if (min_hz < 0)
|
||||
{
|
||||
if (min_hz < 0) {
|
||||
min_hz = 0;
|
||||
}
|
||||
if (max_hz > rate / 2)
|
||||
{
|
||||
|
||||
if (max_hz > rate / 2) {
|
||||
max_hz = rate / 2;
|
||||
}
|
||||
float per = (max_hz - min_hz) / nthreads;
|
||||
|
||||
float per = (max_hz - min_hz) / nthreads;
|
||||
std::vector<FT8 *> thv;
|
||||
|
||||
for (int i = 0; i < nthreads; i++)
|
||||
{
|
||||
float hz0 = min_hz + i * per;
|
||||
if (i > 0 || overlap_edges)
|
||||
|
||||
if (i > 0 || overlap_edges) {
|
||||
hz0 -= overlap;
|
||||
}
|
||||
|
||||
float hz1 = min_hz + (i + 1) * per;
|
||||
if (i != nthreads - 1 || overlap_edges)
|
||||
|
||||
if (i != nthreads - 1 || overlap_edges) {
|
||||
hz1 += overlap;
|
||||
}
|
||||
|
||||
hz0 = std::max(hz0, 0.0f);
|
||||
hz1 = std::min(hz1, (rate / 2.0f) - 50);
|
||||
@@ -3823,9 +3668,7 @@ void entry(
|
||||
);
|
||||
|
||||
int npasses = nprevdecs > 0 ? npasses_two : npasses_one;
|
||||
|
||||
ft8->th_ = new std::thread([ft8, npasses] () { ft8->go(npasses); });
|
||||
|
||||
thv.push_back(ft8);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user