"type" parameter (the first parameter) in MavLink DO_CHANGE_SPEED command

Making a simple photo survey mission with the Mission Planner Auto WP tool, (the first I’ve made in quite a while) I noticed that the DO_CHANGE_SPEED command (MavLink 178) has a new parameter - “type.”

This parameter sets the type of speed - and the default value, “0” is airspeed. Obviously - a questionable choice for a quad-copter.

I’ve got a couple of questions:

  1. What does the copter firmware do when it sees a value of “1” for this parameter?

  2. There was a bug with the DO_CHANGE_SPEED command that required a work-around - it had to be placed after a waypoint to take effect. Has this been fixed?

  3. TAKEOFF command (MavLink 22) also has a similar first parameter - “pitch.” The Mission Planner Auto WP for survey maps puts a value of “20” in this first parameter - and it appears to be ignored. The description of the MavLink commands suggests that this command (or how it’s processed) is ignored if no airspeed sensor is present. I’m not sure how the copter firmware handles it - but it appears to ignore it. If so - it’s possible that copter ignores “type” for DO_CHANGE_SPEED as well.

If someone knows off hand - it would be nice to have more information about this. I know it’s a chore to peak at the code to find out, but if that’s necessary, I’d really appreciate the effort.

Thank you!

I just run the scenarios in the Simulator and figure out what it does if I don’t know.

  1. It uses Groundspeed from GPS I suppose as there is no other speed sensor. 0 and 1 in the Type field produce the same result.
  2. I have never used a DO_CHANGE_SPEED command before any waypoints but one placed after the Takeoff command and before the 1st Waypoint did not change speed from the default set by WPNAV_SPEED.
  3. If you Plan a Mission from Copter then there is no Pitch Angle field. Only when planning from Plane will that be available.
2 Likes

Thanks for taking a look at this.

I didn’t see a fix in the release notes, but there was a problem a release or two ago with do_speed_change. The work around was to put it after a waypoint. I’ve reached out about this - just to find out. But if I need to stay with the work around, it’s not too much of a problem.

Thanks Dave.

Yea, I tried that and it didn’t work. I always place a Waypoint for a speed change. For the initial mission speed I typically use WP Speed on a Tune pot. You can adjust the speed that way for the entire Mission if you are within RC Range.

1 Like

Nice trick man! But about topic 2 above, it should change the speed if you place the command after a wp… it’s weird it didn’t work with you.

Hi Bruno-That did work. It didn’t work when placed after Takeoff and before the 1st WP. Not sure of the usefulness in doing this anyway but tested it.

Ok, sorry for misunderstanding it man!

The dev team is working on fixing this:

2 Likes