Mats Bohlinsson
Second Officer
Flight distance : 1838077 ft
Sweden
Offline
|
djiuser_OR8EW5uz3gSA Posted at 5-1 10:46
Wow that looks awesome! Seems like you are getting really close!
I've had that problem before where either the x or y vectors was too high, past max velocity (15m/s) and it caused the drone to move too far in one direction. I looked back at another issue I had before where the drone was drifting and it turned out I made the mistake of not properly converting to radians when passing values to trigonometry functions.
Yep pretty much off how I do it.
Today I got it really good!
I implemented a crosstrack pid-regulator. It flyes completly straight!
Have a look here:
https://app.airdata.com/share/hdAOdz
You can clearly see where the pid regultor start swinging in at each turn. I havn't adjusted the pid-values, I got it good in the simulator, but the real drone needs other values.
I even tried in heavy sidewind, completly straight line.
Pid looks something like this:
pid.output_limits = (-55, 55)
pid.setpoint = 0
pid.tunings = (6, 1.2, 0.9)
while True:
crosstrack_error = l.get_crosstrack_error(loc_start, loc_dest)
course_correcton = pid(crosstrack_error)
You correct about the high speed. It seems like the drone prioritize speed compared to course stabilty in visrtualstick-mode!!
What kind of app are you doing? |
|