NMT 450: Support for other European counties, like Belgium, Czech, Slovakia

This commit is contained in:
Andreas Eversberg
2017-06-09 20:18:24 +02:00
parent dbdedfe1a1
commit 50b2021d21
9 changed files with 309 additions and 154 deletions

View File

@@ -112,7 +112,7 @@ void dsp_init(void)
}
/* Init FSK of transceiver */
int dsp_init_sender(nmt_t *nmt)
int dsp_init_sender(nmt_t *nmt, double deviation_factor)
{
sample_t *spl;
int i;
@@ -129,10 +129,10 @@ int dsp_init_sender(nmt_t *nmt)
PDEBUG_CHAN(DDSP, DEBUG_DEBUG, "Init DSP for Transceiver.\n");
/* set modulation parameters */
sender_set_fm(&nmt->sender, MAX_DEVIATION, MAX_MODULATION, DBM0_DEVIATION, MAX_DISPLAY);
sender_set_fm(&nmt->sender, MAX_DEVIATION * deviation_factor, MAX_MODULATION * deviation_factor, DBM0_DEVIATION * deviation_factor, MAX_DISPLAY);
PDEBUG(DDSP, DEBUG_DEBUG, "Using FSK level of %.0f (3.5 KHz deviation @ 1500 Hz)\n", TX_PEAK_FSK);
PDEBUG(DDSP, DEBUG_DEBUG, "Using Supervisory level of %.0f (0.3 KHz deviation @ 4015 Hz)\n", TX_PEAK_SUPER);
PDEBUG(DDSP, DEBUG_DEBUG, "Using FSK level of %.0f (%.3f KHz deviation @ 1500 Hz)\n", TX_PEAK_FSK * deviation_factor, 3.5 * deviation_factor);
PDEBUG(DDSP, DEBUG_DEBUG, "Using Supervisory level of %.0f (%.3f KHz deviation @ 4015 Hz)\n", TX_PEAK_SUPER * deviation_factor, 0.3 * deviation_factor);
nmt->fsk_samples_per_bit = (double)nmt->sender.samplerate / (double)BIT_RATE;
nmt->fsk_bits_per_sample = 1.0 / nmt->fsk_samples_per_bit;