sporkus / probe_accuracy_tests

GNU General Public License v3.0
136 stars 29 forks source link

Probe could hit the dock or be out of range #4

Closed fbeauKmi closed 2 years ago

fbeauKmi commented 2 years ago

While performing the repeatability test, the probe can hit the dock due to get_random_loc(). If xmin or ymin are negative it can produce out of range value

        x = np.random.random() * (xmax - xmin - **margin**) + margin
        y = np.random.random() * (ymax - ymin - **margin**) + margin

gives position range : ( margin, max-min) . To keep margin and accuracy you should use

        x = np.random.random() * (xmax - xmin - 2 * margin) + margin + xmin
        y = np.random.random() * (ymax - ymin - 2 * margin) + margin + ymin

position range : ( min + margin, max - margin )

sporkus commented 2 years ago

@fbeauKmi Thanks for fixing my math. Implemented.