|
|
@ -117,7 +117,7 @@ void radioCESSBtransmit_F32::update(void) { |
|
|
|
arm_fir_f32(&firInstWeaverQ, weaverMQ, workingDataQ, nW); |
|
|
|
arm_fir_f32(&firInstWeaverQ, weaverMQ, workingDataQ, nW); |
|
|
|
// Note: Sine wave envelope gain from blockIn->data[kk] to here is gainIn
|
|
|
|
// Note: Sine wave envelope gain from blockIn->data[kk] to here is gainIn
|
|
|
|
|
|
|
|
|
|
|
|
// Mesaure input power and peak envelope, SSB before any CESSB processing
|
|
|
|
// Measure input power and peak envelope, SSB before any CESSB processing
|
|
|
|
for(int k=0; k<nW; k++) |
|
|
|
for(int k=0; k<nW; k++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
float32_t pwrWorkingData = workingDataI[k]*workingDataI[k] + workingDataQ[k]*workingDataQ[k]; |
|
|
|
float32_t pwrWorkingData = workingDataI[k]*workingDataI[k] + workingDataQ[k]*workingDataQ[k]; |
|
|
@ -142,10 +142,17 @@ void radioCESSBtransmit_F32::update(void) { |
|
|
|
// LPF with gain of 2 built into coefficients, correct for zeros.
|
|
|
|
// LPF with gain of 2 built into coefficients, correct for zeros.
|
|
|
|
arm_fir_f32(&firInstInterpolate1I, workingDataI, workingDataI, nC); |
|
|
|
arm_fir_f32(&firInstInterpolate1I, workingDataI, workingDataI, nC); |
|
|
|
arm_fir_f32(&firInstInterpolate1Q, workingDataQ, workingDataQ, nC); |
|
|
|
arm_fir_f32(&firInstInterpolate1Q, workingDataQ, workingDataQ, nC); |
|
|
|
|
|
|
|
|
|
|
|
// WorkingDataI and Q are now at 24 ksps and ready for clipping
|
|
|
|
// WorkingDataI and Q are now at 24 ksps and ready for clipping
|
|
|
|
// For input 48 ksps this produces 64 numbers
|
|
|
|
// For input 48 ksps this produces 64 numbers
|
|
|
|
// Voltage gain from blockIn->data to here for small sine wave is 1.0
|
|
|
|
// Voltage gain from blockIn->data to here for small sine wave is 1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Optional skip of CESSB processing. Filtering & SSB generation unchanged. Thanks to Greg KF5N
|
|
|
|
|
|
|
|
if(cessbProcessing) // Not skipping
|
|
|
|
|
|
|
|
{ |
|
|
|
for(int kk=0; kk<nC; kk++) |
|
|
|
for(int kk=0; kk<nC; kk++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
float32_t power = workingDataI[kk]*workingDataI[kk] + workingDataQ[kk]*workingDataQ[kk]; |
|
|
|
float32_t power = workingDataI[kk]*workingDataI[kk] + workingDataQ[kk]*workingDataQ[kk]; |
|
|
@ -238,6 +245,7 @@ void radioCESSBtransmit_F32::update(void) { |
|
|
|
workingDataI[k] = delayedDataI[k] - gainCompensate*diffI[k]; |
|
|
|
workingDataI[k] = delayedDataI[k] - gainCompensate*diffI[k]; |
|
|
|
workingDataQ[k] = delayedDataQ[k] - gainCompensate*diffQ[k]; |
|
|
|
workingDataQ[k] = delayedDataQ[k] - gainCompensate*diffQ[k]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} // End CESSB processing
|
|
|
|
|
|
|
|
|
|
|
|
// Finally interpolate to 48 or 96 ksps. Data is in workingDataI[k]
|
|
|
|
// Finally interpolate to 48 or 96 ksps. Data is in workingDataI[k]
|
|
|
|
// and is 64 samples for audio 48 ksps.
|
|
|
|
// and is 64 samples for audio 48 ksps.
|
|
|
|