68 lines
2.5 KiB
Python
68 lines
2.5 KiB
Python
import ctypes
|
|
|
|
# Minimal placeholders for nested datatypes used by tracked target messages
|
|
class RelativeTimetag(ctypes.Union):
|
|
_pack_ = 1
|
|
_fields_ = [("raw", ctypes.c_uint16)]
|
|
|
|
class TargetXDisplayCoordinate(ctypes.Union):
|
|
_pack_ = 1
|
|
_fields_ = [("raw", ctypes.c_int16)]
|
|
|
|
class TargetYDisplayCoordinate(ctypes.Union):
|
|
_pack_ = 1
|
|
_fields_ = [("raw", ctypes.c_int16)]
|
|
|
|
class TargetIdentifier(ctypes.Union):
|
|
_pack_ = 1
|
|
_fields_ = [("raw", ctypes.c_uint32)]
|
|
|
|
class TrackValidityAndStatusWord1(ctypes.Union):
|
|
_pack_ = 1
|
|
_fields_ = [("raw", ctypes.c_uint16)]
|
|
|
|
class TrackValidityAndStatusWord2(ctypes.Union):
|
|
_pack_ = 1
|
|
_fields_ = [("raw", ctypes.c_uint16)]
|
|
|
|
class TrackedTarget02_10(ctypes.Structure):
|
|
_pack_ = 1
|
|
_fields_ = [
|
|
("track_validity_and_status_word_1", TrackValidityAndStatusWord1),
|
|
("track_validity_and_status_word_2", TrackValidityAndStatusWord2),
|
|
("time_tag", RelativeTimetag),
|
|
("target_range", ctypes.c_uint16),
|
|
("normalized_target_position_x", ctypes.c_int16),
|
|
("normalized_target_position_y", ctypes.c_int16),
|
|
("normalized_target_position_z", ctypes.c_int16),
|
|
("target_range_rate", ctypes.c_int16),
|
|
("target_velocity", ctypes.c_uint16),
|
|
("target_velocity_x", ctypes.c_int16),
|
|
("target_velocity_y", ctypes.c_int16),
|
|
("target_velocity_z", ctypes.c_int16),
|
|
("target_acceleration", ctypes.c_uint16),
|
|
("target_acceleration_x", ctypes.c_int16),
|
|
("target_acceleration_y", ctypes.c_int16),
|
|
("target_acceleration_z", ctypes.c_int16),
|
|
("target_aspect_angle", ctypes.c_int16),
|
|
("target_cas", ctypes.c_uint16),
|
|
("target_mach_number", ctypes.c_uint16),
|
|
("target_x_display_coordinate", TargetXDisplayCoordinate),
|
|
("target_y_display_coordinate", TargetYDisplayCoordinate),
|
|
("standard_deviation_of_position_x_estimate", ctypes.c_uint16),
|
|
("standard_deviation_of_position_y_estimate", ctypes.c_uint16),
|
|
("standard_deviation_of_position_z_estimate", ctypes.c_uint16),
|
|
("reserved_word_1", ctypes.c_int16),
|
|
("reserved_word_2", ctypes.c_int16),
|
|
("target_identifier", TargetIdentifier),
|
|
]
|
|
|
|
class TrackedTarget01(TrackedTarget02_10):
|
|
_pack_ = 1
|
|
_fields_ = TrackedTarget02_10._fields_ + [
|
|
("validity_word_and_hpt_identifier", ctypes.c_uint16),
|
|
("track_priority_01_to_04", ctypes.c_uint16),
|
|
("track_priority_05_to_08", ctypes.c_uint16),
|
|
("track_priority_09_to_10", ctypes.c_uint16),
|
|
]
|