Correct typos

pull/16/merge
boblark 2 years ago
parent bf1cfa561a
commit 0a71e2ca80
  1. 4
      examples/FT8Receive/FT8Receive.ino
  2. 32
      examples/FT8Receive/Process_DSP_R.ino
  3. 2
      examples/FT8Receive/constantsR.ino
  4. 6
      examples/FT8Receive/decode_ft8R.ino
  5. 2
      examples/FT8Receive/encodeR.ino
  6. 2
      examples/FT8Receive/ldpcR.ino
  7. 2
      examples/FT8Receive/unpackR.ino
  8. 4
      radioFT8Demodulator_F32.h

@ -3,7 +3,7 @@
// amateur radio. // amateur radio.
/* /*
* Huge thanks to Charlie Hill, W5BAA, for his Pocket FT8 work, much of which * Huge thanks to Charley Hill, W5BAA, for his Pocket FT8 work, much of which
* is the basis for this INO: https://github.com/Rotron/Pocket-FT8 * is the basis for this INO: https://github.com/Rotron/Pocket-FT8
* That work started from the "FT8 Decoding Library" by * That work started from the "FT8 Decoding Library" by
* Karlis Goba: https://github.com/kgoba/ft8_lib and thank you to both * Karlis Goba: https://github.com/kgoba/ft8_lib and thank you to both
@ -298,7 +298,7 @@ void loop(void) {
#endif #endif
} }
if(rcvFT8State!=FT8_RCV_IDLE && demod1.getFFTCount() >= 184) if(rcvFT8State!=FT8_RCV_IDLE && demod1.getFFTCount() >= 184)
{ {
rcvFT8State = FT8_RCV_DECODE; rcvFT8State = FT8_RCV_DECODE;
#ifdef DEBUG1 #ifdef DEBUG1

@ -5,7 +5,7 @@
* Bob Larkin W7PUA, September 2022. * Bob Larkin W7PUA, September 2022.
* *
*/ */
/* Thank you to Charlie Hill, W5BAA, https://github.com/Rotron/Pocket-FT8 /* Thank you to Charley Hill, W5BAA, https://github.com/Rotron/Pocket-FT8
* for the conversion to Teensy operation, as well as * for the conversion to Teensy operation, as well as
* to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib. * to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib.
* Thanks to all the contributors to the Joe Taylor WSJT project. * Thanks to all the contributors to the Joe Taylor WSJT project.
@ -41,7 +41,7 @@ SOFTWARE.
* increase the range here. The library function radioFT8Demodulator_F32 is filtered * increase the range here. The library function radioFT8Demodulator_F32 is filtered
* to pass all frequencies up to, at least 2800 Hz. * to pass all frequencies up to, at least 2800 Hz.
*/ */
// Following are used inside extract_power() // Following are used inside extract_power()
float32_t fft_buffer[2048]; float32_t fft_buffer[2048];
float fftOutput[2048]; float fftOutput[2048];
@ -57,7 +57,7 @@ arm_rfft_fast_instance_f32 Sfft;
uint16_t noiseBufferWrite = 0; // Array index uint16_t noiseBufferWrite = 0; // Array index
bool noiseMeasured = false; // <<<<<<GLOBAL bool noiseMeasured = false; // <<<<<<GLOBAL
uint8_t noisePower8 = 0; // half dB per noise estimate GLOBAL uint8_t noisePower8 = 0; // half dB per noise estimate GLOBAL
void init_DSP(void) { void init_DSP(void) {
arm_rfft_fast_init_f32(&Sfft, 2048); arm_rfft_fast_init_f32(&Sfft, 2048);
for (int i = 0; i < FFT_SIZE; ++i) for (int i = 0; i < FFT_SIZE; ++i)
@ -81,7 +81,7 @@ float ft_blackman_i(int i, int N) {
void extract_power( int offset) { void extract_power( int offset) {
float32_t y[8]; float32_t y[8];
float32_t noiseCoeff[3]; float32_t noiseCoeff[3];
/* Format of export_fft_power[] array: /* Format of export_fft_power[] array:
368 bytes of power for even time for 0.32 sec sample DESCRIBE BETTER <<<<<<<<<<<<<<<<<<<<<< 368 bytes of power for even time for 0.32 sec sample DESCRIBE BETTER <<<<<<<<<<<<<<<<<<<<<<
368 bytes of power for odd time for 0.32 sec sample 368 bytes of power for odd time for 0.32 sec sample
@ -105,7 +105,7 @@ void extract_power( int offset) {
// Variables for estimating noise level for SNR // Variables for estimating noise level for SNR
powerSum = 0.0f; powerSum = 0.0f;
powerMax = 0.0f; powerMax = 0.0f;
for(int i=1; i<1024; i++) for(int i=1; i<1024; i++)
{ {
if(i>=128 && i<768) // Omit the first 400 Hz and last 800 Hz if(i>=128 && i<768) // Omit the first 400 Hz and last 800 Hz
@ -121,7 +121,7 @@ void extract_power( int offset) {
fft_buffer[i] = 136.0f + 20.0f*log10f( 0.0000001f + fftOutput[i] ); fft_buffer[i] = 136.0f + 20.0f*log10f( 0.0000001f + fftOutput[i] );
} }
fft_buffer[0] = 0.000001; // Fake DC term fft_buffer[0] = 0.000001; // Fake DC term
/* Noise needs to be estimated to determine snr. Two cases: /* Noise needs to be estimated to determine snr. Two cases:
* runningMax/runningSum < 100 This is weak signal case for which * runningMax/runningSum < 100 This is weak signal case for which
* the runningSum must be used alone. * the runningSum must be used alone.
@ -138,7 +138,7 @@ void extract_power( int offset) {
//fitCurve (int order, int nPoints, float32_t py[], int nCoeffs, float32_t *coeffs) //fitCurve (int order, int nPoints, float32_t py[], int nCoeffs, float32_t *coeffs)
fitCurve(2, 8, y, 3, noiseCoeff); fitCurve(2, 8, y, 3, noiseCoeff);
float32_t y9 = noiseCoeff[2] + 9.0f*noiseCoeff[1] + 81.0f*noiseCoeff[0]; float32_t y9 = noiseCoeff[2] + 9.0f*noiseCoeff[1] + 81.0f*noiseCoeff[0];
if(runningMax > 100.0f*0.00156f*runningSum && y9 > 2.0f*noiseCoeff[2] && !noiseMeasured) if(runningMax > 100.0f*0.00156f*runningSum && y9 > 2.0f*noiseCoeff[2] && !noiseMeasured)
{ {
// This measurement occurs once every 15 sec, but may be just before // This measurement occurs once every 15 sec, but may be just before
@ -149,14 +149,14 @@ void extract_power( int offset) {
noisePeakAveRatio = runningMax/(0.00156*runningSum); noisePeakAveRatio = runningMax/(0.00156*runningSum);
#ifdef DEBUG_N #ifdef DEBUG_N
Serial.println("Noise measurement between transmit time periods:"); Serial.println("Noise measurement between transmit time periods:");
Serial.print(" rSum, rMax= "); Serial.print(0.00156*runningSum, 5); Serial.print(" rSum, rMax= "); Serial.print(0.00156*runningSum, 5);
Serial.print(" "); Serial.print(runningMax, 5); Serial.print(" "); Serial.print(runningMax, 5);
Serial.print(" Ratio= "); Serial.print(noisePeakAveRatio, 3); Serial.print(" Ratio= "); Serial.print(noisePeakAveRatio, 3);
Serial.print(" Int noise= "); Serial.print(" Int noise= ");
Serial.println(noisePwrDBIntH); // dB increments Serial.println(noisePwrDBIntH); // dB increments
#endif #endif
} }
// Loop over two frequency bin offsets. This first picks up 367 even // Loop over two frequency bin offsets. This first picks up 367 even
// numbered fft_buffer[] followed by 367 odd numbered bins. This is // numbered fft_buffer[] followed by 367 odd numbered bins. This is
// a frequency shift of 3.125 Hz. With windowing, the bandwidth // a frequency shift of 3.125 Hz. With windowing, the bandwidth
@ -176,7 +176,7 @@ void extract_power( int offset) {
} // End extract_power() } // End extract_power()
// =============================================================== // ===============================================================
// CURVE FIT // CURVE FIT
/* /*
curveFitting - Library for fitting curves to given curveFitting - Library for fitting curves to given
@ -226,12 +226,12 @@ int trianglize(float32_t **m, int n)
} }
return sign; return sign;
} }
float32_t det(float32_t *in, int n) float32_t det(float32_t *in, int n)
{ {
float32_t *m[n]; float32_t *m[n];
m[0] = in; m[0] = in;
for (int i = 1; i < n; i++) for (int i = 1; i < n; i++)
m[i] = m[i - 1] + n; m[i] = m[i - 1] + n;
int sign = trianglize(m, n); int sign = trianglize(m, n);
@ -265,11 +265,11 @@ int fitCurve (int order, int nPoints, float32_t py[], int nCoeffs, float32_t *co
float32_t denom; //denominator for Cramer's rule, determinant of LHS linear equation float32_t denom; //denominator for Cramer's rule, determinant of LHS linear equation
float32_t x, y; float32_t x, y;
float32_t px[nPoints]; //Generate X values, from 0 to n float32_t px[nPoints]; //Generate X values, from 0 to n
for (i=0; i<nPoints; i++){ for (i=0; i<nPoints; i++){
px[i] = i; px[i] = i;
} }
for (i=0; i<nPoints; i++) {//Generate matrix elements for (i=0; i<nPoints; i++) {//Generate matrix elements
x = px[i]; x = px[i];
y = py[i]; y = py[i];
@ -287,7 +287,7 @@ int fitCurve (int order, int nPoints, float32_t py[], int nCoeffs, float32_t *co
masterMat[i*nCoeffs+j] = S[i+j]; masterMat[i*nCoeffs+j] = S[i+j];
} }
} }
float32_t mat[nCoeffs*nCoeffs]; //Temp matrix as det() method alters the matrix given float32_t mat[nCoeffs*nCoeffs]; //Temp matrix as det() method alters the matrix given
cpyArray(masterMat, mat, nCoeffs); cpyArray(masterMat, mat, nCoeffs);
denom = det(mat, nCoeffs); denom = det(mat, nCoeffs);

@ -7,7 +7,7 @@
*/ */
/* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib /* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib
* and to Charlie Hill, W5BAA, https://github.com/Rotron/Pocket-FT8 * and to Charley Hill, W5BAA, https://github.com/Rotron/Pocket-FT8
* as well as the all the contributors to the Joe Taylor WSJT project. * as well as the all the contributors to the Joe Taylor WSJT project.
* See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN, * See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN,
* Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020 * Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020

@ -7,7 +7,7 @@
*/ */
/* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib /* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib
* and to Charlie Hill, W5BAA, https://github.com/Rotron/Pocket-FT8 * and to Charley Hill, W5BAA, https://github.com/Rotron/Pocket-FT8
* as well as the all the contributors to the Joe Taylor WSJT project. * as well as the all the contributors to the Joe Taylor WSJT project.
* See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN, * See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN,
* Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020 * Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020
@ -137,7 +137,7 @@ int ft8_decode(void) {
rtc_string[kk] = '0'; rtc_string[kk] = '0';
} }
dt = 0.16f*(float)cand.time_offset; dt = 0.16f*(float)cand.time_offset;
// Revised procedure to support snr measurement. Now keep the strongest // Revised procedure to support snr measurement. Now keep the strongest
// of duplicates. Bob Larkin Nov 2020. // of duplicates. Bob Larkin Nov 2020.
if(found) // Keep the one with bigger score, put into [ if(found) // Keep the one with bigger score, put into [
@ -187,7 +187,7 @@ int ft8_decode(void) {
Serial.print(rtc_string); Serial.print(rtc_string);
Serial.print("msg: "); Serial.print("msg: ");
Serial.print(message); Serial.print(message);
#endif #endif
strcpy(decoded[num_decoded], message); strcpy(decoded[num_decoded], message);
new_decoded[num_decoded].sync_score = cand.score; new_decoded[num_decoded].sync_score = cand.score;
new_decoded[num_decoded].freq_hz = (int)freq_hz; new_decoded[num_decoded].freq_hz = (int)freq_hz;

@ -7,7 +7,7 @@
*/ */
/* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib /* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib
* and to Charlie Hill, W5BAA, https://github.com/Rotron/Pocket-FT8 * and to Charley Hill, W5BAA, https://github.com/Rotron/Pocket-FT8
* as well as the all the contributors to the Joe Taylor WSJT project. * as well as the all the contributors to the Joe Taylor WSJT project.
* See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN, * See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN,
* Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020 * Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020

@ -7,7 +7,7 @@
*/ */
/* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib /* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib
* and to Charlie Hill, W5BAA, https://github.com/Rotron/Pocket-FT8 * and to Charley Hill, W5BAA, https://github.com/Rotron/Pocket-FT8
* as well as the all the contributors to the Joe Taylor WSJT project. * as well as the all the contributors to the Joe Taylor WSJT project.
* See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN, * See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN,
* Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020 * Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020

@ -6,7 +6,7 @@
*/ */
/* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib /* Thank you to Kārlis Goba, YL3JG, https://github.com/kgoba/ft8_lib
* and to Charlie Hill, W5BAA, https://github.com/Rotron/Pocket-FT8 * and to Charley Hill, W5BAA, https://github.com/Rotron/Pocket-FT8
* as well as the all the contributors to the Joe Taylor WSJT project. * as well as the all the contributors to the Joe Taylor WSJT project.
* See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN, * See "The FT4 and FT8 Communication Protocols," Steve Franks, K9AN,
* Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020 * Bill Somerville, G4WJS and Joe Taylor, K1JT, QEX July/August 2020

@ -33,7 +33,7 @@
* and FT8 Communications Protocols," by Steve Franke, K9AN, Bill Somerville, * and FT8 Communications Protocols," by Steve Franke, K9AN, Bill Somerville,
* G4WJS and Joe Taylor, K1JT, QEX July/August 2020, pp7-17. I was guided * G4WJS and Joe Taylor, K1JT, QEX July/August 2020, pp7-17. I was guided
* in the right direction for this implementation by Farhan, VU2ESE * in the right direction for this implementation by Farhan, VU2ESE
* and Charlie, W5BAA. This led to a pair of excellent Raspberry Pi sources, * and Charley, W5BAA. This led to a pair of excellent Raspberry Pi sources,
* https://github.com/kgoba/ft8_lib and * https://github.com/kgoba/ft8_lib and
* https://github.com/WB2CBA/W5BAA-FT8-POCKET-TERMINAL * https://github.com/WB2CBA/W5BAA-FT8-POCKET-TERMINAL
* An FT8 derivative of the first web site, using the Raspberry Pi, * An FT8 derivative of the first web site, using the Raspberry Pi,
@ -76,7 +76,7 @@
* 5. Update time required for a T4.x is uSec. * 5. Update time required for a T4.x is uSec.
*/ */
// The Charlie Hill W5BAA_INTERFACE is from the Pocket-FT9 project and // The Charley Hill W5BAA_INTERFACE is from the Pocket-FT9 project and
// transfers data as 128 int's. It is included as a compile time // transfers data as 128 int's. It is included as a compile time
// option to allow testing with the Pocket-FT8 Teensy software. // option to allow testing with the Pocket-FT8 Teensy software.
// The default interface transfers the collected data as a pointer to // The default interface transfers the collected data as a pointer to

Loading…
Cancel
Save