summaryrefslogtreecommitdiff
path: root/gssm/src/lib/gsm_constants.h
blob: 6f4f07ee2992cf612e6602800349d0149f84e226 (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// $Id: gsm_constants.h,v 1.1.1.1 2007-06-01 04:26:57 jl Exp $

#pragma once

static const double	QN_TIME		= 12.0l / 13.0l / 1000000.0l;
static const double	BN_TIME		= 4.0l * QN_TIME;
static const double	TN_TIME		= 156.25l * BN_TIME;
static const double	FN_TIME		= 8.0l * TN_TIME;

static const double	GSM_RATE	= 812500.0l / 3.0l;
static const int	MAX_FN		= 26 * 51 * 2048;

static const int	BURST_LENGTH	= 156;


/*
 * frequency correction:
 * 	tn = 0	fnm51 = 0
 *
 * sync:
 * 	tn = 0	fnm51 = 1
 * 	tn = 0	fnm51 = 11
 * 	tn = 0	fnm51 = 21
 * 	tn = 0	fnm51 = 31
 * 	tn = 0	fnm51 = 41
 *
 * bcch:
 * 	tn = 0	fnm51 = 2, 3, 4, 5
 * 	tn = 2	fnm51 = 2, 3, 4, 5
 * 	tn = 4	fnm51 = 2, 3, 4, 5
 * 	tn = 6	fnm51 = 2, 3, 4, 5
 *
 * bcch_ext:
 * 	tn = 0	fnm51 = 6, 7, 8, 9
 * 	tn = 2	fnm51 = 6, 7, 8, 9
 * 	tn = 4	fnm51 = 6, 7, 8, 9
 * 	tn = 6	fnm51 = 6, 7, 8, 9
 *
 * pch and agch:
 * 	tn = 0	fnm51 = 6, 7, 8, 9
 * 	tn = 0	fnm51 = 12, 13, 14, 15
 * 	tn = 0	fnm51 = 16, 17, 18, 19
 * 	tn = 0	fnm51 = 22, 23, 24, 25
 * 	tn = 0	fnm51 = 26, 27, 28, 29
 * 	tn = 0	fnm51 = 32, 33, 34, 35
 * 	tn = 0	fnm51 = 36, 37, 38, 39
 * 	tn = 0	fnm51 = 42, 43, 44, 45
 * 	tn = 0	fnm51 = 46, 47, 48, 49
 * 	tn = 2	fnm51 = 6, 7, 8, 9
 * 	tn = 2	fnm51 = 12, 13, 14, 15
 * 	tn = 2	fnm51 = 16, 17, 18, 19
 * 	tn = 2	fnm51 = 22, 23, 24, 25
 * 	tn = 2	fnm51 = 26, 27, 28, 29
 * 	tn = 2	fnm51 = 32, 33, 34, 35
 * 	tn = 2	fnm51 = 36, 37, 38, 39
 * 	tn = 2	fnm51 = 42, 43, 44, 45
 * 	tn = 2	fnm51 = 46, 47, 48, 49
 * 	tn = 4	fnm51 = 6, 7, 8, 9
 * 	tn = 4	fnm51 = 12, 13, 14, 15
 * 	tn = 4	fnm51 = 16, 17, 18, 19
 * 	tn = 4	fnm51 = 22, 23, 24, 25
 * 	tn = 4	fnm51 = 26, 27, 28, 29
 * 	tn = 4	fnm51 = 32, 33, 34, 35
 * 	tn = 4	fnm51 = 36, 37, 38, 39
 * 	tn = 4	fnm51 = 42, 43, 44, 45
 * 	tn = 4	fnm51 = 46, 47, 48, 49
 * 	tn = 6	fnm51 = 6, 7, 8, 9
 * 	tn = 6	fnm51 = 12, 13, 14, 15
 * 	tn = 6	fnm51 = 16, 17, 18, 19
 * 	tn = 6	fnm51 = 22, 23, 24, 25
 * 	tn = 6	fnm51 = 26, 27, 28, 29
 * 	tn = 6	fnm51 = 32, 33, 34, 35
 * 	tn = 6	fnm51 = 36, 37, 38, 39
 * 	tn = 6	fnm51 = 42, 43, 44, 45
 * 	tn = 6	fnm51 = 46, 47, 48, 49
 */
personal git repositories of Harald Welte. Your mileage may vary