数值计算:求解空间坐标欧式距离等于速度时间乘积方程的解:x, y, z, t
但是输出为EmptySet,请问能否给出解,如果不能,可否给出近似解
# encoding: gbk
from sympy import *
V = 340 # m/s
x, y, z, t = symbols('x y z t', real=True)
X_distance = 97304 # m
Y_distance = 111263 # m
x1, y1, z1, t1 = 110.241, 27.204, 824, 100.767
x2, y2, z2, t2 = 110.780, 27.456, 727, 112.220
x3, y3, z3, t3 = 110.712, 27.785, 742, 188.020
x4, y4, z4, t4 = 110.251, 27.825, 850, 258.985
x5, y5, z5, t5 = 110.524, 27.617, 786, 118.443
x6, y6, z6, t6 = 110.467, 27.921, 678, 266.871
x7, y7, z7, t7 = 110.047, 27.121, 575, 163.024
eq_func = lambda x1, y1, z1, t1: sqrt((X_distance * (x - x1))**2 + (Y_distance * (y - y1))**2 + (z - z1)**2) - V*(t1 - t)
eq1 = eq_func(x1, y1, z1, t1)
eq2 = eq_func(x2, y2, z2, t2)
eq3 = eq_func(x3, y3, z3, t3)
eq4 = eq_func(x4, y4, z4, t4)
eq5 = eq_func(x5, y5, z5, t5)
eq6 = eq_func(x6, y6, z6, t6)
eq7 = eq_func(x7, y7, z7, t7)
eq = [eq1, eq2, eq3, eq4]
guess = [110., 30., 700., 150.]
solution = nonlinsolve(eq, [x, y, z, t])
# solution = nsolve(eq, [x, y, z, t], guess, prec=10**-10)
print("solution: ", solution)