23#ifndef INCLUDED_GSM_CONSTANTS_H
24#define INCLUDED_GSM_CONSTANTS_H
26#define GSM_SYMBOL_RATE (1625000.0/6.0)
27#define GSM_SYMBOL_PERIOD (1.0/GSM_SYMBOL_RATE)
32#define GUARD_FRACTIONAL 0.25
33#define GUARD_PERIOD GUARD_BITS + GUARD_FRACTIONAL
36#define N_TRAIN_BITS 26
38#define USEFUL_BITS 142
39#define FCCH_BITS USEFUL_BITS
40#define BURST_SIZE (USEFUL_BITS+2*TAIL_BITS)
41#define ACCESS_BURST_SIZE 88
42#define PROCESSED_CHUNK BURST_SIZE+2*GUARD_PERIOD
44#define SCH_DATA_LEN 39
45#define TS_BITS (TAIL_BITS+USEFUL_BITS+TAIL_BITS+GUARD_BITS)
47#define FRAME_BITS (TS_PER_FRAME * TS_BITS + 2)
48#define FCCH_POS TAIL_BITS
50#define TRAIN_POS ( TAIL_BITS + (DATA_BITS+STEALING_BIT) + 5)
52#define TRAIN_BEGINNING 5
53#define SAFETY_MARGIN 6
55#define FCCH_HITS_NEEDED (USEFUL_BITS - 4)
56#define FCCH_MAX_MISSES 1
57#define FCCH_MAX_FREQ_OFFSET 100
59#define CHAN_IMP_RESP_LENGTH 5
61#define MAX_SCH_ERRORS 10
67 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0,
68 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
69 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1,
70 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1
78const unsigned TEST_CCH_FRAMES[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49};
79const unsigned TRAFFIC_CHANNEL_F[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
80const unsigned TEST51[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50};
93#define TRAIN_SEQ_NUM 9
106 {0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1},
107 {0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1},
108 {0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0},
109 {0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0},
110 {0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1},
111 {0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0},
112 {1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1},
113 {1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
114 {0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1}
121 1, 1, 1, 1, 1, 0, 1, 1, 0, 1,
122 1, 1, 0, 1, 1, 0, 0,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, 1, 0, 1, 0, 1, 0,
170 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
171 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
172 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
173 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
174 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0
static const unsigned char dummy_burst[]
Definition: gsm_constants.h:119
#define TRAIN_SEQ_NUM
Definition: gsm_constants.h:93
static const unsigned char fc_compact_fb[]
Definition: gsm_constants.h:165
const unsigned TEST51[]
Definition: gsm_constants.h:80
const unsigned BCCH_FRAMES[]
Definition: gsm_constants.h:76
const unsigned TRAFFIC_CHANNEL_F[]
Definition: gsm_constants.h:79
static const unsigned char fc_fb[]
Definition: gsm_constants.h:151
const unsigned SCH_FRAMES[]
Definition: gsm_constants.h:74
const unsigned FCCH_FRAMES[]
Definition: gsm_constants.h:73
const unsigned TEST_CCH_FRAMES[]
!the receiver shouldn't care about logical !channels so this will be removed from this header
Definition: gsm_constants.h:78
#define N_TRAIN_BITS
Definition: gsm_constants.h:36
multiframe_type
Definition: gsm_constants.h:64
@ unknown
Definition: gsm_constants.h:64
@ multiframe_26
Definition: gsm_constants.h:64
@ multiframe_51
Definition: gsm_constants.h:64
static const unsigned char train_seq[TRAIN_SEQ_NUM][N_TRAIN_BITS]
Definition: gsm_constants.h:105
burst_type
Definition: gsm_constants.h:63
@ dummy
Definition: gsm_constants.h:63
@ normal_or_noise
Definition: gsm_constants.h:63
@ fcch_burst
Definition: gsm_constants.h:63
@ normal_burst
Definition: gsm_constants.h:63
@ sch_burst
Definition: gsm_constants.h:63
@ rach_burst
Definition: gsm_constants.h:63
@ dummy_or_normal
Definition: gsm_constants.h:63
@ empty
Definition: gsm_constants.h:63
static const unsigned char SYNC_BITS[]
Definition: gsm_constants.h:66