Softivation

Mission speed won't change in Mission Planner: check the columns

If mission speed won't change in Mission Planner, check, in order, the Type and Speed boxes on the DO_CHANGE_SPEED line, the m/s unit, short legs and mode switches.

Furkan IŞIKAY 6 min read

You've added the DO_CHANGE_SPEED line on the Plan screen and written the mission, but the drone still flies at the same speed. Or the speed holds on one leg and goes back to its old value on the next.

Most of the time the problem lies in what you wrote in which box of the line and how the mission is built. If you do the five checks below in order, you'll find why the speed doesn't change in a few minutes. The numbers given are for ArduCopter 4.7.2.

Which leg the speed line takes effect on

In a mission, the DO_CHANGE_SPEED line changes the speed. It's a DO line: it runs when the waypoint above it completes and applies to the legs from that point on.

Think of the payload drop task at TEKNOFEST. If you want to slow down while approaching the target, you put the speed line right below the waypoint before the target. When the drone reaches that point, it slows down and flies the target leg at low speed.

Writing the speed in the wrong box

In a Copter mission, the first column of the DO_CHANGE_SPEED line is headed Type (0:horiz,2:up,3:down), and the second Speed m/s. If you write the speed in the first box out of habit, the line becomes Type 5, Speed 0.

The autopilot runs this line, but since the speed is zero, it changes nothing. The message saying the line ran still appears in the Messages tab, which is why the mistake goes unnoticed.

Type 2 changes only the climb speed, and Type 3 only the descent speed. For horizontal speed, leave Type at 0; Copter treats 0 and 1 the same.

The speed box's unit is m/s

In ArduCopter 4.7, the mission's default speed is the WP_SPD parameter. Its unit is m/s and its default is 10. In older versions this was WPNAV_SPEED, in cm/s. When you update the board, the firmware divides the old value by 100 and moves it to WP_SPD.

The speed in the mission line is in m/s too. If you write 500 out of old habit, the autopilot takes it as 500 m/s and doesn't clip it to an upper limit. The drone can't reach that speed, but instead of the slow flight you expected, it flies at the highest speed its frame and tilt limit allow.

If the leg is short, the speed never builds up

If the waypoints have a wait (Delay), the drone stops at each one and accelerates from zero on the next leg. Acceleration is limited by WP_ACC (default 2.5 m/s²). On a short leg, the drone starts braking before it reaches the target speed.

How fast the drone can get on a stop-and-go leg

Top speed reached by leg length
Where to look: on legs shorter than 80 m, the dot can't reach the dashed line. Changing the speed line doesn't fix this.

In the figure, the drone reaches at most 4.2 m/s on a 20 m leg and 6.9 m/s on a 40 m leg, and only settles on the 10 m/s dashed line at 160 m. That's why writing 8 in the speed line makes no difference in a mission with waypoints every 30 meters.

Leaving the mode and coming back resets the speed

If you switch to LOITER from the transmitter mid-mission and go back to AUTO, the mission resumes from the line where it left off. The autopilot, however, clears the speed you set with DO_CHANGE_SPEED, and the drone flies at WP_SPD: on a 5 m/s leg, speed rises to 10 m/s after you switch back.

RTL doesn't use the mission speed either. If RTL_SPEED_MS is 0, the drone returns home at WP_SPD.

If you might switch modes on a leg that should be flown slowly, set the speed with WP_SPD. The speed in the mission line is cleared when you switch back; WP_SPD stays.

Fix: a sample mission with the speed written correctly

Save the text below as hiz_testi.waypoints and load the mission from file on the Plan screen. Change the coordinates to match your own field. Line 3 sets the horizontal speed to 5 m/s.

Mission filehiz_testi.waypoints
QGC WPL 110
0	1	0	16	0	0	0	0	37.1591	38.7969	500	1
1	0	3	22	0	0	0	0	0	0	20	1
2	0	3	16	0	0	0	0	37.1608966	38.7969	20	1
3	0	3	178	0	5	0	0	0	0	0	1
4	0	3	16	0	0	0	0	37.1626932	38.7969	20	1
5	0	3	20	0	0	0	0	0	0	0	1

The columns on each line are, in order: index, current, frame, command, four parameters P1 to P4, latitude, longitude, altitude, autocontinue. 178 is the DO_CHANGE_SPEED command. P1 is the Type box and P2 the Speed box. When you open it in Mission Planner, you should see Type 0, Speed m/s 5 on line 3.

What you'll see

If you write the mission and switch to AUTO, these messages arrive in the Messages tab:

Output
Mission: 1 Takeoff
Mission: 2 WP
Reached command #2
Mission: 3 ChangeSpeed
Mission: 4 WP
Reached command #4
Mission: 5 RTL

The groundspeed on the Quick tab drops to 5.0 after passing waypoint 2 and stays there until waypoint 4. When RTL starts, the drone accelerates back to WP_SPD.

Error Messages

Mission: 3 ChangeSpeed

It says the line started, not that the speed changed. If the Speed box is 0 or negative, the autopilot does nothing on this line. Open the line and look at the second column.

Auto mission changed, restarted command

Appears when you edit and rewrite the mission while the drone is flying in AUTO. The autopilot restarts the waypoint command it's flying at that moment.

Auto: Missing Takeoff Cmd

If you switch to AUTO while the drone is on the ground and armed, and the mission's first navigation command isn't TAKEOFF, this message appears and the mode doesn't change. Putting the speed line at the top causes no problem; putting the first waypoint before TAKEOFF does.

Managing mission speed from start to finish

You'll find the mission table columns and route planning step by step in the Mission Planner from Scratch course. The lesson on this topic covers the order in which the autopilot processes the speed line, how to tell from the log why the speed didn't hold, and the PX4 equivalent.

Was this article helpful?

Free resourceTEKNOFEST UAV software readiness checklistCheck off your team's software readiness stage by stage on a printable list.