1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

Fix -Wmisleading-indentation warning

This commit is contained in:
Carles Fernandez 2017-07-23 23:40:40 +02:00
parent 45ef1db39e
commit 1dda344e46
2 changed files with 20 additions and 5 deletions

View File

@ -1170,7 +1170,11 @@ double str2num(const char *s, int i, int n)
char str[256], *p = str; char str[256], *p = str;
if (i<0 || (int)strlen(s)<i || (int)sizeof(str)-1<n) return 0.0; if (i<0 || (int)strlen(s)<i || (int)sizeof(str)-1<n) return 0.0;
for (s += i; *s && --n >= 0; s++) *p++=*s == 'd' || *s == 'D' ? 'E' : *s; *p = '\0'; for (s += i; *s && --n >= 0; s++)
{
*p++=*s == 'd' || *s == 'D' ? 'E' : *s;
}
*p = '\0';
return sscanf(str, "%lf", &value) == 1 ? value : 0.0; return sscanf(str, "%lf", &value) == 1 ? value : 0.0;
} }
@ -1188,7 +1192,11 @@ int str2time(const char *s, int i, int n, gtime_t *t)
char str[256], *p = str; char str[256], *p = str;
if (i<0 || (int)strlen(s)<i || (int)sizeof(str)-1<i) return -1; if (i<0 || (int)strlen(s)<i || (int)sizeof(str)-1<i) return -1;
for (s += i; *s && --n >= 0;) *p++=*s++; *p = '\0'; for (s += i; *s && --n >= 0;)
{
*p++=*s++;
}
*p = '\0';
if (sscanf(str, "%lf %lf %lf %lf %lf %lf", ep, ep+1, ep+2, ep+3, ep+4, ep+5)<6) if (sscanf(str, "%lf %lf %lf %lf %lf %lf", ep, ep+1, ep+2, ep+3, ep+4, ep+5)<6)
return -1; return -1;
if (ep[0]<100.0) ep[0] += ep[0]<80.0 ? 2000.0 : 1900.0; if (ep[0]<100.0) ep[0] += ep[0]<80.0 ? 2000.0 : 1900.0;

View File

@ -585,7 +585,11 @@ void udpos(rtk_t *rtk, double tt)
return; return;
} }
/* check variance of estimated postion */ /* check variance of estimated postion */
for (i = 0;i<3;i++) var += rtk->P[i+i*rtk->nx]; var/=3.0; for (i = 0;i<3;i++)
{
var += rtk->P[i+i*rtk->nx];
}
var /= 3.0;
if (var>VAR_POS) if (var>VAR_POS)
{ {
@ -1178,8 +1182,11 @@ int constbl(rtk_t *rtk, const double *x, const double *P, double *v,
/* approximate variance of solution */ /* approximate variance of solution */
if (P) if (P)
{ {
for (i = 0;i<3;i++) var+=P[i+i*rtk->nx]; for (i = 0;i<3;i++)
var/=3.0; {
var += P[i+i*rtk->nx];
}
var /= 3.0;
} }
/* check nonlinearity */ /* check nonlinearity */
if (var>thres*thres*bb*bb) if (var>thres*thres*bb*bb)