You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in skadi/decoder/recv_prop/float.py you can find the following:
def _decode_normal(self, stream):
"""
Decode 'normal' float, which appears to be 11 low bits in a float
multiplied by specific float-encoding-related values.
Arguments:
stream -- a Stream (skadi.io.stream)
Returns a float.
"""
s = stream.read_numeric_bits(1) # sign
l = stream.read_numeric_bits(11) # low
b = bytearray(0, 0, l & 0x0000ff00, l & 0x000000ff)
v = struct.unpack('f', b)[0]
# not sure this is ever called. what does bitshifting a float mean?
if v >> 31:
v += 4.2949673e9
v *= 4.885197850512946e-4
return v * -1 if s else v
which puts the eleven bits read in l into the bytearray b.
However, the third value put in, l & 0x0000ff00 will be zero all the time.
Proposed fix:
put (l & 0x0000ff00) >> 8 into the third byte.
The text was updated successfully, but these errors were encountered:
in skadi/decoder/recv_prop/float.py you can find the following:
which puts the eleven bits read in l into the bytearray b.
However, the third value put in, l & 0x0000ff00 will be zero all the time.
Proposed fix:
put (l & 0x0000ff00) >> 8 into the third byte.
The text was updated successfully, but these errors were encountered: