class documentation
class DobotSupliment: (source)
Utility class for Dobot-related calculations.
| Static Method | calculate |
Calculates the absolute position on a grid from a starting point. |
| Static Method | calculate |
Calculates the angle in degrees from the origin to the point (x, y). |
def calculate_pos_on_grid(grid:
Grid, start_x: float, start_y: float, distance_between_pos: float, dir_x: Direction, dir_y: Direction) -> tuple[ float, float]:
(source)
¶
Calculates the absolute position on a grid from a starting point.
Combines the starting coordinates with the grid offset to find the resulting position in space.
| Parameters | |
grid:Grid | The grid object containing the current x and y positions. |
startfloat | The starting x-coordinate in physical space. (float) |
startfloat | The starting y-coordinate in physical space. (float) |
distancefloat | The distance between each grid cell. (float) |
dirDirection | Undocumented |
dirDirection | Undocumented |
| Returns | |
tuple[ | The resulting (x, y) position in physical space. (Tuple[float, float]) |
Calculates the angle in degrees from the origin to the point (x, y).
Uses the arctangent function to determine the direction.
| Parameters | |
x:float | The x-coordinate of the point. (float) |
y:float | The y-coordinate of the point. (float) |
offset:float | Undocumented |
| Returns | |
float | The angle in degrees between the x-axis and the point (x, y). (float) |