Fixed user initial position bugs
This commit is contained in:
parent
783a885c21
commit
5f79c934ca
11
gpssim.c
11
gpssim.c
@ -1959,6 +1959,9 @@ int main(int argc, char *argv[])
|
|||||||
// Set simulation duration
|
// Set simulation duration
|
||||||
if (numd>iduration)
|
if (numd>iduration)
|
||||||
numd = iduration;
|
numd = iduration;
|
||||||
|
|
||||||
|
// Set user initial position
|
||||||
|
xyz2llh(xyz[0], llh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1966,12 +1969,16 @@ int main(int argc, char *argv[])
|
|||||||
// Added by scateu@gmail.com
|
// Added by scateu@gmail.com
|
||||||
fprintf(stderr, "Using static location mode.\n");
|
fprintf(stderr, "Using static location mode.\n");
|
||||||
|
|
||||||
|
// Set simulation duration
|
||||||
numd = iduration;
|
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, "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]);
|
fprintf(stderr, "llh = %11.6f, %11.6f, %11.1f\n", llh[0]*R2D, llh[1]*R2D, llh[2]);
|
||||||
*/
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
// Read ephemeris
|
// Read ephemeris
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
2
gpssim.h
2
gpssim.h
@ -1,7 +1,7 @@
|
|||||||
#ifndef GPSSIM_H
|
#ifndef GPSSIM_H
|
||||||
#define 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 TRUE (1)
|
||||||
#define FALSE (0)
|
#define FALSE (0)
|
||||||
|
Loading…
Reference in New Issue
Block a user