Moving using distance information in meters

Hey there! In the last month i tried to study ArduPilot codebase in order to develop a new mode (something like the auto mode) where the drone moves to a specific point. It should read 3 numbers that represent the distance in meters from the home point in a NED reference (i.e. a txt with “10 -5 -8” means the drone should go 10mt North, 5mt West and 8 Up).
I cannot figure out whether there is a easy way to implement this or not. Is it possible to implement this using mavlink commands?

I’m a newbie here, so please link me some lessons or the functions/.cpp to study.

Thanks in advance for your help.

Companion computer and Guided mode. No need to change any AC code.

1 Like

Just keep reading the documentation, the existing code already does all you need. The mavlink commands to do that already exist, so just use them. No need to change the autopilot’s source code.

1 Like

@xfacta @amilcarlucas thanks for replying.

I took a quick look at mav commands in guided mode. SET_POSITION_TARGET_LOCAL_NED and its conditions seem to be the right one to move the drone, isn’t it?.
So if I want to send it manually I should establish a connection with the controller (a PixHawk 4) and send it with the right parameters, right?

yeap. There is lots of documentation on how to do it.

1 Like