Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for sending callsigns using RADE #783

Merged
merged 59 commits into from
Dec 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f8b647c
Prevent EOO from being repeatedly sent during TX stop.
tmiw Dec 4, 2024
e2a1e58
Make sure we don't accidentally overflow the output FIFO when transmi…
tmiw Dec 4, 2024
bac7298
Add additional logging to verify EOO behavior.
tmiw Dec 5, 2024
04e263f
Fix issue preventing EOO from being sent on voice keyer completion.
tmiw Dec 5, 2024
864640e
Scale EOO the same as the primary waveform.
tmiw Dec 5, 2024
2c3f6a2
Remove #ifdef code per PR comment.
tmiw Dec 5, 2024
3506b34
Use main branch for RADE.
tmiw Dec 5, 2024
afb1958
Add initial support for RADE callsign handling.
tmiw Dec 7, 2024
baf1790
Merge branch 'ms-eoo-stuttering' into ms-rade-text
tmiw Dec 7, 2024
0293c65
Add additional logging and try different way to calculate amps.
tmiw Dec 7, 2024
ced3370
More debugging. We should also make sure all of EOO is initialized to…
tmiw Dec 7, 2024
dfb818f
Testing and other changes:
tmiw Dec 8, 2024
dc9be4f
Fix test so it actually runs on Linux.
tmiw Dec 8, 2024
cc78240
Disable temporary fprintf of symbols.
tmiw Dec 8, 2024
5b98090
GH environment gave different BER, so let's try positive ROT45.
tmiw Dec 8, 2024
6217bef
set_eoo_bits should be receiving OFDM symbols.
tmiw Dec 8, 2024
bdc5b3c
Don't fault if we don't have a RX callback.
tmiw Dec 8, 2024
c816178
Fix issue preventing ctest from working in GH environment.
tmiw Dec 8, 2024
c3b0c78
Reenable interleaving.
tmiw Dec 8, 2024
1873d20
Initial code cleanup.
tmiw Dec 8, 2024
126d3d8
Reformat code to make it easier to read.
tmiw Dec 8, 2024
f760b0c
Inject noise into the TX sample in the ctest.
tmiw Dec 8, 2024
1ec7485
Merge branch 'ms-rade-text' of github.com:drowe67/freedv-gui into ms-…
tmiw Dec 8, 2024
b14c907
Add initial test scripts for verifying RADE reporting.
tmiw Dec 8, 2024
ca8dbe1
Add some sleeps since the UT framework can issue GUI events faster th…
tmiw Dec 9, 2024
da07752
Add ctest for test_rade_reporting.sh.
tmiw Dec 9, 2024
708edbb
Add RADE reporting noise test.
tmiw Dec 9, 2024
fb10065
Use codec2 ch tool to generate noise.
tmiw Dec 9, 2024
17c6710
Add raw/coded BER debugging output for tests.
tmiw Dec 11, 2024
0a27a96
Fix formula used for BER.
tmiw Dec 13, 2024
c91888d
Update ctest to use mpp instead of AWGN, similar to RADE repo.
tmiw Dec 13, 2024
20c6aa9
Bring back AWGN test.
tmiw Dec 13, 2024
766f9a9
Add Octave to build environment.
tmiw Dec 13, 2024
ca73537
Update cmake-macos.yml
tmiw Dec 13, 2024
1e457c3
Fix buffer overrun from previous changes.
tmiw Dec 13, 2024
cfb4188
Accidentally included previous change.
tmiw Dec 13, 2024
875149f
Ensure we have defaults for txattempts and txtime.
tmiw Dec 13, 2024
6529c87
Coded BER should use output of LDPC decode.
tmiw Dec 14, 2024
413da78
Merge branch 'v2.0-dev' into ms-rade-text
tmiw Dec 14, 2024
78ff9e2
Install octave-signal in macOS CI environment.
tmiw Dec 14, 2024
cc305c7
Need to pass -forge in to install signal properly.
tmiw Dec 14, 2024
30c8272
Need octave-control too.
tmiw Dec 14, 2024
699f375
Need gcc to build control/signal.
tmiw Dec 14, 2024
c863d89
Some additional stuff is needed to get gfortran working.
tmiw Dec 14, 2024
e42c86f
Need to use gcc 14 instead.
tmiw Dec 14, 2024
8f62a7d
Add debugging.
tmiw Dec 14, 2024
623d227
Fix typo.
tmiw Dec 14, 2024
fa2a059
Homebrew uses /opt/homebrew.
tmiw Dec 14, 2024
74fc87a
Merge branch 'v2.0-dev' into ms-rade-text
tmiw Dec 15, 2024
d66b494
Merge branch 'v2.0-dev' into ms-rade-text
tmiw Dec 15, 2024
22b3fb8
Clarify logging as we also report to FreeDV Reporter.
tmiw Dec 20, 2024
bcdbafc
Forgot to update ctest acceptance criteria due to logging change.
tmiw Dec 20, 2024
20a9c9e
Add logic to output TX/RX floats to files.
tmiw Dec 22, 2024
985c491
rade_text should handle stuffing of unused EOO bits, not upstream code.
tmiw Dec 23, 2024
2dd63e5
Test framework: remove hardcoded 5s delay after startup request.
tmiw Dec 23, 2024
64c4452
Calculate raw BER across entire EOO, not just the used portion.
tmiw Dec 23, 2024
83c8508
Code cleanup and EOO calculation fixes.
tmiw Dec 24, 2024
3f311e0
FreeDV Reporter: only highlight for 2 seconds if there's no RX callsign.
tmiw Dec 24, 2024
ddaa2f8
Switch RADE branch to main as EOO changes have now been merged.
tmiw Dec 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
set_eoo_bits should be receiving OFDM symbols.
tmiw committed Dec 8, 2024
commit 6217bef731db562a62a3cca9c6d47e54883aaf9f
4 changes: 2 additions & 2 deletions src/freedv_interface.cpp
Original file line number Diff line number Diff line change
@@ -686,8 +686,8 @@ void FreeDVInterface::setReliableText(const char* callsign)
float eooSyms[nsyms];
for (int index = 0; index < nsyms; index++)
{
// Default everything to 0 (represented by -1)
eooSyms[index] = -1;
// Default everything to 0 (represented by 1 + 0j)
eooSyms[index] = index % 2 ? 0 : 1;
}

rade_text_generate_tx_string(radeTextPtr_, callsign, strlen(callsign), eooSyms);
38 changes: 31 additions & 7 deletions src/pipeline/rade_text.c
Original file line number Diff line number Diff line change
@@ -229,20 +229,20 @@ void rade_text_rx(rade_text_t ptr, float* syms, int symSize)

// Calculate RMS of all symbols
float rms = 0;
for (int index = 0; index < LDPC_TOTAL_SIZE_BITS / 2; index++)
for (int index = 0; index < symSize; index++)
{
COMP* sym = (COMP*)&obj->inbound_pending_syms[index];
rms += sym->real * sym->real + sym->imag * sym->imag;
}
rms = sqrt(rms/(LDPC_TOTAL_SIZE_BITS / 2));
rms = sqrt(rms/symSize);

// Copy over symbols prior to decode.
for (int index = 0; index < LDPC_TOTAL_SIZE_BITS / 2; index++)
{
COMP* sym = (COMP*)&obj->inbound_pending_syms[index];
/*if (index < 4)*/ log_info("RX symbol: %f, %f", sym->real, sym->imag);
complex float symbol = CMPLXF(sym->real, sym->imag);
*(complex float*)&obj->inbound_pending_syms[index] = symbol * cmplx(ROT45); //CMPLXF(cosf(-M_PI/4), sinf(-M_PI/4));
//*(complex float*)&obj->inbound_pending_syms[index] = symbol * cmplx(-ROT45); //CMPLXF(cosf(-M_PI/4), sinf(-M_PI/4));

obj->inbound_pending_amps[index] = rms; //sqrt(obj->inbound_pending_syms[index].real * obj->inbound_pending_syms[index].real + obj->inbound_pending_syms[index].imag * obj->inbound_pending_syms[index].imag);
/*if (index < 4)*/ log_info("RX symbol rotated: %f, %f, amp: %f",
@@ -366,11 +366,35 @@ void rade_text_generate_tx_string(

// Generate floats based on the bits.
char debugString[256];
for (int index = 0; index < LDPC_TOTAL_SIZE_BITS; index++)
for (int index = 0; index < LDPC_TOTAL_SIZE_BITS / 2; index++)
{
syms[index] = 2.0*impl->tx_text[index] - 1.0;
log_info("sym[%d] = %f", index, syms[index]);
debugString[index] = impl->tx_text[index] ? '1' : '0';
#if 1
char* ptr = &impl->tx_text[2 * index];
if (*ptr == 0 && *(ptr + 1) == 0)
{
syms[2*index] = 1;
syms[2*index + 1] = 0;
}
else if (*ptr == 0 && *(ptr + 1) == 1)
{
syms[2*index] = 0;
syms[2*index + 1] = 1;
}
else if (*ptr == 1 && *(ptr + 1) == 0)
{
syms[2*index] = 0;
syms[2*index + 1] = -1;
}
else if (*ptr == 1 && *(ptr + 1) == 1)
{
syms[2*index] = -1;
syms[2*index + 1] = 0;
}
#endif
//syms[index] = 2.0*impl->tx_text[index] - 1.0;
//log_info("sym[%d] = %f", index, syms[index]);
debugString[2*index] = impl->tx_text[2*index] ? '1' : '0';
debugString[2*index + 1] = impl->tx_text[2*index + 1] ? '1' : '0';
}
debugString[LDPC_TOTAL_SIZE_BITS] = 0;
log_info("generated bits: %s", debugString);
2 changes: 1 addition & 1 deletion src/pipeline/test/RadeTextTest.cpp
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ int main()
float txSyms[rade_n_eoo_bits(rade)];
for (int index = 0; index < rade_n_eoo_bits(rade); index++)
{
txSyms[index] = -1;
txSyms[index] = index % 2 ? 1 : 0;
}
rade_text_generate_tx_string(txt, "K6AQ", 4, txSyms);
rade_tx_set_eoo_bits(rade, txSyms);