Static mode dded by scateu@gmail.com
This commit is contained in:
parent
d7a65c2e69
commit
ea289235ce
@ -43,14 +43,14 @@ The bladeRF command line interface requires I/Q pairs stored as signed
|
|||||||
Usage: gps-sdr-sim [options]
|
Usage: gps-sdr-sim [options]
|
||||||
Options:
|
Options:
|
||||||
-e <gps_nav> RINEX navigation file for GPS ephemerides (required)
|
-e <gps_nav> RINEX navigation file for GPS ephemerides (required)
|
||||||
-u <user_motion> User motion file
|
-u <user_motion> User motion file (dynamic mode)
|
||||||
-l <location> Latitude,Longitude,Height (static mode) eg: 30.286502,120.032669,100
|
-l <location> Lat,Lon,Hgt (static mode) e.g. 30.286502,120.032669,100
|
||||||
-o <output> I/Q sampling data file (default: gpssim.bin)
|
-o <output> I/Q sampling data file (default: gpssim.bin)
|
||||||
-s <frequency> Sampling frequency [Hz] (default: 2600000)
|
-s <frequency> Sampling frequency [Hz] (default: 2600000)
|
||||||
-b <iq_bits> I/Q data format [8/16] (default: 8)
|
-b <iq_bits> 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
|
> gps-sdr-sim -e brdc3540.14n -u circle.csv -b 16
|
||||||
|
34
gpssim.c
34
gpssim.c
@ -1076,8 +1076,8 @@ void usage(void)
|
|||||||
printf("Usage: gps-sdr-sim [options]\n"
|
printf("Usage: gps-sdr-sim [options]\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -e <gps_nav> RINEX navigation file for GPS ephemerides (required)\n"
|
" -e <gps_nav> RINEX navigation file for GPS ephemerides (required)\n"
|
||||||
" -u <user_motion> User motion file \n"
|
" -u <user_motion> User motion file (dynamic mode)\n"
|
||||||
" -l <location> Latitude,Longitude,Height (static mode) eg: 30.286502,120.032669,100\n"
|
" -l <location> Lat,Lon,Hgt (static mode) e.g. 30.286502,120.032669,100\n"
|
||||||
" -o <output> I/Q sampling data file (default: gpssim.bin)\n"
|
" -o <output> I/Q sampling data file (default: gpssim.bin)\n"
|
||||||
" -s <frequency> Sampling frequency [Hz] (default: 2600000)\n"
|
" -s <frequency> Sampling frequency [Hz] (default: 2600000)\n"
|
||||||
" -b <iq_bits> I/Q data format [8/16] (default: 8)\n");
|
" -b <iq_bits> I/Q data format [8/16] (default: 8)\n");
|
||||||
@ -1172,8 +1172,8 @@ int main(int argc, char *argv[])
|
|||||||
strcpy(umfile, optarg);
|
strcpy(umfile, optarg);
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
// static llh coordinate input mode.
|
// Static geodetic coordinates input mode
|
||||||
// add by scateu@gmail.com
|
// Added by scateu@gmail.com
|
||||||
staticLocationMode = true;
|
staticLocationMode = true;
|
||||||
sscanf(optarg,"%lf,%lf,%lf",&llh[0],&llh[1],&llh[2]);
|
sscanf(optarg,"%lf,%lf,%lf",&llh[0],&llh[1],&llh[2]);
|
||||||
llh[0] = llh[0] / R2D; // convert to RAD
|
llh[0] = llh[0] / R2D; // convert to RAD
|
||||||
@ -1231,7 +1231,6 @@ int main(int argc, char *argv[])
|
|||||||
// Receiver position
|
// Receiver position
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
if (!staticLocationMode)
|
if (!staticLocationMode)
|
||||||
{
|
{
|
||||||
// Read user motion file
|
// Read user motion file
|
||||||
@ -1251,26 +1250,27 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Initial location in Geodetic coordinate system
|
// Initial location in Geodetic coordinate system
|
||||||
xyz2llh(xyz[0], llh);
|
xyz2llh(xyz[0], llh);
|
||||||
|
}
|
||||||
printf("xyz = %11.1f, %11.1f, %11.1f\n", xyz[0][0], xyz[0][1], xyz[0][2]);
|
else
|
||||||
printf("llh = %11.6f, %11.6f, %11.1f\n", llh[0]*R2D, llh[1]*R2D, llh[2]);
|
{
|
||||||
|
// Static geodetic coordinates input mode: "-l"
|
||||||
} else {
|
// Added by scateu@gmail.com
|
||||||
// static llh coordinate input mode. "-l"
|
|
||||||
// add by scateu@gmail.com
|
|
||||||
printf("Using static location mode.\n");
|
printf("Using static location mode.\n");
|
||||||
llh2xyz(llh,xyz[0]); // convert llh to xyz
|
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]);
|
|
||||||
|
|
||||||
numd = USER_MOTION_SIZE;
|
numd = USER_MOTION_SIZE;
|
||||||
for (int i=1;i<numd;i++) {
|
|
||||||
|
for (int i=1;i<numd;i++)
|
||||||
|
{
|
||||||
xyz[i][0] = xyz[0][0];
|
xyz[i][0] = xyz[0][0];
|
||||||
xyz[i][1] = xyz[0][1];
|
xyz[i][1] = xyz[0][1];
|
||||||
xyz[i][2] = xyz[0][2];
|
xyz[i][2] = xyz[0][2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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]);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Read ephemeris
|
// Read ephemeris
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
@ -1468,7 +1468,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
for (iumd=1; iumd<numd; iumd++)
|
for (iumd=1; iumd<numd; iumd++)
|
||||||
{
|
{
|
||||||
#pragma omp parallel for private(isamp)
|
//#pragma omp parallel for private(isamp) // !!!FIXME!!! The current code runs faster without OpenMP support
|
||||||
// Properties -> Configuration Properties -> C/C++ -> Language -> Open MP Support -> Yes (/openmp)
|
// Properties -> Configuration Properties -> C/C++ -> Language -> Open MP Support -> Yes (/openmp)
|
||||||
for (i=0; i<nsat; i++)
|
for (i=0; i<nsat; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user