FreeCalypso > hg > fc-rfcal-tools
comparison autocal/rxband.c @ 61:0bf853d1b68e
fc-rfcal-rxband: almost finished
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sun, 28 May 2017 00:10:16 +0000 |
| parents | 81e8f7e99d89 |
| children | a98873b713c3 |
comparison
equal
deleted
inserted
replaced
| 60:81e8f7e99d89 | 61:0bf853d1b68e |
|---|---|
| 65 sizeof(rx_calchan_1900) / sizeof(struct rx_calchan_range)}, | 65 sizeof(rx_calchan_1900) / sizeof(struct rx_calchan_range)}, |
| 66 {0, 0, 0, 0, 0} | 66 {0, 0, 0, 0, 0} |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 struct rxcal_band *rxcal_band; | 69 struct rxcal_band *rxcal_band; |
| 70 int Gmagic, rx_calchan_values[10]; | |
| 70 | 71 |
| 71 finish_cmdline(argc, argv) | 72 finish_cmdline(argc, argv) |
| 72 char **argv; | 73 char **argv; |
| 73 { | 74 { |
| 74 extern int optind; | 75 extern int optind; |
| 120 exit(0); | 121 exit(0); |
| 121 } | 122 } |
| 122 | 123 |
| 123 do_gmagic() | 124 do_gmagic() |
| 124 { | 125 { |
| 125 int pm, Gmagic; | 126 int pm; |
| 126 char Gmagic_db[64]; | 127 char Gmagic_db[64]; |
| 127 | 128 |
| 128 printf("Calibrating GMagic\n"); | 129 printf("Calibrating GMagic\n"); |
| 129 pm = rx_measure(rxcal_band->main_arfcn); | 130 pm = rx_measure(rxcal_band->main_arfcn); |
| 130 Gmagic = pm - RXCAL_SIGGEN_LEVEL - RXCAL_AGC_DB * 2; | 131 Gmagic = pm - RXCAL_SIGGEN_LEVEL - RXCAL_AGC_DB * 2; |
| 131 halfdb_to_string(Gmagic, Gmagic_db); | 132 halfdb_to_string(Gmagic, Gmagic_db); |
| 132 printf("GMagic=%d (%s dB)\n", Gmagic, Gmagic_db); | 133 printf("GMagic=%d (%s dB)\n", Gmagic, Gmagic_db); |
| 133 upload_gmagic(Gmagic); | 134 upload_gmagic(); |
| 134 return(0); | 135 return(0); |
| 135 } | 136 } |
