working on the polar conversion, need to add a comparison of regular xy -> dualmotor-lenxy -> converted back dualmotor-lenxy

This commit is contained in:
2019-06-03 14:22:49 -07:00
parent 6867696a2c
commit b7966b75ca
3 changed files with 63 additions and 33 deletions

18
main.py
View File

@@ -1,4 +1,3 @@
from math import sqrt
from tkinter import *
from tkinter import filedialog
from tkinter.ttk import Notebook
@@ -12,23 +11,6 @@ from ImageConverter import ImageConverter
from Simulator import Simulator
def xy_to_radial(settings, current_xy, dest_xy, pulley_diameter):
# maybe check for the distance of the move. Split it up into multiple to avoid distortion
# get the current length of the left pulley wire
b = (settings.left_pulley_x_offset - settings.pulley_diameter + current_xy[0])
a = settings.pulley_y_droop
length = sqrt(pow(a, 2) + pow(b, 2))
# get the current length of the right pulley wire
# get the desired length of the left pulley wire
# get the desired length of the right pulley wire
return
class Settings: