CCSDSPy / ccsdspy

I/O interface and utilities for CCSDS binary spacecraft data in Python. Library used in flight missions at NASA, NOAA, and SWRI
https://ccsdspy.org
BSD 3-Clause "New" or "Revised" License
75 stars 18 forks source link

Byte ordering specified in PacketField not taken into account for float datatypes #7

Closed 5tefan closed 5 years ago

5tefan commented 5 years ago

I am finding crazy values for float values among sane int and uint values. Changing byte_order for float datatypes did not resolve. Digging in, it turns out that the default float datatype created from https://github.com/ddasilva/ccsdspy/blob/f3d9d9f45c950df0b8d0aa610396b845c27d1832/ccsdspy/decode.py#L63 defaults to system byteordering, probably little endian these days and will not work to parse bigendian.

I'll open a resolving PR in a second.

ddasilva commented 5 years ago

Yikes! I had assumed that IEEE had spec'd out the endianness of floating points but I guess I was wrong. Thanks for fixing this.