GPS RTCM data not recognized by F9P chip/u-center

Hello,

I`m trying to receive to use a Pixhawk together with a simpleRTK2B board and an online NTRIP service. My plan is to receive the NTRIP data on a companion computer and send the RTCM data via MAVSDK to the Pixhawk. The Pixhawk should then send the data automatically to the simpleRTK2B’s F9P chip and thereby create an RTK fix.

My current setup is using the NTRIP client from MAVProxy and I convert the rtcm data as described here.

from ntrip import NtripClient
import sys
import asyncio
from mavsdk import System
from mavsdk.rtk import RtcmData
from pyrtcm import RTCMReader

async def send_to_px4(raw_rtcm_data):
    msg = RTCMReader.parse(raw_rtcm_data)
    print(msg.identity)
   
    drone = System(mavsdk_server_address='localhost', port=50051)
    await drone.connect()
    await drone.rtk.send_rtcm_data(RtcmData(str(raw_rtcm_data)))

if __name__ == '__main__':
    n = NtripClient( user="username",
                     port=2101,
                     caster="casterip",
                     mountpoint="mountpoint",
                     lat=48,
                     lon=12,
                     height=0,
                    );

    for raw_rtcm_data in n.readLoop():
        asyncio.run(send_to_px4(raw_rtcm_data))

I changed this line in the NTRIP client to yield return the data instead of printing it.

    def readLoop(self):
        while True:
            data = self.read()
            if data is None:
                continue
            else:
                yield data

The RTCM data is received by the Pixhawk and forwarded to the simpleRTK which I can see by connecting to the simpleRTK via u-center, however the data can`t be parsed and is labeled as unknown.
ucenter-unknown

Now it could be that I somehow misconfigured the simpleRTK board, but to find that out I was trying to follow the RTCM data and see if it gets mixed up somewhere.
My first step was to look at the gps_inject_data message using QGroundControl`s MAVLink Console. When viewing the data there, I was not able to find any relation between the data I sent to the PixHawk and the data printed out there.


The data i sent started with 211, 0, … and I found no match somewhere in the array.

Now my question is if I am parsing the data correctly and if the way I check the data is even correct. I would also be interested what the “flags” parameter in the message means exactly as this was the only thing changing at some times.

Please let me know if you need any further data or description of what I tried so far as I might have forgotten something.

Greetings,
Andy

Did you manage it to get to work, I have similar issues, the rtk fix just doesn’t happen. send_rtcm_data is not complaining anything, data goes to PX4 but nothing happens

I wonder if RtcmData(str(raw_rtcm_data)) is the right approach. Shouldn’t it be bytes instead of str?