From 5f79c934caf7cb9aaba39d6eef31059c3787acb0 Mon Sep 17 00:00:00 2001 From: OSQZSS Date: Sun, 28 Aug 2022 19:26:22 +0900 Subject: [PATCH] Fixed user initial position bugs --- gpssim.c | 11 +++++++++-- gpssim.h | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gpssim.c b/gpssim.c index 1248314..2587d22 100644 --- a/gpssim.c +++ b/gpssim.c @@ -1959,6 +1959,9 @@ int main(int argc, char *argv[]) // Set simulation duration if (numd>iduration) numd = iduration; + + // Set user initial position + xyz2llh(xyz[0], llh); } else { @@ -1966,12 +1969,16 @@ int main(int argc, char *argv[]) // Added by scateu@gmail.com fprintf(stderr, "Using static location mode.\n"); + // Set simulation duration numd = iduration; + + // Set user initial position + llh2xyz(llh, xyz[0]); } -/* + fprintf(stderr, "xyz = %11.1f, %11.1f, %11.1f\n", xyz[0][0], xyz[0][1], xyz[0][2]); fprintf(stderr, "llh = %11.6f, %11.6f, %11.1f\n", llh[0]*R2D, llh[1]*R2D, llh[2]); -*/ + //////////////////////////////////////////////////////////// // Read ephemeris //////////////////////////////////////////////////////////// diff --git a/gpssim.h b/gpssim.h index be86905..71a47dd 100644 --- a/gpssim.h +++ b/gpssim.h @@ -1,7 +1,7 @@ #ifndef GPSSIM_H #define GPSSIM_H -#define FLOAT_CARR_PHASE // For RKT simulation. Higher computational load, but smoother carrier phase. +//#define FLOAT_CARR_PHASE // For RKT simulation. Higher computational load, but smoother carrier phase. #define TRUE (1) #define FALSE (0)