def send_ned_velocity(velocity_x, velocity_y, velocity_z, duration):
 msg = vehicle.message_factory.set_position_target_local_ned_encode(0, 0, 0, mavutil.mavlink.MAV_FRAME_LOCAL_NED, 4039, 0, 0, 0, velocity_x, velocity_y, velocity_z, 0, 0, 0, 0, 0)
 for x in range(0, duration):
  vehicle.send_mavlink(msg)
  time.sleep(1)

def send_ned_velocity ( velocity_x , velocity_y , velocity_z , duration ) : msg = vehicle . message_factory . set_position_target_local_ned_encode ( 0 , 0 , 0 , mavutil . mavlink . MAV_FRAME_LOCAL_NED , 4039 , 0 , 0 , 0 , velocity_x , velocity_y , velocity_z , 0 , 0 , 0 , 0 , 0 ) for x in range ( 0 , duration ) : vehicle . send_mavlink ( msg ) time . sleep ( 1 )
move vehicle in direction based on specified velocity vectors and for the specified duration .