diff --git a/README.md b/README.md index 8a44333..40b5947 100644 --- a/README.md +++ b/README.md @@ -43,14 +43,14 @@ The bladeRF command line interface requires I/Q pairs stored as signed Usage: gps-sdr-sim [options] Options: -e RINEX navigation file for GPS ephemerides (required) - -u User motion file - -l Latitude,Longitude,Height (static mode) eg: 30.286502,120.032669,100 + -u User motion file (dynamic mode) + -l Lat,Lon,Hgt (static mode) e.g. 30.286502,120.032669,100 -o I/Q sampling data file (default: gpssim.bin) -s Sampling frequency [Hz] (default: 2600000) -b I/Q data format [8/16] (default: 8) ``` -For example: +The user motion can be specified in either dynamic or static mode: ``` > gps-sdr-sim -e brdc3540.14n -u circle.csv -b 16 diff --git a/gpssim.c b/gpssim.c index c61ad1b..210e43e 100644 --- a/gpssim.c +++ b/gpssim.c @@ -1076,8 +1076,8 @@ void usage(void) printf("Usage: gps-sdr-sim [options]\n" "Options:\n" " -e RINEX navigation file for GPS ephemerides (required)\n" - " -u User motion file \n" - " -l Latitude,Longitude,Height (static mode) eg: 30.286502,120.032669,100\n" + " -u User motion file (dynamic mode)\n" + " -l Lat,Lon,Hgt (static mode) e.g. 30.286502,120.032669,100\n" " -o I/Q sampling data file (default: gpssim.bin)\n" " -s Sampling frequency [Hz] (default: 2600000)\n" " -b I/Q data format [8/16] (default: 8)\n"); @@ -1172,8 +1172,8 @@ int main(int argc, char *argv[]) strcpy(umfile, optarg); break; case 'l': - // static llh coordinate input mode. - // add by scateu@gmail.com + // Static geodetic coordinates input mode + // Added by scateu@gmail.com staticLocationMode = true; sscanf(optarg,"%lf,%lf,%lf",&llh[0],&llh[1],&llh[2]); llh[0] = llh[0] / R2D; // convert to RAD @@ -1231,7 +1231,6 @@ int main(int argc, char *argv[]) // Receiver position //////////////////////////////////////////////////////////// - if (!staticLocationMode) { // Read user motion file @@ -1251,26 +1250,27 @@ int main(int argc, char *argv[]) // Initial location in Geodetic coordinate system xyz2llh(xyz[0], llh); - - printf("xyz = %11.1f, %11.1f, %11.1f\n", xyz[0][0], xyz[0][1], xyz[0][2]); - printf("llh = %11.6f, %11.6f, %11.1f\n", llh[0]*R2D, llh[1]*R2D, llh[2]); - - } else { - // static llh coordinate input mode. "-l" - // add by scateu@gmail.com + } + else + { + // Static geodetic coordinates input mode: "-l" + // Added by scateu@gmail.com printf("Using static location mode.\n"); - llh2xyz(llh,xyz[0]); // convert llh to xyz - printf("xyz = %11.1f, %11.1f, %11.1f\n", xyz[0][0], xyz[0][1], xyz[0][2]); - printf("llh = %11.6f, %11.6f, %11.1f\n", llh[0]*R2D, llh[1]*R2D, llh[2]); + llh2xyz(llh,xyz[0]); // Convert llh to xyz numd = USER_MOTION_SIZE; - for (int i=1;i Configuration Properties -> C/C++ -> Language -> Open MP Support -> Yes (/openmp) for (i=0; i