Time Synchronisation for MAVLink Sensor/ Companion Computer

Hi.
I’m looking for a way to integrate a sensor (in my case a radar - which can be understood like a companion computer since i have a system with a linux kernel running) via MAVLink into PX4. To handle the MAVLink messages (distance_sensor) might be the easy part by following this guide mavlink interface example - I had no problems to get my sensor information published into uORB.
Now I’m struggling with the synchronisation of my timebases - time synchronisation is implemented in PX4 and also in MAVROS but it seems that there is no standard way of getting a synced timebase for a simple companion computer (without ROS)?

Maybe I’m completely wrong with trying to integrate a sensor via MAVLink, but ROS is too heavy for my radar/companion computer and beside of that it would be an overkill since I would only use the MAVROS node for time sync and communication. I wonder that there is no standard solution for that since connecting a companion without ROS seems to be a standard configuration (Companion Computer connected via MAVLink.

Thanks for any answers!

1 Like

Hi,
Did you manage to get this working @eggchr ?
I just wanted to implement this on a MCU. I have been reading the PX4 code and the MAvros , but I do not get the idea. How has to be implemented and how does it work.
Can somebody help me?