Added comments to the time of ephemeris check statements
This commit is contained in:
parent
b80826d7e6
commit
e497ad30ac
6
gpssim.c
6
gpssim.c
@ -2009,6 +2009,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
// Deviation from original gpssim.c. This statement is checking that the current receiver local time is
|
||||
// within a longer time interval given by two hours before the minimum ephemeris time and two hours after the
|
||||
// maximum ephemeris time. In the original implementation, the check was that the current receiver local time
|
||||
// is within the miminum time of ephemeris and the maximum time of ephemeris
|
||||
if (fabs(subGpsTime(g0, gmin))>2*SECONDS_IN_HOUR && fabs(subGpsTime(gmax, g0))>2*SECONDS_IN_HOUR)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Invalid start time.\n");
|
||||
@ -2042,6 +2046,8 @@ int main(int argc, char *argv[])
|
||||
if (eph[i][sv].vflg == 1)
|
||||
{
|
||||
dt = subGpsTime(g0, eph[i][sv].toc);
|
||||
// Test that ephemeris can be used by comparing the receiver local time with the time of clock from ephemeris data and observing
|
||||
// the receiver local time is within a 4 hour interval from the time of clock from ephemeris
|
||||
if (dt>=-2*SECONDS_IN_HOUR && dt<2*SECONDS_IN_HOUR)
|
||||
{
|
||||
ieph = i;
|
||||
|
Loading…
Reference in New Issue
Block a user