import ctypes

ICD1553_DL_POSITION_METERS_LSB = float(1/32767)
SCALER = 32767

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

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

    def set(self, value):
        self.raw = ctypes.c_int16(int(value/100 *SCALER)).value