Пример #1
0
def test_GLOPrn_combineData0():
  '''
  GLONASS L1/L2 C/A PRN data combination
  '''
  code = GLOPrnCode(1)
  dataBits = numpy.zeros(511, dtype=numpy.uint8)
  chipIndex_all = numpy.linspace(0, 510, 511, dtype=numpy.long)
  data = code.combineData(chipIndex_all, dataBits)
  assert ((data < 0) == GLOCACode).all()
Пример #2
0
def test_GPSL1Prn_combineData1():
  '''
  GLONASS L1/L2 C/A PRN data combination
  '''
  code = GLOPrnCode(1)
  dataBits = numpy.zeros(511, dtype=numpy.uint8)
  dataBits[1::2] = 1
  chipIndex_all = numpy.linspace(0, 510, 511, dtype=numpy.long)
  data = code.combineData(chipIndex_all, dataBits)
  assert ((data[1::2] > 0) == GLOCACode[1::2]).all()
  assert ((data[::2] < 0) == GLOCACode[::2]).all()