Controlling reference speed (advanced controll)

Hi, i’m in need of controlling the speed such that it follows an oscillating signal. That is, i would like the speed to follow something like V_a =10 + sin(t).

I am familiar with the ‘do_change_speed’ command. However, i would need to call this command at a fixed time frequency.

Any suggestion of how i could achieve this?

lua scripting is your friend!!

1 Like

To expand on what Amilcar said, the MAVLink message that you are wanting to use is detailed here and the Lua function is mission.set_item(). The documentation for that function isn’t up yet. So poking around in AP_Mission will show you what the inputs are. Also checking out the Lua function description file will provided some help too.