forked from justsankalp/tiny-gnss-sdr-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcacode.py
44 lines (42 loc) · 909 Bytes
/
cacode.py
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
from dataclasses import dataclass
@dataclass
class Svidtap:
def __init__(self, sv):
self.sv = sv
self.g2 = self.id2tap()
def id2tap(self):
satellites = {
1: [2,6],
2: [3,7],
3: [4,8],
4: [5,9],
5: [1,9],
6: [2,10],
7: [1,8],
8: [2,9],
9: [3,10],
10: [2,3],
11: [3,4],
12: [5,6],
13: [6,7],
14: [7,8],
15: [8,9],
16: [9,10],
17: [1,4],
18: [2,5],
19: [3,6],
20: [4,7],
21: [5,8],
22: [6,9],
23: [1,3],
24: [4,6],
25: [5,7],
26: [6,8],
27: [7,9],
28: [8,10],
29: [1,6],
30: [2,7],
31: [3,8],
32: [4,9],
}
return satellites[self.sv]