From 96174fb5442c566c2a94eb8f0a417d815590d63d Mon Sep 17 00:00:00 2001 From: OSQZSS Date: Fri, 16 Sep 2016 10:52:39 +0900 Subject: [PATCH] Fix issue #49 --- gpssim.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gpssim.c b/gpssim.c index 04cf542..a1d2f7a 100644 --- a/gpssim.c +++ b/gpssim.c @@ -938,6 +938,11 @@ int readRinexNavAll(ephem_t eph[][MAX_SAT], ionoutc_t *ionoutc, const char *fnam if (NULL==fgets(str, MAX_CHAR, fp)) break; + // PRN + strncpy(tmp, str, 2); + tmp[2] = 0; + sv = atoi(tmp)-1; + // EPOCH strncpy(tmp, str+3, 2); tmp[2] = 0; @@ -983,11 +988,6 @@ int readRinexNavAll(ephem_t eph[][MAX_SAT], ionoutc_t *ionoutc, const char *fnam // Date and time eph[ieph][sv].t = t; - // PRN - strncpy(tmp, str, 2); - tmp[2] = 0; - sv = atoi(tmp)-1; - // SV CLK eph[ieph][sv].toc = g;