Sending gps data from Ros 2 to PX4 via Micro XRCE-DDS

Hi everyone! I am a total newbie and in need of help. I know some of my questions may have been answered here before and I have searched for them but am still unsure of what I am doing. I am a student and currently working on a research project where I am in charge of flying a drone indoor that should be getting its GPS location from opti track cameras. I have the gps coordinates from opti track and am trying to send this data to the PX4 Flight controller to update the drone gps location. I am trying to send this information via ROS2 Micro XRCE-DDS client. This is being done on a pi 3 with ubuntu server 22.04 lts that will be physically attached and wired to the Pixhawk. A few of my questions are:

  1. Does it sound like Im going about this in the right way? Can the Micro XRCE-DDS do what I am looking for
  2. Does the PixHawk firmware need to be changed to get the client on the PixHawk? I am unsure of how I am supposed to get the firmware onto the controller or if it comes default
  3. What is the best way to go about connecting ROS2 to the Pixhawk controller and updating the drones gps location - is there a tutorial somewhere or suggestions on how to complete this

Thank you all I have attached a picture of my pixhawk controller for reference