Merge pull request #85 from julianoes/hotfix_gps_heading

Fixed missing heading for mtkcustom and nmea
This commit is contained in:
px4dev
2012-12-01 22:52:59 -08:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 */
+1 -1
View File
@@ -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;