diff autocal/gmagicmain.c @ 50:d309241fcae3

fc-rfcal-gmagic ready to test
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 27 May 2017 07:33:39 +0000
parents 5018fd8eecce
children fe39aac56cde
line wrap: on
line diff
--- a/autocal/gmagicmain.c	Sat May 27 07:23:20 2017 +0000
+++ b/autocal/gmagicmain.c	Sat May 27 07:33:39 2017 +0000
@@ -64,6 +64,9 @@
 main(argc, argv)
 	char **argv;
 {
+	int pm, Gmagic;
+	char Gmagic_db[64];
+
 	socket_pathname_options(argc, argv);
 	finish_cmdline(argc, argv);
 	connect_rvinterf_socket();
@@ -75,6 +78,9 @@
 	do_tms(1);
 	do_rfpw(STD_BAND_FLAG, selected_band->rfpw_std_band);
 	l1tm_setup_for_rxcal();
-
-
+	pm = rx_measure(arfcn);
+	Gmagic = pm - RXCAL_SIGGEN_LEVEL - RXCAL_AGC_DB * 2;
+	halfdb_to_string(Gmagic, Gmagic_db);
+	printf("GMagic=%d (%s dB)\n", Gmagic, Gmagic_db);
+	exit(0);
 }