Sensor tracking
Module contains a guidance sensor for tracking the "tracking" task acceptability, see TrackingTaskAcceptabilitySensor
documentation for details.
TrackingTaskAcceptabilitySensor
¶
Bases: TaskAcceptabilitySensor
Guidance sensor for the tracking task.
Source code in matbii\guidance\sensor_tracking.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
__init__(*args, **kwargs)
¶
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
list[Any]
|
additional optional arguments. |
()
|
kwargs |
dict[Any]
|
additional optional keyword arguments. |
{}
|
Source code in matbii\guidance\sensor_tracking.py
17 18 19 20 21 22 23 24 25 26 27 |
|
is_point_in_rectangle(point, rect_min, rect_max)
staticmethod
¶
Checks wether the given point
is within the rectangle as specified by the top left and bottom right coordinate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
point |
tuple[float, float]
|
point to check. |
required |
rect_min |
tuple[float, float]
|
top left. |
required |
rect_max |
tuple[float, float]
|
bottom right. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
whether the point is in the rectangle. |
Source code in matbii\guidance\sensor_tracking.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
is_tracking_acceptable()
¶
Determines whether the tracking task is in an acceptable state.
Acceptable: "target" is within the central box of the task. Unacceptable: otherwise.
Raises:
Type | Description |
---|---|
ValueError
|
if there is missing observational data about the task - this may mean the task is not active. |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
whether the task is in an acceptable state. |
Source code in matbii\guidance\sensor_tracking.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
on_observation(observation)
¶
Update beliefs about the tracking task based on the incoming observation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation |
Observation
|
observation |
required |
Source code in matbii\guidance\sensor_tracking.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
|
sense()
¶
Generates the sense actions that are required for checking whether the tracking task is in an acceptable state.
The actions will request the following data: - the bounds of the target element. - the bounds of the central box of the tracking task.
Returns:
Type | Description |
---|---|
list[Select]
|
list[Select]: list of sense actions to take. |
Source code in matbii\guidance\sensor_tracking.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|