get more accurate
This commit is contained in:
@@ -11,7 +11,7 @@ import multiprocessing
|
||||
import io
|
||||
from PIL import Image
|
||||
|
||||
mp.dps = 15 # 设置精度为15位小数
|
||||
mp.dps = 50 # 设置精度为50位小数
|
||||
|
||||
kSegLength1 = mp.mpf('2.86')
|
||||
kSegLength2 = mp.mpf('1.65')
|
||||
@@ -37,7 +37,7 @@ class Dragon:
|
||||
test_node_dot = self.Theta2Dot(theta)
|
||||
actual_distance = mp.sqrt((cur_node_dot[0]-test_node_dot[0])**2 + (cur_node_dot[1]-test_node_dot[1])**2)
|
||||
return actual_distance - expected_distance
|
||||
return mp.findroot(f, cur_node_theta + 0.1, solver='secant',tol=1e-20)
|
||||
return mp.findroot(f, cur_node_theta + 0.1, solver='secant')
|
||||
|
||||
|
||||
def CalcMoveList(self, delta_theta=0):
|
||||
|
Reference in New Issue
Block a user