| 9 | |
| 10 | |
| 11 | class StateIndex: |
| 12 | _X = 0 |
| 13 | _Y = 1 |
| 14 | _HEADING = 2 |
| 15 | _VELOCITY_X = 3 |
| 16 | _VELOCITY_Y = 4 |
| 17 | _ACCELERATION_X = 5 |
| 18 | _ACCELERATION_Y = 6 |
| 19 | _STEERING_ANGLE = 7 |
| 20 | _STEERING_RATE = 8 |
| 21 | _ANGULAR_VELOCITY = 9 |
| 22 | _ANGULAR_ACCELERATION = 10 |
| 23 | |
| 24 | @classmethod |
| 25 | def size(cls): |
| 26 | valid_attributes = [ |
| 27 | attribute |
| 28 | for attribute in dir(cls) |
| 29 | if attribute.startswith("_") |
| 30 | and not attribute.startswith("__") |
| 31 | and not callable(getattr(cls, attribute)) |
| 32 | ] |
| 33 | return len(valid_attributes) |
| 34 | |
| 35 | @classmethod |
| 36 | @property |
| 37 | def X(cls): |
| 38 | return cls._X |
| 39 | |
| 40 | @classmethod |
| 41 | @property |
| 42 | def Y(cls): |
| 43 | return cls._Y |
| 44 | |
| 45 | @classmethod |
| 46 | @property |
| 47 | def HEADING(cls): |
| 48 | return cls._HEADING |
| 49 | |
| 50 | @classmethod |
| 51 | @property |
| 52 | def VELOCITY_X(cls): |
| 53 | return cls._VELOCITY_X |
| 54 | |
| 55 | @classmethod |
| 56 | @property |
| 57 | def VELOCITY_Y(cls): |
| 58 | return cls._VELOCITY_Y |
| 59 | |
| 60 | @classmethod |
| 61 | @property |
| 62 | def ACCELERATION_X(cls): |
| 63 | return cls._ACCELERATION_X |
| 64 | |
| 65 | @classmethod |
| 66 | @property |
| 67 | def ACCELERATION_Y(cls): |
| 68 | return cls._ACCELERATION_Y |
nothing calls this directly
no outgoing calls
no test coverage detected