import ctypes

ICD1553_TWS_VEL_LSB = 0.125

class TwsVelocity(ctypes.Structure):
    _fields_ = [("raw", ctypes.c_int16)]

    def get(self):
        return self.raw * ICD1553_TWS_VEL_LSB

    def set(self, value):
        self.raw = int(value / ICD1553_TWS_VEL_LSB)