1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-07-01 17:43:02 +00:00

Fix warning raised by clang-tidy check cert-flp30-c

Loop induction expression should not have floating-point type
This commit is contained in:
Carles Fernandez 2019-08-16 15:37:39 +02:00
parent e89a92469b
commit 0066d581a1
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -452,13 +452,15 @@ void geph2pos(gtime_t time, const geph_t *geph, double *rs, double *dts,
x[i] = geph->pos[i]; x[i] = geph->pos[i];
x[i + 3] = geph->vel[i]; x[i + 3] = geph->vel[i];
} }
for (tt = t < 0.0 ? -TSTEP : TSTEP; fabs(t) > 1e-9; t -= tt) tt = t < 0.0 ? -TSTEP : TSTEP;
while (fabs(t) > 1e-9)
{ {
if (fabs(t) < TSTEP) if (fabs(t) < TSTEP)
{ {
tt = t; tt = t;
} }
glorbit(tt, x, geph->acc); glorbit(tt, x, geph->acc);
t -= tt;
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
{ {