Read GPS Data by miniPC

Dear all,
I want to read pixhawk’s GPS data by an odroid xu4 minipc to lable aerial images by gps coordinates for a localization problem. Also I want its coordinate for validating my algorithm in the test scenario.

In the algorithm I read the gps by serial port and send back it to the pixhawk module (my minipc acts like an interface between pixhawk and gps moduls). The problem is pixhawk doesnot know any gps connection! At the first of connection,at least, I can read gps data by baudrate 9600 but it seems after a few second these two module are changing their baudrate! So neither my odroid nor pixhawk can read gps data.
I know this scenario is previously done throw mavlink. Is there any trick to solve the problem?

You might be seeing that PX4 reconfigures uBlox GPS to a certain baudrate and message rate, etc…

Instead of putting yourself between GPS and Pixhawk I would just connect the GPS directly to the Pixhawk (because it will give you the best performance) and then use MAVLink to communicate with the Pixhawk. I’d suggest to use MAVSDK as an easy way to receive the GPS position from the Pixhawk via MAVLink.