Mavlink messages from pc to raspberry pi

hi, hope doing good.

i am trying to send mavlink data of a sitl which is running in one pc to raspberry pi 3b+ model. in simple, i want to get the lat,long,alt data of a px4 sitl(in pc) and send it to raspberry pi.

my raspberry pi and pc both are connected in same network (using ethernet splitter to connect both pc and raspberry pi).

i get to know that the mavlink router is something that is used to send data to any network. but still i could not figure it out.

And in raspberry pi end, i want to use mavsdk c++ to get those data send by the mavlink router(pc).

please help me on the same…
thanks in advance.

From Rasperry side a mavlink connection should wait for a mavlink stream from a specific port. If you route the mavlink stream with mavlink router to this port your connection is established. You can check this page to understand how to use connection string in mavsdk to listen the mavlink stream. Connecting to Systems (Vehicles) · MAVSDK Guide
If you encounter with a specific error please share it. But you are right the most suitable way I think is mavlink-router.