Skip to content

Question: Forwarding RTCM Data with Rtk Plugin #195

@Ba0Nguyen

Description

@Ba0Nguyen

`

        val inputStream = socket.getInputStream()
        val buffer = ByteArray(512)
        var bytesRead: Int
        while (inputStream.read(buffer).also { bytesRead = it } != -1) {
            // Output the binary data
            CoroutineScope(Dispatchers.IO).launch {
                val rtcmEncodedString: String = android.util.Base64.encodeToString(buffer, android.util.Base64.NO_WRAP)
                val rtkData = RtcmData(rtcmEncodedString)
                val completable = rtk.sendRtcmData(rtkData)
                completable.subscribe({
                    Log.d("RTCM DATA Forwarding", "Forwarding Success, ${rtkData.data}")
                }, { e ->
                    Log.d("RTCM DATA Forwarding", "Forwarding Failed: error ${e.message}")
                })
            }
        }

`

Is this the correct way of forwarding RTCM Data to the drone to achieve RTK Fixed?
I got forwarding data result Success but my horizontal uncertainty and vertical uncertainty from the RawGps plugin is still very high. If I leave my FlightController in one place and not move it for 5 minutes, the position uncertainty could get down to less than 3 cm and the flight controller can achieve RTK Fixed status. My goal is to achieve RTK Fixed status at all time when RTCM data is forwarded. Do you think the way I'm forwarding RTCM Data might affect the position uncertainty? Or could it be that the data I'm getting is not very effective?

MavSDK v2.0.1 with Ardupilot v4.4.4
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions