Mavlink message for offboard control

Hello everybody,

I would like your opinion regarding a project I am trying to achieve.
I have a drone equipped with a pixhawk and a raspberry Pi 3, the two are linked in order to create an autonomous flight mode. I generate mavlink messages from raspberry, the code is in C.

Let me explain, I would like to be able to fly the drone using Mavlink messages. I have already done some research and I came across the messages MAV_LOCAL_POSITION_NED and MAV_GLOBAL_POSITION_INT, but I would like to be able to give a relative displacement order which does not depend on the NED convention.
For example, I would like to be able to give the order to move the drone X meters to the right (of the drone) without taking care the NED orientation.

I could see that you could use MAVSDK except that my code is in C, and that MAVSDK is available in C ++. Do you have any alternatives for or ideas for making this movement?

Thank you for your help

You can look at this implementation at reference:

Thanks for your link, but i can’t seem to figure out how you build your mavlink messages and which types of messages are used (i’m not comfortable with c ++).

I use mavros for that application. If you don’t want to use cpp, there are alot of different options such as mavsdk-python / mavsdk-java etc

You can look at

Yes I saw that you could use mavros or MAVSDK, but precisely I would like to implement my code in C without going through an SDK or ROS. I use functions from this directory ( when creating my message and going directly through a UDP link. I already use this method to program proximity sensor messages.
Here my problem is that I have trouble identifying the MAVlink messages ( to use/build in order to be able to control the movement of a drone in the manner of set_velocity_body with MAVSDK (

I don’t know if I’m clear but thanks for your help

I finally decide to use ATTITUDE message in order to control manually the drone movement :
And I will use the C "library “:” to generate Mavlink messages from the raspberry.

Thank you for your help