Fixed missing heading for mtkcustom and nmea

This commit is contained in:
Julian Oes 2012-11-30 14:26:03 -08:00
parent 3de3b58505
commit 6f572637de
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ int mtk_parse(uint8_t b, char *gps_rx_buffer)
mtk_gps->eph = packet->hdop; mtk_gps->eph = packet->hdop;
mtk_gps->epv = 65535; //unknown in mtk custom mode mtk_gps->epv = 65535; //unknown in mtk custom mode
mtk_gps->vel = packet->ground_speed; 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; mtk_gps->satellites_visible = packet->satellites;
/* convert time and date information to unix timestamp */ /* convert time and date information to unix timestamp */

View File

@ -214,7 +214,7 @@ void *nmea_loop(void *args)
nmea_gps->eph = (uint16_t)(info->HDOP * 100); //TODO:test scaling nmea_gps->eph = (uint16_t)(info->HDOP * 100); //TODO:test scaling
nmea_gps->epv = (uint16_t)(info->VDOP * 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->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; nmea_gps->satellites_visible = (uint8_t)info->satinfo.inview;
int i = 0; int i = 0;