mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-05 14:17:20 +08:00
Fixed missing heading for mtkcustom and nmea
This commit is contained in:
+1
-1
@@ -128,7 +128,7 @@ int mtk_parse(uint8_t b, char *gps_rx_buffer)
|
||||
mtk_gps->eph = packet->hdop;
|
||||
mtk_gps->epv = 65535; //unknown in mtk custom mode
|
||||
mtk_gps->vel = packet->ground_speed;
|
||||
mtk_gps->cog = 65535; //unknown in mtk custom mode
|
||||
mtk_gps->cog = (uint16_t)packet->heading; //mtk: degrees *1e2, mavlink/ubx: degrees *1e2
|
||||
mtk_gps->satellites_visible = packet->satellites;
|
||||
|
||||
/* convert time and date information to unix timestamp */
|
||||
|
||||
@@ -214,7 +214,7 @@ void *nmea_loop(void *args)
|
||||
nmea_gps->eph = (uint16_t)(info->HDOP * 100); //TODO:test scaling
|
||||
nmea_gps->epv = (uint16_t)(info->VDOP * 100); //TODO:test scaling
|
||||
nmea_gps->vel = (uint16_t)(info->speed * 1000 / 36); //*1000/3600*100
|
||||
nmea_gps->cog = 65535;
|
||||
nmea_gps->cog = (uint16_t)info->direction*100; //nmea: degrees float, ubx/mavlink: degrees*1e2
|
||||
nmea_gps->satellites_visible = (uint8_t)info->satinfo.inview;
|
||||
|
||||
int i = 0;
|
||||
|
||||
Reference in New Issue
Block a user