2022-02-27 18:41:16 +01:00
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
2021-10-17 19:26:38 +02:00
|
|
|
|
|
|
|
#include <liquid/liquid.h>
|
|
|
|
|
2022-02-27 18:41:16 +01:00
|
|
|
/*** LAYER 1 CONFIG ***/
|
|
|
|
|
2022-02-27 20:21:14 +01:00
|
|
|
#define SYMBOL_RATE 100e3f
|
|
|
|
|
2022-02-12 21:58:53 +01:00
|
|
|
#define PAYLOAD_CHANNEL_CODE LIQUID_FEC_CONV_V27P34
|
|
|
|
#define PAYLOAD_MODULATION LIQUID_MODEM_QAM16
|
2021-10-17 19:26:38 +02:00
|
|
|
|
|
|
|
#define HEADER_CHANNEL_CODE LIQUID_FEC_NONE
|
|
|
|
#define HEADER_MODULATION LIQUID_MODEM_QPSK
|
|
|
|
|
2022-02-12 21:58:53 +01:00
|
|
|
#define PAYLOAD_CRC_SCHEME LIQUID_CRC_16
|
|
|
|
|
2021-10-17 19:26:38 +02:00
|
|
|
#define PREAMBLE_MSEQ_M 6
|
|
|
|
#define PREAMBLE_MSEQ_POLY LIQUID_MSEQUENCE_GENPOLY_M6
|
|
|
|
#define PREAMBLE_MSEQ_INIT 0x00000001
|
|
|
|
|
2022-01-29 22:05:17 +01:00
|
|
|
#define RRC_SPS 4 // samples per symbol
|
|
|
|
#define RRC_DELAY 7 // delay in symbols
|
|
|
|
#define RRC_BETA 0.2f
|
|
|
|
|
2022-01-30 20:23:41 +01:00
|
|
|
#define TRANSMISSION_RAMP_UP_LEN 64 // symbols
|
2022-01-29 22:05:17 +01:00
|
|
|
#define TRANSMISSION_RAMP_DOWN_LEN 32 // symbols
|
|
|
|
|
2022-03-03 22:18:19 +01:00
|
|
|
/*** SDR CONFIG ***/
|
|
|
|
|
|
|
|
#define SDR_IS_FULL_DUPLEX 0
|
|
|
|
|
|
|
|
#define SDR_OVERSAMPLING 3 // integer factor!
|
|
|
|
|
|
|
|
#define SDR_RX_SAMPLING_RATE (SYMBOL_RATE * RRC_SPS * SDR_OVERSAMPLING)
|
|
|
|
#define SDR_TX_SAMPLING_RATE SDR_RX_SAMPLING_RATE
|
|
|
|
|
|
|
|
// actually transmitted or received signal frequencies, NOT the SDR center frequency.
|
|
|
|
#define SDR_TX_FREQ 434.100e6f
|
|
|
|
#define SDR_RX_FREQ 434.100e6f
|
|
|
|
|
|
|
|
// shift applied in the baseband, to get rid of SDR DC peak. If the value here
|
|
|
|
// is not 0, software mixing will be done on the received signal.
|
|
|
|
#define SDR_TX_IF_SHIFT 0.000e6f
|
|
|
|
#define SDR_RX_IF_SHIFT 0.150e6f
|
|
|
|
|
|
|
|
// NOTE: the SDR center frequency will be SDR_RX_FREQ - SDR_RX_IF_SHIFT.
|
|
|
|
|
2022-02-27 18:41:16 +01:00
|
|
|
#endif // CONFIG_H
|