ardupilot/Tools/autotest/pysim/testwind.py
Andrew Tridgell 5f3e2cf98a pysim: update the multicopter simulator with correct acceleration
this re-works the multicopter simulator in terms of rotation matrices,
and adds full acceleration support, which means it will include linear
acceleration affects and centripetal acceleration
2012-03-22 23:00:45 +11:00

17 lines
289 B
Python
Executable File

#!/usr/bin/env python
# simple test of wind generation code
import util, time, random
wind = util.Wind('3,90,0.1')
t0 = time.time()
velocity = Vector3(0,0,0)
t = 0
deltat = 0.01
while t < 60:
print("%.4f %f" % (t, wind.accel(velocity, deltat=deltat).magnitude()))
t += deltat