@ham2k/lib-operation-data 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/bands.js +22 -13
- package/src/lib/modes.js +1 -0
package/package.json
CHANGED
package/src/lib/bands.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export const BANDS = [
|
|
2
|
-
'
|
|
2
|
+
'2190m',
|
|
3
3
|
'630m',
|
|
4
|
+
'560m',
|
|
4
5
|
'160m',
|
|
5
6
|
'80m',
|
|
6
7
|
'60m',
|
|
@@ -12,9 +13,10 @@ export const BANDS = [
|
|
|
12
13
|
'12m',
|
|
13
14
|
'10m',
|
|
14
15
|
'6m',
|
|
16
|
+
'5m',
|
|
15
17
|
'4m',
|
|
16
18
|
'2m',
|
|
17
|
-
'
|
|
19
|
+
'1.25m',
|
|
18
20
|
'70cm',
|
|
19
21
|
'33cm',
|
|
20
22
|
'23cm',
|
|
@@ -22,20 +24,21 @@ export const BANDS = [
|
|
|
22
24
|
'9cm',
|
|
23
25
|
'6cm',
|
|
24
26
|
'3cm',
|
|
25
|
-
'
|
|
27
|
+
'1.25cm',
|
|
26
28
|
'6mm',
|
|
27
29
|
'4mm',
|
|
28
30
|
'2.5mm',
|
|
29
31
|
'2mm',
|
|
30
32
|
'1mm',
|
|
33
|
+
'submm',
|
|
31
34
|
'other'
|
|
32
35
|
]
|
|
33
36
|
|
|
34
37
|
export const HF_BANDS = ['160m', '80m', '60m', '40m', '30m', '20m', '17m', '15m', '12m', '10m']
|
|
35
|
-
export const VHF_BANDS = ['6m', '4m', '2m', '
|
|
38
|
+
export const VHF_BANDS = ['6m', '5m', '4m', '2m', '1.25m']
|
|
36
39
|
export const UHF_BANDS = ['70cm', '33cm', '23cm', '13cm']
|
|
37
|
-
export const SHF_BANDS = ['9cm', '6cm', '3cm', '
|
|
38
|
-
export const EHF_BANDS = ['6mm', '4mm', '2mm', '2.5mm', '1mm']
|
|
40
|
+
export const SHF_BANDS = ['9cm', '6cm', '3cm', '1.25cm']
|
|
41
|
+
export const EHF_BANDS = ['6mm', '4mm', '2mm', '2.5mm', '1mm', 'submm']
|
|
39
42
|
|
|
40
43
|
export const POPULAR_BANDS = ['160m', '80m', '60m', '40m', '30m', '20m', '17m', '15m', '12m', '10m', '6m', '2m', '70cm']
|
|
41
44
|
export const CONTEST_BANDS = ['160m', '80m', '40m', '20m', '15m', '10m']
|
|
@@ -45,8 +48,9 @@ export function bandForFrequency (freq) {
|
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
function bandForExactFrequencyInMHz (freq) {
|
|
48
|
-
if (freq >= 130 && freq <= 140) return '
|
|
49
|
-
else if (freq >= 450 && freq <=
|
|
51
|
+
if (freq >= 130 && freq <= 140) return '2190m'
|
|
52
|
+
else if (freq >= 450 && freq <= 499) return '630m'
|
|
53
|
+
else if (freq >= 500 && freq <= 505) return '560m'
|
|
50
54
|
else if (freq >= 1700 && freq <= 2100) return '160m'
|
|
51
55
|
else if (freq >= 3400 && freq <= 4100) return '80m'
|
|
52
56
|
else if (freq >= 5300 && freq <= 5500) return '60m'
|
|
@@ -58,9 +62,10 @@ function bandForExactFrequencyInMHz (freq) {
|
|
|
58
62
|
else if (freq >= 24500 && freq <= 25200) return '12m'
|
|
59
63
|
else if (freq >= 27900 && freq <= 30000) return '10m'
|
|
60
64
|
else if (freq >= 50000 && freq <= 54000) return '6m'
|
|
65
|
+
else if (freq >= 54001 && freq <= 69999) return '5m'
|
|
61
66
|
else if (freq >= 70000 && freq <= 71000) return '4m'
|
|
62
67
|
else if (freq >= 140000 && freq <= 150000) return '2m'
|
|
63
|
-
else if (freq >= 219000 && freq <= 230000) return '
|
|
68
|
+
else if (freq >= 219000 && freq <= 230000) return '1.25m'
|
|
64
69
|
else if (freq >= 400000 && freq <= 460000) return '70cm'
|
|
65
70
|
else if (freq >= 900000 && freq <= 930000) return '33cm'
|
|
66
71
|
else if (freq >= 1180000 && freq <= 1420000) return '23cm'
|
|
@@ -68,18 +73,20 @@ function bandForExactFrequencyInMHz (freq) {
|
|
|
68
73
|
else if (freq >= 3290000 && freq <= 3510000) return '9cm'
|
|
69
74
|
else if (freq >= 5640000 && freq <= 5926000) return '6cm'
|
|
70
75
|
else if (freq >= 10000000 && freq <= 10500000) return '3cm'
|
|
71
|
-
else if (freq >= 24000000 && freq <= 24250000) return '
|
|
76
|
+
else if (freq >= 24000000 && freq <= 24250000) return '1.25cm'
|
|
72
77
|
else if (freq >= 47000000 && freq <= 47200000) return '6mm'
|
|
73
78
|
else if (freq >= 75000000 && freq <= 81000000) return '4mm'
|
|
74
79
|
else if (freq >= 122250000 && freq <= 123000000) return '2.5mm'
|
|
75
80
|
else if (freq >= 134000000 && freq <= 141000000) return '2mm'
|
|
76
81
|
else if (freq >= 241000000 && freq <= 250000000) return '1mm'
|
|
82
|
+
else if (freq >= 300000000 && freq <= 7500000000) return 'submm'
|
|
77
83
|
else return undefined
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
export function frequencyForBand(band, mode) {
|
|
81
|
-
if (band === '
|
|
87
|
+
if (band === '2190m') return 135.7
|
|
82
88
|
else if (band === '630m') return 472
|
|
89
|
+
else if (band === '560m') return 501
|
|
83
90
|
else if (band === '160m') {
|
|
84
91
|
if (mode === 'FT8' || mode === 'FT4') return 1840
|
|
85
92
|
else return 1800
|
|
@@ -142,9 +149,10 @@ export function frequencyForBand(band, mode) {
|
|
|
142
149
|
else if (mode === 'FT4') return 50318
|
|
143
150
|
else return 50000
|
|
144
151
|
}
|
|
152
|
+
else if (band === '5m') return 55000
|
|
145
153
|
else if (band === '4m') return 70090
|
|
146
154
|
else if (band === '2m') return 145400
|
|
147
|
-
else if (band === '
|
|
155
|
+
else if (band === '1.25m') return 222000
|
|
148
156
|
else if (band === '70cm') return 420000
|
|
149
157
|
else if (band === '33cm') return 902000
|
|
150
158
|
else if (band === '23cm') return 1240000
|
|
@@ -152,11 +160,12 @@ export function frequencyForBand(band, mode) {
|
|
|
152
160
|
else if (band === '9cm') return 3300000
|
|
153
161
|
else if (band === '6cm') return 5650000
|
|
154
162
|
else if (band === '3cm') return 10000000
|
|
155
|
-
else if (band === '
|
|
163
|
+
else if (band === '1.25cm') return 24000000
|
|
156
164
|
else if (band === '6mm') return 47000000
|
|
157
165
|
else if (band === '4mm') return 75500000
|
|
158
166
|
else if (band === '2.5mm') return 122500000
|
|
159
167
|
else if (band === '2mm') return 134000000
|
|
160
168
|
else if (band === '1mm') return 241000000
|
|
169
|
+
else if (band === 'submm') return 300000000
|
|
161
170
|
else return undefined
|
|
162
171
|
}
|