Mavlink communication to send MOCAP data from Arduino to Pixhawk 4

I have an Arduino Due receiving MOCAP data streams via an Xbee and want to sent this data to a Pixhawk 4. I have connected the Arduino to the TELEM2 serial port and have successfully received Heartbeat messages. However, I can never get the Pixhawk to receive the VISION_POSITION_ESTIMATE message that I encode with the information. I use the following script to encode the message:

mavlink_msg_vision_position_estimate_pack(1, 100, &msgPos, micros(), xPos, yPos, zPos, roll, pitch, yaw, covariance, 0);

where msgPos is the mavlink message object. Is this the correct manner or is there another way of doing it or should I just try it with mavros?