Spline Waypoints

Just a quick question for someone who may be able to shed some light.

If I prepare a mission with APM Planner2 using spline waypoints, upload the mission to my quadcopter, go to the field, download the mission into Tower from the drone, it doesn’t show the spline waypoints on the ground track on the map. However, the aircraft flies the spline waypoints just fine.

If I prepare the mission with Tower, then the spline waypoints show correctly on the ground track for the mission, and it also flies them just fine.

I currently do not have a Windows computer to try creating a mission with Mission Planner with spline waypoints to see if it does the same thing when downloaded from the aircraft to Tower.

Is this normal behavior?

@ChrisOlson Does the same behavior occur with normal waypoints?

Hi Fredia,
What I have seen is that if I create a mission in APM Planner2 and upload it to the aircraft, then download to Tower in the field, that the spline waypoints are actually shown in Tower as a squiggley line in the waypoint. But the mission’s ground track is shown as if were a normal waypoint mission. The regular waypoints show as regular, the spline waypoints show as spline. It’s just the ground track that shows a direct line between each waypoint with the spine ones, instead of the spline track.

However, when I actually fly the mission, the aircraft follows the ground track for the spline waypoints properly, regardless of how Tower shows it.

If I create the mission with Tower with spline waypoints, and upload it to the aircraft with Tower, then it shows the correct ground track for a spline waypoint. If I later download that mission created with Tower from the aircraft to APM Planner2 it also shows the correct ground track in APM Planner2.

So the issue only appears to be when a mission is stored in the aircraft’s flash, that is created with APM Planner2 and uploaded to the aircraft, and then downloaded to Tower from the aircraft prior to arming and takeoff. Like I said, I do not have a computer that can run Mission Planner at present to see if it does the same thing.

If you would like some more specifics, like some screen shots with a step by step of how to create the issue I would be glad to do that and post it for you to review.

I’ll just make a separate post for this.

Here’s an example mission created in APM Planner2 and this was uploaded to the FC.

The aircraft flew the ground track as shown in APM Planner2.

The flight was actually flown in the field withTower and when the flight plan was downloaded from the aircraft to Tower this what it looks like:

@ChrisOlson Thanks for the screenshots! Can you also provide the mission txt file. The upcoming version of Tower is able to load a mission from the same txt file as mission/apm planner, so it can be used to troubleshoot the issue.

Hi Fredia,

The text file for that flight should be attached to this post as a zip

Testing and Calibration Flight.txt.zip (479 Bytes)

Additional Comment:
There may be different math involved with the way Tower is creating spline waypoints, vs the way APM Planner2 is doing it. I created a mission in Tower using spline waypoints, uploaded it to the aircraft’s FC. Then download the mission from the aircraft to APM Planner2. The ground track is totally different in APM Planner2 vs what was created in Tower. I am not sure which ground track the aircraft will actually fly. I will test that and post the results.

Also, just so we are not chasing in circles, I am using AC3.2.1 with APM flight controller. There may have been changes in the code in later versions that is causing the discrepancy I am seeing.

@ChrisOlson Your last comment was correct. We’re using different math to create the ground track for spline waypoints. The logic in Tower is more limited and requires at least three consecutive spline waypoints to draw the ground track correctly.

I suspected that. And that’s understandable. I’m curious to see how the aircraft follows the ground track with a spline waypoint mission created with Tower, even though it shows different in APM Planner2 when downloaded to that application. I suspect it will fly it just as it was created and shows in Tower, but still want to verify that. We have 18-20kt wind here today with gusts to 25-30, so not the ideal day to test such a thing.

Aug 23, 2016:
I created a figure 8 flight, 1/2 mile long from one end of the figure 8 to the other in Tower. Flew it at 5 m/s the first time and the aircraft followed the exact flight path shown on the Screen in Tower. Loaded that flight into APM Planner2 from the aircraft and played back the telemetry log from the Android tablet/Tower in APM Planner2. There was no difference in APM Planner2.

The second time I flew that flight at 20 m/s. The flight controller decelerates the aircraft due to the horizontal accel limits in the turns of the figure 8. But flying down the chute on the straight parts it gets up to 45 mph, and then the flight path doesn’t precisely follow the track shown in Tower on the turn, as the flight controller slows the aircraft for the corner and keeps the G’s within set limits on the turn. It was a pretty tight turn with about a 30 foot radius like pylon racing, and the flight controller modified the flight path a little. It was only maybe 10-15 feet off, and if I would crank up the WPNAV_ACCEL param and let it pull a few more G’s it would’ve followed it precisely.

So it worked perfectly going from Tower to the aircraft, and then to APM Planner2.

Great to hear! Does APM Planner 2 reflects the correct ground track for the second faster flight?
I’m curious to know if there’s a way to improve the spline path based on the vehicle speed.

Fredia, with the mission created in Tower here, then uploaded to the aircraft, and subsequently downloaded to APM Planner2, both software applications agreed on what the flight path should be.

The flight I flew had extremely tight turns that were not possible to make at 20 m/s flight speed and 150cm/sec^2 horizontal acceleration limit. I did that to see what it would do.

The default speed in Tower for a mission is 5 m/s. When it draws the spline turns it doesn’t know what the aircraft’s horizontal accel limit is set to until it connects to the aircraft and downloads the params. So, for instance, if you create a mission with a speed of 20 m/s and there’s a 90 deg spline waypoint turn that would require 0.5G of accel, but the WPNAV_ACCEL is set to 50 cm/sec^2, what’s it going to do?

At this point, I don’t think there’s a problem at all with the Ground Station application. It simply creates a flight with a ground track based on what you tell it to do because that’s where you want the aircraft to fly. If the aircraft is not capable of flying that ground track, either due to aircraft limitations, or settings you have made in the params, it is up to the flight controller or pilot to compensate for that.

I have to create another high speed mission with impossible parameters for horizontal acceleration on several turns and see what it does, to verify what I think it will do.