Merge pull request #83 from juribeparada/master

Fix for latitude sign of GPS data
This commit is contained in:
Jonathan Naylor 2017-03-22 05:40:56 +00:00 committed by GitHub
commit 0521b82e24

View file

@ -179,10 +179,10 @@ void CGPS::transmitGPS(const unsigned char* source)
return; // error/unknown
int lat_dir;
unsigned char b = m_buffer[6U] & 0xF0U; // currently a guess
if (b == 0x30U)
unsigned char b = m_buffer[8U] & 0xF0U; // currently a guess
if (b == 0x50U)
lat_dir = 1; // N
else if (b == 0x50U)
else if (b == 0x30U)
lat_dir = -1; // S
else
return; // error/unknown