mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-12 10:58:30 -04:00
autotest: added a test script for wind generation
this makes it easier to experiment
This commit is contained in:
parent
63688826cf
commit
0e75b3b140
16
Tools/autotest/pysim/testwind.py
Executable file
16
Tools/autotest/pysim/testwind.py
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# simple test of wind generation code
|
||||||
|
|
||||||
|
import util, euclid, time, random
|
||||||
|
|
||||||
|
wind = util.Wind('3,90,0.1')
|
||||||
|
|
||||||
|
t0 = time.time()
|
||||||
|
velocity = euclid.Vector3(0,0,0)
|
||||||
|
|
||||||
|
t = 0
|
||||||
|
deltat = 0.01
|
||||||
|
|
||||||
|
while t < 60:
|
||||||
|
print("%.4f %f" % (t, wind.accel(velocity, deltat=deltat).magnitude()))
|
||||||
|
t += deltat
|
Loading…
Reference in New Issue
Block a user