some of you will know what splines are, here I used Catmull-Rom Splines. Special about this type is that the curve passes exactly the control points and for this reason it is often used in computer games. A little explanation and a demo you can find here: .
For a first implementation (called it CatmullRom1) I simply calculated a few intermediate waypoints that are set during the transition to the target waypoint. What I did not like was the reduced navigational speed because of short distances between the intermediate points and the target range around the intermediates.
CatmullRom2 sets an imaginary target as projection from the copter position through the intermediate point in a distance equal to the waypoint target. Target range is the distance from intermediate point to imaginary target.
Here is an output from my calculation tests, 4 waypoints arranged in a square, flown are two diagonals and two perimeters.
blue – strait connection
red – Catmull-Rom
yellow – projections to imaginary target, will not be flown
- calculation test
- 4Waypoints_CatmullRom.jpg (134.21 KiB) Viewed 19629 times
For the tests I let the mission work in an infinite loop. Here is a video , all waypoints are CatmullRom, at about 1:10 I switch from CatmullRom1 to 2.
- extracted kml
- 4Waypoints_CatmullRom.kml.jpg (64.06 KiB) Viewed 19629 times
If there is interest to have that in AutoQuad I will pass the source code to a core developer and give any help I can for integration.