Exemple #1
0
def test_GLOSv_getBatchSignals3():
    '''
  GLONASS SV signal generation: L2
  '''
    sv = GLOSatellite(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((4, 100))
    noiseParams = NoiseParameters(NormalRateConfig.SAMPLE_RATE_HZ, 1.0)
    sv.setL2Enabled(True)
    result = sv.getBatchSignals(userTimeAll_s, samples, NormalRateConfig,
                                noiseParams, NormalRateConfig.GLONASS.L2,
                                False)
    assert len(result) == 1
    assert result[0]['type'] == 'GLOL2'
    assert result[0]['doppler'] is None
    assert (samples[0] == 0).all()
    assert (samples[1] == 0).all()
    assert (samples[2] == 0).all()
    assert (samples[3] != 0).any()
def test_GLOSv_getBatchSignals3():
  '''
  GLONASS SV signal generation: L2
  '''
  sv = GLOSatellite(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((4, 100))
  noiseParams = NoiseParameters(NormalRateConfig.SAMPLE_RATE_HZ, 1.0)
  sv.setL2Enabled(True)
  result = sv.getBatchSignals(userTimeAll_s,
                              samples,
                              NormalRateConfig,
                              noiseParams,
                              NormalRateConfig.GLONASS.L2,
                              False)
  assert len(result) == 1
  assert result[0]['type'] == 'GLOL2'
  assert result[0]['doppler'] is None
  assert (samples[0] == 0).all()
  assert (samples[1] == 0).all()
  assert (samples[2] == 0).all()
  assert (samples[3] != 0).any()
Exemple #3
0
def test_GLOSv_getBatchSignals1():
    '''
  GLONASS SV signal generation: not available
  '''
    sv = GLOSatellite(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((4, 100))
    noiseParams = NoiseParameters(NormalRateConfig.SAMPLE_RATE_HZ, 1.0)
    result = sv.getBatchSignals(userTimeAll_s, samples, NormalRateConfig,
                                noiseParams, NormalRateConfig.GPS.L1, False)
    assert len(result) == 0
    assert (samples == 0).all()
def test_GLOSv_getBatchSignals0():
  '''
  GLONASS SV signal generation: not enabled
  '''
  sv = GLOSatellite(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((4, 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
  assert (samples == 0).all()