gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] PPS from position hold / time-only modes


From: Håkan Johansson
Subject: Re: [gpsd-dev] PPS from position hold / time-only modes
Date: Mon, 14 Mar 2016 22:00:28 +0100
User-agent: Alpine 2.11 (DEB 23 2013-08-11)


Before going to the solution, I believe the two checks in
report_hook() in timehint.c inside the

/* FIXME! these two validations need to move back into ppsthread.c */

are duplicates of the (longer) check block in gpsd.c,

If they were duplicates then I would not have added the comment.

(Saving the comment in gpsd.c and also using
PPS_MIN_FIXES instead of 0 for the check.)

You can't just use PPS_MIN_FIXES, you need positive indication from the
GPS that the PPS is good, in this cycle.

I just meant that if the two fixcnt checks are duplicates, then one should use the stricter PPS_MIN_FIXES requirement.

I still think the fixcnt check is duplicated:

When

gpsd.c:1520:
    } else if ( 0 >= device->fixcnt ) {

fails, then

gpsd:1543:
                pps_thread_fixin(&ppsonly->pps_thread, &td);

will not be executed, and thus also not

ppsthreads.c:439:
    *last_fixtime = thread_context->fix_in;

making

ppsthreads.c:1021:
        if (last_fixtime.real.tv_sec == 0) {

fail and the fresh PPS sample is rejected, not making it beyond

ppsthreads.c:1036:
            continue;

If it would make it past that point, then it should be shipped to
ntpd/chrondy by:

ppsthreads.c:1105:
                log1 = thread_context->report_hook(thread_context, &ppstimes);

(i.e. report_hook of timehint.c:353:), but that has a check also:

timehint.c:377:
        if (session->fixcnt <= PPS_MIN_FIXES)

Which would be the duplicate check.

Maybe I missed something?

Best regards,
Håkan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]