Skip to content

Commit

Permalink
AP_GPS: add RTKT and RTKR messages
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Sep 28, 2024
1 parent 12a89ba commit ee29a94
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libraries/AP_GPS/AP_GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,7 @@ bool AP_GPS::parse_rtcm_injection(mavlink_channel_t chan, const mavlink_gps_rtcm
const uint32_t crc = crc_crc32(0, buf, len);

#if HAL_LOGGING_ENABLED
AP::logger().WriteStreaming("RTCM", "TimeUS,Chan,RTCMId,Len,CRC", "s#---", "F----", "QBHHI",
AP::logger().WriteStreaming("RTKR", "TimeUS,Chan,RTCMId,Len,CRC", "s#---", "F----", "QBHHI",
AP_HAL::micros64(),
uint8_t(chan),
rtcm.parsers[chan]->get_id(),
Expand All @@ -1670,6 +1670,14 @@ bool AP_GPS::parse_rtcm_injection(mavlink_channel_t chan, const mavlink_gps_rtcm
rtcm.sent_idx = (rtcm.sent_idx+1) % ARRAY_SIZE(rtcm.sent_crc);

if (buf != nullptr && len > 0) {
#if HAL_LOGGING_ENABLED
AP::logger().WriteStreaming("RTKT", "TimeUS,Chan,RTCMId,Len,CRC", "s#---", "F----", "QBHHI",
AP_HAL::micros64(),
uint8_t(chan),
rtcm.parsers[chan]->get_id(),
len,
crc);
#endif
inject_data(buf, len);
}
rtcm.parsers[chan]->reset();
Expand Down

0 comments on commit ee29a94

Please sign in to comment.