From 0e75b3b1409288f3c22524b79ccf84966205b2dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 13 Dec 2011 10:13:01 +1100 Subject: [PATCH] autotest: added a test script for wind generation this makes it easier to experiment --- Tools/autotest/pysim/testwind.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 Tools/autotest/pysim/testwind.py diff --git a/Tools/autotest/pysim/testwind.py b/Tools/autotest/pysim/testwind.py new file mode 100755 index 0000000000..7884479931 --- /dev/null +++ b/Tools/autotest/pysim/testwind.py @@ -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