aboutsummaryrefslogtreecommitdiffstats
path: root/src/amps
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-08-27 18:02:43 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-09-01 18:42:54 +0200
commit94ed39f5e28520ba968a604c7eeabf2be0ca35d7 (patch)
treef187fb00c90c70c9f5c447ed44cbf48a2e6fdc59 /src/amps
parent489ab9506ca597e36f0fe20ace34425709a313b1 (diff)
JTACS: Implementation of the Japanese variant of TACS
Diffstat (limited to 'src/amps')
-rw-r--r--src/amps/amps.c20
-rw-r--r--src/amps/main.c1
-rw-r--r--src/amps/main.h1
3 files changed, 18 insertions, 4 deletions
diff --git a/src/amps/amps.c b/src/amps/amps.c
index 2150ecb..74abbc4 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -83,16 +83,28 @@ double amps_channel2freq(int channel, int uplink)
channel -= 1023;
freq = 870.030 + (channel - 1) * 0.030;
- } else {
+
+ if (uplink)
+ freq -= 45.000;
+ } else if (!jtacs) {
/* 600 channels */
if (channel < 1 || channel > 600)
return 0;
freq = 935.0125 + (channel - 1) * 0.025;
- }
- if (uplink)
- freq -= 45.000;
+ if (uplink)
+ freq -= 45.000;
+ } else {
+ /* 799 channels */
+ if (channel < 1 || channel > 799)
+ return 0;
+
+ freq = 860.0125 + (channel - 1) * 0.025;
+
+ if (uplink)
+ freq += 55.000;
+ }
return freq * 1e6;
}
diff --git a/src/amps/main.c b/src/amps/main.c
index ce0e065..4c8e445 100644
--- a/src/amps/main.c
+++ b/src/amps/main.c
@@ -6,6 +6,7 @@
#include "congestion.h"
const int tacs = 0;
+const int jtacs = 0;
int main(int argc, char *argv[])
{
diff --git a/src/amps/main.h b/src/amps/main.h
index 323b94a..23acd6a 100644
--- a/src/amps/main.h
+++ b/src/amps/main.h
@@ -1,5 +1,6 @@
extern const int tacs;
+extern const int jtacs;
int main_amps_tacs(int argc, char *argv[]);