def test_GLOMessage_getDataBits0(): ''' GLONASS message: test getting bits ''' msg = GLOMessage(prn=0, tow0=0, n_msg=1, n_prefixBits=0) dataAll_idx = numpy.linspace(150, 449, 300, dtype=numpy.long) bits = msg.getDataBits(dataAll_idx) assert isinstance(bits, numpy.ndarray) assert bits.shape == (300,) assert (bits == msg.messageBits[150:450]).all()
def test_GLOMessage_getDataBits0(): ''' GLONASS message: test getting bits ''' msg = GLOMessage(prn=0, tow0=0, n_msg=1, n_prefixBits=0) dataAll_idx = numpy.linspace(150, 449, 300, dtype=numpy.long) bits = msg.getDataBits(dataAll_idx) assert isinstance(bits, numpy.ndarray) assert bits.shape == (300, ) assert (bits == msg.messageBits[150:450]).all()