forked from Archive/PX4-Autopilot
Fixed missing heading for mtkcustom and nmea
This commit is contained in:
parent
3de3b58505
commit
6f572637de
|
@ -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 */
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue