-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
`
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
Labels
No labels