aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2022-07-04 19:29:41 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2022-07-23 08:26:42 +0200
commit53357957591c0276eff7bb8983f6773820c6f1ac (patch)
tree6d9df1c6a0ea3459d29a2cd51f68bf7e0c5a6544 /src
parentc6149ed3b4164940850747e7baf5bb73affa04c0 (diff)
JTACS: Fixed channel allocation, but have no hardware to verify
Diffstat (limited to 'src')
-rw-r--r--src/amps/amps.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/amps/amps.c b/src/amps/amps.c
index 870da27..f6f80df 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -71,6 +71,7 @@ double amps_channel2freq(int channel, int uplink)
double freq;
if (!tacs) {
+ /* AMPS */
if (uplink == 2)
return -45.000 * 1e6;
@@ -86,6 +87,7 @@ double amps_channel2freq(int channel, int uplink)
if (uplink)
freq -= 45.000;
} else if (!jtacs) {
+ /* TACS */
if (uplink == 2)
return -45.000 * 1e6;
@@ -98,14 +100,23 @@ double amps_channel2freq(int channel, int uplink)
if (uplink)
freq -= 45.000;
} else {
+ /* JTACS */
+ /* see "ARIB_STD-T64-C.S0057-0v1.0.pdf" */
if (uplink == 2)
return -55.000 * 1e6;
/* 799 channels */
- if (channel < 1 || channel > 799)
+ if (channel >= 1 && channel <= 799)
+ freq = 860.0125 + (channel - 1) * 0.0125;
+ else if (channel >= 801 && channel <= 1039)
+ freq = 843.0125 + (channel - 801) * 0.0125;
+ else if (channel >= 1041 && channel <= 1199)
+ freq = 832.0125 + (channel - 1041) * 0.0125;
+ else if (channel >= 1201 && channel <= 1600)
+ freq = 838.0125 + (channel - 1201) * 0.0125;
+ else
return 0;
- freq = 860.0125 + (channel - 1) * 0.025;
if (uplink)
freq += 55.000;