Dear ardupilot community,
Thank you all for your amazing work.
I have a new question for you and I thank you in advance for any help.
I want to be able to set a target position on Lat, Lon coordinates while at the same time control the altitude with velocity.
I’ve managed to control the position and the Z-velocity separatly but I’m not sure on how I should do this together.
I have tried to set a Lat, Lon position with a x and y-velocity to zero but in this case the drone doesn’t move in the xy direction:
mli.SendSetPositionTargetGlobalInt(0, 5, 0b0000111111111111, D_Lat, D_Lon, alt, 0, 0, -1, 0, 0, 0, 0, 0);
I have also tried to first set the position and then play with the velocity (still with x and y velocity to zero) but the moment I send the second command, the desired position is updated to the actual position (which isn’t exactly D_Lat and D_Lon):
1: mli.SendSetPositionTargetGlobalInt(0, 5, 0b0000111111111000, D_Lat, D_Lon, alt, 0, 0, 0, 0, 0, 0, 0, 0);
2: mli.SendSetPositionTargetGlobalInt(0, 5, 0b0000111111000111, D_Lat, D_Lon, alt, 0, 0, -1, 0, 0, 0, 0, 0);
Does anyone know if there is a way to do this ?
I’ll continue digging into the source code but if there is already someone with an answer somewhere it will help me a lot.
Thanks again,
Regards.