Esempio n. 1
0
def test_LNavMessage_updateParity_D22D23p2():
    '''
  GPS LNav: parity of message with D22/D23 patch
  '''
    msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
    bits = msg.getBits(0b10101010101010101010101110101010, 32)
    bits2 = msg.getBits(0b10101010101010101010101101101000, 32)
    msg.updateParity(bits, True)
    assert (bits == bits2).all()
Esempio n. 2
0
def test_LNavMessage_updateParity1():
    '''
  GPS LNav: inversion of parity
  '''
    msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
    bits = msg.getBits(0b01000000000000000000000000000000, 32)
    bits2 = msg.getBits(0b01111111111111111111111111010101, 32)
    msg.updateParity(bits, False)
    assert (bits == bits2).all()
Esempio n. 3
0
def test_LNavMessage_updateParity2():
    '''
  GPS LNav: D29' contribution
  '''
    msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
    bits = msg.getBits(0b10000000000000000000000000000000, 32)
    bits2 = msg.getBits(0b10000000000000000000000000101001, 32)
    msg.updateParity(bits, False)
    assert (bits == bits2).all()
Esempio n. 4
0
def test_LNavMessage_updateParity_D22D23p2():
  '''
  GPS LNav: parity of message with D22/D23 patch
  '''
  msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
  bits = msg.getBits(0b10101010101010101010101110101010, 32)
  bits2 = msg.getBits(0b10101010101010101010101101101000, 32)
  msg.updateParity(bits, True)
  assert (bits == bits2).all()
Esempio n. 5
0
def test_LNavMessage_updateParity_d8():
    '''
  GPS LNav: parity of D8 bit
  '''
    msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
    bits = msg.getBits(0b0000000000000000000000100000000, 32)
    bits2 = msg.getBits(0b0000000000000000000000100000011, 32)
    msg.updateParity(bits, False)
    assert (bits == bits2).all()
Esempio n. 6
0
def test_LNavMessage_updateParity2():
  '''
  GPS LNav: D29' contribution
  '''
  msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
  bits = msg.getBits(0b10000000000000000000000000000000, 32)
  bits2 = msg.getBits(0b10000000000000000000000000101001, 32)
  msg.updateParity(bits, False)
  assert (bits == bits2).all()
Esempio n. 7
0
def test_LNavMessage_updateParity1():
  '''
  GPS LNav: inversion of parity
  '''
  msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
  bits = msg.getBits(0b01000000000000000000000000000000, 32)
  bits2 = msg.getBits(0b01111111111111111111111111010101, 32)
  msg.updateParity(bits, False)
  assert (bits == bits2).all()
Esempio n. 8
0
def test_LNavMessage_updateParity_d8():
  '''
  GPS LNav: parity of D8 bit
  '''
  msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
  bits = msg.getBits(0b0000000000000000000000100000000, 32)
  bits2 = msg.getBits(0b0000000000000000000000100000011, 32)
  msg.updateParity(bits, False)
  assert (bits == bits2).all()
Esempio n. 9
0
def test_LNavMessage_updateParity0():
    '''
  GPS LNav: parity of empty message
  '''
    msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
    bits = msg.getBits(0b00000000000000000000000000000000, 32)
    msg.updateParity(bits, False)
    assert (bits == 0).all()
Esempio n. 10
0
def test_LNavMessage_updateParity0():
  '''
  GPS LNav: parity of empty message
  '''
  msg = LNavMessage(1, tow0=0, n_msg=0, n_prefixBits=0)
  bits = msg.getBits(0b00000000000000000000000000000000, 32)
  msg.updateParity(bits, False)
  assert (bits == 0).all()