def test_GPSSV_getBatchSignals1(): ''' GPS SV signal generation: not available ''' sv = GPSSatellite(1) start = 0. stop = start + (100. / float(NormalRateConfig.SAMPLE_RATE_HZ)) userTimeAll_s = numpy.linspace( start, stop, 100, endpoint=False, dtype=numpy.float) samples = numpy.zeros((2, 100)) noiseParams = NoiseParameters(NormalRateConfig.SAMPLE_RATE_HZ, 1.0) result = sv.getBatchSignals(userTimeAll_s, samples, NormalRateConfig, noiseParams, NormalRateConfig.GLONASS.L1, False) assert len(result) == 0 # No signals are generated because SV object doesn't support GLONASS assert (samples == 0).all()
def test_GPSSV_getBatchSignals1(): ''' GPS SV signal generation: not available ''' sv = GPSSatellite(1) start = 0. stop = start + (100. / float(NormalRateConfig.SAMPLE_RATE_HZ)) userTimeAll_s = numpy.linspace(start, stop, 100, endpoint=False, dtype=numpy.float) samples = numpy.zeros((2, 100)) noiseParams = NoiseParameters(NormalRateConfig.SAMPLE_RATE_HZ, 1.0) result = sv.getBatchSignals(userTimeAll_s, samples, NormalRateConfig, noiseParams, NormalRateConfig.GLONASS.L1, False) assert len(result) == 0 # No signals are generated because SV object doesn't support GLONASS assert (samples == 0).all()
def test_GPSSV_getBatchSignals3(): ''' GPS SV signal generation: L2C ''' sv = GPSSatellite(1) start = 0. stop = start + (100. / float(NormalRateConfig.SAMPLE_RATE_HZ)) userTimeAll_s = numpy.linspace(start, stop, 100, endpoint=False, dtype=numpy.float) samples = numpy.zeros((2, 100)) noiseParams = NoiseParameters(NormalRateConfig.SAMPLE_RATE_HZ, 1.0) sv.setL2CEnabled(True) result = sv.getBatchSignals(userTimeAll_s, samples, NormalRateConfig, noiseParams, NormalRateConfig.GPS.L2, False) assert len(result) == 1 assert result[0]['type'] == 'GPSL2' assert result[0]['doppler'] is None assert (samples[0] == 0).all() assert (samples[1] != 0).any()
def test_GPSSV_getBatchSignals3(): ''' GPS SV signal generation: L2C ''' sv = GPSSatellite(1) start = 0. stop = start + (100. / float(NormalRateConfig.SAMPLE_RATE_HZ)) userTimeAll_s = numpy.linspace( start, stop, 100, endpoint=False, dtype=numpy.float) samples = numpy.zeros((2, 100)) noiseParams = NoiseParameters(NormalRateConfig.SAMPLE_RATE_HZ, 1.0) sv.setL2CEnabled(True) result = sv.getBatchSignals(userTimeAll_s, samples, NormalRateConfig, noiseParams, NormalRateConfig.GPS.L2, False) assert len(result) == 1 assert result[0]['type'] == 'GPSL2' assert result[0]['doppler'] is None assert (samples[0] == 0).all() assert (samples[1] != 0).any()