Fix terrasync parsing of atlas messages
This commit is contained in:
parent
46d381cc87
commit
cde8b0c54a
1 changed files with 7 additions and 1 deletions
|
@ -243,8 +243,14 @@ static void parse_message( const string &msg, int *lat, int *lon ) {
|
|||
|
||||
// find GGA string and advance to start of lat
|
||||
string::size_type pos = text.find( "$GPGGA" );
|
||||
if ( pos == string::npos )
|
||||
{
|
||||
*lat = -9999.0;
|
||||
*lon = -9999.0;
|
||||
return;
|
||||
}
|
||||
string tmp = text.substr( pos + 7 );
|
||||
pos = text.find( "," );
|
||||
pos = tmp.find( "," );
|
||||
tmp = tmp.substr( pos + 1 );
|
||||
// cout << "-> " << tmp << endl;
|
||||
|
||||
|
|
Loading…
Reference in a new issue