You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
365 B
20 lines
365 B
#!/usr/bin/env python |
|
""" |
|
simple test of wind generation code |
|
""" |
|
from __future__ import print_function |
|
import time |
|
import util |
|
from pymavlink.rotmat import Vector3 |
|
|
|
wind = util.Wind('7,90,0.1') |
|
|
|
t0 = time.time() |
|
velocity = Vector3(0, 0, 0) |
|
|
|
t = 0 |
|
deltat = 0.01 |
|
|
|
while t < 60: |
|
print("%.4f %f" % (t, wind.drag(velocity, deltat=deltat).length())) |
|
t += deltat
|
|
|