aboutsummaryrefslogtreecommitdiffstats
path: root/src/amps
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-10-12 19:43:15 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2017-10-22 19:23:06 +0200
commitf7a0e4622bed9551bb0999d3c54bb69249065d38 (patch)
treeb0f4585d3d7b013046636285783157aa993c2fd3 /src/amps
parente67c171035807f547ae2eeb7359d7ec8d158cc2a (diff)
Display channel offset with TX and RX channel frequencies on startup
Diffstat (limited to 'src/amps')
-rw-r--r--src/amps/amps.c9
-rw-r--r--src/amps/amps_tacs_main.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/src/amps/amps.c b/src/amps/amps.c
index e6f5bbd..3bc22b6 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -75,6 +75,9 @@ double amps_channel2freq(int channel, int uplink)
double freq;
if (!tacs) {
+ if (uplink == 2)
+ return -45.000 * 1e6;
+
/* 832 channels, 990 not used, see TIA/EIA-136-110 */
if (channel < 1 || channel > 1023 || (channel > 799 && channel < 991))
return 0;
@@ -87,6 +90,9 @@ double amps_channel2freq(int channel, int uplink)
if (uplink)
freq -= 45.000;
} else if (!jtacs) {
+ if (uplink == 2)
+ return -45.000 * 1e6;
+
/* 600 channels */
if (channel < 1 || channel > 600)
return 0;
@@ -96,6 +102,9 @@ double amps_channel2freq(int channel, int uplink)
if (uplink)
freq -= 45.000;
} else {
+ if (uplink == 2)
+ return -55.000 * 1e6;
+
/* 799 channels */
if (channel < 1 || channel > 799)
return 0;
diff --git a/src/amps/amps_tacs_main.c b/src/amps/amps_tacs_main.c
index 3065e7d..cd65a98 100644
--- a/src/amps/amps_tacs_main.c
+++ b/src/amps/amps_tacs_main.c
@@ -397,9 +397,9 @@ int main_amps_tacs(int argc, char *argv[])
goto fail;
}
if (!tacs)
- printf("Base station on channel %d ready (%s), please tune transmitter to %.3f MHz and receiver to %.3f MHz.\n", kanal[i], chan_type_long_name(chan_type[i]), amps_channel2freq(kanal[i], 0) / 1e6, amps_channel2freq(kanal[i], 1) / 1e6);
+ printf("Base station on channel %d ready (%s), please tune transmitter to %.3f MHz and receiver to %.3f MHz. (%.3f MHz offset)\n", kanal[i], chan_type_long_name(chan_type[i]), amps_channel2freq(kanal[i], 0) / 1e6, amps_channel2freq(kanal[i], 1) / 1e6, amps_channel2freq(kanal[i], 2) / 1e6);
else
- printf("Base station on channel %d ready (%s), please tune transmitter to %.4f MHz and receiver to %.4f MHz.\n", kanal[i], chan_type_long_name(chan_type[i]), amps_channel2freq(kanal[i], 0) / 1e6, amps_channel2freq(kanal[i], 1) / 1e6);
+ printf("Base station on channel %d ready (%s), please tune transmitter to %.4f MHz and receiver to %.4f MHz. (%.3f MHz offset)\n", kanal[i], chan_type_long_name(chan_type[i]), amps_channel2freq(kanal[i], 0) / 1e6, amps_channel2freq(kanal[i], 1) / 1e6, amps_channel2freq(kanal[i], 2) / 1e6);
}
main_mobile(&quit, latency, interval, NULL, station_id, 10);