ardupilot/Tools/autotest/pysim/testwind.py
Pierre Kancir 9e1ffcae5d Tools: update python coding style
Tools: update PrintVersion.py coding style

autotest: update python coding style

pysim: update python coding style

jsb_sim: update Python coding style

param_metadata: update Python coding style
2016-09-01 13:05:11 +10:00

21 lines
318 B
Python
Executable File

#!/usr/bin/env python
"""
simple test of wind generation code
"""
import time
import util
from 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