From f7a0e4622bed9551bb0999d3c54bb69249065d38 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Thu, 12 Oct 2017 19:43:15 +0200 Subject: Display channel offset with TX and RX channel frequencies on startup --- src/amps/amps.c | 9 +++++++++ src/amps/amps_tacs_main.c | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/amps') 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); -- cgit v1.2.3