#include <ctype.h>
#include <time.h>
#include <string.h>
+#include <stdlib.h>
static uint32_t tokenToInt(const char *s, int precision)
int ns;
if (*phem == 0)
- {
return 0;
- }
-
/* north lat is +, south lat is - */
if (*phem == 'N')
- {
ns = 1;
- }
else
- {
ns = -1;
- }
return ns * convertToDegree(plat);
{
int ew;
+ if (*phem == 0)
+ return 0;
+
/* west long is negative, east long is positive */
if (*phem == 'E')
- {
ew = 1;
- }
- else {
+ else
ew = -1;
- }
-
- if (*phem == 0)
- {
- return 0;
- }
return ew * convertToDegree(plot);
}
uint32_t alt;
if (*palt == 0)
- {
return 0;
- }
alt = atoi(palt);