Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data format to use RTK Plugin to forward RTCM messages #176

Open
lukask0ch opened this issue Aug 16, 2024 · 3 comments
Open

Data format to use RTK Plugin to forward RTCM messages #176

lukask0ch opened this issue Aug 16, 2024 · 3 comments

Comments

@lukask0ch
Copy link

Hi, I'm trying to use MAVSDK-Java to send RTCM messages coming from an NTRIP Provider to a PX4 Drone with a F9P uBlox GPS Receiver. I get this data as a byte array and need to convert it to a string to send it with the sendRtcmData() function.
The data is being sent and I can see it arriving in QGroundControl. However, the GPS status is still 3d lock and not going to RTK. I assume the data conversion to string is wrong. I also tried Base64 encoding, as posted here mavlink/MAVSDK#2352. But from what I can see, the MAVSDK version used in the Java wrapper is not using Base64 encoding yet, as it has been implemented only recently mavlink/MAVSDK#2332.
What encoding type is needed to successfully send this data?

MAV_RTK = new Rtk("127.0.0.1",14551);
MAV_RTK.initialize();
byte[] data; // coming from ntrip
Rtk.RtcmData rtkData = new Rtk.RtcmData(new String(data, StandardCharsets.UTF_8));
MAV_RTK.sendRtcmData(rtkData).subscribe();

Using MAVSDK-Java 2.1.0 and PX4 v1.15.0Beta

@julianoes
Copy link
Contributor

You need to stick with the latest MAVSDK release if that worked. Once you update to a newer mavsdk_server (v3) which exposes the field as base64, you will have to update the Java wrapper/example. That's just how breaking releases work in my mind.

@lukask0ch
Copy link
Author

Thanks for your answer. The current Mavsdk-Java version 2.1.0 still wants a string. And I don't know how to convert it correctly. The ublox F9P does not understand the message, as shown in u-center. There was the same discussion with this on the python wrapper before (mavlink/MAVSDK-Python#491), but no clue how to do it on java, since binary data just can not be simply stored in a string.

u-center

@julianoes
Copy link
Contributor

Right, so it just doesn't work until v3 is out and fixes it. Sorry about that.

If you're blocked by this, consider throwing something in the hat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants