1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-07 16:02:51 +02:00

Added support for NMEA files

This commit is contained in:
2016-11-16 23:54:15 +01:00
parent e9e7660beb
commit 535361dada
9 changed files with 491 additions and 28 deletions

View File

@ -1,4 +1,5 @@
#include <cmath>
#include <cctype>
#include "misc.h"
@ -33,3 +34,17 @@ double niceNum(double x, int round)
return nf * pow(10.0, expv);
}
int str2int(const char *str, int len)
{
int res = 0;
for (const char *sp = str; sp < str + len; sp++) {
if (::isdigit(*sp))
res = res * 10 + *sp - '0';
else
return -1;
}
return res;
}