hamnet70/impl/src/config.h

48 lines
1.3 KiB
C
Raw Normal View History

2022-02-27 18:41:16 +01:00
#ifndef CONFIG_H
#define CONFIG_H
#include <liquid/liquid.h>
/*** SDR CONFIG ***/
#define SDR_IS_FULL_DUPLEX 0
#define SDR_RX_SAMPLING_RATE 1e6f
#define SDR_TX_SAMPLING_RATE 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
/*** LAYER 1 CONFIG ***/
#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
#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
#define PREAMBLE_MSEQ_M 6
#define PREAMBLE_MSEQ_POLY LIQUID_MSEQUENCE_GENPOLY_M6
#define PREAMBLE_MSEQ_INIT 0x00000001
#define RRC_SPS 4 // samples per symbol
#define RRC_DELAY 7 // delay in symbols
#define RRC_BETA 0.2f
#define TRANSMISSION_RAMP_UP_LEN 64 // symbols
#define TRANSMISSION_RAMP_DOWN_LEN 32 // symbols
2022-02-27 18:41:16 +01:00
#endif // CONFIG_H