I have a companion computer (raspberry pi) connected to a flight controller through a serial connection. I’m using mavlink router to make this serial connection accessible to a python script running on the companion computer, as well as a ground station that’s connected to the same wifi network as the companion computer by using the following command:
mavlink-routerd -e 192.168.0.135:14550 -e 127.0.0.1:14540 /dev/serial0:921600
I would like to have the python script receive attitude messages at a rate of 50 Hz, and the ground station receive attitude messages at a lower rate (4 Hz) to save wifi bandwidth. I get the feeling this is not possible to do using only one serial connection, but wanted to check.
Currently, if I run only the python script, it successfully receives the attitude message at 50 Hz. Once I connect the ground station, it requests the same message at 4 Hz, and both the ground station and the python script then receive attitude messages at 4 Hz.
Is there any way to route the same message at different rates using only one serial port? Thanks.