How can i use POSITION_TARGET_GLOBAL_INT in c++

i encode and sent it to drone, but it doesn’t move at all.

Show what are you trying to do, share the script/code, checkout on mavproxy for the command acknowledgement if its throwing any error

it will only work if the drone is flying and in guided mode.

yes i’m already change it into GUIDED Mode But it fly to wrong direction and not stop at all.

This is my code
mavlink_message_t msg;
mavlink_set_position_target_global_int_t set_pos;
set_pos.time_boot_ms = time_stamp;
set_pos.target_system = 1;
set_pos.target_component = 0;
set_pos.coordinate_frame = 6;
set_pos.type_mask = 65528;
set_pos.lat_int = 13918234;
set_pos.lon_int = 1006307209;
set_pos.alt = 5;
mavlink_msg_set_position_target_global_int_encode(1 , 255 ,&msg ,&set_pos);
uint8_t data_buff_send[MAVLINK_MAX_PACKET_LEN];
uint16_t len = mavlink_msg_to_send_buffer(data_buff_send, &msg);
socket->write((const char*)data_buff_send,len);