-
Notifications
You must be signed in to change notification settings - Fork 7
/
magic_lat.py
99 lines (94 loc) · 2.09 KB
/
magic_lat.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import numpy as np
import matplotlib.pyplot as plt
import math
# Consts
pcy1 = 1.603
pdy1=1.654
pdy2=-0.1783
pdy3=0
pey1 = -1.409
pey2 = -1.6617
pey3 = 0.26886
pey4 = -13.61
pky1 = -53.05
pky2 = 4.1265
pky3 = 1.5016
phy1 = 0.0039
phy2 = -0.00253
pvy1 = -0.01038
pvy2 = -0.1
pvy3 = 0.4498
pvy4 = -1.5
rby1 = 35.304
rby2 = 15.666
rby3 = -0.01179
rcy1 = 1.018
rey1 = 0.35475
rey2 = 0.01966
rhy1 = 0.00667
rhy2 = 0.00207
mayvals = []
dfzs_1 = np.arange(0,3,0.1)
# for dfz in np.arange(0,1,0.1) :
# mayvals.append(0)
# for speed in (0,83) :
# dfz_rear, dfz_front =
# for delta in (-0.5,0.5) :
# delta_rear , delta_forward =
for dfz in np.arange(1,1.1,0.1) :
epsilon = 0
slips = np.arange(-0.1,0.1,0.00001)
dfz = dfz-1
fz = 3114*(1+dfz)
fz0 = 3114
shy = phy1 + phy2*dfz
ky = slips + shy
Cy = pcy1
muy = pdy1 + pdy2*dfz
# print("muy :", muy)
Dy = muy*fz
Ey = (pey1 + pey2*dfz)#*(1-pey4)
K = fz0*pky1*np.sin(2*np.arctan(fz/(pky2*fz0)))#+pky2*dfz)#*exp(pky3*dfz)
print(K)
By=K/(Cy*Dy+epsilon)
print(By)
svy = fz*(pvy1+pvy2*dfz)
Fy = Dy*np.sin(Cy*np.arctan(By*ky- Ey*(By*ky-np.arctan(By*ky)))) + svy# plt.plot(slips*(180/3.14),Fy)
print(Fy.shape)
print(slips.shape)
plt.plot(slips,Fy)
plt.show()
# print(1+dfz, max(Fy))
print(Fy)
mayvals.append(max(Fy))
plt.plot(dfzs_1,mayvals)
plt.show()
# dfz = 0.5
# fz = 7056*(1+dfz)
# shy = phy1 + phy2*dfz
# ky = slips + shy
# Cy = pcy1
# muy = pdy1 + pdy2*dfz
# Dy = muy*fz
# Ey = (pey1 + pey2*dfz + pey3*dfz**2)*(1-pey4)
# K = fz*(pky1+pky2*dfz)*np.eyp(pky3*dfz)
# By=K/(Cy*Dy+epsilon)
# svy = fz*(pvy1+pvy2*dfz+pvy3*dfz**2+pvy4*dfz**3)
# Fy = Dy*np.sin(Cy*np.arctan(By*ky - Ey*(By*ky-np.arctan(By*ky))))
# plt.plot(slips*(180/3.14),Fy)
# print(may(Fy))
# dfz = 1
# fz = 7056*(1+dfz)
# shy = phy1 + phy2*dfz
# ky = slips + shy
# Cy = pcy1
# muy = pdy1 + pdy2*dfz
# Dy = muy*fz
# Ey = (pey1 + pey2*dfz + pey3*dfz**2)*(1-pey4)
# K = fz*(pky1+pky2*dfz)*np.eyp(pky3*dfz)
# By=K/(Cy*Dy+epsilon)
# svy = fz*(pvy1+pvy2*dfz+pvy3*dfz**2+pvy4*dfz**3)
# Fy = Dy*np.sin(Cy*np.arctan(By*ky - Ey*(By*ky-np.arctan(By*ky))))
# plt.plot(slips*(180/3.14),Fy)
# print(may(Fy))
# plt.show()