Uh oh!
There was an error while loading. Please reload this page.
forked from tmcclintock/FrisPy
- Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathexample.py
More file actions
Latest commit
25 lines (18 loc) · 772 Bytes
/
Copy pathexample.py
File metadata and controls
25 lines (18 loc) · 772 Bytes
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
importmath
importmatplotlib.pyplotasplt
fromfrispyimportDisc
fromfrispyimportDiscs
# change these params to see different flights
model=Discs.wraith
v=25# 25 m/s is about 56 mph
rot=-v/model.diameter# This is an advance rate of 0.5 which is common (radians per sec)
uphill_angle=10# velocity points 10 degrees above the horizon
nose_up=0# 0 degrees nose down
hyzer=15# 15 degrees hyzer
disc=Disc(model, {"vx": math.cos(uphill_angle*math.pi/180) *v, "dgamma": rot, "vz": math.sin(uphill_angle*math.pi/180) *v, "nose_up": nose_up, "hyzer": hyzer})
result=disc.compute_trajectory(15.0, **{"max_step": .2})
times=result.times
t, x, y, z=result.times, result.x, result.y, result.z
plt.plot(x, y)
plt.plot(x, z)
plt.show()