mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
5f3e2cf98a
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
17 lines
289 B
Python
Executable File
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
|