Loading SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -107,13 +107,13 @@ void CComponentCore::getLBandBandwidth(ACS::doubleSeq& bw) { baci::ThreadSyncGuard guard(&m_mutex); bw.length(m_configuration.getIFs()); double ifmax, ifmin, filter; double if_max, if_min, filter_max; for (WORD i=0; i<m_configuration.getIFs(); i++) { ifmin = m_configuration.getLBandRFMin()[i] - m_localOscillatorValue; ifmax = m_configuration.getLBandRFMax()[i] - m_localOscillatorValue; filter = m_configuration.getLowpassFilterMin()[0]; ifmax = (ifmax < filter) ? ifmax : filter; bw[i] = (ifmax - ifmin) > 0 ? (ifmax - ifmin) : 0; if_min = m_configuration.getLBandRFMin()[i] - m_localOscillatorValue; if_max = m_configuration.getLBandRFMax()[i] - m_localOscillatorValue; filter_max = m_configuration.getLowpassFilterMax()[0]; if_max = (if_max < filter_max) ? if_max : filter_max; bw[i] = (if_max - if_min) > 0 ? (if_max - if_min) : 0; } } Loading SRT/Servers/SRTLPBandReceiver/test/functional/docLO.rst +2 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,8 @@ Expected: Bandwidth==75 (925:1000) Expected: start frequency==925 Test 11: low pass IF filter (NO-default) ======================================== Test 11: low pass IF filter (NO-default): NOT IMPLMENTED ======================================================== > receiversMode=L1L5 (1625-1715) > setL0=500 (IF band: 1125-1215) # Target command Loading SRT/Servers/SRTLPBandReceiver/test/functional/test_lo.py +16 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,22 @@ class TestLO(unittest2.TestCase): self.assertEqual(initialFrequency, ifmin) def test_lowpassfilter_setMode_before_setLo(self): """The lowpass filter cuts the IF band: setMode before setLO""" self.lp.setMode('XXL4') # RF band -> 1300:1800 self.lp.setLO([600.0, 600.0]) # IF band -> 700:1200 bandWidth = self.get_property('bandWidth') self.assertEqual(bandWidth, [300.0, 300]) def test_lowpassfilter_setMode_after_setLo(self): """The lowpass filter cuts the IF band: setMode after setLO""" self.lp.setLO([700.0, 700.0]) self.lp.setMode('XXL5') # band 1625:1715 -> IF band -> 925:1015 bandWidth = self.get_property('bandWidth') self.assertEqual(bandWidth, [75.0, 75]) def get_ifs(self): """Return the current IFs, taking in account the low pass filter""" rfmin = self.get_cdb_values('LBandRFMin') Loading Loading
SRT/Servers/SRTLPBandReceiver/src/ComponentCore.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -107,13 +107,13 @@ void CComponentCore::getLBandBandwidth(ACS::doubleSeq& bw) { baci::ThreadSyncGuard guard(&m_mutex); bw.length(m_configuration.getIFs()); double ifmax, ifmin, filter; double if_max, if_min, filter_max; for (WORD i=0; i<m_configuration.getIFs(); i++) { ifmin = m_configuration.getLBandRFMin()[i] - m_localOscillatorValue; ifmax = m_configuration.getLBandRFMax()[i] - m_localOscillatorValue; filter = m_configuration.getLowpassFilterMin()[0]; ifmax = (ifmax < filter) ? ifmax : filter; bw[i] = (ifmax - ifmin) > 0 ? (ifmax - ifmin) : 0; if_min = m_configuration.getLBandRFMin()[i] - m_localOscillatorValue; if_max = m_configuration.getLBandRFMax()[i] - m_localOscillatorValue; filter_max = m_configuration.getLowpassFilterMax()[0]; if_max = (if_max < filter_max) ? if_max : filter_max; bw[i] = (if_max - if_min) > 0 ? (if_max - if_min) : 0; } } Loading
SRT/Servers/SRTLPBandReceiver/test/functional/docLO.rst +2 −2 Original line number Diff line number Diff line Loading @@ -92,8 +92,8 @@ Expected: Bandwidth==75 (925:1000) Expected: start frequency==925 Test 11: low pass IF filter (NO-default) ======================================== Test 11: low pass IF filter (NO-default): NOT IMPLMENTED ======================================================== > receiversMode=L1L5 (1625-1715) > setL0=500 (IF band: 1125-1215) # Target command Loading
SRT/Servers/SRTLPBandReceiver/test/functional/test_lo.py +16 −0 Original line number Diff line number Diff line Loading @@ -127,6 +127,22 @@ class TestLO(unittest2.TestCase): self.assertEqual(initialFrequency, ifmin) def test_lowpassfilter_setMode_before_setLo(self): """The lowpass filter cuts the IF band: setMode before setLO""" self.lp.setMode('XXL4') # RF band -> 1300:1800 self.lp.setLO([600.0, 600.0]) # IF band -> 700:1200 bandWidth = self.get_property('bandWidth') self.assertEqual(bandWidth, [300.0, 300]) def test_lowpassfilter_setMode_after_setLo(self): """The lowpass filter cuts the IF band: setMode after setLO""" self.lp.setLO([700.0, 700.0]) self.lp.setMode('XXL5') # band 1625:1715 -> IF band -> 925:1015 bandWidth = self.get_property('bandWidth') self.assertEqual(bandWidth, [75.0, 75]) def get_ifs(self): """Return the current IFs, taking in account the low pass filter""" rfmin = self.get_cdb_values('LBandRFMin') Loading